rookery-agent 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +467 -367
- package/docs/migration.md +88 -88
- package/docs/updates.md +112 -0
- package/package.json +11 -3
- package/packages/cli/dist/commands/config.js +2 -2
- package/packages/cli/dist/commands/doctor.d.ts.map +1 -1
- package/packages/cli/dist/commands/doctor.js +13 -9
- package/packages/cli/dist/commands/doctor.js.map +1 -1
- package/packages/cli/dist/commands/memory.js +1 -1
- package/packages/cli/dist/commands/org.d.ts +2 -2
- package/packages/cli/dist/commands/org.d.ts.map +1 -1
- package/packages/cli/dist/commands/org.js +19 -17
- package/packages/cli/dist/commands/org.js.map +1 -1
- package/packages/cli/dist/commands/serve.js +1 -1
- package/packages/cli/dist/commands/serve.js.map +1 -1
- package/packages/cli/dist/commands/shared.d.ts.map +1 -1
- package/packages/cli/dist/commands/shared.js +2 -1
- package/packages/cli/dist/commands/shared.js.map +1 -1
- package/packages/cli/dist/commands/tasks.d.ts.map +1 -1
- package/packages/cli/dist/commands/tasks.js +25 -11
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/tools.js +1 -1
- package/packages/cli/dist/commands/tools.js.map +1 -1
- package/packages/cli/dist/index.js +13 -13
- package/packages/cli/dist/index.js.map +1 -1
- package/packages/cli/dist/repl.d.ts +12 -0
- package/packages/cli/dist/repl.d.ts.map +1 -1
- package/packages/cli/dist/repl.js +170 -16
- package/packages/cli/dist/repl.js.map +1 -1
- package/packages/cli/dist/tui/App.d.ts +7 -3
- package/packages/cli/dist/tui/App.d.ts.map +1 -1
- package/packages/cli/dist/tui/App.js +182 -16
- package/packages/cli/dist/tui/App.js.map +1 -1
- package/packages/cli/dist/tui/commands.d.ts +7 -0
- package/packages/cli/dist/tui/commands.d.ts.map +1 -1
- package/packages/cli/dist/tui/commands.js +70 -8
- package/packages/cli/dist/tui/commands.js.map +1 -1
- package/packages/cli/dist/tui/components/AssignmentsView.js +4 -4
- package/packages/cli/dist/tui/components/AssignmentsView.js.map +1 -1
- package/packages/cli/dist/tui/components/Banner.d.ts +11 -2
- package/packages/cli/dist/tui/components/Banner.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/Banner.js +7 -10
- package/packages/cli/dist/tui/components/Banner.js.map +1 -1
- package/packages/cli/dist/tui/components/CodeBlock.js +2 -2
- package/packages/cli/dist/tui/components/CodeBlock.js.map +1 -1
- package/packages/cli/dist/tui/components/InputBox.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/InputBox.js +4 -4
- package/packages/cli/dist/tui/components/InputBox.js.map +1 -1
- package/packages/cli/dist/tui/components/Logo.d.ts +56 -0
- package/packages/cli/dist/tui/components/Logo.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/Logo.js +50 -0
- package/packages/cli/dist/tui/components/Logo.js.map +1 -0
- package/packages/cli/dist/tui/components/Markdown.js +8 -8
- package/packages/cli/dist/tui/components/Markdown.js.map +1 -1
- package/packages/cli/dist/tui/components/Message.d.ts +1 -1
- package/packages/cli/dist/tui/components/Message.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/Message.js +5 -4
- package/packages/cli/dist/tui/components/Message.js.map +1 -1
- package/packages/cli/dist/tui/components/QuestionView.d.ts +29 -0
- package/packages/cli/dist/tui/components/QuestionView.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/QuestionView.js +53 -0
- package/packages/cli/dist/tui/components/QuestionView.js.map +1 -0
- package/packages/cli/dist/tui/components/SlashPalette.d.ts +5 -2
- package/packages/cli/dist/tui/components/SlashPalette.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/SlashPalette.js +2 -2
- package/packages/cli/dist/tui/components/SlashPalette.js.map +1 -1
- package/packages/cli/dist/tui/components/StatusLine.d.ts +0 -2
- package/packages/cli/dist/tui/components/StatusLine.d.ts.map +1 -1
- package/packages/cli/dist/tui/components/StatusLine.js +8 -5
- package/packages/cli/dist/tui/components/StatusLine.js.map +1 -1
- package/packages/cli/dist/tui/components/ToolGroup.js +2 -2
- package/packages/cli/dist/tui/components/ToolGroup.js.map +1 -1
- package/packages/cli/dist/tui/components/WatchView.d.ts +21 -0
- package/packages/cli/dist/tui/components/WatchView.d.ts.map +1 -0
- package/packages/cli/dist/tui/components/WatchView.js +36 -0
- package/packages/cli/dist/tui/components/WatchView.js.map +1 -0
- package/packages/cli/dist/tui/history.d.ts +20 -0
- package/packages/cli/dist/tui/history.d.ts.map +1 -0
- package/packages/cli/dist/tui/history.js +105 -0
- package/packages/cli/dist/tui/history.js.map +1 -0
- package/packages/cli/dist/tui/hooks/useSlash.d.ts.map +1 -1
- package/packages/cli/dist/tui/hooks/useSlash.js +3 -2
- package/packages/cli/dist/tui/hooks/useSlash.js.map +1 -1
- package/packages/cli/dist/tui/hooks/useTurn.d.ts +58 -1
- package/packages/cli/dist/tui/hooks/useTurn.d.ts.map +1 -1
- package/packages/cli/dist/tui/hooks/useTurn.js +214 -36
- package/packages/cli/dist/tui/hooks/useTurn.js.map +1 -1
- package/packages/cli/dist/tui/hooks/useWatch.d.ts +52 -0
- package/packages/cli/dist/tui/hooks/useWatch.d.ts.map +1 -0
- package/packages/cli/dist/tui/hooks/useWatch.js +145 -0
- package/packages/cli/dist/tui/hooks/useWatch.js.map +1 -0
- package/packages/cli/dist/tui/inkTheme.d.ts +19 -0
- package/packages/cli/dist/tui/inkTheme.d.ts.map +1 -0
- package/packages/cli/dist/tui/inkTheme.js +81 -0
- package/packages/cli/dist/tui/inkTheme.js.map +1 -0
- package/packages/cli/dist/tui/theme.d.ts +39 -29
- package/packages/cli/dist/tui/theme.d.ts.map +1 -1
- package/packages/cli/dist/tui/theme.js +35 -25
- package/packages/cli/dist/tui/theme.js.map +1 -1
- package/packages/cli/dist/tui/types.d.ts +56 -3
- package/packages/cli/dist/tui/types.d.ts.map +1 -1
- package/packages/cli/dist/tui/types.js +85 -0
- package/packages/cli/dist/tui/types.js.map +1 -1
- package/packages/cli/dist/ui/modelNames.d.ts +51 -0
- package/packages/cli/dist/ui/modelNames.d.ts.map +1 -0
- package/packages/cli/dist/ui/modelNames.js +134 -0
- package/packages/cli/dist/ui/modelNames.js.map +1 -0
- package/packages/cli/dist/ui/render.d.ts.map +1 -1
- package/packages/cli/dist/ui/render.js +17 -8
- package/packages/cli/dist/ui/render.js.map +1 -1
- package/packages/cli/dist/ui/speech.js +5 -0
- package/packages/cli/dist/ui/speech.js.map +1 -1
- package/packages/cli/dist/ui/theme.d.ts +33 -9
- package/packages/cli/dist/ui/theme.d.ts.map +1 -1
- package/packages/cli/dist/ui/theme.js +33 -9
- package/packages/cli/dist/ui/theme.js.map +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/dist/agents/persona.d.ts.map +1 -1
- package/packages/core/dist/agents/persona.js +4 -1
- package/packages/core/dist/agents/persona.js.map +1 -1
- package/packages/core/dist/computer/accessibility.d.ts +78 -0
- package/packages/core/dist/computer/accessibility.d.ts.map +1 -0
- package/packages/core/dist/computer/accessibility.js +270 -0
- package/packages/core/dist/computer/accessibility.js.map +1 -0
- package/packages/core/dist/computer/assemblies.d.ts +17 -0
- package/packages/core/dist/computer/assemblies.d.ts.map +1 -0
- package/packages/core/dist/computer/assemblies.js +55 -0
- package/packages/core/dist/computer/assemblies.js.map +1 -0
- package/packages/core/dist/computer/browser-init.d.ts +9 -0
- package/packages/core/dist/computer/browser-init.d.ts.map +1 -0
- package/packages/core/dist/computer/browser-init.js +133 -0
- package/packages/core/dist/computer/browser-init.js.map +1 -0
- package/packages/core/dist/computer/cursor.d.ts +30 -0
- package/packages/core/dist/computer/cursor.d.ts.map +1 -0
- package/packages/core/dist/computer/cursor.js +30 -0
- package/packages/core/dist/computer/cursor.js.map +1 -0
- package/packages/core/dist/computer/mcp-server.js +524 -82
- package/packages/core/dist/computer/mcp-server.js.map +1 -1
- package/packages/core/dist/computer/powershell.d.ts +4 -0
- package/packages/core/dist/computer/powershell.d.ts.map +1 -1
- package/packages/core/dist/computer/powershell.js +471 -81
- package/packages/core/dist/computer/powershell.js.map +1 -1
- package/packages/core/dist/computer/screen-text.d.ts +82 -0
- package/packages/core/dist/computer/screen-text.d.ts.map +1 -0
- package/packages/core/dist/computer/screen-text.js +243 -0
- package/packages/core/dist/computer/screen-text.js.map +1 -0
- package/packages/core/dist/computer/sketch.d.ts +66 -0
- package/packages/core/dist/computer/sketch.d.ts.map +1 -0
- package/packages/core/dist/computer/sketch.js +540 -0
- package/packages/core/dist/computer/sketch.js.map +1 -0
- package/packages/core/dist/computer/tools.d.ts +8 -8
- package/packages/core/dist/computer/tools.d.ts.map +1 -1
- package/packages/core/dist/computer/tools.js +186 -31
- package/packages/core/dist/computer/tools.js.map +1 -1
- package/packages/core/dist/computer/validation.d.ts +555 -0
- package/packages/core/dist/computer/validation.d.ts.map +1 -0
- package/packages/core/dist/computer/validation.js +111 -0
- package/packages/core/dist/computer/validation.js.map +1 -0
- package/packages/core/dist/computer/windows-cursor.d.ts +14 -0
- package/packages/core/dist/computer/windows-cursor.d.ts.map +1 -0
- package/packages/core/dist/computer/windows-cursor.js +713 -0
- package/packages/core/dist/computer/windows-cursor.js.map +1 -0
- package/packages/core/dist/config.d.ts.map +1 -1
- package/packages/core/dist/config.js +284 -10
- package/packages/core/dist/config.js.map +1 -1
- package/packages/core/dist/cron/scheduler.d.ts +49 -3
- package/packages/core/dist/cron/scheduler.d.ts.map +1 -1
- package/packages/core/dist/cron/scheduler.js +268 -25
- package/packages/core/dist/cron/scheduler.js.map +1 -1
- package/packages/core/dist/cron/store.d.ts +19 -1
- package/packages/core/dist/cron/store.d.ts.map +1 -1
- package/packages/core/dist/cron/store.js +36 -8
- package/packages/core/dist/cron/store.js.map +1 -1
- package/packages/core/dist/external/claude-code.d.ts +4 -0
- package/packages/core/dist/external/claude-code.d.ts.map +1 -0
- package/packages/core/dist/external/claude-code.js +111 -0
- package/packages/core/dist/external/claude-code.js.map +1 -0
- package/packages/core/dist/external/discovery.d.ts +33 -0
- package/packages/core/dist/external/discovery.d.ts.map +1 -0
- package/packages/core/dist/external/discovery.js +144 -0
- package/packages/core/dist/external/discovery.js.map +1 -0
- package/packages/core/dist/external/homes.d.ts +26 -0
- package/packages/core/dist/external/homes.d.ts.map +1 -0
- package/packages/core/dist/external/homes.js +49 -0
- package/packages/core/dist/external/homes.js.map +1 -0
- package/packages/core/dist/external/shared.d.ts +201 -0
- package/packages/core/dist/external/shared.d.ts.map +1 -0
- package/packages/core/dist/external/shared.js +308 -0
- package/packages/core/dist/external/shared.js.map +1 -0
- package/packages/core/dist/gateway/policy.d.ts +100 -2
- package/packages/core/dist/gateway/policy.d.ts.map +1 -1
- package/packages/core/dist/gateway/policy.js +270 -6
- package/packages/core/dist/gateway/policy.js.map +1 -1
- package/packages/core/dist/index.d.ts +36 -10
- package/packages/core/dist/index.d.ts.map +1 -1
- package/packages/core/dist/index.js +64 -10
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/memory/db.d.ts +1 -1
- package/packages/core/dist/memory/db.d.ts.map +1 -1
- package/packages/core/dist/memory/db.js +741 -1
- package/packages/core/dist/memory/db.js.map +1 -1
- package/packages/core/dist/memory/dream/admission.d.ts +124 -0
- package/packages/core/dist/memory/dream/admission.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/admission.js +116 -0
- package/packages/core/dist/memory/dream/admission.js.map +1 -0
- package/packages/core/dist/memory/dream/candidate.d.ts +152 -0
- package/packages/core/dist/memory/dream/candidate.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/candidate.js +547 -0
- package/packages/core/dist/memory/dream/candidate.js.map +1 -0
- package/packages/core/dist/memory/dream/evaluate.d.ts +394 -0
- package/packages/core/dist/memory/dream/evaluate.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/evaluate.js +1032 -0
- package/packages/core/dist/memory/dream/evaluate.js.map +1 -0
- package/packages/core/dist/memory/dream/frame.d.ts +61 -0
- package/packages/core/dist/memory/dream/frame.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/frame.js +292 -0
- package/packages/core/dist/memory/dream/frame.js.map +1 -0
- package/packages/core/dist/memory/dream/label.d.ts +370 -0
- package/packages/core/dist/memory/dream/label.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/label.js +439 -0
- package/packages/core/dist/memory/dream/label.js.map +1 -0
- package/packages/core/dist/memory/dream/measure.d.ts +114 -0
- package/packages/core/dist/memory/dream/measure.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/measure.js +205 -0
- package/packages/core/dist/memory/dream/measure.js.map +1 -0
- package/packages/core/dist/memory/dream/policy.d.ts +21 -0
- package/packages/core/dist/memory/dream/policy.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/policy.js +157 -0
- package/packages/core/dist/memory/dream/policy.js.map +1 -0
- package/packages/core/dist/memory/dream/probe.d.ts +202 -0
- package/packages/core/dist/memory/dream/probe.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/probe.js +671 -0
- package/packages/core/dist/memory/dream/probe.js.map +1 -0
- package/packages/core/dist/memory/dream/promote.d.ts +312 -0
- package/packages/core/dist/memory/dream/promote.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/promote.js +528 -0
- package/packages/core/dist/memory/dream/promote.js.map +1 -0
- package/packages/core/dist/memory/dream/score.d.ts +103 -0
- package/packages/core/dist/memory/dream/score.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/score.js +334 -0
- package/packages/core/dist/memory/dream/score.js.map +1 -0
- package/packages/core/dist/memory/dream/slots.d.ts +193 -0
- package/packages/core/dist/memory/dream/slots.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/slots.js +0 -0
- package/packages/core/dist/memory/dream/slots.js.map +1 -0
- package/packages/core/dist/memory/dream/trajectory.d.ts +262 -0
- package/packages/core/dist/memory/dream/trajectory.d.ts.map +1 -0
- package/packages/core/dist/memory/dream/trajectory.js +366 -0
- package/packages/core/dist/memory/dream/trajectory.js.map +1 -0
- package/packages/core/dist/memory/extractor.d.ts +7 -0
- package/packages/core/dist/memory/extractor.d.ts.map +1 -1
- package/packages/core/dist/memory/extractor.js +35 -12
- package/packages/core/dist/memory/extractor.js.map +1 -1
- package/packages/core/dist/memory/gate.d.ts +43 -7
- package/packages/core/dist/memory/gate.d.ts.map +1 -1
- package/packages/core/dist/memory/gate.js +91 -4
- package/packages/core/dist/memory/gate.js.map +1 -1
- package/packages/core/dist/memory/recall.d.ts +57 -0
- package/packages/core/dist/memory/recall.d.ts.map +1 -1
- package/packages/core/dist/memory/recall.js +60 -123
- package/packages/core/dist/memory/recall.js.map +1 -1
- package/packages/core/dist/memory/sleep.d.ts +131 -4
- package/packages/core/dist/memory/sleep.d.ts.map +1 -1
- package/packages/core/dist/memory/sleep.js +2384 -65
- package/packages/core/dist/memory/sleep.js.map +1 -1
- package/packages/core/dist/memory/store.d.ts +564 -10
- package/packages/core/dist/memory/store.d.ts.map +1 -1
- package/packages/core/dist/memory/store.js +1673 -102
- package/packages/core/dist/memory/store.js.map +1 -1
- package/packages/core/dist/org/controller.d.ts +282 -3
- package/packages/core/dist/org/controller.d.ts.map +1 -1
- package/packages/core/dist/org/controller.js +2334 -237
- package/packages/core/dist/org/controller.js.map +1 -1
- package/packages/core/dist/org/ponytail.d.ts +1 -1
- package/packages/core/dist/org/ponytail.js +1 -1
- package/packages/core/dist/org/project-mcp.d.ts +3 -3
- package/packages/core/dist/org/prompts.d.ts +41 -28
- package/packages/core/dist/org/prompts.d.ts.map +1 -1
- package/packages/core/dist/org/prompts.js +281 -94
- package/packages/core/dist/org/prompts.js.map +1 -1
- package/packages/core/dist/org/questions.d.ts +104 -0
- package/packages/core/dist/org/questions.d.ts.map +1 -0
- package/packages/core/dist/org/questions.js +136 -0
- package/packages/core/dist/org/questions.js.map +1 -0
- package/packages/core/dist/org/review.d.ts +100 -0
- package/packages/core/dist/org/review.d.ts.map +1 -0
- package/packages/core/dist/org/review.js +256 -0
- package/packages/core/dist/org/review.js.map +1 -0
- package/packages/core/dist/org/store.d.ts +249 -2
- package/packages/core/dist/org/store.d.ts.map +1 -1
- package/packages/core/dist/org/store.js +787 -13
- package/packages/core/dist/org/store.js.map +1 -1
- package/packages/core/dist/org/tools.d.ts +26 -2
- package/packages/core/dist/org/tools.d.ts.map +1 -1
- package/packages/core/dist/org/tools.js +352 -63
- package/packages/core/dist/org/tools.js.map +1 -1
- package/packages/core/dist/providers/catalogue.d.ts +1 -1
- package/packages/core/dist/providers/catalogue.d.ts.map +1 -1
- package/packages/core/dist/providers/catalogue.js +2 -2
- package/packages/core/dist/providers/catalogue.js.map +1 -1
- package/packages/core/dist/providers/claude-code.d.ts +18 -3
- package/packages/core/dist/providers/claude-code.d.ts.map +1 -1
- package/packages/core/dist/providers/claude-code.js +490 -40
- package/packages/core/dist/providers/claude-code.js.map +1 -1
- package/packages/core/dist/providers/claude-tui.d.ts +175 -0
- package/packages/core/dist/providers/claude-tui.d.ts.map +1 -0
- package/packages/core/dist/providers/claude-tui.js +683 -0
- package/packages/core/dist/providers/claude-tui.js.map +1 -0
- package/packages/core/dist/providers/codex-auth.d.ts +15 -0
- package/packages/core/dist/providers/codex-auth.d.ts.map +1 -0
- package/packages/core/dist/providers/codex-auth.js +127 -0
- package/packages/core/dist/providers/codex-auth.js.map +1 -0
- package/packages/core/dist/providers/codex-bridge.d.ts +58 -0
- package/packages/core/dist/providers/codex-bridge.d.ts.map +1 -0
- package/packages/core/dist/providers/codex-bridge.js +375 -0
- package/packages/core/dist/providers/codex-bridge.js.map +1 -0
- package/packages/core/dist/providers/codex-translate.d.ts +75 -0
- package/packages/core/dist/providers/codex-translate.d.ts.map +1 -0
- package/packages/core/dist/providers/codex-translate.js +383 -0
- package/packages/core/dist/providers/codex-translate.js.map +1 -0
- package/packages/core/dist/providers/model-gateway.d.ts +56 -0
- package/packages/core/dist/providers/model-gateway.d.ts.map +1 -0
- package/packages/core/dist/providers/model-gateway.js +119 -0
- package/packages/core/dist/providers/model-gateway.js.map +1 -0
- package/packages/core/dist/providers/process.d.ts +3 -1
- package/packages/core/dist/providers/process.d.ts.map +1 -1
- package/packages/core/dist/providers/process.js +3 -3
- package/packages/core/dist/providers/process.js.map +1 -1
- package/packages/core/dist/providers/profiles.d.ts +11 -0
- package/packages/core/dist/providers/profiles.d.ts.map +1 -0
- package/packages/core/dist/providers/profiles.js +28 -0
- package/packages/core/dist/providers/profiles.js.map +1 -0
- package/packages/core/dist/providers/provider-catalog.d.ts +72 -0
- package/packages/core/dist/providers/provider-catalog.d.ts.map +1 -0
- package/packages/core/dist/providers/provider-catalog.js +144 -0
- package/packages/core/dist/providers/provider-catalog.js.map +1 -0
- package/packages/core/dist/providers/quota.d.ts +40 -1
- package/packages/core/dist/providers/quota.d.ts.map +1 -1
- package/packages/core/dist/providers/quota.js +288 -25
- package/packages/core/dist/providers/quota.js.map +1 -1
- package/packages/core/dist/providers/registry.d.ts +46 -3
- package/packages/core/dist/providers/registry.d.ts.map +1 -1
- package/packages/core/dist/providers/registry.js +148 -13
- package/packages/core/dist/providers/registry.js.map +1 -1
- package/packages/core/dist/providers/router.d.ts +28 -0
- package/packages/core/dist/providers/router.d.ts.map +1 -0
- package/packages/core/dist/providers/router.js +88 -0
- package/packages/core/dist/providers/router.js.map +1 -0
- package/packages/core/dist/providers/user-settings-guard.d.ts +12 -0
- package/packages/core/dist/providers/user-settings-guard.d.ts.map +1 -0
- package/packages/core/dist/providers/user-settings-guard.js +130 -0
- package/packages/core/dist/providers/user-settings-guard.js.map +1 -0
- package/packages/core/dist/runtime.d.ts +140 -6
- package/packages/core/dist/runtime.d.ts.map +1 -1
- package/packages/core/dist/runtime.js +1312 -225
- package/packages/core/dist/runtime.js.map +1 -1
- package/packages/core/dist/skills/builtin.d.ts +34 -0
- package/packages/core/dist/skills/builtin.d.ts.map +1 -0
- package/packages/core/dist/skills/builtin.js +305 -0
- package/packages/core/dist/skills/builtin.js.map +1 -0
- package/packages/core/dist/skills/shelf.d.ts +30 -0
- package/packages/core/dist/skills/shelf.d.ts.map +1 -0
- package/packages/core/dist/skills/shelf.js +159 -0
- package/packages/core/dist/skills/shelf.js.map +1 -0
- package/packages/core/dist/skills/store.d.ts +66 -4
- package/packages/core/dist/skills/store.d.ts.map +1 -1
- package/packages/core/dist/skills/store.js +105 -18
- package/packages/core/dist/skills/store.js.map +1 -1
- package/packages/core/dist/skills/suggest.d.ts +21 -0
- package/packages/core/dist/skills/suggest.d.ts.map +1 -0
- package/packages/core/dist/skills/suggest.js +150 -0
- package/packages/core/dist/skills/suggest.js.map +1 -0
- package/packages/core/dist/tools/catalog.d.ts +1 -3
- package/packages/core/dist/tools/catalog.d.ts.map +1 -1
- package/packages/core/dist/tools/catalog.js +38 -26
- package/packages/core/dist/tools/catalog.js.map +1 -1
- package/packages/core/dist/tools/hub.d.ts +136 -10
- package/packages/core/dist/tools/hub.d.ts.map +1 -1
- package/packages/core/dist/tools/hub.js +418 -24
- package/packages/core/dist/tools/hub.js.map +1 -1
- package/packages/core/dist/turns/journal.d.ts +78 -0
- package/packages/core/dist/turns/journal.d.ts.map +1 -0
- package/packages/core/dist/turns/journal.js +104 -0
- package/packages/core/dist/turns/journal.js.map +1 -0
- package/packages/core/dist/types.d.ts +1598 -12
- package/packages/core/dist/types.d.ts.map +1 -1
- package/packages/core/dist/types.js.map +1 -1
- package/packages/core/dist/util/blocks.d.ts +41 -0
- package/packages/core/dist/util/blocks.d.ts.map +1 -0
- package/packages/core/dist/util/blocks.js +175 -0
- package/packages/core/dist/util/blocks.js.map +1 -0
- package/packages/core/dist/util/queue.d.ts +12 -0
- package/packages/core/dist/util/queue.d.ts.map +1 -1
- package/packages/core/dist/util/queue.js +16 -0
- package/packages/core/dist/util/queue.js.map +1 -1
- package/packages/core/dist/util/time.d.ts +39 -0
- package/packages/core/dist/util/time.d.ts.map +1 -0
- package/packages/core/dist/util/time.js +71 -0
- package/packages/core/dist/util/time.js.map +1 -0
- package/packages/core/package.json +1 -1
- package/packages/server/dist/auth.d.ts +14 -1
- package/packages/server/dist/auth.d.ts.map +1 -1
- package/packages/server/dist/auth.js +19 -0
- package/packages/server/dist/auth.js.map +1 -1
- package/packages/server/dist/context.d.ts +35 -1
- package/packages/server/dist/context.d.ts.map +1 -1
- package/packages/server/dist/context.js +28 -8
- package/packages/server/dist/context.js.map +1 -1
- package/packages/server/dist/gateways/attachments.d.ts +32 -0
- package/packages/server/dist/gateways/attachments.d.ts.map +1 -0
- package/packages/server/dist/gateways/attachments.js +167 -0
- package/packages/server/dist/gateways/attachments.js.map +1 -0
- package/packages/server/dist/gateways/markdown.d.ts +9 -0
- package/packages/server/dist/gateways/markdown.d.ts.map +1 -0
- package/packages/server/dist/gateways/markdown.js +170 -0
- package/packages/server/dist/gateways/markdown.js.map +1 -0
- package/packages/server/dist/gateways/push.d.ts +1 -1
- package/packages/server/dist/gateways/push.d.ts.map +1 -1
- package/packages/server/dist/gateways/push.js +347 -6
- package/packages/server/dist/gateways/push.js.map +1 -1
- package/packages/server/dist/gateways/telegram-api.d.ts +70 -1
- package/packages/server/dist/gateways/telegram-api.d.ts.map +1 -1
- package/packages/server/dist/gateways/telegram-api.js +140 -1
- package/packages/server/dist/gateways/telegram-api.js.map +1 -1
- package/packages/server/dist/gateways/telegram.d.ts +158 -1
- package/packages/server/dist/gateways/telegram.d.ts.map +1 -1
- package/packages/server/dist/gateways/telegram.js +1471 -78
- package/packages/server/dist/gateways/telegram.js.map +1 -1
- package/packages/server/dist/gateways/threads.d.ts +79 -0
- package/packages/server/dist/gateways/threads.d.ts.map +1 -0
- package/packages/server/dist/gateways/threads.js +279 -0
- package/packages/server/dist/gateways/threads.js.map +1 -0
- package/packages/server/dist/index.d.ts +2 -1
- package/packages/server/dist/index.d.ts.map +1 -1
- package/packages/server/dist/index.js +2 -1
- package/packages/server/dist/index.js.map +1 -1
- package/packages/server/dist/listeners/imap.d.ts +13 -0
- package/packages/server/dist/listeners/imap.d.ts.map +1 -0
- package/packages/server/dist/listeners/imap.js +0 -0
- package/packages/server/dist/listeners/imap.js.map +1 -0
- package/packages/server/dist/listeners/registry.d.ts +18 -0
- package/packages/server/dist/listeners/registry.d.ts.map +1 -0
- package/packages/server/dist/listeners/registry.js +88 -0
- package/packages/server/dist/listeners/registry.js.map +1 -0
- package/packages/server/dist/listeners/types.d.ts +55 -0
- package/packages/server/dist/listeners/types.d.ts.map +1 -0
- package/packages/server/dist/listeners/types.js +2 -0
- package/packages/server/dist/listeners/types.js.map +1 -0
- package/packages/server/dist/main.js +15 -1
- package/packages/server/dist/main.js.map +1 -1
- package/packages/server/dist/routes/chat.d.ts +7 -3
- package/packages/server/dist/routes/chat.d.ts.map +1 -1
- package/packages/server/dist/routes/chat.js +8 -17
- package/packages/server/dist/routes/chat.js.map +1 -1
- package/packages/server/dist/routes/config.d.ts.map +1 -1
- package/packages/server/dist/routes/config.js +39 -7
- package/packages/server/dist/routes/config.js.map +1 -1
- package/packages/server/dist/routes/cron.d.ts.map +1 -1
- package/packages/server/dist/routes/cron.js +65 -8
- package/packages/server/dist/routes/cron.js.map +1 -1
- package/packages/server/dist/routes/dream.d.ts +22 -0
- package/packages/server/dist/routes/dream.d.ts.map +1 -0
- package/packages/server/dist/routes/dream.js +152 -0
- package/packages/server/dist/routes/dream.js.map +1 -0
- package/packages/server/dist/routes/hooks.d.ts +18 -0
- package/packages/server/dist/routes/hooks.d.ts.map +1 -0
- package/packages/server/dist/routes/hooks.js +62 -0
- package/packages/server/dist/routes/hooks.js.map +1 -0
- package/packages/server/dist/routes/listeners.d.ts +10 -0
- package/packages/server/dist/routes/listeners.d.ts.map +1 -0
- package/packages/server/dist/routes/listeners.js +12 -0
- package/packages/server/dist/routes/listeners.js.map +1 -0
- package/packages/server/dist/routes/memories.d.ts.map +1 -1
- package/packages/server/dist/routes/memories.js +55 -3
- package/packages/server/dist/routes/memories.js.map +1 -1
- package/packages/server/dist/routes/org.d.ts.map +1 -1
- package/packages/server/dist/routes/org.js +284 -48
- package/packages/server/dist/routes/org.js.map +1 -1
- package/packages/server/dist/routes/profile.d.ts.map +1 -1
- package/packages/server/dist/routes/profile.js +6 -3
- package/packages/server/dist/routes/profile.js.map +1 -1
- package/packages/server/dist/routes/providers.d.ts.map +1 -1
- package/packages/server/dist/routes/providers.js +66 -7
- package/packages/server/dist/routes/providers.js.map +1 -1
- package/packages/server/dist/routes/questions.d.ts +45 -0
- package/packages/server/dist/routes/questions.d.ts.map +1 -0
- package/packages/server/dist/routes/questions.js +73 -0
- package/packages/server/dist/routes/questions.js.map +1 -0
- package/packages/server/dist/routes/sessions.d.ts.map +1 -1
- package/packages/server/dist/routes/sessions.js +26 -6
- package/packages/server/dist/routes/sessions.js.map +1 -1
- package/packages/server/dist/routes/sleep.d.ts.map +1 -1
- package/packages/server/dist/routes/sleep.js +71 -2
- package/packages/server/dist/routes/sleep.js.map +1 -1
- package/packages/server/dist/routes/terminals.d.ts +25 -0
- package/packages/server/dist/routes/terminals.d.ts.map +1 -0
- package/packages/server/dist/routes/terminals.js +35 -0
- package/packages/server/dist/routes/terminals.js.map +1 -0
- package/packages/server/dist/routes/tools.d.ts.map +1 -1
- package/packages/server/dist/routes/tools.js +140 -6
- package/packages/server/dist/routes/tools.js.map +1 -1
- package/packages/server/dist/routes/updates.d.ts +10 -0
- package/packages/server/dist/routes/updates.d.ts.map +1 -0
- package/packages/server/dist/routes/updates.js +22 -0
- package/packages/server/dist/routes/updates.js.map +1 -0
- package/packages/server/dist/routes/ws.d.ts +11 -5
- package/packages/server/dist/routes/ws.d.ts.map +1 -1
- package/packages/server/dist/routes/ws.js +162 -28
- package/packages/server/dist/routes/ws.js.map +1 -1
- package/packages/server/dist/schemas.d.ts +1125 -211
- package/packages/server/dist/schemas.d.ts.map +1 -1
- package/packages/server/dist/schemas.js +300 -12
- package/packages/server/dist/schemas.js.map +1 -1
- package/packages/server/dist/server.d.ts +7 -1
- package/packages/server/dist/server.d.ts.map +1 -1
- package/packages/server/dist/server.js +186 -3
- package/packages/server/dist/server.js.map +1 -1
- package/packages/server/dist/services/stream.d.ts +89 -5
- package/packages/server/dist/services/stream.d.ts.map +1 -1
- package/packages/server/dist/services/stream.js +9 -20
- package/packages/server/dist/services/stream.js.map +1 -1
- package/packages/server/dist/services/stt.d.ts +65 -0
- package/packages/server/dist/services/stt.d.ts.map +1 -0
- package/packages/server/dist/services/stt.js +306 -0
- package/packages/server/dist/services/stt.js.map +1 -0
- package/packages/server/dist/services/turns.d.ts +49 -0
- package/packages/server/dist/services/turns.d.ts.map +1 -0
- package/packages/server/dist/services/turns.js +138 -0
- package/packages/server/dist/services/turns.js.map +1 -0
- package/packages/server/dist/services/updates.d.ts +99 -0
- package/packages/server/dist/services/updates.d.ts.map +1 -0
- package/packages/server/dist/services/updates.js +316 -0
- package/packages/server/dist/services/updates.js.map +1 -0
- package/packages/server/package.json +1 -1
- package/packages/web/dist/app-icon.svg +2 -0
- package/packages/web/dist/apple-touch-icon.png +0 -0
- package/packages/web/dist/assets/abnfDiagram-O67JEVCF-B4qWcqra.js +1 -0
- package/packages/web/dist/assets/arc-CQult7TN.js +1 -0
- package/packages/web/dist/assets/architectureDiagram-NJMV4G6O-DFTRvl66.js +36 -0
- package/packages/web/dist/assets/blockDiagram-BEXU5L5S-TCFoK_k-.js +140 -0
- package/packages/web/dist/assets/c4Diagram-YGBWAQC7-i5_GqhJa.js +38 -0
- package/packages/web/dist/assets/channel-D_4EmqNR.js +1 -0
- package/packages/web/dist/assets/chunk-2Q5K7J3B-BK6I2wfW.js +1 -0
- package/packages/web/dist/assets/chunk-3FUC2YCW-Dw-TfKT0.js +2 -0
- package/packages/web/dist/assets/chunk-5VM5RSS4-AE_XRNTT.js +15 -0
- package/packages/web/dist/assets/chunk-GTNCS2PH-DO18WaaJ.js +88 -0
- package/packages/web/dist/assets/chunk-GWA4HPMP-3rdjszP_.js +1 -0
- package/packages/web/dist/assets/chunk-JWPE2WC7-C93LH2D0.js +1 -0
- package/packages/web/dist/assets/chunk-NETBCI7D-Dj7O3-H-.js +1 -0
- package/packages/web/dist/assets/chunk-WEXAMYUT-BRFvQUIn.js +1 -0
- package/packages/web/dist/assets/chunk-XXDRQBXY-CXx6HMbz.js +1 -0
- package/packages/web/dist/assets/classDiagram-v2-NBCMYWYE-BGXszxjn.js +217 -0
- package/packages/web/dist/assets/cose-bilkent-JH36ORCC-BAuXqkne.js +1 -0
- package/packages/web/dist/assets/cynefin-OW5HDTMX-plNzhY7J.js +178 -0
- package/packages/web/dist/assets/cynefinDiagram-VND7K2PF-DuPlljFS.js +62 -0
- package/packages/web/dist/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
- package/packages/web/dist/assets/dagre-6A5THRUB-CXzwdR-6.js +4 -0
- package/packages/web/dist/assets/diagram-22UHCM2B-B7iv_V2D.js +200 -0
- package/packages/web/dist/assets/diagram-3UASUU5V-BMvi7gSi.js +24 -0
- package/packages/web/dist/assets/diagram-ATOU4E4O-NJ7EB5Qg.js +3 -0
- package/packages/web/dist/assets/diagram-CDSNMT55-DccMMNJ-.js +30 -0
- package/packages/web/dist/assets/diagram-MLGK6HIB-BbwGHK4g.js +24 -0
- package/packages/web/dist/assets/diagram-MPIPVDR6-BbSSZfM3.js +41 -0
- package/packages/web/dist/assets/draco_decoder-C32yEggz.wasm +0 -0
- package/packages/web/dist/assets/draco_decoder-Z1_iN-Ht.wasm +0 -0
- package/packages/web/dist/assets/draco_decoder-fzg4nYZr.js +34 -0
- package/packages/web/dist/assets/draco_wasm_wrapper-DxJM36Ib.js +117 -0
- package/packages/web/dist/assets/draco_wasm_wrapper-fZCQGLGb.js +116 -0
- package/packages/web/dist/assets/ebnfDiagram-ZINNZB2B-BBfPNM85.js +1 -0
- package/packages/web/dist/assets/elk-276RUBZZ-dM3Y1d2a.js +27 -0
- package/packages/web/dist/assets/erDiagram-OPXOYQCR-iWrUegxy.js +99 -0
- package/packages/web/dist/assets/flowDiagram-KWPJA3E3-B6DYlbkV.js +213 -0
- package/packages/web/dist/assets/ganttDiagram-FUAMR5RP-D7dSWZcC.js +292 -0
- package/packages/web/dist/assets/gitGraphDiagram-X574FWY7-DguFgcbW.js +106 -0
- package/packages/web/dist/assets/graph-Bn3Yngep.js +1 -0
- package/packages/web/dist/assets/index-B1QvSHA5.js +660 -0
- package/packages/web/dist/assets/index-zwMuaz90.css +32 -0
- package/packages/web/dist/assets/infoDiagram-VRGFBTTK-CuiuO3uo.js +2 -0
- package/packages/web/dist/assets/ishikawaDiagram-OU5B5YK6-wBS1_40m.js +70 -0
- package/packages/web/dist/assets/journeyDiagram-ZHPQQLJL-Bd1YE2gP.js +139 -0
- package/packages/web/dist/assets/kanban-definition-PNTS6WVX-BlQzv_X1.js +89 -0
- package/packages/web/dist/assets/katex-C5jXJg4s.js +257 -0
- package/packages/web/dist/assets/mermaid.core-p3CwmLUb.js +313 -0
- package/packages/web/dist/assets/mindmap-definition-NLK3R4M7-BlticnKl.js +96 -0
- package/packages/web/dist/assets/pegDiagram-GJSIUBJH-BbXsP47B.js +1 -0
- package/packages/web/dist/assets/pieDiagram-5QR66LMP-BooBSBug.js +39 -0
- package/packages/web/dist/assets/quadrantDiagram-O4NWA36T-CkXC6VCh.js +7 -0
- package/packages/web/dist/assets/railroadDiagram-XR7U4H2S-BphzYiW-.js +1 -0
- package/packages/web/dist/assets/requirementDiagram-PLB6GJNP-PWpD4zpQ.js +84 -0
- package/packages/web/dist/assets/sankeyDiagram-IPEJSGJF-5Qm39Vfz.js +40 -0
- package/packages/web/dist/assets/scene-D4LPicHk.js +4620 -0
- package/packages/web/dist/assets/sequenceDiagram-PO4LG4MO-DA673J_w.js +169 -0
- package/packages/web/dist/assets/sizeCapture-INFHLROL-1KsNwBhd.js +1 -0
- package/packages/web/dist/assets/stateDiagram-v2-GCMORJYK-D7O0UyHr.js +291 -0
- package/packages/web/dist/assets/swimlanes-2SLR337P-culFSb1R.js +1 -0
- package/packages/web/dist/assets/swimlanesDiagram-TC7HE7FX-kzTmK2BP.js +8 -0
- package/packages/web/dist/assets/timeline-definition-EJHVYXUP-6GIO5p-k.js +120 -0
- package/packages/web/dist/assets/usecaseDiagram-POWQR4AR-BAGHDBzZ.js +370 -0
- package/packages/web/dist/assets/vennDiagram-UO4OBE2U-PbtBvPRE.js +34 -0
- package/packages/web/dist/assets/wardleyDiagram-VNRHLVJA-9scbtDvX.js +78 -0
- package/packages/web/dist/assets/xychartDiagram-PMCCYNJV-C51PiF4p.js +7 -0
- package/packages/web/dist/draco/draco_decoder.js +33 -0
- package/packages/web/dist/draco/draco_decoder.wasm +0 -0
- package/packages/web/dist/draco/draco_wasm_wrapper.js +116 -0
- package/packages/web/dist/favicon-16.png +0 -0
- package/packages/web/dist/favicon-32.png +0 -0
- package/packages/web/dist/favicon-48.png +0 -0
- package/packages/web/dist/favicon.ico +0 -0
- package/packages/web/dist/favicon.svg +1 -1
- package/packages/web/dist/icon-192.png +0 -0
- package/packages/web/dist/icon-512.png +0 -0
- package/packages/web/dist/index.html +12 -4
- package/packages/web/dist/logo-light.svg +1 -1
- package/packages/web/dist/logo-mono.svg +2 -0
- package/packages/web/dist/logo-stacked-light.svg +2 -0
- package/packages/web/dist/logo-stacked.svg +2 -0
- package/packages/web/dist/logo-white.svg +2 -0
- package/packages/web/dist/logo.svg +1 -1
- package/packages/web/dist/mark-light.svg +1 -1
- package/packages/web/dist/mark-mono.svg +2 -0
- package/packages/web/dist/mark-small-light.svg +2 -0
- package/packages/web/dist/mark-small.svg +2 -0
- package/packages/web/dist/mark-white.svg +2 -0
- package/packages/web/dist/mark.svg +1 -1
- package/packages/web/dist/models/LICENSE.txt +5 -0
- package/packages/web/dist/models/brain.glb +0 -0
- package/packages/web/dist/site.webmanifest +23 -0
- package/packages/web/dist/wordmark-light.svg +2 -0
- package/packages/web/dist/wordmark.svg +2 -0
- package/packages/web/package.json +1 -1
- package/scripts/rookery.mjs +204 -122
- package/scripts/updater.mjs +227 -0
- package/packages/cli/dist/tui/components/Wordmark.d.ts +0 -35
- package/packages/cli/dist/tui/components/Wordmark.d.ts.map +0 -1
- package/packages/cli/dist/tui/components/Wordmark.js +0 -81
- package/packages/cli/dist/tui/components/Wordmark.js.map +0 -1
- package/packages/core/dist/agents/orchestrator.d.ts +0 -24
- package/packages/core/dist/agents/orchestrator.d.ts.map +0 -1
- package/packages/core/dist/agents/orchestrator.js +0 -88
- package/packages/core/dist/agents/orchestrator.js.map +0 -1
- package/packages/core/dist/agents/roles.d.ts +0 -21
- package/packages/core/dist/agents/roles.d.ts.map +0 -1
- package/packages/core/dist/agents/roles.js +0 -81
- package/packages/core/dist/agents/roles.js.map +0 -1
- package/packages/core/dist/agents/team.d.ts +0 -105
- package/packages/core/dist/agents/team.d.ts.map +0 -1
- package/packages/core/dist/agents/team.js +0 -623
- package/packages/core/dist/agents/team.js.map +0 -1
- package/packages/core/dist/providers/codex.d.ts +0 -10
- package/packages/core/dist/providers/codex.d.ts.map +0 -1
- package/packages/core/dist/providers/codex.js +0 -375
- package/packages/core/dist/providers/codex.js.map +0 -1
- package/packages/core/dist/tools/browser.d.ts +0 -20
- package/packages/core/dist/tools/browser.d.ts.map +0 -1
- package/packages/core/dist/tools/browser.js +0 -72
- package/packages/core/dist/tools/browser.js.map +0 -1
- package/packages/server/dist/routes/agents.d.ts +0 -5
- package/packages/server/dist/routes/agents.d.ts.map +0 -1
- package/packages/server/dist/routes/agents.js +0 -6
- package/packages/server/dist/routes/agents.js.map +0 -1
- package/packages/server/dist/routes/team.d.ts +0 -11
- package/packages/server/dist/routes/team.d.ts.map +0 -1
- package/packages/server/dist/routes/team.js +0 -36
- package/packages/server/dist/routes/team.js.map +0 -1
- package/packages/web/dist/assets/3d-force-graph-BPZmoydi.js +0 -1163
- package/packages/web/dist/assets/index-IBSTzK7-.js +0 -1255
- package/packages/web/dist/assets/index-qUXUui7W.css +0 -1
- package/packages/web/dist/assets/three-spritetext-B9ZIW7c-.js +0 -4
- package/packages/web/dist/assets/three.module-cmFfBtHS.js +0 -4228
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/elk-276RUBZZ-dM3Y1d2a.js","assets/chunk-NETBCI7D-Dj7O3-H-.js","assets/chunk-3FUC2YCW-Dw-TfKT0.js","assets/index-B1QvSHA5.js","assets/index-zwMuaz90.css","assets/graph-Bn3Yngep.js","assets/dagre-6A5THRUB-CXzwdR-6.js","assets/swimlanes-2SLR337P-culFSb1R.js","assets/cose-bilkent-JH36ORCC-BAuXqkne.js","assets/cytoscape.esm-Ix0LnXOy.js","assets/c4Diagram-YGBWAQC7-i5_GqhJa.js","assets/chunk-GWA4HPMP-3rdjszP_.js","assets/flowDiagram-KWPJA3E3-B6DYlbkV.js","assets/chunk-5VM5RSS4-AE_XRNTT.js","assets/chunk-XXDRQBXY-CXx6HMbz.js","assets/chunk-WEXAMYUT-BRFvQUIn.js","assets/channel-D_4EmqNR.js","assets/diagram-22UHCM2B-B7iv_V2D.js","assets/swimlanesDiagram-TC7HE7FX-kzTmK2BP.js","assets/erDiagram-OPXOYQCR-iWrUegxy.js","assets/gitGraphDiagram-X574FWY7-DguFgcbW.js","assets/chunk-2Q5K7J3B-BK6I2wfW.js","assets/chunk-JWPE2WC7-C93LH2D0.js","assets/cynefin-OW5HDTMX-plNzhY7J.js","assets/ganttDiagram-FUAMR5RP-D7dSWZcC.js","assets/infoDiagram-VRGFBTTK-CuiuO3uo.js","assets/pieDiagram-5QR66LMP-BooBSBug.js","assets/arc-CQult7TN.js","assets/quadrantDiagram-O4NWA36T-CkXC6VCh.js","assets/xychartDiagram-PMCCYNJV-C51PiF4p.js","assets/requirementDiagram-PLB6GJNP-PWpD4zpQ.js","assets/sequenceDiagram-PO4LG4MO-DA673J_w.js","assets/classDiagram-v2-NBCMYWYE-BGXszxjn.js","assets/stateDiagram-v2-GCMORJYK-D7O0UyHr.js","assets/journeyDiagram-ZHPQQLJL-Bd1YE2gP.js","assets/timeline-definition-EJHVYXUP-6GIO5p-k.js","assets/mindmap-definition-NLK3R4M7-BlticnKl.js","assets/kanban-definition-PNTS6WVX-BlQzv_X1.js","assets/sankeyDiagram-IPEJSGJF-5Qm39Vfz.js","assets/diagram-MLGK6HIB-BbwGHK4g.js","assets/diagram-MPIPVDR6-BbSSZfM3.js","assets/blockDiagram-BEXU5L5S-TCFoK_k-.js","assets/diagram-CDSNMT55-DccMMNJ-.js","assets/architectureDiagram-NJMV4G6O-DFTRvl66.js","assets/diagram-ATOU4E4O-NJ7EB5Qg.js","assets/ishikawaDiagram-OU5B5YK6-wBS1_40m.js","assets/vennDiagram-UO4OBE2U-PbtBvPRE.js","assets/diagram-3UASUU5V-BMvi7gSi.js","assets/usecaseDiagram-POWQR4AR-BAGHDBzZ.js","assets/wardleyDiagram-VNRHLVJA-9scbtDvX.js","assets/cynefinDiagram-VND7K2PF-DuPlljFS.js","assets/railroadDiagram-XR7U4H2S-BphzYiW-.js","assets/chunk-GTNCS2PH-DO18WaaJ.js","assets/ebnfDiagram-ZINNZB2B-BBfPNM85.js","assets/abnfDiagram-O67JEVCF-B4qWcqra.js","assets/pegDiagram-GJSIUBJH-BbXsP47B.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var ym=Object.defineProperty;var Cm=(e,t,r)=>t in e?ym(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Vt=(e,t,r)=>Cm(e,typeof t!="symbol"?t+"":t,r);import{aj as iu,ak as Qs,e as Gl,al as Rr,am as su,T as xm,_ as Pt,an as jl,ao as Xl,ap as bm,aq as au,o as ou,ar as km,as as wm,at as Ro,au as nu,av as Vl,aw as Sm,ax as lu,ay as hu,az as cu,aA as uu,aB as du,aC as fu,aD as Tm,U as qs,aE as pu,aF as gu,aG as Bm,aH as vm,aI as Po,a as _m}from"./index-B1QvSHA5.js";function mu(e,t){this._basis=new iu(e),this._beta=t}mu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,c;++o<=r;)c=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+c*a),this._beta*t[o]+(1-this._beta)*(s+c*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Lm=(function e(t){function r(i){return t===1?new iu(i):new mu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Js(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function kn(e,t){this._context=e,this._k=(1-t)/6}kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Js(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Js(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yu=(function e(t){function r(i){return new kn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function wn(e,t){this._context=e,this._k=(1-t)/6}wn.prototype={areaStart:Qs,areaEnd:Qs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Js(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fm=(function e(t){function r(i){return new wn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Sn(e,t){this._context=e,this._k=(1-t)/6}Sn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Js(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Am=(function e(t){function r(i){return new Sn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Tn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>Gl){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Gl){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/l,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function Cu(e,t){this._context=e,this._alpha=t}Cu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Tn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xu=(function e(t){function r(i){return t?new Cu(i,t):new kn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function bu(e,t){this._context=e,this._alpha=t}bu.prototype={areaStart:Qs,areaEnd:Qs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Tn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Em=(function e(t){function r(i){return t?new bu(i,t):new wn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ku(e,t){this._context=e,this._alpha=t}ku.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Mm=(function e(t){function r(i){return t?new ku(i,t):new Sn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);var Zl=180/Math.PI,qo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wu(e,t,r,i,s,a){var n,o,c;return(n=Math.sqrt(e*e+t*t))&&(e/=n,t/=n),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,c/=o),e*i<t*r&&(e=-e,t=-t,c=-c,n=-n),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*Zl,skewX:Math.atan(c)*Zl,scaleX:n,scaleY:o}}var _s;function Om(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?qo:wu(t.a,t.b,t.c,t.d,t.e,t.f)}function $m(e){return e==null||(_s||(_s=document.createElementNS("http://www.w3.org/2000/svg","g")),_s.setAttribute("transform",e),!(e=_s.transform.baseVal.consolidate()))?qo:(e=e.matrix,wu(e.a,e.b,e.c,e.d,e.e,e.f))}function Su(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function a(h,l,u,f,d,m){if(h!==u||l!==f){var y=d.push("translate(",null,t,null,r);m.push({i:y-4,x:Rr(h,u)},{i:y-2,x:Rr(l,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function n(h,l,u,f){h!==l?(h-l>180?l+=360:l-h>180&&(h+=360),f.push({i:u.push(s(u)+"rotate(",null,i)-2,x:Rr(h,l)})):l&&u.push(s(u)+"rotate("+l+i)}function o(h,l,u,f){h!==l?f.push({i:u.push(s(u)+"skewX(",null,i)-2,x:Rr(h,l)}):l&&u.push(s(u)+"skewX("+l+i)}function c(h,l,u,f,d,m){if(h!==u||l!==f){var y=d.push(s(d)+"scale(",null,",",null,")");m.push({i:y-4,x:Rr(h,u)},{i:y-2,x:Rr(l,f)})}else(u!==1||f!==1)&&d.push(s(d)+"scale("+u+","+f+")")}return function(h,l){var u=[],f=[];return h=e(h),l=e(l),a(h.translateX,h.translateY,l.translateX,l.translateY,u,f),n(h.rotate,l.rotate,u,f),o(h.skewX,l.skewX,u,f),c(h.scaleX,h.scaleY,l.scaleX,l.scaleY,u,f),h=l=null,function(d){for(var m=-1,y=f.length,x;++m<y;)u[(x=f[m]).i]=x.x(d);return u.join("")}}}var Im=Su(Om,"px, ","px)","deg)"),Dm=Su($m,", ",")",")");function Ga(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 Rm(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Ns(e){return su(e)}var Tu=Object.defineProperty,p=(e,t)=>Tu(e,"name",{value:t,configurable:!0}),Pm=(e,t)=>{for(var r in t)Tu(e,r,{get:t[r],enumerable:!0})},Ws={exports:{}},qm=Ws.exports,Kl;function Nm(){return Kl||(Kl=1,(function(e,t){(function(r,i){e.exports=i()})(qm,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",c="hour",h="day",l="week",u="month",f="quarter",d="year",m="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var M=["th","st","nd","rd"],_=E%100;return"["+E+(M[(_-20)%10]||M[_]||M[0])+"]"}},k=function(E,M,_){var N=String(E);return!N||N.length>=M?E:""+Array(M+1-N.length).join(_)+E},T={s:k,z:function(E){var M=-E.utcOffset(),_=Math.abs(M),N=Math.floor(_/60),O=_%60;return(M<=0?"+":"-")+k(N,2,"0")+":"+k(O,2,"0")},m:function E(M,_){if(M.date()<_.date())return-E(_,M);var N=12*(_.year()-M.year())+(_.month()-M.month()),O=M.clone().add(N,u),G=_-O<0,j=M.clone().add(N+(G?-1:1),u);return+(-(N+(_-O)/(G?O-j:j-O))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:d,w:l,d:h,D:m,h:c,m:o,s:n,ms:a,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},v="en",L={};L[v]=b;var A="$isDayjsObject",F=function(E){return E instanceof tt||!(!E||!E[A])},Y=function E(M,_,N){var O;if(!M)return v;if(typeof M=="string"){var G=M.toLowerCase();L[G]&&(O=G),_&&(L[G]=_,O=G);var j=M.split("-");if(!O&&j.length>1)return E(j[0])}else{var lt=M.name;L[lt]=M,O=lt}return!N&&O&&(v=O),O||!N&&v},D=function(E,M){if(F(E))return E.clone();var _=typeof M=="object"?M:{};return _.date=E,_.args=arguments,new tt(_)},q=T;q.l=Y,q.i=F,q.w=function(E,M){return D(E,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var tt=(function(){function E(_){this.$L=Y(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[A]=!0}var M=E.prototype;return M.parse=function(_){this.$d=(function(N){var O=N.date,G=N.utc;if(O===null)return new Date(NaN);if(q.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var j=O.match(x);if(j){var lt=j[2]-1||0,bt=(j[7]||"0").substring(0,3);return G?new Date(Date.UTC(j[1],lt,j[3]||1,j[4]||0,j[5]||0,j[6]||0,bt)):new Date(j[1],lt,j[3]||1,j[4]||0,j[5]||0,j[6]||0,bt)}}return new Date(O)})(_),this.init()},M.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},M.$utils=function(){return q},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(_,N){var O=D(_);return this.startOf(N)<=O&&O<=this.endOf(N)},M.isAfter=function(_,N){return D(_)<this.startOf(N)},M.isBefore=function(_,N){return this.endOf(N)<D(_)},M.$g=function(_,N,O){return q.u(_)?this[N]:this.set(O,_)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(_,N){var O=this,G=!!q.u(N)||N,j=q.p(_),lt=function(Bt,ct){var mt=q.w(O.$u?Date.UTC(O.$y,ct,Bt):new Date(O.$y,ct,Bt),O);return G?mt:mt.endOf(h)},bt=function(Bt,ct){return q.w(O.toDate()[Bt].apply(O.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ct)),O)},xt=this.$W,kt=this.$M,ot=this.$D,At="set"+(this.$u?"UTC":"");switch(j){case d:return G?lt(1,0):lt(31,11);case u:return G?lt(1,kt):lt(0,kt+1);case l:var Et=this.$locale().weekStart||0,qt=(xt<Et?xt+7:xt)-Et;return lt(G?ot-qt:ot+(6-qt),kt);case h:case m:return bt(At+"Hours",0);case c:return bt(At+"Minutes",1);case o:return bt(At+"Seconds",2);case n:return bt(At+"Milliseconds",3);default:return this.clone()}},M.endOf=function(_){return this.startOf(_,!1)},M.$set=function(_,N){var O,G=q.p(_),j="set"+(this.$u?"UTC":""),lt=(O={},O[h]=j+"Date",O[m]=j+"Date",O[u]=j+"Month",O[d]=j+"FullYear",O[c]=j+"Hours",O[o]=j+"Minutes",O[n]=j+"Seconds",O[a]=j+"Milliseconds",O)[G],bt=G===h?this.$D+(N-this.$W):N;if(G===u||G===d){var xt=this.clone().set(m,1);xt.$d[lt](bt),xt.init(),this.$d=xt.set(m,Math.min(this.$D,xt.daysInMonth())).$d}else lt&&this.$d[lt](bt);return this.init(),this},M.set=function(_,N){return this.clone().$set(_,N)},M.get=function(_){return this[q.p(_)]()},M.add=function(_,N){var O,G=this;_=Number(_);var j=q.p(N),lt=function(kt){var ot=D(G);return q.w(ot.date(ot.date()+Math.round(kt*_)),G)};if(j===u)return this.set(u,this.$M+_);if(j===d)return this.set(d,this.$y+_);if(j===h)return lt(1);if(j===l)return lt(7);var bt=(O={},O[o]=i,O[c]=s,O[n]=r,O)[j]||1,xt=this.$d.getTime()+_*bt;return q.w(xt,this)},M.subtract=function(_,N){return this.add(-1*_,N)},M.format=function(_){var N=this,O=this.$locale();if(!this.isValid())return O.invalidDate||y;var G=_||"YYYY-MM-DDTHH:mm:ssZ",j=q.z(this),lt=this.$H,bt=this.$m,xt=this.$M,kt=O.weekdays,ot=O.months,At=O.meridiem,Et=function(ct,mt,Ft,Nt){return ct&&(ct[mt]||ct(N,G))||Ft[mt].slice(0,Nt)},qt=function(ct){return q.s(lt%12||12,ct,"0")},Bt=At||function(ct,mt,Ft){var Nt=ct<12?"AM":"PM";return Ft?Nt.toLowerCase():Nt};return G.replace(C,(function(ct,mt){return mt||(function(Ft){switch(Ft){case"YY":return String(N.$y).slice(-2);case"YYYY":return q.s(N.$y,4,"0");case"M":return xt+1;case"MM":return q.s(xt+1,2,"0");case"MMM":return Et(O.monthsShort,xt,ot,3);case"MMMM":return Et(ot,xt);case"D":return N.$D;case"DD":return q.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Et(O.weekdaysMin,N.$W,kt,2);case"ddd":return Et(O.weekdaysShort,N.$W,kt,3);case"dddd":return kt[N.$W];case"H":return String(lt);case"HH":return q.s(lt,2,"0");case"h":return qt(1);case"hh":return qt(2);case"a":return Bt(lt,bt,!0);case"A":return Bt(lt,bt,!1);case"m":return String(bt);case"mm":return q.s(bt,2,"0");case"s":return String(N.$s);case"ss":return q.s(N.$s,2,"0");case"SSS":return q.s(N.$ms,3,"0");case"Z":return j}return null})(ct)||j.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(_,N,O){var G,j=this,lt=q.p(N),bt=D(_),xt=(bt.utcOffset()-this.utcOffset())*i,kt=this-bt,ot=function(){return q.m(j,bt)};switch(lt){case d:G=ot()/12;break;case u:G=ot();break;case f:G=ot()/3;break;case l:G=(kt-xt)/6048e5;break;case h:G=(kt-xt)/864e5;break;case c:G=kt/s;break;case o:G=kt/i;break;case n:G=kt/r;break;default:G=kt}return O?G:q.a(G)},M.daysInMonth=function(){return this.endOf(u).$D},M.$locale=function(){return L[this.$L]},M.locale=function(_,N){if(!_)return this.$L;var O=this.clone(),G=Y(_,N,!0);return G&&(O.$L=G),O},M.clone=function(){return q.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},E})(),z=tt.prototype;return D.prototype=z,[["$ms",a],["$s",n],["$m",o],["$H",c],["$W",h],["$M",u],["$y",d],["$D",m]].forEach((function(E){z[E[1]]=function(M){return this.$g(M,E[0],E[1])}})),D.extend=function(E,M){return E.$i||(E(M,tt,D),E.$i=!0),D},D.locale=Y,D.isDayjs=F,D.unix=function(E){return D(1e3*E)},D.en=L[v],D.Ls=L,D.p={},D}))})(Ws)),Ws.exports}var Wm=Nm();const zm=xm(Wm);var dr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},J={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Bn=p(function(e="fatal"){let t=dr.fatal;typeof e=="string"?e.toLowerCase()in dr&&(t=dr[e]):typeof e=="number"&&(t=e),J.trace=()=>{},J.debug=()=>{},J.info=()=>{},J.warn=()=>{},J.error=()=>{},J.fatal=()=>{},t<=dr.fatal&&(J.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",qe("FATAL"))),t<=dr.error&&(J.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",qe("ERROR"))),t<=dr.warn&&(J.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",qe("WARN"))),t<=dr.info&&(J.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",qe("INFO"))),t<=dr.debug&&(J.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("DEBUG"))),t<=dr.trace&&(J.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("TRACE")))},"setLogLevel"),qe=p(e=>`%c${zm().format("ss.SSS")} : ${e} : `,"format");const zs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return zs.hue2rgb(a,s,e+1/3)*255;case"g":return zs.hue2rgb(a,s,e)*255;case"b":return zs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,c=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return c*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},Hm={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Ym={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},It={channel:zs,lang:Hm,unit:Ym},vr={};for(let e=0;e<=255;e++)vr[e]=It.unit.dec2hex(e);const me={ALL:0,RGB:1,HSL:2};let Um=class{constructor(){this.type=me.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=me.ALL}is(t){return this.type===t}};class Gm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Um}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=me.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=It.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=It.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=It.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=It.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=It.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=It.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(me.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(me.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(me.HSL)&&r!==void 0?r:(this._ensureHSL(),It.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(me.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(me.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(me.RGB)&&r!==void 0?r:(this._ensureRGB(),It.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(me.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(me.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(me.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(me.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(me.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(me.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const wa=new Gm({r:0,g:0,b:0,a:0},"transparent"),ai={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ai.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,c=n?8:4,h=a?0:-1,l=n?255:15;return wa.set({r:(i>>c*(h+3)&l)*o,g:(i>>c*(h+2)&l)*o,b:(i>>c*(h+1)&l)*o,a:a?(i&l)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${vr[Math.round(t)]}${vr[Math.round(r)]}${vr[Math.round(i)]}${vr[Math.round(s*255)]}`:`#${vr[Math.round(t)]}${vr[Math.round(r)]}${vr[Math.round(i)]}`}},Nr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Nr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return It.channel.clamp.h(parseFloat(r)*.9);case"rad":return It.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return It.channel.clamp.h(parseFloat(r)*360)}}return It.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Nr.re);if(!r)return;const[,i,s,a,n,o]=r;return wa.set({h:Nr._hue2deg(i),s:It.channel.clamp.s(parseFloat(s)),l:It.channel.clamp.l(parseFloat(a)),a:n?It.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${It.lang.round(t)}, ${It.lang.round(r)}%, ${It.lang.round(i)}%, ${s})`:`hsl(${It.lang.round(t)}, ${It.lang.round(r)}%, ${It.lang.round(i)}%)`}},rs={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=rs.colors[e];if(t)return ai.parse(t)},stringify:e=>{const t=ai.stringify(e);for(const r in rs.colors)if(rs.colors[r]===t)return r}},ji={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ji.re);if(!r)return;const[,i,s,a,n,o,c,h,l]=r;return wa.set({r:It.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:It.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:It.channel.clamp.b(c?parseFloat(o)*2.55:parseFloat(o)),a:h?It.channel.clamp.a(l?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${It.lang.round(t)}, ${It.lang.round(r)}, ${It.lang.round(i)}, ${It.lang.round(s)})`:`rgb(${It.lang.round(t)}, ${It.lang.round(r)}, ${It.lang.round(i)})`}},rr={format:{keyword:rs,hex:ai,rgb:ji,rgba:ji,hsl:Nr,hsla:Nr},parse:e=>{if(typeof e!="string")return e;const t=ai.parse(e)||ji.parse(e)||Nr.parse(e)||rs.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(me.HSL)||e.data.r===void 0?Nr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ji.stringify(e):ai.stringify(e)},Bu=(e,t)=>{const r=rr.parse(e);for(const i in t)r[i]=It.channel.clamp[i](t[i]);return rr.stringify(r)},Lr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bu(e,{a:t});const s=wa.set({r:It.channel.clamp.r(e),g:It.channel.clamp.g(t),b:It.channel.clamp.b(r),a:It.channel.clamp.a(i)});return rr.stringify(s)},jm=e=>{const{r:t,g:r,b:i}=rr.parse(e),s=.2126*It.channel.toLinear(t)+.7152*It.channel.toLinear(r)+.0722*It.channel.toLinear(i);return It.lang.round(s)},Xm=e=>jm(e)>=.5,Ae=e=>!Xm(e),vu=(e,t,r)=>{const i=rr.parse(e),s=i[t],a=It.channel.clamp[t](s+r);return s!==a&&(i[t]=a),rr.stringify(i)},H=(e,t)=>vu(e,"l",t),U=(e,t)=>vu(e,"l",-t),w=(e,t)=>{const r=rr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Bu(e,i)},Vm=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=rr.parse(e),{r:o,g:c,b:h,a:l}=rr.parse(t),u=r/100,f=u*2-1,d=n-l,y=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,x=1-y,C=i*y+o*x,b=s*y+c*x,k=a*y+h*x,T=n*u+l*(1-u);return Lr(C,b,k,T)},$=(e,t=100)=>{const r=rr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Vm(r,e,t)};/*! @license DOMPurify 3.4.15 | (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.15/LICENSE */function Ql(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 Zm(e){if(Array.isArray(e))return e}function Km(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,n,o=[],c=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);c=!0);}catch(l){h=!0,s=l}finally{try{if(!c&&r.return!=null&&(n=r.return(),Object(n)!==n))return}finally{if(h)throw s}}return o}}function Qm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jm(e,t){return Zm(e)||Km(e,t)||ty(e,t)||Qm()}function ty(e,t){if(e){if(typeof e=="string")return Ql(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)?Ql(e,t):void 0}}const _u=Object.entries,Jl=Object.setPrototypeOf,ey=Object.isFrozen,ry=Object.getPrototypeOf,iy=Object.getOwnPropertyDescriptor;let le=Object.freeze,he=Object.seal,ri=Object.create,Lu=typeof Reflect<"u"&&Reflect,No=Lu.apply,Wo=Lu.construct;le||(le=function(t){return t});he||(he=function(t){return t});No||(No=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Wo||(Wo=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 Pr=oe(Array.prototype.forEach),sy=oe(Array.prototype.lastIndexOf),th=oe(Array.prototype.pop),Ri=oe(Array.prototype.push),ay=oe(Array.prototype.splice),oi=Array.isArray,Xi=oe(String.prototype.toLowerCase),ja=oe(String.prototype.toString),eh=oe(String.prototype.match),Pi=oe(String.prototype.replace),rh=oe(String.prototype.indexOf),oy=oe(String.prototype.trim),ny=oe(Number.prototype.toString),ly=oe(Boolean.prototype.toString),ih=typeof BigInt>"u"?null:oe(BigInt.prototype.toString),sh=typeof Symbol>"u"?null:oe(Symbol.prototype.toString),Fe=oe(Object.prototype.hasOwnProperty),qi=oe(Object.prototype.toString),ge=oe(RegExp.prototype.test),Ir=hy(TypeError);function oe(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 No(e,t,i)}}function hy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Wo(e,r)}}function Yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xi;if(Jl&&Jl(e,null),!oi(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(ey(t)||(t[i]=a),s=a)}e[s]=!0}return e}function cy(e){for(let t=0;t<e.length;t++)Fe(e,t)||(e[t]=null);return e}function Oe(e){const t=ri(null);for(const i of _u(e)){var r=Jm(i,2);const s=r[0],a=r[1];Fe(e,s)&&(oi(a)?t[s]=cy(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Oe(a):t[s]=a)}return t}function uy(e){switch(typeof e){case"string":return e;case"number":return ny(e);case"boolean":return ly(e);case"bigint":return ih?ih(e):"0";case"symbol":return sh?sh(e):"Symbol()";case"undefined":return qi(e);case"function":case"object":{if(e===null)return qi(e);const t=e,r=Ne(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:qi(i)}return qi(e)}default:return qi(e)}}function Ne(e,t){for(;e!==null;){const i=iy(e,t);if(i){if(i.get)return oe(i.get);if(typeof i.value=="function")return oe(i.value)}e=ry(e)}function r(){return null}return r}function dy(e){try{return ge(e,""),!0}catch{return!1}}const ah=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"]),Xa=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"]),Va=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"]),fy=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"]),Za=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"]),py=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oh=le(["#text"]),nh=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"]),Ka=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"]),lh=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"]),Ls=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gy=he(/{{[\w\W]*|^[\w\W]*}}/g),my=he(/<%[\w\W]*|^[\w\W]*%>/g),yy=he(/\${[\w\W]*/g),Cy=he(/^data-[\-\w.\u00B7-\uFFFF]+$/),xy=he(/^aria-[\-\w]+$/),hh=he(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),by=he(/^(?:\w+script|data):/i),ky=he(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wy=he(/^html$/i),Sy=he(/^[a-z][.\w]*(-[.\w]+)+$/i),ch=he(/<[/\w!]/g),uh=he(/<[/\w]/g),Ty=he(/<\/no(script|embed|frames)/i),By=he(/\/>/i),Ee={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Fu=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],vy=le(Yt({},Fu)),_y=(function(){const e={};return Pr(Fu,t=>{e[t]=he(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),le(e)})(),Ly=function(){return typeof window>"u"?null:window},Fy=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 a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},dh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Tr=function(t,r,i,s){return Fe(t,r)&&oi(t[r])?Yt(s.base?Oe(s.base):{},t[r],s.transform):i},Qa=function(t,r,i){const s=Fe(t,r)?t[r]:void 0;return s&&typeof s=="object"?Oe(s):i()};function Au(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ly();const t=nt=>Au(nt);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==Ee.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,n=e.Node,o=e.Element,c=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const l=e.DOMParser,u=e.trustedTypes,f=o.prototype,d=Ne(f,"cloneNode"),m=Ne(f,"remove"),y=Ne(f,"removeAttributeNode"),x=Ne(f,"nextSibling"),C=Ne(f,"childNodes"),b=Ne(f,"parentNode"),k=Ne(f,"shadowRoot"),T=Ne(f,"attributes"),v=n&&n.prototype?Ne(n.prototype,"nodeType"):null,L=n&&n.prototype?Ne(n.prototype,"nodeName"):null,A=n&&n.prototype?Ne(n.prototype,"ownerDocument"):null,F=function(B){return v?v(B):B.nodeType},Y=function(B){return L?L(B):B.nodeName};if(typeof a=="function"){const nt=r.createElement("template");nt.content&&nt.content.ownerDocument&&(r=nt.content.ownerDocument)}let D,q="",tt,z=!1,E=0;const M=function(){if(E>0)throw Ir('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.')},_=function(B){M(),E++;try{return D.createHTML(B)}finally{E--}},N=function(B){M(),E++;try{return D.createScriptURL(B)}finally{E--}},O=function(){return z||(tt=Fy(u,s),z=!0),tt},G=r,j=G.implementation,lt=G.createNodeIterator,bt=G.createDocumentFragment,xt=G.getElementsByTagName,kt=i.importNode;let ot=dh();t.isSupported=typeof _u=="function"&&typeof b=="function"&&j&&j.createHTMLDocument!==void 0;const At=gy,Et=my,qt=yy,Bt=Cy,ct=xy,mt=by,Ft=ky,Nt=Sy;let Ut=hh,R=null;const Lt=Yt({},[...ah,...Xa,...Va,...Za,...oh]);let zt=null;const we=Yt({},[...nh,...Ka,...lh,...Ls]);let fe=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}})),Pe=null,lr=null;const Se=Object.seal(ri(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,hr=!0,cr=!1,ur=!0,Be=!1,g=!0,I=!1,V=!1,K=null,X=null,at=!1,S=!1,W=!1,rt=!1,Z=!0,Q=!1;const st="user-content-";let et=!0,yt=!1,ft={},wt=null;const _t=Yt({},["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 Wt=null;const Xt=Yt({},["audio","video","img","source","image","track"]);let $i=null;const wr=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",bs="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Vr=Ze,Pa=!1,qa=null;const em=Yt({},[Ve,bs,Ze],ja),Al=le(["mi","mo","mn","ms","mtext"]);let Na=Yt({},Al);const El=le(["annotation-xml"]);let Wa=Yt({},El);const rm=Yt({},["title","style","font","a","script"]);let Ii=null;const im=["application/xhtml+xml","text/html"],sm="text/html";let ee=null,Zr=null;const am=r.createElement("form"),Ml=function(B){return B instanceof RegExp||B instanceof Function},za=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zr&&Zr===B)return;(!B||typeof B!="object")&&(B={}),B=Oe(B),Ii=im.indexOf(B.PARSER_MEDIA_TYPE)===-1?sm:B.PARSER_MEDIA_TYPE,ee=Ii==="application/xhtml+xml"?ja:Xi,R=Tr(B,"ALLOWED_TAGS",Lt,{transform:ee}),zt=Tr(B,"ALLOWED_ATTR",we,{transform:ee}),qa=Tr(B,"ALLOWED_NAMESPACES",em,{transform:ja}),$i=Tr(B,"ADD_URI_SAFE_ATTR",wr,{transform:ee,base:wr}),Wt=Tr(B,"ADD_DATA_URI_TAGS",Xt,{transform:ee,base:Xt}),wt=Tr(B,"FORBID_CONTENTS",_t,{transform:ee}),Pe=Tr(B,"FORBID_TAGS",Oe({}),{transform:ee}),lr=Tr(B,"FORBID_ATTR",Oe({}),{transform:ee}),ft=Fe(B,"USE_PROFILES")?B.USE_PROFILES&&typeof B.USE_PROFILES=="object"?Oe(B.USE_PROFILES):B.USE_PROFILES:!1,Te=B.ALLOW_ARIA_ATTR!==!1,hr=B.ALLOW_DATA_ATTR!==!1,cr=B.ALLOW_UNKNOWN_PROTOCOLS||!1,ur=B.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Be=B.SAFE_FOR_TEMPLATES||!1,g=B.SAFE_FOR_XML!==!1,I=B.WHOLE_DOCUMENT||!1,S=B.RETURN_DOM||!1,W=B.RETURN_DOM_FRAGMENT||!1,rt=B.RETURN_TRUSTED_TYPE||!1,at=B.FORCE_BODY||!1,Z=B.SANITIZE_DOM!==!1,Q=B.SANITIZE_NAMED_PROPS||!1,et=B.KEEP_CONTENT!==!1,yt=B.IN_PLACE||!1,Ut=dy(B.ALLOWED_URI_REGEXP)?B.ALLOWED_URI_REGEXP:hh,Vr=typeof B.NAMESPACE=="string"?B.NAMESPACE:Ze,Na=Qa(B,"MATHML_TEXT_INTEGRATION_POINTS",()=>Yt({},Al)),Wa=Qa(B,"HTML_INTEGRATION_POINTS",()=>Yt({},El));const P=Qa(B,"CUSTOM_ELEMENT_HANDLING",()=>ri(null));if(fe=ri(null),Fe(P,"tagNameCheck")&&Ml(P.tagNameCheck)&&(fe.tagNameCheck=P.tagNameCheck),Fe(P,"attributeNameCheck")&&Ml(P.attributeNameCheck)&&(fe.attributeNameCheck=P.attributeNameCheck),Fe(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),he(fe),Be&&(hr=!1),W&&(S=!0),ft&&(R=Yt({},oh),zt=ri(null),ft.html===!0&&(Yt(R,ah),Yt(zt,nh)),ft.svg===!0&&(Yt(R,Xa),Yt(zt,Ka),Yt(zt,Ls)),ft.svgFilters===!0&&(Yt(R,Va),Yt(zt,Ka),Yt(zt,Ls)),ft.mathMl===!0&&(Yt(R,Za),Yt(zt,lh),Yt(zt,Ls))),Se.tagCheck=null,Se.attributeCheck=null,Fe(B,"ADD_TAGS")&&(typeof B.ADD_TAGS=="function"?Se.tagCheck=B.ADD_TAGS:oi(B.ADD_TAGS)&&(R===Lt&&(R=Oe(R)),Yt(R,B.ADD_TAGS,ee))),Fe(B,"ADD_ATTR")&&(typeof B.ADD_ATTR=="function"?Se.attributeCheck=B.ADD_ATTR:oi(B.ADD_ATTR)&&(zt===we&&(zt=Oe(zt)),Yt(zt,B.ADD_ATTR,ee))),Fe(B,"ADD_FORBID_CONTENTS")&&oi(B.ADD_FORBID_CONTENTS)&&(wt===_t&&(wt=Oe(wt)),Yt(wt,B.ADD_FORBID_CONTENTS,ee)),et&&(R["#text"]=!0),I&&Yt(R,["html","head","body"]),R.table&&(Yt(R,["tbody"]),delete Pe.tbody),B.TRUSTED_TYPES_POLICY){if(typeof B.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof B.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const it=D;D=B.TRUSTED_TYPES_POLICY;try{q=_("")}catch(Ct){throw D=it,Ct}}else B.TRUSTED_TYPES_POLICY===null?(D=void 0,q=""):(D===void 0&&(D=O()),D&&typeof q=="string"&&(q=_("")));le&&le(B),Zr=B},Ol=Yt({},[...Xa,...Va,...fy]),$l=Yt({},[...Za,...py]),om=function(B,P,it){return P.namespaceURI===Ze?B==="svg":P.namespaceURI===Ve?B==="svg"&&(it==="annotation-xml"||Na[it]):!!Ol[B]},nm=function(B,P,it){return P.namespaceURI===Ze?B==="math":P.namespaceURI===bs?B==="math"&&Wa[it]:!!$l[B]},lm=function(B,P,it){return P.namespaceURI===bs&&!Wa[it]||P.namespaceURI===Ve&&!Na[it]?!1:!$l[B]&&(rm[B]||!Ol[B])},hm=function(B){let P=b(B);(!P||!P.tagName)&&(P={namespaceURI:Vr,tagName:"template"});const it=Xi(B.tagName),Ct=Xi(P.tagName);return qa[B.namespaceURI]?B.namespaceURI===bs?om(it,P,Ct):B.namespaceURI===Ve?nm(it,P,Ct):B.namespaceURI===Ze?lm(it,P,Ct):!!(Ii==="application/xhtml+xml"&&qa[B.namespaceURI]):!1},Sr=function(B){Ri(t.removed,{element:B});try{b(B).removeChild(B)}catch{if(m(B),!b(B))throw Ir("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Il=function(B,P,it){try{y(B,P)}catch{try{B.removeAttribute(it)}catch{}}},ks=function(B){ws(B);const P=C(B);if(P){const Ct=[];Pr(P,vt=>{Ri(Ct,vt)}),Pr(Ct,vt=>{try{m(vt)}catch{}})}const it=T(B);if(it)for(let Ct=it.length-1;Ct>=0;--Ct){const vt=it[Ct],$t=vt&&vt.name;typeof $t=="string"&&Il(B,vt,$t)}},$r=function(B,P,it){if(!it)try{it=P.getAttributeNode(B)}catch{it=null}Ri(t.removed,{attribute:it||null,from:P});try{it?y(P,it):P.removeAttribute(B)}catch{try{P.removeAttribute(B)}catch{}}if(B==="is")if(S||W)try{Sr(P)}catch{}else try{P.setAttribute(B,"")}catch{}},cm=function(B){const P=T(B);if(P)for(let it=P.length-1;it>=0;--it){const Ct=P[it],vt=Ct&&Ct.name;typeof vt!="string"||zt[ee(vt)]||Il(B,Ct,vt)}},ws=function(B){const P=[B];for(;P.length>0;){const it=P.pop();F(it)===Ee.element&&cm(it);const vt=C(it);if(vt)for(let $t=vt.length-1;$t>=0;--$t)P.push(vt[$t])}},Dl=function(B,P){return g?B==="patchsrc"?!0:B==="for"&&P!=="label"&&P!=="output":!1},um=function(B){if(!g)return;const P=[B];for(;P.length>0;){const it=P.pop(),Ct=F(it);if(Ct===Ee.processingInstruction||Ct===Ee.comment&&ge(uh,it.data)){try{m(it)}catch{}continue}if(Ct===Ee.element){const $t=it,Zt=ee(Y(it));try{$t.hasAttribute&&$t.hasAttribute("patchsrc")&&$t.removeAttribute("patchsrc"),$t.hasAttribute&&$t.hasAttribute("for")&&Dl("for",Zt)&&$t.removeAttribute("for")}catch{}}const vt=C(it);if(vt)for(let $t=vt.length-1;$t>=0;--$t)P.push(vt[$t])}},Rl=function(B){let P=null,it=null;if(at)B="<remove></remove>"+B;else{const $t=eh(B,/^[\r\n\t ]+/);it=$t&&$t[0]}Ii==="application/xhtml+xml"&&Vr===Ze&&(B='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+B+"</body></html>");const Ct=D?_(B):B;if(Vr===Ze)try{P=new l().parseFromString(Ct,Ii)}catch{}if(!P||!P.documentElement){P=j.createDocument(Vr,"template",null);try{P.documentElement.innerHTML=Pa?q:Ct}catch{}}const vt=P.body||P.documentElement;return B&&it&&vt.insertBefore(r.createTextNode(it),vt.childNodes[0]||null),Vr===Ze?xt.call(P,I?"html":"body")[0]:I?P.documentElement:vt},Pl=function(B){const P=A?A(B):B.ownerDocument;return lt.call(P||B,B,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ss=function(B){return B=Pi(B,At," "),B=Pi(B,Et," "),B=Pi(B,qt," "),B},Ha=function(B){var P;B.normalize();const it=A?A(B):B.ownerDocument,Ct=lt.call(it||B,B,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let vt=Ct.nextNode();for(;vt;)vt.data=Ss(vt.data),vt=Ct.nextNode();const $t=(P=B.querySelectorAll)===null||P===void 0?void 0:P.call(B,"template");$t&&Pr($t,Zt=>{Kr(Zt.content)&&Ha(Zt.content)})},Ts=function(B){const P=L?L(B):null;return typeof P!="string"||ee(P)!=="form"?!1:typeof B.nodeName!="string"||typeof B.textContent!="string"||typeof B.removeChild!="function"||B.attributes!==T(B)||typeof B.removeAttribute!="function"||typeof B.removeAttributeNode!="function"||typeof B.getAttributeNode!="function"||typeof B.setAttribute!="function"||typeof B.namespaceURI!="string"||typeof B.insertBefore!="function"||typeof B.hasChildNodes!="function"||B.nodeType!==v(B)||B.childNodes!==C(B)},Kr=function(B){if(!v||typeof B!="object"||B===null)return!1;try{return v(B)===Ee.documentFragment}catch{return!1}},Di=function(B){if(!v||typeof B!="object"||B===null)return!1;try{return typeof v(B)=="number"}catch{return!1}};function Ke(nt,B,P){nt.length!==0&&Pr(nt,it=>{it.call(t,B,P,Zr)})}const dm=function(B,P){return!!(g&&B.hasChildNodes()&&!Di(B.firstElementChild)&&ge(ch,B.textContent)&&ge(ch,B.innerHTML)||g&&B.namespaceURI===Ze&&vy[P]&&(Di(B.firstElementChild)||typeof B.textContent=="string"&&ge(_y[P],B.textContent))||B.nodeType===Ee.processingInstruction||g&&B.nodeType===Ee.comment&&ge(uh,B.data))},Bs=function(B,P){if(B instanceof RegExp)return ge(B,P);if(B instanceof Function){for(var it=arguments.length,Ct=new Array(it>2?it-2:0),vt=2;vt<it;vt++)Ct[vt-2]=arguments[vt];return!!B(P,...Ct)}return!1},fm=function(B,P,it){if(!Pe[P]&&Hl(P)&&Bs(fe.tagNameCheck,P))return!1;if(et&&!wt[P]){const Ct=b(B),vt=C(B);if(vt&&Ct){const $t=vt.length;for(let Zt=$t-1;Zt>=0;--Zt){const Jt=B===it?d(vt[Zt],!0):vt[Zt];Ct.insertBefore(Jt,x(B))}}}return Sr(B),!0},ql=function(B,P,it,Ct){return B.length===0?P:P===it||P===Ct?Oe(P):P},Nl=function(B,P){return B===P||b(B)!==null?!1:(yt&&ws(B),!0)},Wl=function(B,P){if(Ke(ot.beforeSanitizeElements,B,null),Nl(B,P))return!0;if(Ts(B))return Sr(B),!0;const it=ee(Y(B));if(R=ql(ot.uponSanitizeElement,R,Lt,K),Ke(ot.uponSanitizeElement,B,{tagName:it,allowedTags:R}),Nl(B,P))return!0;if(dm(B,it))return Sr(B),!0;if(Pe[it]||!(Se.tagCheck instanceof Function&&Se.tagCheck(it))&&!R[it]){const vt=fm(B,it,P);return vt===!1&&Ke(ot.afterSanitizeElements,B,null),vt}if(F(B)===Ee.element&&!hm(B)||(it==="noscript"||it==="noembed"||it==="noframes")&&ge(Ty,B.innerHTML))return Sr(B),!0;if(Be&&B.nodeType===Ee.text){const vt=Ss(B.textContent);B.textContent!==vt&&(Ri(t.removed,{element:B.cloneNode()}),B.textContent=vt)}return Ke(ot.afterSanitizeElements,B,null),!1},zl=function(B,P,it){if(lr[P]||Dl(P,B)||Z&&(P==="id"||P==="name")&&(it in r||it in am))return!1;const Ct=zt[P]||Se.attributeCheck instanceof Function&&Se.attributeCheck(P,B);return hr&&ge(Bt,P)||Te&&ge(ct,P)?!0:Ct?$i[P]||ge(Ut,Pi(it,Ft,""))||(P==="src"||P==="xlink:href"||P==="href")&&B!=="script"&&rh(it,"data:")===0&&Wt[B]||cr&&!ge(mt,Pi(it,Ft,""))?!0:!it:Hl(B)&&Bs(fe.tagNameCheck,B)&&Bs(fe.attributeNameCheck,P,B)||P==="is"&&fe.allowCustomizedBuiltInElements&&Bs(fe.tagNameCheck,it)},pm=Yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Hl=function(B){return!pm[Xi(B)]&&ge(Nt,B)},gm=function(B,P,it,Ct){if(D&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!it)switch(u.getAttributeType(B,P)){case"TrustedHTML":return _(Ct);case"TrustedScriptURL":return N(Ct)}return Ct},mm=function(B,P,it,Ct){try{return it?B.setAttributeNS(it,P,Ct):B.setAttribute(P,Ct),Ts(B)?(Sr(B),!1):!0}catch{return $r(P,B),!1}},Yl=function(B){Ke(ot.beforeSanitizeAttributes,B,null);const P=B.attributes;if(!P||Ts(B))return;zt=ql(ot.uponSanitizeAttribute,zt,we,X);const it={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:zt,forceKeepAttr:void 0};let Ct=P.length;const vt=ee(B.nodeName);for(;Ct--;){const $t=P[Ct],Zt=$t.name,Jt=$t.namespaceURI,ve=$t.value,_e=ee(Zt),Ua=ve;let xe=Zt==="value"?Ua:oy(Ua),Ul=!1;if(it.attrName=_e,it.attrValue=xe,it.keepAttr=!0,it.forceKeepAttr=void 0,Ke(ot.uponSanitizeAttribute,B,it),xe=it.attrValue,Q&&(_e==="id"||_e==="name")&&rh(xe,st)!==0&&($r(Zt,B,$t),xe=st+xe,Ul=!0),g&&ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,xe)){$r(Zt,B,$t);continue}if(_e==="attributename"&&eh(xe,"href")){$r(Zt,B,$t);continue}if(!it.forceKeepAttr){if(!it.keepAttr){$r(Zt,B,$t);continue}if(!ur&&ge(By,xe)){$r(Zt,B,$t);continue}if(Be&&(xe=Ss(xe)),!zl(vt,_e,xe)){$r(Zt,B,$t);continue}xe=gm(vt,_e,Jt,xe),xe!==Ua&&mm(B,Zt,Jt,xe)&&Ul&&th(t.removed)}}Ke(ot.afterSanitizeAttributes,B,null)},vs=function(B){let P=null;const it=Pl(B);for(Ke(ot.beforeSanitizeShadowDOM,B,null);P=it.nextNode();)if(Ke(ot.uponSanitizeShadowNode,P,null),Wl(P,B),Yl(P),Kr(P.content)&&vs(P.content),F(P)===Ee.element){const Ct=k(P);Kr(Ct)&&(Ya(Ct),vs(Ct))}Ke(ot.afterSanitizeShadowDOM,B,null)},Ya=function(B){const P=[{node:B,shadow:null}];for(;P.length>0;){const it=P.pop();if(it.shadow){vs(it.shadow);continue}const Ct=it.node,$t=F(Ct)===Ee.element,Zt=C(Ct);if(Zt)for(let Jt=Zt.length-1;Jt>=0;--Jt)P.push({node:Zt[Jt],shadow:null});if($t){const Jt=L?L(Ct):null;if(typeof Jt=="string"&&ee(Jt)==="template"){const ve=Ct.content;Kr(ve)&&P.push({node:ve,shadow:null})}}if($t){const Jt=k(Ct);Kr(Jt)&&P.push({node:null,shadow:Jt},{node:Jt,shadow:null})}}};return t.sanitize=function(nt){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,it=null,Ct=null,vt=null;if(Pa=!nt,Pa&&(nt="<!-->"),typeof nt!="string"&&!Di(nt)&&(nt=uy(nt),typeof nt!="string"))throw Ir("dirty is not a string, aborting");if(!t.isSupported)return nt;V?(R=K,zt=X):za(B),(ot.uponSanitizeElement.length>0||ot.uponSanitizeAttribute.length>0)&&(R=Oe(R)),ot.uponSanitizeAttribute.length>0&&(zt=Oe(zt)),t.removed=[];const $t=yt&&typeof nt!="string"&&Di(nt);if($t){um(nt);const ve=Y(nt);if(typeof ve=="string"){const _e=ee(ve);if(!R[_e]||Pe[_e])throw ks(nt),Ir("root node is forbidden and cannot be sanitized in-place")}if(Ts(nt))throw ks(nt),Ir("root node is clobbered and cannot be sanitized in-place");try{Ya(nt)}catch(_e){throw ks(nt),_e}}else if(Di(nt))P=Rl("<!---->"),it=P.ownerDocument.importNode(nt,!0),it.nodeType===Ee.element&&it.nodeName==="BODY"||it.nodeName==="HTML"?P=it:P.appendChild(it),Ya(P);else{if(!S&&!Be&&!I&&nt.indexOf("<")===-1)return D&&rt?_(nt):nt;if(P=Rl(nt),!P)return S?null:rt?q:""}P&&at&&Sr(P.firstChild);const Zt=$t?nt:P;try{const ve=Pl(Zt);for(;Ct=ve.nextNode();)Wl(Ct,Zt),Yl(Ct),Kr(Ct.content)&&vs(Ct.content)}catch(ve){throw $t&&(ks(nt),Pr(t.removed,_e=>{_e.element&&ws(_e.element)})),ve}if($t)return Pr(t.removed,ve=>{ve.element&&ws(ve.element)}),Be&&Ha(nt),nt;if(S){if(Be&&Ha(P),W)for(vt=bt.call(P.ownerDocument);P.firstChild;)vt.appendChild(P.firstChild);else vt=P;return(zt.shadowroot||zt.shadowrootmode)&&(vt=kt.call(i,vt,!0)),vt}let Jt=I?P.outerHTML:P.innerHTML;return I&&R["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&ge(wy,P.ownerDocument.doctype.name)&&(Jt="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
|
|
4
|
+
`+Jt),Be&&(Jt=Ss(Jt)),D&&rt?_(Jt):Jt},t.setConfig=function(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};za(nt),V=!0,K=R,X=zt},t.clearConfig=function(){Zr=null,V=!1,K=null,X=null,D=tt,q=""},t.isValidAttribute=function(nt,B,P){Zr||za({});const it=ee(nt),Ct=ee(B);return zl(it,Ct,P)},t.addHook=function(nt,B){typeof B=="function"&&Fe(ot,nt)&&Ri(ot[nt],B)},t.removeHook=function(nt,B){if(Fe(ot,nt)){if(B!==void 0){const P=sy(ot[nt],B);return P===-1?void 0:ay(ot[nt],P,1)[0]}return th(ot[nt])}},t.removeHooks=function(nt){Fe(ot,nt)&&(ot[nt]=[])},t.removeAllHooks=function(){ot=dh()},t}var Si=Au(),Eu=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,is=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ay=/\s/,Ey=p(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const a=e.indexOf(`
|
|
5
|
+
`,s);if(a===-1)break;let n=s;for(;n>r&&Ay.test(e[n-1]);)n--;t+=e.slice(r,n)+`
|
|
6
|
+
`,r=a+1,i=r}return t+e.slice(r)},"stripAnyComments"),li,Mu=(li=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(li,"UnknownDiagramError"),li),Hr={},Sa=p(function(e,t){e=Ey(e.replace(Eu,"").replace(is,""));for(const[r,{detector:i}]of Object.entries(Hr))if(i(e,t))return r;throw new Mu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),zo=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ou(t,r,i)},"registerLazyLoadedDiagrams"),Ou=p((e,t,r)=>{Hr[e]&&J.warn(`Detector with key ${e} already exists. Overwriting.`),Hr[e]={detector:t,loader:r},J.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),My=p(e=>Hr[e].loader,"getDiagramLoader"),Ho=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>Ho(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(([a,n])=>{if(typeof n=="object"){if(n===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(n)?[]:{}),typeof s[a]=="object"&&(s[a]=Ho(s[a],n,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=n:Object.defineProperty(e,a,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),se=Ho,ir="#ffffff",sr="#f2f2f2",Ot=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),hi,Oy=(hi=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,a,n,o,c,h,l,u,f,d,m,y,x,C,b,k,T,v,L,A,F,Y,D,q,tt,z,E,M,_,N,O,G,j,lt,bt,xt,kt,ot,At,Et,qt,Bt,ct,mt,Ft,Nt,Ut,R;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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?U(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(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||H(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||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let Lt=0;Lt<this.THEME_COLOR_LIMIT;Lt++)this["cScale"+Lt]=U(this["cScale"+Lt],75);else for(let Lt=0;Lt<this.THEME_COLOR_LIMIT;Lt++)this["cScale"+Lt]=U(this["cScale"+Lt],25);for(let Lt=0;Lt<this.THEME_COLOR_LIMIT;Lt++)this["cScaleInv"+Lt]=this["cScaleInv"+Lt]||$(this["cScale"+Lt]);for(let Lt=0;Lt<this.THEME_COLOR_LIMIT;Lt++)this.darkMode?this["cScalePeer"+Lt]=this["cScalePeer"+Lt]||H(this["cScale"+Lt],10):this["cScalePeer"+Lt]=this["cScalePeer"+Lt]||U(this["cScale"+Lt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Lt=0;Lt<this.THEME_COLOR_LIMIT;Lt++)this["cScaleLabel"+Lt]=this["cScaleLabel"+Lt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Lt=0;Lt<5;Lt++)this["surface"+Lt]=this["surface"+Lt]||w(this.mainBkg,{h:180,s:-15,l:t*(5+Lt*3)}),this["surfacePeer"+Lt]=this["surfacePeer"+Lt]||w(this.mainBkg,{h:180,s:-15,l:t*(8+Lt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(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:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((n=this.cynefin)==null?void 0:n.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((c=this.cynefin)==null?void 0:c.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((l=this.cynefin)==null?void 0:l.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((T=this.radar)==null?void 0:T.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.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:((tt=this.wardley)==null?void 0:tt.axisColor)||this.lineColor,axisTextColor:((z=this.wardley)==null?void 0:z.axisTextColor)||this.primaryTextColor,gridColor:((E=this.wardley)==null?void 0:E.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((_=this.wardley)==null?void 0:_.componentStroke)||this.lineColor,componentLabelColor:((N=this.wardley)==null?void 0:N.componentLabelColor)||this.primaryTextColor,linkStroke:((O=this.wardley)==null?void 0:O.linkStroke)||this.lineColor,evolutionStroke:((G=this.wardley)==null?void 0:G.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((j=this.wardley)==null?void 0:j.annotationStroke)||this.lineColor,annotationTextColor:((lt=this.wardley)==null?void 0:lt.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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((xt=this.xyChart)==null?void 0:xt.backgroundColor)||this.background,titleColor:((kt=this.xyChart)==null?void 0:kt.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,legendTextColor:((At=this.xyChart)==null?void 0:At.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Et=this.xyChart)==null?void 0:Et.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((qt=this.xyChart)==null?void 0:qt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((ct=this.xyChart)==null?void 0:ct.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((mt=this.xyChart)==null?void 0:mt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Ft=this.xyChart)==null?void 0:Ft.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Ut=this.xyChart)==null?void 0:Ut.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.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?U(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr,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]}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},p(hi,"Theme"),hi),$y=p(e=>{const t=new Oy;return t.calculate(e),t},"getThemeVariables"),ci,Iy=(ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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=H($("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Lr(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=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Lr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Lr(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||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(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,a,n,o,c,h,l,u,f,d,m,y,x,C,b,k,T,v,L,A,F,Y,D,q,tt,z,E,M,_,N,O,G,j,lt,bt,xt,kt,ot,At,Et,qt,Bt,ct,mt,Ft,Nt,Ut;this.secondBkg=H(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=H(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=H(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||$(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],10);for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||w(this.mainBkg,{h:30,s:-30,l:-(-10+R*4)}),this["surfacePeer"+R]=this["surfacePeer"+R]||w(this.mainBkg,{h:30,s:-30,l:-(-7+R*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];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 R=0;R<8;R++)this["venn"+(R+1)]=this["venn"+(R+1)]??H(this["cScale"+R],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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((D=this.xyChart)==null?void 0:D.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((tt=this.xyChart)==null?void 0:tt.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:((z=this.radar)==null?void 0:z.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((N=this.radar)==null?void 0:N.curveStrokeWidth)||2,graticuleColor:((O=this.radar)==null?void 0:O.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((G=this.radar)==null?void 0:G.graticuleStrokeWidth)||1,graticuleOpacity:((j=this.radar)==null?void 0:j.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((bt=this.radar)==null?void 0:bt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((xt=this.wardley)==null?void 0:xt.backgroundColor)||this.background,axisColor:((kt=this.wardley)==null?void 0:kt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Et=this.wardley)==null?void 0:Et.componentFill)||this.mainBkg,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((ct=this.wardley)==null?void 0:ct.linkStroke)||this.lineColor,evolutionStroke:((mt=this.wardley)==null?void 0:mt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Ft=this.wardley)==null?void 0:Ft.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.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?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||w(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||H("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||H("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||H("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||H("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||H(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||H(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(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]})}},p(ci,"Theme"),ci),Dy=p(e=>{const t=new Iy;return t.calculate(e),t},"getThemeVariables"),ui,Ry=(ui=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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=Ot(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=Lr(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,a,n,o,c,h,l,u,f,d,m,y,x,C,b,k,T,v,L,A,F,Y,D,q,tt,z,E,M,_,N,O,G,j,lt,bt,xt,kt,ot,At,Et,qt,Bt,ct,mt,Ft,Nt,Ut;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=U(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||U(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||w(this["cScale"+R],{h:180});for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||w(this.mainBkg,{h:30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||w(this.mainBkg,{h:30,l:-(7+R*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 R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((Y=this.radar)==null?void 0:Y.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((D=this.wardley)==null?void 0:D.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((tt=this.wardley)==null?void 0:tt.axisTextColor)||this.primaryTextColor,gridColor:((z=this.wardley)==null?void 0:z.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:((N=this.wardley)==null?void 0:N.linkStroke)||this.lineColor,evolutionStroke:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((G=this.wardley)==null?void 0:G.annotationStroke)||this.lineColor,annotationTextColor:((j=this.wardley)==null?void 0:j.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.xyChart={backgroundColor:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((xt=this.xyChart)==null?void 0:xt.titleColor)||this.primaryTextColor,dataLabelColor:((kt=this.xyChart)==null?void 0:kt.dataLabelColor)||this.primaryTextColor,legendTextColor:((ot=this.xyChart)==null?void 0:ot.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((mt=this.xyChart)==null?void 0:mt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Ft=this.xyChart)==null?void 0:Ft.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U($(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(ui,"Theme"),ui),Py=p(e=>{const t=new Ry;return t.calculate(e),t},"getThemeVariables"),di,qy=(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=H("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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,a,n,o,c,h,l,u,f,d,m,y,x,C,b,k,T,v,L,A,F,Y,D,q,tt,z,E,M,_,N,O,G,j,lt,bt,xt,kt,ot,At,Et,qt,Bt,ct,mt,Ft,Nt,Ut;this.actorBorder=U(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=U(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||U(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||w(this["cScale"+R],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||w(this.mainBkg,{h:30,s:-30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||w(this.mainBkg,{h:30,s:-30,l:-(8+R*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((Y=this.radar)==null?void 0:Y.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((D=this.wardley)==null?void 0:D.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((tt=this.wardley)==null?void 0:tt.axisTextColor)||this.primaryTextColor,gridColor:((z=this.wardley)==null?void 0:z.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((_=this.wardley)==null?void 0:_.componentLabelColor)||this.primaryTextColor,linkStroke:((N=this.wardley)==null?void 0:N.linkStroke)||this.lineColor,evolutionStroke:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((G=this.wardley)==null?void 0:G.annotationStroke)||this.lineColor,annotationTextColor:((j=this.wardley)==null?void 0:j.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.xyChart={backgroundColor:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((xt=this.xyChart)==null?void 0:xt.titleColor)||this.primaryTextColor,dataLabelColor:((kt=this.xyChart)==null?void 0:kt.dataLabelColor)||this.primaryTextColor,legendTextColor:((ot=this.xyChart)==null?void 0:ot.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((mt=this.xyChart)==null?void 0:mt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Ft=this.xyChart)==null?void 0:Ft.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(di,"Theme"),di),Ny=p(e=>{const t=new qy;return t.calculate(e),t},"getThemeVariables"),fi,Wy=(fi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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||H(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,a,n,o,c,h,l,u,f,d,m,y,x,C,b,k,T,v,L,A,F,Y,D,q,tt,z,E,M,_,N,O,G,j,lt,bt,xt,kt,ot,At,Et,qt,Bt,ct,mt,Ft,Nt,Ut;this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(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 R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||$(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||U(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||w(this.mainBkg,{l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||w(this.mainBkg,{l:-(8+R*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=H(this.contrast,30),this.sectionBkgColor2=H(this.contrast,30),this.taskBorderColor=U(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=H(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];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 R=0;R<8;R++)this["venn"+(R+1)]=this["venn"+(R+1)]??this["cScale"+R];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:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((D=this.xyChart)==null?void 0:D.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((tt=this.xyChart)==null?void 0:tt.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((z=this.radar)==null?void 0:z.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((_=this.radar)==null?void 0:_.curveOpacity)||.5,curveStrokeWidth:((N=this.radar)==null?void 0:N.curveStrokeWidth)||2,graticuleColor:((O=this.radar)==null?void 0:O.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((G=this.radar)==null?void 0:G.graticuleStrokeWidth)||1,graticuleOpacity:((j=this.radar)==null?void 0:j.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((bt=this.radar)==null?void 0:bt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((xt=this.wardley)==null?void 0:xt.backgroundColor)||this.background,axisColor:((kt=this.wardley)==null?void 0:kt.axisColor)||this.lineColor,axisTextColor:((ot=this.wardley)==null?void 0:ot.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Et=this.wardley)==null?void 0:Et.componentFill)||this.background,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((ct=this.wardley)==null?void 0:ct.linkStroke)||this.lineColor,evolutionStroke:((mt=this.wardley)==null?void 0:mt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Ft=this.wardley)==null?void 0:Ft.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.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=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(fi,"Theme"),fi),zy=p(e=>{const t=new Wy;return t.calculate(e),t},"getThemeVariables"),pi,Hy=(pi=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=Ot(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 a,n,o,c,h,l,u,f,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?H(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(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||H(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||w(t,{h:30}),this.cScale4=this.cScale4||w(t,{h:60}),this.cScale5=this.cScale5||w(t,{h:90}),this.cScale6=this.cScale6||w(t,{h:120}),this.cScale7=this.cScale7||w(t,{h:150}),this.cScale8=this.cScale8||w(t,{h:210,l:150}),this.cScale9=this.cScale9||w(t,{h:270}),this.cScale10=this.cScale10||w(t,{h:300}),this.cScale11=this.cScale11||w(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||$(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||H(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.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?U(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(pi,"Theme"),pi),Yy=p(e=>{const t=new Hy;return t.calculate(e),t},"getThemeVariables"),gi,Uy=(gi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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=H($("#323D47"),10),this.border1="#ccc",this.border2=Lr(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,a,n,o,c,h,l,u,f,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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.secondBkg=this.secondBkg==="calculated"?H(this.mainBkg,16):this.secondBkg,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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(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||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||$(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||H(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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?U(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=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(gi,"Theme"),gi),Gy=p(e=>{const t=new Uy;return t.calculate(e),t},"getThemeVariables"),mi,jy=(mi=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=Ot("#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 a,n,o,c,h,l,u,f,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?H(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(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||H(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||$(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||H(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.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?U(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(mi,"Theme"),mi),Xy=p(e=>{const t=new jy;return t.calculate(e),t},"getThemeVariables"),yi,Vy=(yi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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=H($("#323D47"),10),this.border1="#ccc",this.border2=Lr(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,a,n,o,c,h,l,u,f,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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.secondBkg=this.secondBkg==="calculated"?H(this.mainBkg,16):this.secondBkg,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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(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||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||$(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||H(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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?U(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(yi,"Theme"),yi),Zy=p(e=>{const t=new Vy;return t.calculate(e),t},"getThemeVariables"),Ci,Ky=(Ci=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=Ot("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){var a,n,o,c,h,l,u,f,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Ae(this.background)?H(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});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||H(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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||$(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||H(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||w(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor;for(let C=0;C<8;C++)this["fillType"+C]=this["fillType"+C]||this.bkgColorArray[C];for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+(C+1)]=this["pie"+(C+1)]||this["cScale"+C];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 C=0;C<8;C++)this["venn"+(C+1)]=this["venn"+(C+1)]??this.borderColorArray[C%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.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?U(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||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(Ci,"Theme"),Ci),Qy=p(e=>{const t=new Ky;return t.calculate(e),t},"getThemeVariables"),xi,Jy=(xi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(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=H($("#323D47"),10),this.border1="#ccc",this.border2=Lr(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){var i,s,a,n,o,c,h,l,u,f,d,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(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.secondBkg=this.secondBkg==="calculated"?H(this.mainBkg,16):this.secondBkg,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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||U(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.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||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;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]||H(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||U(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=U(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||w(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((y,x)=>{this["fillType"+x]=this["fillType"+x]||y});for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["pie"+(y+1)]=this["pie"+(y+1)]||this["cScale"+y];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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 y=0;y<8;y++)this["venn"+(y+1)]=this["venn"+(y+1)]??this.borderColorArray[y%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ae(this.quadrant1Fill)?H(this.quadrant1Fill):U(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:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,legendTextColor:((a=this.xyChart)==null?void 0:a.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((f=this.xyChart)==null?void 0:f.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.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?U(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(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||ir,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||sr}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]})}},p(xi,"Theme"),xi),tC=p(e=>{const t=new Jy;return t.calculate(e),t},"getThemeVariables"),yr={base:{getThemeVariables:$y},dark:{getThemeVariables:Dy},default:{getThemeVariables:Py},forest:{getThemeVariables:Ny},neutral:{getThemeVariables:zy},neo:{getThemeVariables:Yy},"neo-dark":{getThemeVariables:Gy},redux:{getThemeVariables:Xy},"redux-dark":{getThemeVariables:Zy},"redux-color":{getThemeVariables:Qy},"redux-dark-color":{getThemeVariables:tC}},re={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",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},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",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},tu,eu,ru,$u={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:yr.default.getThemeVariables(),sequence:{...re.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:(tu=re.class)==null?void 0:tu.theme,look:(eu=re.class)==null?void 0:eu.look,layout:(ru=re.class)==null?void 0:ru.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},eventmodeling:{...re.eventmodeling},treeView:{...re.treeView,useWidth:void 0},radar:{...re.radar},usecase:{...re.usecase},railroad:{...re.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:{...re.ishikawa},sankey:{...re.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:{...re.venn},cynefin:{...re.cynefin}},Iu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Iu(e[i],"")]:[...r,t+i],[]),"keyify"),eC=new Set(Iu($u,"")),vn=$u,rC={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},iC=p(e=>rC[e]??e,"getDiagramConfigKey"),sC={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},aC=p((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))&&(J.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ta=p(e=>{if(J.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ta(t));return}for(const t of Object.keys(e)){if(J.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!eC.has(t)||e[t]==null){J.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=sC[t];i?aC(e[t],i):(J.debug("sanitizing object",t),ta(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(J.debug("sanitizing css option",t),e[t]=Du(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]="")}J.debug("After sanitization",e)}},"sanitizeDirective"),Du=p(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"),Fr=Object.freeze(vn),oC=["theme","look","layout"],nC=new Set(["classic","handDrawn","neo"]),lC=p((e,t)=>e==="theme"?t==="null"||Object.hasOwn(yr,t):e!=="look"||nC.has(t),"isUsableAppearance"),hC=p((e,t,r)=>{if(!e)return;const i=e[t];return[i==null?void 0:i[r],e[r]].find(s=>s!==void 0&&lC(r,s))},"readAppearance"),ar=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),be=se({},Fr),ea,ra={},Cr=[],ss=se({},Fr),as,cC=p((e,t)=>{if(!as)return;const r=[t,...[...Cr].reverse(),ra,Fr],i=e[as];for(const s of oC)for(const a of r){const n=hC(a,as,s);if(n!==void 0){e[s]=n,(i==null?void 0:i[s])!==void 0&&(i[s]=n);break}}},"resolveAppearance"),Li=p((e,t)=>{let r=se({},e),i={};for(const a of t)qu(a),i=se(i,a);if(r=se(r,i),cC(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(yr,r.theme)){const a=se({},ea),n=se(a.themeVariables||{},i.themeVariables);r.themeVariables=yr[r.theme].getThemeVariables(n)}return ss=r,mC(ss),ss},"updateCurrentConfig"),_n=p(e=>{as=e===void 0?void 0:iC(e),Li(be,Cr)},"setDiagramConfigScope"),uC=p(e=>(be=se({},Fr),be=se(be,e),ra=se({},e),e.theme&&Object.hasOwn(yr,e.theme)&&(be.themeVariables=yr[e.theme].getThemeVariables(e.themeVariables)),Li(be,Cr),be),"setSiteConfig"),dC=p(e=>{ea=se({},e)},"saveConfigFromInitialize"),fC=p(e=>(be=se(be,e),ra=se(ra,e),Li(be,Cr),be),"updateSiteConfig"),Ru=p(()=>se({},be),"getSiteConfig"),Pu=p(e=>(Li(ss,[e]),Qt()),"setConfig"),Qt=p(()=>se({},ss),"getConfig"),qu=p(e=>{e&&(["secure",...be.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(J.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"&&qu(e[t])}))},"sanitize"),pC=p(e=>{var t;ta(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Cr.push(e),Li(be,Cr)},"addDirective"),ia=p((e=be)=>{Cr=[],as=void 0,Li(e,Cr)},"reset"),gC={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."},fh={},Nu=p(e=>{fh[e]||(J.warn(gC[e]),fh[e]=!0)},"issueWarning"),mC=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Nu("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ev=p(()=>{let e={};ea&&(e=se(e,ea));for(const t of Cr)e=se(e,t);return e},"getUserDefinedConfig"),ce=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Nu("FLOWCHART_HTML_LABELS_DEPRECATED"),ar(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ds=/<\/?br\s*\/?>/gi,yC=new RegExp(ds.source,"i"),CC=p(e=>e?Hu(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),xC=(()=>{let e=!1;return()=>{e||(Wu(),e=!0)}})();function Wu(){const e="data-temp-href-target";Si.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Si.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"))})}p(Wu,"setupDompurifyHooks");var zu=p(e=>(xC(),Si.sanitize(e)),"removeScript"),ph=p((e,t)=>{if(ce(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=zu(e):r!=="loose"&&(e=Hu(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=SC(e))}return e},"sanitizeMore"),We=p((e,t)=>e&&(t.dompurifyConfig?e=Si.sanitize(ph(e,t),t.dompurifyConfig).toString():e=Si.sanitize(ph(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),bC=p((e,t)=>typeof e=="string"?We(e,t):e.flat().map(r=>We(r,t)),"sanitizeTextOrArray"),kC=p(e=>yC.test(e),"hasBreaks"),wC=p(e=>e.split(ds),"splitBreaks"),SC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Hu=p(e=>e.replace(ds,"#br#"),"breakToPlaceholder"),TC=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),BC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),vC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),gh=p(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 a=t[i-1],n=t[i+1];_C(a,n)&&(s=a+","+n,i++,r.pop())}r.push(LC(s))}return r.join("")},"parseGenericTypes"),Yo=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),_C=p((e,t)=>{const r=Yo(e,"~"),i=Yo(t,"~");return r===1&&i===1},"shouldCombineSets"),LC=p(e=>{const t=Yo(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("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),mh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Uo=/\$\$(.*?)\$\$/g,ls=p(e=>{var t;return(((t=e.match(Uo))==null?void 0:t.length)??0)>0},"hasKatex"),Mv=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Yu(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"),FC=p(async(e,t)=>{if(!ls(e))return e;if(!(mh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Uo,"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||!mh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ds).map(s=>ls(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Uo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Yu=p(async(e,t)=>We(await FC(e,t),t),"renderKatexSanitized"),fs={getRows:CC,sanitizeText:We,sanitizeTextOrArray:bC,hasBreaks:kC,splitBreaks:wC,lineBreakRegex:ds,removeScript:zu,getUrl:TC,evaluate:ar,getMax:BC,getMin:vC},AC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),EC=p(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"),Uu=p(function(e,t,r,i){const s=EC(t,r,i);AC(e,s)},"configureSvgSize"),MC=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;J.info(`SVG bounds: ${a}x${n}`,s);let o=0,c=0;J.info(`Graph bounds: ${o}x${c}`,e),o=a+r*2,c=n+r*2,J.info(`Calculated bounds: ${o}x${c}`),Uu(t,c,o,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Hs={};function Go(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
7
|
+
`)}p(Go,"cssStyleSheetToString");var OC=p((e,t,r,i)=>{let s="";return e in Hs&&Hs[e]?s=Hs[e]({...r,svgId:i}):J.warn(`No theme found for ${e}`),`& {
|
|
8
|
+
font-family: ${r.fontFamily};
|
|
9
|
+
font-size: ${r.fontSize};
|
|
10
|
+
fill: ${r.textColor}
|
|
11
|
+
}
|
|
12
|
+
@keyframes edge-animation-frame {
|
|
13
|
+
from {
|
|
14
|
+
stroke-dashoffset: 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
@keyframes dash {
|
|
18
|
+
to {
|
|
19
|
+
stroke-dashoffset: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
& .edge-animation-slow {
|
|
23
|
+
stroke-dasharray: 9,5 !important;
|
|
24
|
+
stroke-dashoffset: 900;
|
|
25
|
+
animation: dash 50s linear infinite;
|
|
26
|
+
stroke-linecap: round;
|
|
27
|
+
}
|
|
28
|
+
& .edge-animation-fast {
|
|
29
|
+
stroke-dasharray: 9,5 !important;
|
|
30
|
+
stroke-dashoffset: 900;
|
|
31
|
+
animation: dash 20s linear infinite;
|
|
32
|
+
stroke-linecap: round;
|
|
33
|
+
}
|
|
34
|
+
/* Classes common for multiple diagrams */
|
|
35
|
+
|
|
36
|
+
& .error-icon {
|
|
37
|
+
fill: ${r.errorBkgColor};
|
|
38
|
+
}
|
|
39
|
+
& .error-text {
|
|
40
|
+
fill: ${r.errorTextColor};
|
|
41
|
+
stroke: ${r.errorTextColor};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
& .edge-thickness-normal {
|
|
45
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
46
|
+
}
|
|
47
|
+
& .edge-thickness-thick {
|
|
48
|
+
stroke-width: 3.5px
|
|
49
|
+
}
|
|
50
|
+
& .edge-pattern-solid {
|
|
51
|
+
stroke-dasharray: 0;
|
|
52
|
+
}
|
|
53
|
+
& .edge-thickness-invisible {
|
|
54
|
+
stroke-width: 0;
|
|
55
|
+
fill: none;
|
|
56
|
+
}
|
|
57
|
+
& .edge-pattern-dashed{
|
|
58
|
+
stroke-dasharray: 3;
|
|
59
|
+
}
|
|
60
|
+
.edge-pattern-dotted {
|
|
61
|
+
stroke-dasharray: 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
& .marker {
|
|
65
|
+
fill: ${r.lineColor};
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
& .marker.cross {
|
|
69
|
+
stroke: ${r.lineColor};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& svg {
|
|
73
|
+
font-family: ${r.fontFamily};
|
|
74
|
+
font-size: ${r.fontSize};
|
|
75
|
+
}
|
|
76
|
+
& p {
|
|
77
|
+
margin: 0
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
${s}
|
|
81
|
+
.node .neo-node {
|
|
82
|
+
stroke: ${r.nodeBorder};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
86
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
87
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
88
|
+
}
|
|
89
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
90
|
+
filter: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
[data-look="neo"].node path {
|
|
95
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
96
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-look="neo"].node .outer-path {
|
|
100
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-look="neo"].node .neo-line path {
|
|
104
|
+
stroke: ${r.nodeBorder};
|
|
105
|
+
filter: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-look="neo"].node circle{
|
|
109
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
110
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-look="neo"].node circle .state-start{
|
|
114
|
+
fill: #000000;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-look="neo"].icon-shape .icon {
|
|
118
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
119
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
123
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
124
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
${t}
|
|
128
|
+
`},"getStyles"),$C=p((e,t)=>{t!==void 0&&(Hs[e]=t)},"addStylesForDiagram"),IC=OC,Gu={};Pm(Gu,{clear:()=>DC,getAccDescription:()=>NC,getAccTitle:()=>PC,getDiagramTitle:()=>zC,setAccDescription:()=>qC,setAccTitle:()=>RC,setDiagramTitle:()=>WC});var Ln="",Fn="",An="",En=p(e=>We(e,Qt()),"sanitizeText"),DC=p(()=>{Ln="",An="",Fn=""},"clear"),RC=p(e=>{Ln=En(e).replace(/^\s+/g,"")},"setAccTitle"),PC=p(()=>Ln,"getAccTitle"),qC=p(e=>{An=En(e).replace(/\n\s+/g,`
|
|
129
|
+
`)},"setAccDescription"),NC=p(()=>An,"getAccDescription"),WC=p(e=>{Fn=En(e)},"setDiagramTitle"),zC=p(()=>Fn,"getDiagramTitle"),yh=J,HC=Bn,Rt=Qt,Ov=Pu,$v=Fr,Mn=p(e=>We(e,Rt()),"sanitizeText"),YC=MC,UC=p(()=>Gu,"getCommonDb"),sa={},aa=p((e,t,r)=>{var i;sa[e]&&yh.warn(`Diagram with id ${e} already registered. Overwriting.`),sa[e]=t,r&&Ou(e,r),$C(e,t.styles),(i=t.injectUtils)==null||i.call(t,yh,HC,Rt,Mn,YC,UC(),()=>{})},"registerDiagram"),jo=p(e=>{if(e in sa)return sa[e];throw new GC(e)},"getDiagram"),bi,GC=(bi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(bi,"DiagramNotFoundError"),bi),jC={value:()=>{}};function ju(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ys(r)}function Ys(e){this._=e}function XC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ys.prototype=ju.prototype={constructor:Ys,on:function(e,t){var r=this._,i=XC(e+"",r),s,a=-1,n=i.length;if(arguments.length<2){for(;++a<n;)if((s=(e=i[a]).type)&&(s=VC(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<n;)if(s=(e=i[a]).type)r[s]=Ch(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Ch(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ys(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function VC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Ch(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=jC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Xo="http://www.w3.org/1999/xhtml";const xh={svg:"http://www.w3.org/2000/svg",xhtml:Xo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ta(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),xh.hasOwnProperty(t)?{space:xh[t],local:e}:e}function ZC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Xo&&t.documentElement.namespaceURI===Xo?t.createElement(e):t.createElementNS(r,e)}}function KC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xu(e){var t=Ta(e);return(t.local?KC:ZC)(t)}function QC(){}function On(e){return e==null?QC:function(){return this.querySelector(e)}}function JC(e){typeof e!="function"&&(e=On(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=new Array(n),c,h,l=0;l<n;++l)(c=a[l])&&(h=e.call(c,c.__data__,l,a))&&("__data__"in c&&(h.__data__=c.__data__),o[l]=h);return new Ie(i,this._parents)}function t0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function e0(){return[]}function Vu(e){return e==null?e0:function(){return this.querySelectorAll(e)}}function r0(e){return function(){return t0(e.apply(this,arguments))}}function i0(e){typeof e=="function"?e=r0(e):e=Vu(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var n=t[a],o=n.length,c,h=0;h<o;++h)(c=n[h])&&(i.push(e.call(c,c.__data__,h,n)),s.push(c));return new Ie(i,s)}function Zu(e){return function(){return this.matches(e)}}function Ku(e){return function(t){return t.matches(e)}}var s0=Array.prototype.find;function a0(e){return function(){return s0.call(this.children,e)}}function o0(){return this.firstElementChild}function n0(e){return this.select(e==null?o0:a0(typeof e=="function"?e:Ku(e)))}var l0=Array.prototype.filter;function h0(){return Array.from(this.children)}function c0(e){return function(){return l0.call(this.children,e)}}function u0(e){return this.selectAll(e==null?h0:c0(typeof e=="function"?e:Ku(e)))}function d0(e){typeof e!="function"&&(e=Zu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],c,h=0;h<n;++h)(c=a[h])&&e.call(c,c.__data__,h,a)&&o.push(c);return new Ie(i,this._parents)}function Qu(e){return new Array(e.length)}function f0(){return new Ie(this._enter||this._groups.map(Qu),this._parents)}function oa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}oa.prototype={constructor:oa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function p0(e){return function(){return e}}function g0(e,t,r,i,s,a){for(var n=0,o,c=t.length,h=a.length;n<h;++n)(o=t[n])?(o.__data__=a[n],i[n]=o):r[n]=new oa(e,a[n]);for(;n<c;++n)(o=t[n])&&(s[n]=o)}function m0(e,t,r,i,s,a,n){var o,c,h=new Map,l=t.length,u=a.length,f=new Array(l),d;for(o=0;o<l;++o)(c=t[o])&&(f[o]=d=n.call(c,c.__data__,o,t)+"",h.has(d)?s[o]=c:h.set(d,c));for(o=0;o<u;++o)d=n.call(e,a[o],o,a)+"",(c=h.get(d))?(i[o]=c,c.__data__=a[o],h.delete(d)):r[o]=new oa(e,a[o]);for(o=0;o<l;++o)(c=t[o])&&h.get(f[o])===c&&(s[o]=c)}function y0(e){return e.__data__}function C0(e,t){if(!arguments.length)return Array.from(this,y0);var r=t?m0:g0,i=this._parents,s=this._groups;typeof e!="function"&&(e=p0(e));for(var a=s.length,n=new Array(a),o=new Array(a),c=new Array(a),h=0;h<a;++h){var l=i[h],u=s[h],f=u.length,d=x0(e.call(l,l&&l.__data__,h,i)),m=d.length,y=o[h]=new Array(m),x=n[h]=new Array(m),C=c[h]=new Array(f);r(l,u,y,x,C,d,t);for(var b=0,k=0,T,v;b<m;++b)if(T=y[b]){for(b>=k&&(k=b+1);!(v=x[k])&&++k<m;);T._next=v||null}}return n=new Ie(n,i),n._enter=o,n._exit=c,n}function x0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b0(){return new Ie(this._exit||this._groups.map(Qu),this._parents)}function k0(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function w0(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,n=Math.min(s,a),o=new Array(s),c=0;c<n;++c)for(var h=r[c],l=i[c],u=h.length,f=o[c]=new Array(u),d,m=0;m<u;++m)(d=h[m]||l[m])&&(f[m]=d);for(;c<s;++c)o[c]=r[c];return new Ie(o,this._parents)}function S0(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],n;--s>=0;)(n=i[s])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function T0(e){e||(e=B0);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var n=r[a],o=n.length,c=s[a]=new Array(o),h,l=0;l<o;++l)(h=n[l])&&(c[l]=h);c.sort(t)}return new Ie(s,this._parents).order()}function B0(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function v0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _0(){return Array.from(this)}function L0(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var n=i[s];if(n)return n}return null}function F0(){let e=0;for(const t of this)++e;return e}function A0(){return!this.node()}function E0(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,n=s.length,o;a<n;++a)(o=s[a])&&e.call(o,o.__data__,a,s);return this}function M0(e){return function(){this.removeAttribute(e)}}function O0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $0(e,t){return function(){this.setAttribute(e,t)}}function I0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function D0(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function R0(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function P0(e,t){var r=Ta(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?O0:M0:typeof t=="function"?r.local?R0:D0:r.local?I0:$0)(r,t))}function Ju(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function q0(e){return function(){this.style.removeProperty(e)}}function N0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function W0(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function z0(e,t,r){return arguments.length>1?this.each((t==null?q0:typeof t=="function"?W0:N0)(e,t,r??"")):Ti(this.node(),e)}function Ti(e,t){return e.style.getPropertyValue(t)||Ju(e).getComputedStyle(e,null).getPropertyValue(t)}function H0(e){return function(){delete this[e]}}function Y0(e,t){return function(){this[e]=t}}function U0(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function G0(e,t){return arguments.length>1?this.each((t==null?H0:typeof t=="function"?U0:Y0)(e,t)):this.node()[e]}function td(e){return e.trim().split(/^|\s+/)}function $n(e){return e.classList||new ed(e)}function ed(e){this._node=e,this._names=td(e.getAttribute("class")||"")}ed.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function rd(e,t){for(var r=$n(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function id(e,t){for(var r=$n(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function j0(e){return function(){rd(this,e)}}function X0(e){return function(){id(this,e)}}function V0(e,t){return function(){(t.apply(this,arguments)?rd:id)(this,e)}}function Z0(e,t){var r=td(e+"");if(arguments.length<2){for(var i=$n(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?V0:t?j0:X0)(r,t))}function K0(){this.textContent=""}function Q0(e){return function(){this.textContent=e}}function J0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tx(e){return arguments.length?this.each(e==null?K0:(typeof e=="function"?J0:Q0)(e)):this.node().textContent}function ex(){this.innerHTML=""}function rx(e){return function(){this.innerHTML=e}}function ix(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function sx(e){return arguments.length?this.each(e==null?ex:(typeof e=="function"?ix:rx)(e)):this.node().innerHTML}function ax(){this.nextSibling&&this.parentNode.appendChild(this)}function ox(){return this.each(ax)}function nx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lx(){return this.each(nx)}function hx(e){var t=typeof e=="function"?e:Xu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function cx(){return null}function ux(e,t){var r=typeof e=="function"?e:Xu(e),i=t==null?cx:typeof t=="function"?t:On(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function dx(){var e=this.parentNode;e&&e.removeChild(this)}function fx(){return this.each(dx)}function px(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mx(e){return this.select(e?gx:px)}function yx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Cx(e){return function(t){e.call(this,t,this.__data__)}}function xx(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function bx(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function kx(e,t,r){return function(){var i=this.__on,s,a=Cx(t);if(i){for(var n=0,o=i.length;n<o;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function wx(e,t,r){var i=xx(e+""),s,a=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,h=o.length,l;c<h;++c)for(s=0,l=o[c];s<a;++s)if((n=i[s]).type===l.type&&n.name===l.name)return l.value}return}for(o=t?kx:bx,s=0;s<a;++s)this.each(o(i[s],t,r));return this}function sd(e,t,r){var i=Ju(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Sx(e,t){return function(){return sd(this,e,t)}}function Tx(e,t){return function(){return sd(this,e,t.apply(this,arguments))}}function Bx(e,t){return this.each((typeof t=="function"?Tx:Sx)(e,t))}function*vx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,n;s<a;++s)(n=i[s])&&(yield n)}var ad=[null];function Ie(e,t){this._groups=e,this._parents=t}function ps(){return new Ie([[document.documentElement]],ad)}function _x(){return this}Ie.prototype=ps.prototype={constructor:Ie,select:JC,selectAll:i0,selectChild:n0,selectChildren:u0,filter:d0,data:C0,enter:f0,exit:b0,join:k0,merge:w0,selection:_x,order:S0,sort:T0,call:v0,nodes:_0,node:L0,size:F0,empty:A0,each:E0,attr:P0,style:z0,property:G0,classed:Z0,text:tx,html:sx,raise:ox,lower:lx,append:hx,insert:ux,remove:fx,clone:mx,datum:yx,on:wx,dispatch:Bx,[Symbol.iterator]:vx};function Dt(e){return typeof e=="string"?new Ie([[document.querySelector(e)]],[document.documentElement]):new Ie([[e]],ad)}var Bi=0,Vi=0,Ni=0,od=1e3,na,Zi,la=0,Yr=0,Ba=0,hs=typeof performance=="object"&&performance.now?performance:Date,nd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function In(){return Yr||(nd(Lx),Yr=hs.now()+Ba)}function Lx(){Yr=0}function ha(){this._call=this._time=this._next=null}ha.prototype=ld.prototype={constructor:ha,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?In():+r)+(t==null?0:+t),!this._next&&Zi!==this&&(Zi?Zi._next=this:na=this,Zi=this),this._call=e,this._time=r,Vo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vo())}};function ld(e,t,r){var i=new ha;return i.restart(e,t,r),i}function Fx(){In(),++Bi;for(var e=na,t;e;)(t=Yr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Bi}function bh(){Yr=(la=hs.now())+Ba,Bi=Vi=0;try{Fx()}finally{Bi=0,Ex(),Yr=0}}function Ax(){var e=hs.now(),t=e-la;t>od&&(Ba-=t,la=e)}function Ex(){for(var e,t=na,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:na=r);Zi=e,Vo(i)}function Vo(e){if(!Bi){Vi&&(Vi=clearTimeout(Vi));var t=e-Yr;t>24?(e<1/0&&(Vi=setTimeout(bh,e-hs.now()-Ba)),Ni&&(Ni=clearInterval(Ni))):(Ni||(la=hs.now(),Ni=setInterval(Ax,od)),Bi=1,nd(bh))}}function kh(e,t,r){var i=new ha;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Mx=ju("start","end","cancel","interrupt"),Ox=[],hd=0,wh=1,Zo=2,Us=3,Sh=4,Ko=5,Gs=6;function va(e,t,r,i,s,a){var n=e.__transition;if(!n)e.__transition={};else if(r in n)return;$x(e,r,{name:t,index:i,group:s,on:Mx,tween:Ox,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:hd})}function Dn(e,t){var r=Xe(e,t);if(r.state>hd)throw new Error("too late; already scheduled");return r}function or(e,t){var r=Xe(e,t);if(r.state>Us)throw new Error("too late; already running");return r}function Xe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function $x(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=ld(a,0,r.time);function a(h){r.state=wh,r.timer.restart(n,r.delay,r.time),r.delay<=h&&n(h-r.delay)}function n(h){var l,u,f,d;if(r.state!==wh)return c();for(l in i)if(d=i[l],d.name===r.name){if(d.state===Us)return kh(n);d.state===Sh?(d.state=Gs,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[l]):+l<t&&(d.state=Gs,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[l])}if(kh(function(){r.state===Us&&(r.state=Sh,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=Zo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Zo){for(r.state=Us,s=new Array(f=r.tween.length),l=0,u=-1;l<f;++l)(d=r.tween[l].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function o(h){for(var l=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(c),r.state=Ko,1),u=-1,f=s.length;++u<f;)s[u].call(e,l);r.state===Ko&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Gs,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Ix(e,t){var r=e.__transition,i,s,a=!0,n;if(r){t=t==null?null:t+"";for(n in r){if((i=r[n]).name!==t){a=!1;continue}s=i.state>Zo&&i.state<Ko,i.state=Gs,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[n]}a&&delete e.__transition}}function Dx(e){return this.each(function(){Ix(this,e)})}function Rx(e,t){var r,i;return function(){var s=or(this,e),a=s.tween;if(a!==r){i=r=a;for(var n=0,o=i.length;n<o;++n)if(i[n].name===t){i=i.slice(),i.splice(n,1);break}}s.tween=i}}function Px(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=or(this,e),n=a.tween;if(n!==i){s=(i=n).slice();for(var o={name:t,value:r},c=0,h=s.length;c<h;++c)if(s[c].name===t){s[c]=o;break}c===h&&s.push(o)}a.tween=s}}function qx(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Xe(this.node(),r).tween,s=0,a=i.length,n;s<a;++s)if((n=i[s]).name===e)return n.value;return null}return this.each((t==null?Rx:Px)(r,e,t))}function Rn(e,t,r){var i=e._id;return e.each(function(){var s=or(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Xe(s,i).value[t]}}function cd(e,t){var r;return(typeof t=="number"?Rr:t instanceof jl?Xl:(r=jl(t))?(t=r,Xl):bm)(e,t)}function Nx(e){return function(){this.removeAttribute(e)}}function Wx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function zx(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttribute(e);return n===s?null:n===i?a:a=t(i=n,r)}}function Hx(e,t,r){var i,s=r+"",a;return function(){var n=this.getAttributeNS(e.space,e.local);return n===s?null:n===i?a:a=t(i=n,r)}}function Yx(e,t,r){var i,s,a;return function(){var n,o=r(this),c;return o==null?void this.removeAttribute(e):(n=this.getAttribute(e),c=o+"",n===c?null:n===i&&c===s?a:(s=c,a=t(i=n,o)))}}function Ux(e,t,r){var i,s,a;return function(){var n,o=r(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(n=this.getAttributeNS(e.space,e.local),c=o+"",n===c?null:n===i&&c===s?a:(s=c,a=t(i=n,o)))}}function Gx(e,t){var r=Ta(e),i=r==="transform"?Dm:cd;return this.attrTween(e,typeof t=="function"?(r.local?Ux:Yx)(r,i,Rn(this,"attr."+e,t)):t==null?(r.local?Wx:Nx)(r):(r.local?Hx:zx)(r,i,t))}function jx(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Xx(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Vx(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Xx(e,a)),r}return s._value=t,s}function Zx(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&jx(e,a)),r}return s._value=t,s}function Kx(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Ta(e);return this.tween(r,(i.local?Vx:Zx)(i,t))}function Qx(e,t){return function(){Dn(this,e).delay=+t.apply(this,arguments)}}function Jx(e,t){return t=+t,function(){Dn(this,e).delay=t}}function tb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Qx:Jx)(t,e)):Xe(this.node(),t).delay}function eb(e,t){return function(){or(this,e).duration=+t.apply(this,arguments)}}function rb(e,t){return t=+t,function(){or(this,e).duration=t}}function ib(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eb:rb)(t,e)):Xe(this.node(),t).duration}function sb(e,t){if(typeof t!="function")throw new Error;return function(){or(this,e).ease=t}}function ab(e){var t=this._id;return arguments.length?this.each(sb(t,e)):Xe(this.node(),t).ease}function ob(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;or(this,e).ease=r}}function nb(e){if(typeof e!="function")throw new Error;return this.each(ob(this._id,e))}function lb(e){typeof e!="function"&&(e=Zu(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],c,h=0;h<n;++h)(c=a[h])&&e.call(c,c.__data__,h,a)&&o.push(c);return new xr(i,this._parents,this._name,this._id)}function hb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),n=new Array(i),o=0;o<a;++o)for(var c=t[o],h=r[o],l=c.length,u=n[o]=new Array(l),f,d=0;d<l;++d)(f=c[d]||h[d])&&(u[d]=f);for(;o<i;++o)n[o]=t[o];return new xr(n,this._parents,this._name,this._id)}function cb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function ub(e,t,r){var i,s,a=cb(t)?Dn:or;return function(){var n=a(this,e),o=n.on;o!==i&&(s=(i=o).copy()).on(t,r),n.on=s}}function db(e,t){var r=this._id;return arguments.length<2?Xe(this.node(),r).on.on(e):this.each(ub(r,e,t))}function fb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pb(){return this.on("end.remove",fb(this._id))}function gb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=On(e));for(var i=this._groups,s=i.length,a=new Array(s),n=0;n<s;++n)for(var o=i[n],c=o.length,h=a[n]=new Array(c),l,u,f=0;f<c;++f)(l=o[f])&&(u=e.call(l,l.__data__,f,o))&&("__data__"in l&&(u.__data__=l.__data__),h[f]=u,va(h[f],t,r,f,h,Xe(l,r)));return new xr(a,this._parents,t,r)}function mb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Vu(e));for(var i=this._groups,s=i.length,a=[],n=[],o=0;o<s;++o)for(var c=i[o],h=c.length,l,u=0;u<h;++u)if(l=c[u]){for(var f=e.call(l,l.__data__,u,c),d,m=Xe(l,r),y=0,x=f.length;y<x;++y)(d=f[y])&&va(d,t,r,y,f,m);a.push(f),n.push(l)}return new xr(a,n,t,r)}var yb=ps.prototype.constructor;function Cb(){return new yb(this._groups,this._parents)}function xb(e,t){var r,i,s;return function(){var a=Ti(this,e),n=(this.style.removeProperty(e),Ti(this,e));return a===n?null:a===r&&n===i?s:s=t(r=a,i=n)}}function ud(e){return function(){this.style.removeProperty(e)}}function bb(e,t,r){var i,s=r+"",a;return function(){var n=Ti(this,e);return n===s?null:n===i?a:a=t(i=n,r)}}function kb(e,t,r){var i,s,a;return function(){var n=Ti(this,e),o=r(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),Ti(this,e))),n===c?null:n===i&&c===s?a:(s=c,a=t(i=n,o))}}function wb(e,t){var r,i,s,a="style."+t,n="end."+a,o;return function(){var c=or(this,e),h=c.on,l=c.value[a]==null?o||(o=ud(t)):void 0;(h!==r||s!==l)&&(i=(r=h).copy()).on(n,s=l),c.on=i}}function Sb(e,t,r){var i=(e+="")=="transform"?Im:cd;return t==null?this.styleTween(e,xb(e,i)).on("end.style."+e,ud(e)):typeof t=="function"?this.styleTween(e,kb(e,i,Rn(this,"style."+e,t))).each(wb(this._id,e)):this.styleTween(e,bb(e,i,t),r).on("end.style."+e,null)}function Tb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Bb(e,t,r){var i,s;function a(){var n=t.apply(this,arguments);return n!==s&&(i=(s=n)&&Tb(e,n,r)),i}return a._value=t,a}function vb(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Bb(e,t,r??""))}function _b(e){return function(){this.textContent=e}}function Lb(e){return function(){var t=e(this);this.textContent=t??""}}function Fb(e){return this.tween("text",typeof e=="function"?Lb(Rn(this,"text",e)):_b(e==null?"":e+""))}function Ab(e){return function(t){this.textContent=e.call(this,t)}}function Eb(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Ab(s)),t}return i._value=e,i}function Mb(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Eb(e))}function Ob(){for(var e=this._name,t=this._id,r=dd(),i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,c,h=0;h<o;++h)if(c=n[h]){var l=Xe(c,t);va(c,e,r,h,n,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new xr(i,this._parents,e,r)}function $b(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,n){var o={value:n},c={value:function(){--s===0&&a()}};r.each(function(){var h=or(this,i),l=h.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),h.on=t}),s===0&&a()})}var Ib=0;function xr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function dd(){return++Ib}var fr=ps.prototype;xr.prototype={constructor:xr,select:gb,selectAll:mb,selectChild:fr.selectChild,selectChildren:fr.selectChildren,filter:lb,merge:hb,selection:Cb,transition:Ob,call:fr.call,nodes:fr.nodes,node:fr.node,size:fr.size,empty:fr.empty,each:fr.each,on:db,attr:Gx,attrTween:Kx,style:Sb,styleTween:vb,text:Fb,textTween:Mb,remove:pb,tween:qx,delay:tb,duration:ib,ease:ab,easeVarying:nb,end:$b,[Symbol.iterator]:fr[Symbol.iterator]};function Db(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Rb={time:null,delay:0,duration:250,ease:Db};function Pb(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function qb(e){var t,r;e instanceof xr?(t=e._id,e=e._name):(t=dd(),(r=Rb).time=In(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var n=i[a],o=n.length,c,h=0;h<o;++h)(c=n[h])&&va(c,e,t,h,n,r||Pb(c,t));return new xr(i,this._parents,e,t)}ps.prototype.interrupt=Dx;ps.prototype.transition=qb;function Ki(e,t,r){this.k=e,this.x=t,this.y=r}Ki.prototype={constructor:Ki,scale:function(e){return e===1?this:new Ki(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ki(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Ki.prototype;var Nb=p(e=>{var s;const{securityLevel:t}=Rt();let r=Dt("body");if(t==="sandbox"){const n=((s=Dt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Dt(n.body)}return r.select(`#${e}`)},"selectSvgElement");function fd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(fd,"getDefaultExportFromCjs");var pe={},Fs={},Br={},Th;function Fi(){if(Th)return Br;Th=1;function e(n){return typeof n>"u"||n===null}p(e,"isNothing");function t(n){return typeof n=="object"&&n!==null}p(t,"isObject");function r(n){return Array.isArray(n)?n:e(n)?[]:[n]}p(r,"toArray");function i(n,o){if(o){const c=Object.keys(o);for(let h=0,l=c.length;h<l;h+=1){const u=c[h];n[u]=o[u]}}return n}p(i,"extend");function s(n,o){let c="";for(let h=0;h<o;h+=1)c+=n;return c}p(s,"repeat");function a(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}return p(a,"isNegativeZero"),Br.isNothing=e,Br.isObject=t,Br.toArray=r,Br.repeat=s,Br.isNegativeZero=a,Br.extend=i,Br}p(Fi,"requireCommon");var Ja,Bh;function Ai(){if(Bh)return Ja;Bh=1;function e(r,i){let s="";const a=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+=`
|
|
130
|
+
|
|
131
|
+
`+r.mark.snippet),a+" "+s):a}p(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 p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Ja=t,Ja}p(Ai,"requireException");var to,vh;function pd(){if(vh)return to;vh=1;const e=Fi();function t(s,a,n,o,c){let h="",l="";const u=Math.floor(c/2)-1;return o-a>u&&(h=" ... ",a=o-u+h.length),n-o>u&&(l=" ...",n=o+u-l.length),{str:h+s.slice(a,n).replace(/\t/g,"→")+l,pos:o-a+h.length}}p(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}p(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const n=/\r?\n|\r|\0/g,o=[0],c=[];let h,l=-1;for(;h=n.exec(s.buffer);)c.push(h.index),o.push(h.index+h[0].length),s.position<=h.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u="";const f=Math.min(s.line+a.linesAfter,c.length).toString().length,d=a.maxLength-(a.indent+f+3);for(let y=1;y<=a.linesBefore&&!(l-y<0);y++){const x=t(s.buffer,o[l-y],c[l-y],s.position-(o[l]-o[l-y]),d);u=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),f)+" | "+x.str+`
|
|
132
|
+
`+u}const m=t(s.buffer,o[l],c[l],s.position,d);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),f)+" | "+m.str+`
|
|
133
|
+
`,u+=e.repeat("-",a.indent+f+3+m.pos)+`^
|
|
134
|
+
`;for(let y=1;y<=a.linesAfter&&!(l+y>=c.length);y++){const x=t(s.buffer,o[l+y],c[l+y],s.position-(o[l]-o[l+y]),d);u+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),f)+" | "+x.str+`
|
|
135
|
+
`}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),to=i,to}p(pd,"requireSnippet");var eo,_h;function Ce(){if(_h)return eo;_h=1;const e=Ai(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const n={};return a!==null&&Object.keys(a).forEach(function(o){a[o].forEach(function(c){n[String(c)]=o})}),n}p(i,"compileStyleAliases");function s(a,n){if(n=n||{},Object.keys(n).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+a+'" YAML type.')}),this.options=n,this.tag=a,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=i(n.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return p(s,"Type2"),eo=s,eo}p(Ce,"requireType");var ro,Lh;function Pn(){if(Lh)return ro;Lh=1;const e=Ai(),t=Ce();function r(a,n){const o=[];return a[n].forEach(function(c){let h=o.length;o.forEach(function(l,u){l.tag===c.tag&&l.kind===c.kind&&l.multi===c.multi&&(h=u)}),o[h]=c}),o}p(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(o){o.multi?(a.multi[o.kind].push(o),a.multi.fallback.push(o)):a[o.kind][o.tag]=a.fallback[o.tag]=o}p(n,"collectType");for(let o=0,c=arguments.length;o<c;o+=1)arguments[o].forEach(n);return a}p(i,"compileMap");function s(a){return this.extend(a)}return p(s,"Schema2"),s.prototype.extend=p(function(n){let o=[],c=[];if(n instanceof t)c.push(n);else if(Array.isArray(n))c=c.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(o=o.concat(n.implicit)),n.explicit&&(c=c.concat(n.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.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(l.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const h=Object.create(s.prototype);return h.implicit=(this.implicit||[]).concat(o),h.explicit=(this.explicit||[]).concat(c),h.compiledImplicit=r(h,"implicit"),h.compiledExplicit=r(h,"explicit"),h.compiledTypeMap=i(h.compiledImplicit,h.compiledExplicit),h},"extend"),ro=s,ro}p(Pn,"requireSchema");var io,Fh;function qn(){if(Fh)return io;Fh=1;const e=Ce();return io=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),io}p(qn,"requireStr");var so,Ah;function Nn(){if(Ah)return so;Ah=1;const e=Ce();return so=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),so}p(Nn,"requireSeq");var ao,Eh;function Wn(){if(Eh)return ao;Eh=1;const e=Ce();return ao=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),ao}p(Wn,"requireMap");var oo,Mh;function zn(){if(Mh)return oo;Mh=1;const e=Pn();return oo=new e({explicit:[qn(),Nn(),Wn()]}),oo}p(zn,"requireFailsafe");var no,Oh;function Hn(){if(Oh)return no;Oh=1;const e=Ce();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),no=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),no}p(Hn,"require_null");var lo,$h;function Yn(){if($h)return lo;$h=1;const e=Ce();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),lo=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),lo}p(Yn,"requireBool");var ho,Ih;function Un(){if(Ih)return ho;Ih=1;const e=Fi(),t=Ce();function r(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}p(r,"isHexCode");function i(h){return h>=48&&h<=55}p(i,"isOctCode");function s(h){return h>=48&&h<=57}p(s,"isDecCode");function a(h){if(h===null)return!1;const l=h.length;let u=0,f=!1;if(!l)return!1;let d=h[u];if((d==="-"||d==="+")&&(d=h[++u]),d==="0"){if(u+1===l)return!0;if(d=h[++u],d==="b"){for(u++;u<l;u++){if(d=h[u],d!=="0"&&d!=="1")return!1;f=!0}return f&&isFinite(n(h))}if(d==="x"){for(u++;u<l;u++){if(!r(h.charCodeAt(u)))return!1;f=!0}return f&&isFinite(n(h))}if(d==="o"){for(u++;u<l;u++){if(!i(h.charCodeAt(u)))return!1;f=!0}return f&&isFinite(n(h))}}for(;u<l;u++){if(!s(h.charCodeAt(u)))return!1;f=!0}return f?isFinite(n(h)):!1}p(a,"resolveYamlInteger");function n(h){let l=h,u=1,f=l[0];if((f==="-"||f==="+")&&(f==="-"&&(u=-1),l=l.slice(1),f=l[0]),l==="0")return 0;if(f==="0"){if(l[1]==="b")return u*parseInt(l.slice(2),2);if(l[1]==="x")return u*parseInt(l.slice(2),16);if(l[1]==="o")return u*parseInt(l.slice(2),8)}return u*parseInt(l,10)}p(n,"parseYamlInteger");function o(h){return n(h)}p(o,"constructYamlInteger");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&h%1===0&&!e.isNegativeZero(h)}return p(c,"isInteger"),ho=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:o,predicate:c,represent:{binary:p(function(h){return h>=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},"binary"),octal:p(function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},"octal"),decimal:p(function(h){return h.toString(10)},"decimal"),hexadecimal:p(function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ho}p(Un,"requireInt");var co,Dh;function Gn(){if(Dh)return co;Dh=1;const e=Fi(),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(h){return h===null||!r.test(h)?!1:isFinite(parseFloat(h,10))?!0:i.test(h)}p(s,"resolveYamlFloat");function a(h){let l=h.toLowerCase();const u=l[0]==="-"?-1:1;return"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:u*parseFloat(l,10)}p(a,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function o(h,l){if(isNaN(h))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(h))return"-0.0";const u=h.toString(10);return n.test(u)?u.replace("e",".e"):u}p(o,"representYamlFloat");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||e.isNegativeZero(h))}return p(c,"isFloat"),co=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:c,represent:o,defaultStyle:"lowercase"}),co}p(Gn,"requireFloat");var uo,Rh;function jn(){return Rh||(Rh=1,uo=zn().extend({implicit:[Hn(),Yn(),Un(),Gn()]})),uo}p(jn,"requireJson");var fo,Ph;function Xn(){return Ph||(Ph=1,fo=jn()),fo}p(Xn,"requireCore");var po,qh;function Vn(){if(qh)return po;qh=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(n){return n===null?!1:t.exec(n)!==null||r.exec(n)!==null}p(i,"resolveYamlTimestamp");function s(n){let o=0,c=null,h=t.exec(n);if(h===null&&(h=r.exec(n)),h===null)throw new Error("Date resolve error");const l=+h[1],u=+h[2]-1,f=+h[3];if(!h[4])return new Date(Date.UTC(l,u,f));const d=+h[4],m=+h[5],y=+h[6];if(h[7]){for(o=h[7].slice(0,3);o.length<3;)o+="0";o=+o}if(h[9]){const C=+h[10],b=+(h[11]||0);c=(C*60+b)*6e4,h[9]==="-"&&(c=-c)}const x=new Date(Date.UTC(l,u,f,d,m,y,o));return c&&x.setTime(x.getTime()-c),x}p(s,"constructYamlTimestamp");function a(n){return n.toISOString()}return p(a,"representYamlTimestamp"),po=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),po}p(Vn,"requireTimestamp");var go,Nh;function Zn(){if(Nh)return go;Nh=1;const e=Ce();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),go=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),go}p(Zn,"requireMerge");var mo,Wh;function Kn(){if(Wh)return mo;Wh=1;const e=Ce(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
136
|
+
\r`;function r(n){if(n===null)return!1;let o=0;const c=n.length,h=t;for(let l=0;l<c;l++){const u=h.indexOf(n.charAt(l));if(!(u>64)){if(u<0)return!1;o+=6}}return o%8===0}p(r,"resolveYamlBinary");function i(n){const o=n.replace(/[\r\n=]/g,""),c=o.length,h=t;let l=0;const u=[];for(let d=0;d<c;d++)d%4===0&&d&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|h.indexOf(o.charAt(d));const f=c%4*6;return f===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):f===18?(u.push(l>>10&255),u.push(l>>2&255)):f===12&&u.push(l>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function s(n){let o="",c=0;const h=n.length,l=t;for(let f=0;f<h;f++)f%3===0&&f&&(o+=l[c>>18&63],o+=l[c>>12&63],o+=l[c>>6&63],o+=l[c&63]),c=(c<<8)+n[f];const u=h%3;return u===0?(o+=l[c>>18&63],o+=l[c>>12&63],o+=l[c>>6&63],o+=l[c&63]):u===2?(o+=l[c>>10&63],o+=l[c>>4&63],o+=l[c<<2&63],o+=l[64]):u===1&&(o+=l[c>>2&63],o+=l[c<<4&63],o+=l[64],o+=l[64]),o}p(s,"representYamlBinary");function a(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}return p(a,"isBinary"),mo=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),mo}p(Kn,"requireBinary");var yo,zh;function Qn(){if(zh)return yo;zh=1;const e=Ce(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const n=[],o=a;for(let c=0,h=o.length;c<h;c+=1){const l=o[c];let u=!1;if(r.call(l)!=="[object Object]")return!1;let f;for(f in l)if(t.call(l,f))if(!u)u=!0;else return!1;if(!u)return!1;if(n.indexOf(f)===-1)n.push(f);else return!1}return!0}p(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return p(s,"constructYamlOmap"),yo=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),yo}p(Qn,"requireOmap");var Co,Hh;function Jn(){if(Hh)return Co;Hh=1;const e=Ce(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,n=new Array(a.length);for(let o=0,c=a.length;o<c;o+=1){const h=a[o];if(t.call(h)!=="[object Object]")return!1;const l=Object.keys(h);if(l.length!==1)return!1;n[o]=[l[0],h[l[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,n=new Array(a.length);for(let o=0,c=a.length;o<c;o+=1){const h=a[o],l=Object.keys(h);n[o]=[l[0],h[l[0]]]}return n}return p(i,"constructYamlPairs"),Co=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Co}p(Jn,"requirePairs");var xo,Yh;function tl(){if(Yh)return xo;Yh=1;const e=Ce(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const n in a)if(t.call(a,n)&&a[n]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),xo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),xo}p(tl,"requireSet");var bo,Uh;function _a(){return Uh||(Uh=1,bo=Xn().extend({implicit:[Vn(),Zn()],explicit:[Kn(),Qn(),Jn(),tl()]})),bo}p(_a,"require_default");var Gh;function gd(){if(Gh)return Fs;Gh=1;const e=Fi(),t=Ai(),r=pd(),i=_a(),s=Object.prototype.hasOwnProperty,a=1,n=2,o=3,c=4,h=1,l=2,u=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(g){return Object.prototype.toString.call(g)}p(C,"_class");function b(g){return g===10||g===13}p(b,"isEol");function k(g){return g===9||g===32}p(k,"isWhiteSpace");function T(g){return g===9||g===32||g===10||g===13}p(T,"isWsOrEol");function v(g){return g===44||g===91||g===93||g===123||g===125}p(v,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const I=g|32;return I>=97&&I<=102?I-97+10:-1}p(L,"fromHexCode");function A(g){return g===120?2:g===117?4:g===85?8:0}p(A,"escapedHexLen");function F(g){return g>=48&&g<=57?g-48:-1}p(F,"fromDecimalCode");function Y(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
137
|
+
`;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""}}p(Y,"simpleEscapeSequence");function D(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}p(D,"charFromCodepoint");function q(g,I,V){I==="__proto__"?Object.defineProperty(g,I,{configurable:!0,enumerable:!0,writable:!0,value:V}):g[I]=V}p(q,"setProperty");const tt=new Array(256),z=new Array(256);for(let g=0;g<256;g++)tt[g]=Y(g)?1:0,z[g]=Y(g);function E(g,I){this.input=g,this.filename=I.filename||null,this.schema=I.schema||i,this.onWarning=I.onWarning||null,this.legacy=I.legacy||!1,this.json=I.json||!1,this.listener=I.listener||null,this.maxDepth=typeof I.maxDepth=="number"?I.maxDepth:100,this.maxTotalMergeKeys=typeof I.maxTotalMergeKeys=="number"?I.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.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=[]}p(E,"State");function M(g,I){const V={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return V.snippet=r(V),new t(I,V)}p(M,"generateError");function _(g,I){throw M(g,I)}p(_,"throwError");function N(g,I){g.onWarning&&g.onWarning.call(null,M(g,I))}p(N,"throwWarning");function O(g,I,V){const K=g.anchorMapTransactions;if(K.length!==0){const X=K[K.length-1];s.call(X,I)||(X[I]={existed:s.call(g.anchorMap,I),value:g.anchorMap[I]})}g.anchorMap[I]=V}p(O,"storeAnchor");function G(g){g.anchorMapTransactions.push(Object.create(null))}p(G,"beginAnchorTransaction");function j(g){const I=g.anchorMapTransactions.pop(),V=g.anchorMapTransactions;if(V.length===0)return;const K=V[V.length-1],X=Object.keys(I);for(let at=0,S=X.length;at<S;at+=1){const W=X[at];s.call(K,W)||(K[W]=I[W])}}p(j,"commitAnchorTransaction");function lt(g){const I=g.anchorMapTransactions.pop(),V=Object.keys(I);for(let K=V.length-1;K>=0;K-=1){const X=I[V[K]];X.existed?g.anchorMap[V[K]]=X.value:delete g.anchorMap[V[K]]}}p(lt,"rollbackAnchorTransaction");function bt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}p(bt,"snapshotState");function xt(g,I){g.position=I.position,g.line=I.line,g.lineStart=I.lineStart,g.lineIndent=I.lineIndent,g.firstTabInLine=I.firstTabInLine,g.tag=I.tag,g.anchor=I.anchor,g.kind=I.kind,g.result=I.result}p(xt,"restoreState");const kt={YAML:p(function(I,V,K){I.version!==null&&_(I,"duplication of %YAML directive"),K.length!==1&&_(I,"YAML directive accepts exactly one argument");const X=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);X===null&&_(I,"ill-formed argument of the YAML directive");const at=parseInt(X[1],10),S=parseInt(X[2],10);at!==1&&_(I,"unacceptable YAML version of the document"),I.version=K[0],I.checkLineBreaks=S<2,S!==1&&S!==2&&N(I,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(I,V,K){let X;K.length!==2&&_(I,"TAG directive accepts exactly two arguments");const at=K[0];X=K[1],y.test(at)||_(I,"ill-formed tag handle (first argument) of the TAG directive"),s.call(I.tagMap,at)&&_(I,'there is a previously declared suffix for "'+at+'" tag handle'),x.test(X)||_(I,"ill-formed tag prefix (second argument) of the TAG directive");try{X=decodeURIComponent(X)}catch{_(I,"tag prefix is malformed: "+X)}I.tagMap[at]=X},"handleTagDirective")};function ot(g,I,V,K){if(I<V){const X=g.input.slice(I,V);if(K)for(let at=0,S=X.length;at<S;at+=1){const W=X.charCodeAt(at);W===9||W>=32&&W<=1114111||_(g,"expected valid JSON character")}else f.test(X)&&_(g,"the stream contains non-printable characters");g.result+=X}}p(ot,"captureSegment");function At(g,I,V,K){e.isObject(V)||_(g,"cannot merge mappings; the provided source object is unacceptable");const X=Object.keys(V);for(let at=0,S=X.length;at<S;at+=1){const W=X[at];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&_(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call(I,W)||(q(I,W,V[W]),K[W]=!0)}}p(At,"mergeMappings");function Et(g,I,V,K,X,at,S,W,rt){if(Array.isArray(X)){X=Array.prototype.slice.call(X);for(let Z=0,Q=X.length;Z<Q;Z+=1)Array.isArray(X[Z])&&_(g,"nested arrays are not supported inside keys"),typeof X=="object"&&C(X[Z])==="[object Object]"&&(X[Z]="[object Object]")}if(typeof X=="object"&&C(X)==="[object Object]"&&(X="[object Object]"),X=String(X),I===null&&(I={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(at))for(let Z=0,Q=at.length;Z<Q;Z+=1)At(g,I,at[Z],V);else At(g,I,at,V);else!g.json&&!s.call(V,X)&&s.call(I,X)&&(g.line=S||g.line,g.lineStart=W||g.lineStart,g.position=rt||g.position,_(g,"duplicated mapping key")),q(I,X,at),delete V[X];return I}p(Et,"storeMappingPair");function qt(g){const I=g.input.charCodeAt(g.position);I===10?g.position++:I===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):_(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}p(qt,"readLineBreak");function Bt(g,I,V){let K=0,X=g.input.charCodeAt(g.position);for(;X!==0;){for(;k(X);)X===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),X=g.input.charCodeAt(++g.position);if(I&&X===35)do X=g.input.charCodeAt(++g.position);while(X!==10&&X!==13&&X!==0);if(b(X))for(qt(g),X=g.input.charCodeAt(g.position),K++,g.lineIndent=0;X===32;)g.lineIndent++,X=g.input.charCodeAt(++g.position);else break}return V!==-1&&K!==0&&g.lineIndent<V&&N(g,"deficient indentation"),K}p(Bt,"skipSeparationSpace");function ct(g){let I=g.position,V=g.input.charCodeAt(I);return!!((V===45||V===46)&&V===g.input.charCodeAt(I+1)&&V===g.input.charCodeAt(I+2)&&(I+=3,V=g.input.charCodeAt(I),V===0||T(V)))}p(ct,"testDocumentSeparator");function mt(g,I){I===1?g.result+=" ":I>1&&(g.result+=e.repeat(`
|
|
138
|
+
`,I-1))}p(mt,"writeFoldedLines");function Ft(g,I,V){let K,X,at,S,W,rt;const Z=g.kind,Q=g.result;let st=g.input.charCodeAt(g.position);if(T(st)||v(st)||st===35||st===38||st===42||st===33||st===124||st===62||st===39||st===34||st===37||st===64||st===96)return!1;if(st===63||st===45){const et=g.input.charCodeAt(g.position+1);if(T(et)||V&&v(et))return!1}for(g.kind="scalar",g.result="",K=X=g.position,at=!1;st!==0;){if(st===58){const et=g.input.charCodeAt(g.position+1);if(T(et)||V&&v(et))break}else if(st===35){const et=g.input.charCodeAt(g.position-1);if(T(et))break}else{if(g.position===g.lineStart&&ct(g)||V&&v(st))break;if(b(st))if(S=g.line,W=g.lineStart,rt=g.lineIndent,Bt(g,!1,-1),g.lineIndent>=I){at=!0,st=g.input.charCodeAt(g.position);continue}else{g.position=X,g.line=S,g.lineStart=W,g.lineIndent=rt;break}}at&&(ot(g,K,X,!1),mt(g,g.line-S),K=X=g.position,at=!1),k(st)||(X=g.position+1),st=g.input.charCodeAt(++g.position)}return ot(g,K,X,!1),g.result?!0:(g.kind=Z,g.result=Q,!1)}p(Ft,"readPlainScalar");function Nt(g,I){let V,K,X=g.input.charCodeAt(g.position);if(X!==39)return!1;for(g.kind="scalar",g.result="",g.position++,V=K=g.position;(X=g.input.charCodeAt(g.position))!==0;)if(X===39)if(ot(g,V,g.position,!0),X=g.input.charCodeAt(++g.position),X===39)V=g.position,g.position++,K=g.position;else return!0;else b(X)?(ot(g,V,K,!0),mt(g,Bt(g,!1,I)),V=K=g.position):g.position===g.lineStart&&ct(g)?_(g,"unexpected end of the document within a single quoted scalar"):(g.position++,k(X)||(K=g.position));_(g,"unexpected end of the stream within a single quoted scalar")}p(Nt,"readSingleQuotedScalar");function Ut(g,I){let V,K,X,at=g.input.charCodeAt(g.position);if(at!==34)return!1;for(g.kind="scalar",g.result="",g.position++,V=K=g.position;(at=g.input.charCodeAt(g.position))!==0;){if(at===34)return ot(g,V,g.position,!0),g.position++,!0;if(at===92){if(ot(g,V,g.position,!0),at=g.input.charCodeAt(++g.position),b(at))Bt(g,!1,I);else if(at<256&&tt[at])g.result+=z[at],g.position++;else if((X=A(at))>0){let S=X,W=0;for(;S>0;S--)at=g.input.charCodeAt(++g.position),(X=L(at))>=0?W=(W<<4)+X:_(g,"expected hexadecimal character");g.result+=D(W),g.position++}else _(g,"unknown escape sequence");V=K=g.position}else b(at)?(ot(g,V,K,!0),mt(g,Bt(g,!1,I)),V=K=g.position):g.position===g.lineStart&&ct(g)?_(g,"unexpected end of the document within a double quoted scalar"):(g.position++,k(at)||(K=g.position))}_(g,"unexpected end of the stream within a double quoted scalar")}p(Ut,"readDoubleQuotedScalar");function R(g,I){let V=!0,K,X,at;const S=g.tag;let W;const rt=g.anchor;let Z,Q,st,et;const yt=Object.create(null);let ft,wt,_t,Wt=g.input.charCodeAt(g.position);if(Wt===91)Z=93,et=!1,W=[];else if(Wt===123)Z=125,et=!0,W={};else return!1;for(g.anchor!==null&&O(g,g.anchor,W),Wt=g.input.charCodeAt(++g.position);Wt!==0;){if(Bt(g,!0,I),Wt=g.input.charCodeAt(g.position),Wt===Z)return g.position++,g.tag=S,g.anchor=rt,g.kind=et?"mapping":"sequence",g.result=W,!0;if(V?Wt===44&&_(g,"expected the node content, but found ','"):_(g,"missed comma between flow collection entries"),wt=ft=_t=null,Q=st=!1,Wt===63){const Xt=g.input.charCodeAt(g.position+1);T(Xt)&&(Q=st=!0,g.position++,Bt(g,!0,I))}K=g.line,X=g.lineStart,at=g.position,Te(g,I,a,!1,!0),wt=g.tag,ft=g.result,Bt(g,!0,I),Wt=g.input.charCodeAt(g.position),(st||g.line===K)&&Wt===58&&(Q=!0,Wt=g.input.charCodeAt(++g.position),Bt(g,!0,I),Te(g,I,a,!1,!0),_t=g.result),et?Et(g,W,yt,wt,ft,_t,K,X,at):Q?W.push(Et(g,null,yt,wt,ft,_t,K,X,at)):W.push(ft),Bt(g,!0,I),Wt=g.input.charCodeAt(g.position),Wt===44?(V=!0,Wt=g.input.charCodeAt(++g.position)):V=!1}_(g,"unexpected end of the stream within a flow collection")}p(R,"readFlowCollection");function Lt(g,I){let V,K=h,X=!1,at=!1,S=I,W=0,rt=!1,Z,Q=g.input.charCodeAt(g.position);if(Q===124)V=!1;else if(Q===62)V=!0;else return!1;for(g.kind="scalar",g.result="";Q!==0;)if(Q=g.input.charCodeAt(++g.position),Q===43||Q===45)h===K?K=Q===43?u:l:_(g,"repeat of a chomping mode identifier");else if((Z=F(Q))>=0)Z===0?_(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):at?_(g,"repeat of an indentation width identifier"):(S=I+Z-1,at=!0);else break;if(k(Q)){do Q=g.input.charCodeAt(++g.position);while(k(Q));if(Q===35)do Q=g.input.charCodeAt(++g.position);while(!b(Q)&&Q!==0)}for(;Q!==0;){for(qt(g),g.lineIndent=0,Q=g.input.charCodeAt(g.position);(!at||g.lineIndent<S)&&Q===32;)g.lineIndent++,Q=g.input.charCodeAt(++g.position);if(!at&&g.lineIndent>S&&(S=g.lineIndent),b(Q)){W++;continue}if(!at&&S===0&&_(g,"missing indentation for block scalar"),g.lineIndent<S){K===u?g.result+=e.repeat(`
|
|
139
|
+
`,X?1+W:W):K===h&&X&&(g.result+=`
|
|
140
|
+
`);break}V?k(Q)?(rt=!0,g.result+=e.repeat(`
|
|
141
|
+
`,X?1+W:W)):rt?(rt=!1,g.result+=e.repeat(`
|
|
142
|
+
`,W+1)):W===0?X&&(g.result+=" "):g.result+=e.repeat(`
|
|
143
|
+
`,W):g.result+=e.repeat(`
|
|
144
|
+
`,X?1+W:W),X=!0,at=!0,W=0;const st=g.position;for(;!b(Q)&&Q!==0;)Q=g.input.charCodeAt(++g.position);ot(g,st,g.position,!1)}return!0}p(Lt,"readBlockScalar");function zt(g,I){const V=g.tag,K=g.anchor,X=[];let at=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&O(g,g.anchor,X);let S=g.input.charCodeAt(g.position);for(;S!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,_(g,"tab characters must not be used in indentation")),S===45);){const W=g.input.charCodeAt(g.position+1);if(!T(W))break;if(at=!0,g.position++,Bt(g,!0,-1)&&g.lineIndent<=I){X.push(null),S=g.input.charCodeAt(g.position);continue}const rt=g.line;if(Te(g,I,o,!1,!0),X.push(g.result),Bt(g,!0,-1),S=g.input.charCodeAt(g.position),(g.line===rt||g.lineIndent>I)&&S!==0)_(g,"bad indentation of a sequence entry");else if(g.lineIndent<I)break}return at?(g.tag=V,g.anchor=K,g.kind="sequence",g.result=X,!0):!1}p(zt,"readBlockSequence");function we(g,I,V){let K,X,at,S;const W=g.tag,rt=g.anchor,Z={},Q=Object.create(null);let st=null,et=null,yt=null,ft=!1,wt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&O(g,g.anchor,Z);let _t=g.input.charCodeAt(g.position);for(;_t!==0;){!ft&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,_(g,"tab characters must not be used in indentation"));const Wt=g.input.charCodeAt(g.position+1),Xt=g.line;if((_t===63||_t===58)&&T(Wt))_t===63?(ft&&(Et(g,Z,Q,st,et,null,X,at,S),st=et=yt=null),wt=!0,ft=!0,K=!0):ft?(ft=!1,K=!0):_(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,_t=Wt;else{if(X=g.line,at=g.lineStart,S=g.position,!Te(g,V,n,!1,!0))break;if(g.line===Xt){for(_t=g.input.charCodeAt(g.position);k(_t);)_t=g.input.charCodeAt(++g.position);if(_t===58)_t=g.input.charCodeAt(++g.position),T(_t)||_(g,"a whitespace character is expected after the key-value separator within a block mapping"),ft&&(Et(g,Z,Q,st,et,null,X,at,S),st=et=yt=null),wt=!0,ft=!1,K=!1,st=g.tag,et=g.result;else if(wt)_(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=W,g.anchor=rt,!0}else if(wt)_(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=W,g.anchor=rt,!0}if((g.line===Xt||g.lineIndent>I)&&(ft&&(X=g.line,at=g.lineStart,S=g.position),Te(g,I,c,!0,K)&&(ft?et=g.result:yt=g.result),ft||(Et(g,Z,Q,st,et,yt,X,at,S),st=et=yt=null),Bt(g,!0,-1),_t=g.input.charCodeAt(g.position)),(g.line===Xt||g.lineIndent>I)&&_t!==0)_(g,"bad indentation of a mapping entry");else if(g.lineIndent<I)break}return ft&&Et(g,Z,Q,st,et,null,X,at,S),wt&&(g.tag=W,g.anchor=rt,g.kind="mapping",g.result=Z),wt}p(we,"readBlockMapping");function fe(g){let I=!1,V=!1,K,X,at=g.input.charCodeAt(g.position);if(at!==33)return!1;g.tag!==null&&_(g,"duplication of a tag property"),at=g.input.charCodeAt(++g.position),at===60?(I=!0,at=g.input.charCodeAt(++g.position)):at===33?(V=!0,K="!!",at=g.input.charCodeAt(++g.position)):K="!";let S=g.position;if(I){do at=g.input.charCodeAt(++g.position);while(at!==0&&at!==62);g.position<g.length?(X=g.input.slice(S,g.position),at=g.input.charCodeAt(++g.position)):_(g,"unexpected end of the stream within a verbatim tag")}else{for(;at!==0&&!T(at);)at===33&&(V?_(g,"tag suffix cannot contain exclamation marks"):(K=g.input.slice(S-1,g.position+1),y.test(K)||_(g,"named tag handle cannot contain such characters"),V=!0,S=g.position+1)),at=g.input.charCodeAt(++g.position);X=g.input.slice(S,g.position),m.test(X)&&_(g,"tag suffix cannot contain flow indicator characters")}X&&!x.test(X)&&_(g,"tag name cannot contain such characters: "+X);try{X=decodeURIComponent(X)}catch{_(g,"tag name is malformed: "+X)}return I?g.tag=X:s.call(g.tagMap,K)?g.tag=g.tagMap[K]+X:K==="!"?g.tag="!"+X:K==="!!"?g.tag="tag:yaml.org,2002:"+X:_(g,'undeclared tag handle "'+K+'"'),!0}p(fe,"readTagProperty");function Pe(g){let I=g.input.charCodeAt(g.position);if(I!==38)return!1;g.anchor!==null&&_(g,"duplication of an anchor property"),I=g.input.charCodeAt(++g.position);const V=g.position;for(;I!==0&&!T(I)&&!v(I);)I=g.input.charCodeAt(++g.position);return g.position===V&&_(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(V,g.position),!0}p(Pe,"readAnchorProperty");function lr(g){let I=g.input.charCodeAt(g.position);if(I!==42)return!1;I=g.input.charCodeAt(++g.position);const V=g.position;for(;I!==0&&!T(I)&&!v(I);)I=g.input.charCodeAt(++g.position);g.position===V&&_(g,"name of an alias node must contain at least one character");const K=g.input.slice(V,g.position);return s.call(g.anchorMap,K)||_(g,'unidentified alias "'+K+'"'),g.result=g.anchorMap[K],Bt(g,!0,-1),!0}p(lr,"readAlias");function Se(g,I,V,K){const X=bt(g);return G(g),xt(g,I),g.tag=null,g.anchor=null,g.kind=null,g.result=null,we(g,V,K)&&g.kind==="mapping"?(j(g),!0):(lt(g),xt(g,X),!1)}p(Se,"tryReadBlockMappingFromProperty");function Te(g,I,V,K,X){let at,S,W=1,rt=!1,Z=!1,Q=null,st,et,yt;g.depth>=g.maxDepth&&_(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const ft=at=S=c===V||o===V;if(K&&Bt(g,!0,-1)&&(rt=!0,g.lineIndent>I?W=1:g.lineIndent===I?W=0:g.lineIndent<I&&(W=-1)),W===1)for(;;){const wt=g.input.charCodeAt(g.position),_t=bt(g);if(rt&&(wt===33&&g.tag!==null||wt===38&&g.anchor!==null)||!fe(g)&&!Pe(g))break;Q===null&&(Q=_t),Bt(g,!0,-1)?(rt=!0,S=ft,g.lineIndent>I?W=1:g.lineIndent===I?W=0:g.lineIndent<I&&(W=-1)):S=!1}if(S&&(S=rt||X),W===1||c===V)if(a===V||n===V?et=I:et=I+1,yt=g.position-g.lineStart,W===1)if(S&&(zt(g,yt)||we(g,yt,et))||R(g,et))Z=!0;else{const wt=g.input.charCodeAt(g.position);Q!==null&&ft&&!S&&wt!==124&&wt!==62&&Se(g,Q,Q.position-Q.lineStart,et)||at&&Lt(g,et)||Nt(g,et)||Ut(g,et)?Z=!0:lr(g)?(Z=!0,(g.tag!==null||g.anchor!==null)&&_(g,"alias node should not have any properties")):Ft(g,et,a===V)&&(Z=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&O(g,g.anchor,g.result)}else W===0&&(Z=S&&zt(g,yt));if(g.tag===null)g.anchor!==null&&O(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&_(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let wt=0,_t=g.implicitTypes.length;wt<_t;wt+=1)if(st=g.implicitTypes[wt],st.resolve(g.result)){g.result=st.construct(g.result),g.tag=st.tag,g.anchor!==null&&O(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))st=g.typeMap[g.kind||"fallback"][g.tag];else{st=null;const wt=g.typeMap.multi[g.kind||"fallback"];for(let _t=0,Wt=wt.length;_t<Wt;_t+=1)if(g.tag.slice(0,wt[_t].tag.length)===wt[_t].tag){st=wt[_t];break}}st||_(g,"unknown tag !<"+g.tag+">"),g.result!==null&&st.kind!==g.kind&&_(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+st.kind+'", not "'+g.kind+'"'),st.resolve(g.result,g.tag)?(g.result=st.construct(g.result,g.tag),g.anchor!==null&&O(g,g.anchor,g.result)):_(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||Z}p(Te,"composeNode");function hr(g){const I=g.position;let V=!1,K;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(K=g.input.charCodeAt(g.position))!==0&&(Bt(g,!0,-1),K=g.input.charCodeAt(g.position),!(g.lineIndent>0||K!==37));){V=!0,K=g.input.charCodeAt(++g.position);let X=g.position;for(;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);const at=g.input.slice(X,g.position),S=[];for(at.length<1&&_(g,"directive name must not be less than one character in length");K!==0;){for(;k(K);)K=g.input.charCodeAt(++g.position);if(K===35){do K=g.input.charCodeAt(++g.position);while(K!==0&&!b(K));break}if(b(K))break;for(X=g.position;K!==0&&!T(K);)K=g.input.charCodeAt(++g.position);S.push(g.input.slice(X,g.position))}K!==0&&qt(g),s.call(kt,at)?kt[at](g,at,S):N(g,'unknown document directive "'+at+'"')}if(Bt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,Bt(g,!0,-1)):V&&_(g,"directives end mark is expected"),Te(g,g.lineIndent-1,c,!1,!0),Bt(g,!0,-1),g.checkLineBreaks&&d.test(g.input.slice(I,g.position))&&N(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&&ct(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,Bt(g,!0,-1));return}g.position<g.length-1&&_(g,"end of the stream or a document separator is expected")}p(hr,"readDocument");function cr(g,I){g=String(g),I=I||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
|
|
145
|
+
`),g.charCodeAt(0)===65279&&(g=g.slice(1)));const V=new E(g,I),K=g.indexOf("\0");for(K!==-1&&(V.position=K,_(V,"null byte is not allowed in input")),V.input+="\0";V.input.charCodeAt(V.position)===32;)V.lineIndent+=1,V.position+=1;for(;V.position<V.length-1;)hr(V);return V.documents}p(cr,"loadDocuments");function ur(g,I,V){I!==null&&typeof I=="object"&&typeof V>"u"&&(V=I,I=null);const K=cr(g,V);if(typeof I!="function")return K;for(let X=0,at=K.length;X<at;X+=1)I(K[X])}p(ur,"loadAll2");function Be(g,I){const V=cr(g,I);if(V.length!==0){if(V.length===1)return V[0];throw new t("expected a single document in the stream, but found more")}}return p(Be,"load2"),Fs.loadAll=ur,Fs.load=Be,Fs}p(gd,"requireLoader");var ko={},jh;function md(){if(jh)return ko;jh=1;const e=Fi(),t=Ai(),r=_a(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,n=9,o=10,c=13,h=32,l=33,u=34,f=35,d=37,m=38,y=39,x=42,C=44,b=45,k=58,T=61,v=62,L=63,A=64,F=91,Y=93,D=96,q=123,tt=124,z=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function N(S,W){if(W===null)return{};const rt={},Z=Object.keys(W);for(let Q=0,st=Z.length;Q<st;Q+=1){let et=Z[Q],yt=String(W[et]);et.slice(0,2)==="!!"&&(et="tag:yaml.org,2002:"+et.slice(2));const ft=S.compiledTypeMap.fallback[et];ft&&s.call(ft.styleAliases,yt)&&(yt=ft.styleAliases[yt]),rt[et]=yt}return rt}p(N,"compileStyleMap");function O(S){let W,rt;const Z=S.toString(16).toUpperCase();if(S<=255)W="x",rt=2;else if(S<=65535)W="u",rt=4;else if(S<=4294967295)W="U",rt=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+W+e.repeat("0",rt-Z.length)+Z}p(O,"encodeHex");const G=1,j=2;function lt(S){this.schema=S.schema||r,this.indent=Math.max(1,S.indent||2),this.noArrayIndent=S.noArrayIndent||!1,this.skipInvalid=S.skipInvalid||!1,this.flowLevel=e.isNothing(S.flowLevel)?-1:S.flowLevel,this.styleMap=N(this.schema,S.styles||null),this.sortKeys=S.sortKeys||!1,this.lineWidth=S.lineWidth||80,this.noRefs=S.noRefs||!1,this.noCompatMode=S.noCompatMode||!1,this.condenseFlow=S.condenseFlow||!1,this.quotingType=S.quotingType==='"'?j:G,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(lt,"State");function bt(S,W){const rt=e.repeat(" ",W);let Z=0,Q="";const st=S.length;for(;Z<st;){let et;const yt=S.indexOf(`
|
|
146
|
+
`,Z);yt===-1?(et=S.slice(Z),Z=st):(et=S.slice(Z,yt+1),Z=yt+1),et.length&&et!==`
|
|
147
|
+
`&&(Q+=rt),Q+=et}return Q}p(bt,"indentString");function xt(S,W){return`
|
|
148
|
+
`+e.repeat(" ",S.indent*W)}p(xt,"generateNextLine");function kt(S,W){for(let rt=0,Z=S.implicitTypes.length;rt<Z;rt+=1)if(S.implicitTypes[rt].resolve(W))return!0;return!1}p(kt,"testImplicitResolving");function ot(S){return S===h||S===n}p(ot,"isWhitespace");function At(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}p(At,"isPrintable");function Et(S){return At(S)&&S!==a&&S!==c&&S!==o}p(Et,"isNsCharOrWhitespace");function qt(S,W,rt){const Z=Et(S),Q=Z&&!ot(S);return(rt?Z:Z&&S!==C&&S!==F&&S!==Y&&S!==q&&S!==z)&&S!==f&&!(W===k&&!Q)||Et(W)&&!ot(W)&&S===f||W===k&&Q}p(qt,"isPlainSafe");function Bt(S){return At(S)&&S!==a&&!ot(S)&&S!==b&&S!==L&&S!==k&&S!==C&&S!==F&&S!==Y&&S!==q&&S!==z&&S!==f&&S!==m&&S!==x&&S!==l&&S!==tt&&S!==T&&S!==v&&S!==y&&S!==u&&S!==d&&S!==A&&S!==D}p(Bt,"isPlainSafeFirst");function ct(S){return!ot(S)&&S!==k}p(ct,"isPlainSafeLast");function mt(S,W){const rt=S.charCodeAt(W);let Z;return rt>=55296&&rt<=56319&&W+1<S.length&&(Z=S.charCodeAt(W+1),Z>=56320&&Z<=57343)?(rt-55296)*1024+Z-56320+65536:rt}p(mt,"codePointAt");function Ft(S){return/^\n* /.test(S)}p(Ft,"needIndentIndicator");const Nt=1,Ut=2,R=3,Lt=4,zt=5;function we(S,W,rt,Z,Q,st,et,yt){let ft,wt=0,_t=null,Wt=!1,Xt=!1;const $i=Z!==-1;let wr=-1,Ve=Bt(mt(S,0))&&ct(mt(S,S.length-1));if(W||et)for(ft=0;ft<S.length;wt>=65536?ft+=2:ft++){if(wt=mt(S,ft),!At(wt))return zt;Ve=Ve&&qt(wt,_t,yt),_t=wt}else{for(ft=0;ft<S.length;wt>=65536?ft+=2:ft++){if(wt=mt(S,ft),wt===o)Wt=!0,$i&&(Xt=Xt||ft-wr-1>Z&&S[wr+1]!==" ",wr=ft);else if(!At(wt))return zt;Ve=Ve&&qt(wt,_t,yt),_t=wt}Xt=Xt||$i&&ft-wr-1>Z&&S[wr+1]!==" "}return!Wt&&!Xt?Ve&&!et&&!Q(S)?Nt:st===j?zt:Ut:rt>9&&Ft(S)?zt:et?st===j?zt:Ut:Xt?Lt:R}p(we,"chooseScalarStyle");function fe(S,W,rt,Z,Q){S.dump=(function(){if(W.length===0)return S.quotingType===j?'""':"''";if(!S.noCompatMode&&(M.indexOf(W)!==-1||_.test(W)))return S.quotingType===j?'"'+W+'"':"'"+W+"'";const st=S.indent*Math.max(1,rt),et=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-st),yt=Z||S.flowLevel>-1&&rt>=S.flowLevel;function ft(wt){return kt(S,wt)}switch(p(ft,"testAmbiguity"),we(W,yt,S.indent,et,ft,S.quotingType,S.forceQuotes&&!Z,Q)){case Nt:return W;case Ut:return"'"+W.replace(/'/g,"''")+"'";case R:return"|"+Pe(W,S.indent)+lr(bt(W,st));case Lt:return">"+Pe(W,S.indent)+lr(bt(Se(W,et),st));case zt:return'"'+hr(W)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(fe,"writeScalar");function Pe(S,W){const rt=Ft(S)?String(W):"",Z=S[S.length-1]===`
|
|
149
|
+
`,st=Z&&(S[S.length-2]===`
|
|
150
|
+
`||S===`
|
|
151
|
+
`)?"+":Z?"":"-";return rt+st+`
|
|
152
|
+
`}p(Pe,"blockHeader");function lr(S){return S[S.length-1]===`
|
|
153
|
+
`?S.slice(0,-1):S}p(lr,"dropEndingNewline");function Se(S,W){const rt=/(\n+)([^\n]*)/g;let Z=(function(){let yt=S.indexOf(`
|
|
154
|
+
`);return yt=yt!==-1?yt:S.length,rt.lastIndex=yt,Te(S.slice(0,yt),W)})(),Q=S[0]===`
|
|
155
|
+
`||S[0]===" ",st,et;for(;et=rt.exec(S);){const yt=et[1],ft=et[2];st=ft[0]===" ",Z+=yt+(!Q&&!st&&ft!==""?`
|
|
156
|
+
`:"")+Te(ft,W),Q=st}return Z}p(Se,"foldString");function Te(S,W){if(S===""||S[0]===" ")return S;const rt=/ [^ ]/g;let Z,Q=0,st,et=0,yt=0,ft="";for(;Z=rt.exec(S);)yt=Z.index,yt-Q>W&&(st=et>Q?et:yt,ft+=`
|
|
157
|
+
`+S.slice(Q,st),Q=st+1),et=yt;return ft+=`
|
|
158
|
+
`,S.length-Q>W&&et>Q?ft+=S.slice(Q,et)+`
|
|
159
|
+
`+S.slice(et+1):ft+=S.slice(Q),ft.slice(1)}p(Te,"foldLine");function hr(S){let W="",rt=0;for(let Z=0;Z<S.length;rt>=65536?Z+=2:Z++){rt=mt(S,Z);const Q=E[rt];!Q&&At(rt)?(W+=S[Z],rt>=65536&&(W+=S[Z+1])):W+=Q||O(rt)}return W}p(hr,"escapeString");function cr(S,W,rt){let Z="";const Q=S.tag;for(let st=0,et=rt.length;st<et;st+=1){let yt=rt[st];S.replacer&&(yt=S.replacer.call(rt,String(st),yt)),(V(S,W,yt,!1,!1)||typeof yt>"u"&&V(S,W,null,!1,!1))&&(Z!==""&&(Z+=","+(S.condenseFlow?"":" ")),Z+=S.dump)}S.tag=Q,S.dump="["+Z+"]"}p(cr,"writeFlowSequence");function ur(S,W,rt,Z){let Q="";const st=S.tag;for(let et=0,yt=rt.length;et<yt;et+=1){let ft=rt[et];S.replacer&&(ft=S.replacer.call(rt,String(et),ft)),(V(S,W+1,ft,!0,!0,!1,!0)||typeof ft>"u"&&V(S,W+1,null,!0,!0,!1,!0))&&((!Z||Q!=="")&&(Q+=xt(S,W)),S.dump&&o===S.dump.charCodeAt(0)?Q+="-":Q+="- ",Q+=S.dump)}S.tag=st,S.dump=Q||"[]"}p(ur,"writeBlockSequence");function Be(S,W,rt){let Z="";const Q=S.tag,st=Object.keys(rt);for(let et=0,yt=st.length;et<yt;et+=1){let ft="";Z!==""&&(ft+=", "),S.condenseFlow&&(ft+='"');const wt=st[et];let _t=rt[wt];S.replacer&&(_t=S.replacer.call(rt,wt,_t)),V(S,W,wt,!1,!1)&&(S.dump.length>1024&&(ft+="? "),ft+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),V(S,W,_t,!1,!1)&&(ft+=S.dump,Z+=ft))}S.tag=Q,S.dump="{"+Z+"}"}p(Be,"writeFlowMapping");function g(S,W,rt,Z){let Q="";const st=S.tag,et=Object.keys(rt);if(S.sortKeys===!0)et.sort();else if(typeof S.sortKeys=="function")et.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let yt=0,ft=et.length;yt<ft;yt+=1){let wt="";(!Z||Q!=="")&&(wt+=xt(S,W));const _t=et[yt];let Wt=rt[_t];if(S.replacer&&(Wt=S.replacer.call(rt,_t,Wt)),!V(S,W+1,_t,!0,!0,!0))continue;const Xt=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;Xt&&(S.dump&&o===S.dump.charCodeAt(0)?wt+="?":wt+="? "),wt+=S.dump,Xt&&(wt+=xt(S,W)),V(S,W+1,Wt,!0,Xt)&&(S.dump&&o===S.dump.charCodeAt(0)?wt+=":":wt+=": ",wt+=S.dump,Q+=wt)}S.tag=st,S.dump=Q||"{}"}p(g,"writeBlockMapping");function I(S,W,rt){const Z=rt?S.explicitTypes:S.implicitTypes;for(let Q=0,st=Z.length;Q<st;Q+=1){const et=Z[Q];if((et.instanceOf||et.predicate)&&(!et.instanceOf||typeof W=="object"&&W instanceof et.instanceOf)&&(!et.predicate||et.predicate(W))){if(rt?et.multi&&et.representName?S.tag=et.representName(W):S.tag=et.tag:S.tag="?",et.represent){const yt=S.styleMap[et.tag]||et.defaultStyle;let ft;if(i.call(et.represent)==="[object Function]")ft=et.represent(W,yt);else if(s.call(et.represent,yt))ft=et.represent[yt](W,yt);else throw new t("!<"+et.tag+'> tag resolver accepts not "'+yt+'" style');S.dump=ft}return!0}}return!1}p(I,"detectType");function V(S,W,rt,Z,Q,st,et){S.tag=null,S.dump=rt,I(S,rt,!1)||I(S,rt,!0);const yt=i.call(S.dump),ft=Z;Z&&(Z=S.flowLevel<0||S.flowLevel>W);const wt=yt==="[object Object]"||yt==="[object Array]";let _t,Wt;if(wt&&(_t=S.duplicates.indexOf(rt),Wt=_t!==-1),(S.tag!==null&&S.tag!=="?"||Wt||S.indent!==2&&W>0)&&(Q=!1),Wt&&S.usedDuplicates[_t])S.dump="*ref_"+_t;else{if(wt&&Wt&&!S.usedDuplicates[_t]&&(S.usedDuplicates[_t]=!0),yt==="[object Object]")Z&&Object.keys(S.dump).length!==0?(g(S,W,S.dump,Q),Wt&&(S.dump="&ref_"+_t+S.dump)):(Be(S,W,S.dump),Wt&&(S.dump="&ref_"+_t+" "+S.dump));else if(yt==="[object Array]")Z&&S.dump.length!==0?(S.noArrayIndent&&!et&&W>0?ur(S,W-1,S.dump,Q):ur(S,W,S.dump,Q),Wt&&(S.dump="&ref_"+_t+S.dump)):(cr(S,W,S.dump),Wt&&(S.dump="&ref_"+_t+" "+S.dump));else if(yt==="[object String]")S.tag!=="?"&&fe(S,S.dump,W,st,ft);else{if(yt==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+yt)}if(S.tag!==null&&S.tag!=="?"){let Xt=encodeURI(S.tag[0]==="!"?S.tag.slice(1):S.tag).replace(/!/g,"%21");S.tag[0]==="!"?Xt="!"+Xt:Xt.slice(0,18)==="tag:yaml.org,2002:"?Xt="!!"+Xt.slice(18):Xt="!<"+Xt+">",S.dump=Xt+" "+S.dump}}return!0}p(V,"writeNode");function K(S,W){const rt=[],Z=[];X(S,rt,Z);const Q=Z.length;for(let st=0;st<Q;st+=1)W.duplicates.push(rt[Z[st]]);W.usedDuplicates=new Array(Q)}p(K,"getDuplicateReferences");function X(S,W,rt){if(S!==null&&typeof S=="object"){const Z=W.indexOf(S);if(Z!==-1)rt.indexOf(Z)===-1&&rt.push(Z);else if(W.push(S),Array.isArray(S))for(let Q=0,st=S.length;Q<st;Q+=1)X(S[Q],W,rt);else{const Q=Object.keys(S);for(let st=0,et=Q.length;st<et;st+=1)X(S[Q[st]],W,rt)}}}p(X,"inspectNode");function at(S,W){W=W||{};const rt=new lt(W);rt.noRefs||K(S,rt);let Z=S;return rt.replacer&&(Z=rt.replacer.call({"":Z},"",Z)),V(rt,0,Z,!0,!0)?rt.dump+`
|
|
160
|
+
`:""}return p(at,"dump2"),ko.dump=at,ko}p(md,"requireDumper");var Xh;function yd(){if(Xh)return pe;Xh=1;const e=gd(),t=md();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 p(r,"renamed"),pe.Type=Ce(),pe.Schema=Pn(),pe.FAILSAFE_SCHEMA=zn(),pe.JSON_SCHEMA=jn(),pe.CORE_SCHEMA=Xn(),pe.DEFAULT_SCHEMA=_a(),pe.load=e.load,pe.loadAll=e.loadAll,pe.dump=t.dump,pe.YAMLException=Ai(),pe.types={binary:Kn(),float:Gn(),map:Wn(),null:Hn(),pairs:Jn(),set:tl(),timestamp:Vn(),bool:Yn(),int:Un(),merge:Zn(),omap:Qn(),seq:Nn(),str:qn()},pe.safeLoad=r("safeLoad","load"),pe.safeLoadAll=r("safeLoadAll","loadAll"),pe.safeDump=r("safeDump","dump"),pe}p(yd,"requireJsYaml");var Wb=yd(),zb=fd(Wb),{Type:Iv,Schema:Dv,FAILSAFE_SCHEMA:Rv,JSON_SCHEMA:Hb,CORE_SCHEMA:Pv,DEFAULT_SCHEMA:qv,load:Yb,loadAll:Nv,dump:Wv,YAMLException:zv,types:Hv,safeLoad:Yv,safeLoadAll:Uv,safeDump:Gv}=zb,Ub=p((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:a,gradientStop:n}=i??{},o=e.attr("id"),c=r!=null&&r.includes("dark")?"#FFFFFF":"#000000",h=p((u,f,d)=>e.append("defs").append("filter").attr("id",u).attr("height",f).attr("width",f).append("feDropShadow").attr("dx",d).attr("dy",d).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",c),"dropShadow");if(h(`${o}-drop-shadow`,"130%","4"),h(`${o}-drop-shadow-small`,"150%","2"),!s)return;const l=e.append("linearGradient").attr("id",`${o}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");l.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs"),Gb=p(e=>{const{handDrawnSeed:t}=Rt();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),jb=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Or=p(e=>{const t=Xb([...e.cssCompiledStyles||[],...e.cssStyles||[],...jb(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Xb=p(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"),Cd=p(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"),pt=p(e=>{const{stylesArray:t}=Or(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];Cd(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),ut=p((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=Rt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=Or(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||s,seed:i,strokeWidth:((c=n.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Vb(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),Vb=p(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 Zb=Object.freeze({left:0,top:0,width:16,height:16}),ca=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),xd=Object.freeze({...Zb,...ca}),Kb=Object.freeze({...xd,body:"",hidden:!1}),Qb=Object.freeze({width:null,height:null}),Jb=Object.freeze({...Qb,...ca}),tk=(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 o=s.pop(),c=s.pop(),h={provider:s.length>0?s[0]:i,prefix:c,name:o};return wo(h)?h:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return wo(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return wo(o,r)?o:null}return null},wo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function ek(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 Vh(e,t){const r=ek(e,t);for(const i in Kb)i in ca?i in e&&!(i in r)&&(r[i]=ca[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function rk(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,c=o&&a(o);c&&(s[n]=[o].concat(c))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Zh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=Vh(i[o]||s[o],a)}return n(t),r.forEach(n),Vh(e,a)}function ik(e,t){if(e.icons[t])return Zh(e,t,[]);const r=rk(e,[t])[t];return r?Zh(e,t,r):null}const sk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ak=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Kh(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(sk);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=ak.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function ok(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function nk(e,t){return e?"<defs>"+e+"</defs>"+t:t}function lk(e,t,r){const i=ok(e);return nk(i.defs,t+i.content+r)}const hk=e=>e==="unset"||e==="undefined"||e==="none";function ck(e,t){const r={...xd,...e},i={...Jb,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=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 T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=s.height/2+s.top,x.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,x.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")")}k%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),x.length&&(a=lk(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,c=s.width,h=s.height;let l,u;n===null?(u=o===null?"1em":o==="auto"?h:o,l=Kh(u,c/h)):(l=n==="auto"?c:n,u=o===null?Kh(l,h/c):o==="auto"?h:o);const f={},d=(y,x)=>{hk(x)||(f[y]=x.toString())};d("width",l),d("height",u);const m=[s.left,s.top,c,h];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:a}}const uk=/\sid="(\S+)"/g,Qh=new Map;function dk(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Qh.get(e)||0;return Qh.set(e,t+1),t?`${e}${t}`:e}function fk(e){const t=[];let r;for(;r=uk.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=dk(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function pk(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 gk={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},Qo=new Map,bd=new Map,mk=p(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(J.debug("Registering icon pack:",t.name),"loader"in t)bd.set(t.name,t.loader);else if("icons"in t)Qo.set(t.name,t.icons);else throw J.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),kd=p(async(e,t)=>{const r=tk(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=Qo.get(i);if(!s){const n=bd.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},Qo.set(i,s)}catch(o){throw J.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=ik(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),wd=p(async e=>{try{return await kd(e),!0}catch{return!1}},"isIconAvailable"),Ei=p(async(e,t,r)=>{let i;try{i=await kd(e,t==null?void 0:t.fallbackPrefix)}catch(n){J.error(n),i=gk}const s=ck(i,t),a=pk(fk(s.body),{...s.attributes,...r});return We(a,Qt())},"getIconSVG"),As={},ne={},Jh;function yk(){return Jh||(Jh=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 tc;function Ck(){if(tc)return As;tc=1,Object.defineProperty(As,"__esModule",{value:!0}),As.sanitizeUrl=a;var e=yk();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(c,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,c=s(n.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=s(c),o=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var h=c;if(!h)return e.BLANK_URL;if(t(h))return h;var l=h.trimStart(),u=l.match(e.urlSchemeRegex);if(!u)return h;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=l.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return As}var xk=Ck();function Jo(e){return typeof e=="object"&&e!==null}function bk(e){return Jo(e)&&au(e)}function gs(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],a=r.cache;if(a.has(s))return a.get(s);const n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(gs.Cache||Map),r}gs.Cache=Map;function kk(e){if(ou(e))return e;if(Array.isArray(e)||su(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 wk(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const n=r[a];s=js(s,n,i,new Map)}return s}function js(e,t,r,i){if(ou(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return kk(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...km(t)];for(let a=0;a<s.length;a++){const n=s[a];if(wm(n))continue;let o=t[n],c=e[n];if(Ro(o)&&(o={...o}),Ro(c)&&(c={...c}),nu(o)&&(o=Vl(o)),Array.isArray(o))if(Array.isArray(c)){const l=[],u=Reflect.ownKeys(c);for(let f=0;f<u.length;f++){const d=u[f];l[d]=c[d]}c=l}else if(bk(c)){const l=[];for(let u=0;u<c.length;u++)l[u]=c[u];c=l}else c=[];const h=r(c,o,n,e,t,i);h!==void 0?e[n]=h:Array.isArray(o)||Jo(c)&&Jo(o)&&(Ga(c)||Ga(o)||Ns(c)||Ns(o))?e[n]=js(c,o,r,i):c==null&&Ga(o)?e[n]=js({},o,r,i):c==null&&Ns(o)?e[n]=Vl(o):(c===void 0||o!==void 0)&&(e[n]=o)}return e}function Sk(e,...t){return wk(e,...t,Sm)}function ec(e){if(e==null)return!0;if(au(e))return typeof e.splice!="function"&&typeof e!="string"&&!nu(e)&&!Ns(e)&&!Ro(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 Rm(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Tk="",Bk={curveBasis:Po,curveBasisClosed:vm,curveBasisOpen:Bm,curveBumpX:gu,curveBumpY:pu,curveBundle:Lm,curveCardinalClosed:Fm,curveCardinalOpen:Am,curveCardinal:yu,curveCatmullRomClosed:Em,curveCatmullRomOpen:Mm,curveCatmullRom:xu,curveLinear:qs,curveLinearClosed:Tm,curveMonotoneX:fu,curveMonotoneY:du,curveNatural:uu,curveStep:cu,curveStepAfter:hu,curveStepBefore:lu},vk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_k=p(function(e,t){const r=Sd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);ta(n),i=se(i,[...n])}else i=r.args;if(!i)return;let s=Sa(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Sd=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${vk.source})(?=[}][%]{2}).*
|
|
161
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),J.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=is.exec(e))!==null;)if(a.index===is.lastIndex&&is.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:c})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return J.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Lk=p(function(e){return e.replace(is,"")},"removeDirectives"),Fk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function el(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Bk[r]??t}p(el,"interpolateToCurve");function Td(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?xk.sanitizeUrl(r):r}p(Td,"formatUrl");var Ak=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){J.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function rl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(rl,"distance");function Bd(e){let t,r=0;e.forEach(s=>{r+=rl(s,t),t=s});const i=r/2;return il(e,i)}p(Bd,"traverseEdge");function vd(e){return e.length===1?e[0]:Bd(e)}p(vd,"calcLabelPosition");var rc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),il=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=rl(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:rc((1-n)*r.x+n*s.x,5),y:rc((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ek=p((e,t,r)=>{J.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=il(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function _d(e,t,r){const i=structuredClone(r);J.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=il(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(c.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,c.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(c.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,c.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(c.x=Math.sin(o)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o)*n+(i[0].y+a.y)/2),c}p(_d,"calcTerminalLabelPosition");function Ld(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}}p(Ld,"getStylesFromArray");var ic=0,Mk=p(()=>(ic++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ic),"generateId");function Fd(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}p(Fd,"makeRandomHex");var Ok=p(e=>Fd(e.length),"random"),$k=p(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"),Ik=p(function(e,t){const r=t.text.replace(fs.lineBreakRegex," "),[,i]=La(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 a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),Dk=gs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),fs.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const c=br(`${n} `,r),h=br(a,r);if(c>t){const{hyphenatedStrings:f,remainingWord:d}=Rk(n,t,"-",r);s.push(a,...f),a=d}else h+c>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Rk=gs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,c)=>{const h=`${n}${o}`;if(br(h,i)>=t){const u=c+1,f=s.length===u,d=`${h}${r}`;a.push(f?h:d),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Ad(e,t){return sl(e,t).height}p(Ad,"calculateTextHeight");function br(e,t){return sl(e,t).width}p(br,"calculateTextWidth");var sl=gs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=La(r),n=["sans-serif",i],o=e.split(fs.lineBreakRegex),c=[],h=Dt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const l=h.append("svg");for(const f of n){let d=0;const m={width:0,height:0,lineHeight:0};for(const y of o){const x=$k();x.text=y||Tk;const C=Ik(l,x).style("font-size",a).style("font-weight",s).style("font-family",f),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),d=Math.round(b.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}c.push(m)}l.remove();const u=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ki,Pk=(ki=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(ki,"InitIDGenerator"),ki),Es,qk=p(function(e){return Es=Es||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Es.innerHTML=e,unescape(Es.textContent)},"entityDecode");function al(e){return"str"in e}p(al,"isDetailedError");var Nk=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.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"),La=p(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 ol(e,t){return Sk({},e,t)}p(ol,"cleanAndMerge");var Ge={assignWithDepth:se,wrapLabel:Dk,calculateTextHeight:Ad,calculateTextWidth:br,calculateTextDimensions:sl,cleanAndMerge:ol,detectInit:_k,detectDirective:Sd,isSubstringInArray:Fk,interpolateToCurve:el,calcLabelPosition:vd,calcCardinalityPosition:Ek,calcTerminalLabelPosition:_d,formatUrl:Td,getStylesFromArray:Ld,generateId:Mk,random:Ok,runFunc:Ak,entityDecode:qk,insertTitle:Nk,isLabelCoordinateInPath:Ed,parseFontSize:La,InitIDGenerator:Pk},Wk=p(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"),Ar=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),jv=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ae(e){return e??null}p(ae,"handleUndefinedAttr");function Ed(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(Ed,"isLabelCoordinateInPath");function nl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Xr=nl();function Md(e){Xr=e}var os={exec:()=>null};function Gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(ke.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var zk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ke={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")},Hk=/^(?:[ \t]*(?:\n|$))+/,Yk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Uk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ms=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Gk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ll=/(?:[*+-]|\d{1,9}[.)])/,Od=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$d=Gt(Od).replace(/bull/g,ll).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(),jk=Gt(Od).replace(/bull/g,ll).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(),hl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xk=/^[^\n]+/,cl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vk=Gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Zk=Gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ll).getRegex(),Fa="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",ul=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kk=Gt("^ {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",ul).replace("tag",Fa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Id=Gt(hl).replace("hr",ms).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",Fa).getRegex(),Qk=Gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Id).getRegex(),dl={blockquote:Qk,code:Yk,def:Vk,fences:Uk,heading:Gk,hr:ms,html:Kk,lheading:$d,list:Zk,newline:Hk,paragraph:Id,table:os,text:Xk},sc=Gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ms).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",Fa).getRegex(),Jk={...dl,lheading:jk,table:sc,paragraph:Gt(hl).replace("hr",ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sc).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",Fa).getRegex()},t1={...dl,html:Gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ul).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:os,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gt(hl).replace("hr",ms).replace("heading",` *#{1,6} *[^
|
|
162
|
+
]`).replace("lheading",$d).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},e1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,r1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dd=/^( {2,}|\\)\n(?!\s*$)/,i1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Aa=/[\p{P}\p{S}]/u,fl=/[\s\p{P}\p{S}]/u,Rd=/[^\s\p{P}\p{S}]/u,s1=Gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,fl).getRegex(),Pd=/(?!~)[\p{P}\p{S}]/u,a1=/(?!~)[\s\p{P}\p{S}]/u,o1=/(?:[^\s\p{P}\p{S}]|~)/u,n1=Gt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",zk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),qd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,l1=Gt(qd,"u").replace(/punct/g,Aa).getRegex(),h1=Gt(qd,"u").replace(/punct/g,Pd).getRegex(),Nd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",c1=Gt(Nd,"gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,fl).replace(/punct/g,Aa).getRegex(),u1=Gt(Nd,"gu").replace(/notPunctSpace/g,o1).replace(/punctSpace/g,a1).replace(/punct/g,Pd).getRegex(),d1=Gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,fl).replace(/punct/g,Aa).getRegex(),f1=Gt(/\\(punct)/,"gu").replace(/punct/g,Aa).getRegex(),p1=Gt(/^<(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(),g1=Gt(ul).replace("(?:-->|$)","-->").getRegex(),m1=Gt("^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",g1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ua=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,y1=Gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ua).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wd=Gt(/^!?\[(label)\]\[(ref)\]/).replace("label",ua).replace("ref",cl).getRegex(),zd=Gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",cl).getRegex(),C1=Gt("reflink|nolink(?!\\()","g").replace("reflink",Wd).replace("nolink",zd).getRegex(),ac=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pl={_backpedal:os,anyPunctuation:f1,autolink:p1,blockSkip:n1,br:Dd,code:r1,del:os,emStrongLDelim:l1,emStrongRDelimAst:c1,emStrongRDelimUnd:d1,escape:e1,link:y1,nolink:zd,punctuation:s1,reflink:Wd,reflinkSearch:C1,tag:m1,text:i1,url:os},x1={...pl,link:Gt(/^!?\[(label)\]\((.*?)\)/).replace("label",ua).getRegex(),reflink:Gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ua).getRegex()},tn={...pl,emStrongRDelimAst:u1,emStrongLDelim:h1,url:Gt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ac).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:Gt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ac).getRegex()},b1={...tn,br:Gt(Dd).replace("{2,}","*").getRegex(),text:Gt(tn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ms={normal:dl,gfm:Jk,pedantic:t1},Wi={normal:pl,gfm:tn,breaks:b1,pedantic:x1},k1={"&":"&","<":"<",">":">",'"':""","'":"'"},oc=e=>k1[e];function Qe(e,t){if(t){if(ke.escapeTest.test(e))return e.replace(ke.escapeReplace,oc)}else if(ke.escapeTestNoEncode.test(e))return e.replace(ke.escapeReplaceNoEncode,oc);return e}function nc(e){try{e=encodeURI(e).replace(ke.percentDecode,"%")}catch{return null}return e}function lc(e,t){var a;let r=e.replace(ke.findPipe,(n,o,c)=>{let h=!1,l=o;for(;--l>=0&&c[l]==="\\";)h=!h;return h?"|":" |"}),i=r.split(ke.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.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(ke.slashPipe,"|");return i}function zi(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 w1(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 hc(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}function S1(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
163
|
+
`).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
|
|
164
|
+
`)}var da=class{constructor(t){Vt(this,"options");Vt(this,"rules");Vt(this,"lexer");this.options=t||Xr}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:zi(i,`
|
|
165
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=S1(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=zi(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:zi(r[0],`
|
|
166
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=zi(r[0],`
|
|
167
|
+
`).split(`
|
|
168
|
+
`),s="",a="",n=[];for(;i.length>0;){let o=!1,c=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))c.push(i[h]),o=!0;else if(!o)c.push(i[h]);else break;i=i.slice(h);let l=c.join(`
|
|
169
|
+
`),u=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
170
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
171
|
+
${l}`:l,a=a?`${a}
|
|
172
|
+
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=f,i.length===0)break;let d=n.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let m=d,y=m.raw+`
|
|
173
|
+
`+i.join(`
|
|
174
|
+
`),x=this.blockquote(y);n[n.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,a=a.substring(0,a.length-m.text.length)+x.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,y=m.raw+`
|
|
175
|
+
`+i.join(`
|
|
176
|
+
`),x=this.list(y);n[n.length-1]=x,s=s.substring(0,s.length-d.raw.length)+x.raw,a=a.substring(0,a.length-m.raw.length)+x.raw,i=y.substring(n.at(-1).raw.length).split(`
|
|
177
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={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 n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,l="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let f=r[2].split(`
|
|
178
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
179
|
+
`,1)[0],m=!f.trim(),y=0;if(this.options.pedantic?(y=2,u=f.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=f.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(l+=d+`
|
|
180
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let A=t.split(`
|
|
181
|
+
`,1)[0],F;if(d=A,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),F=d):F=d.replace(this.rules.other.tabCharGlobal," "),T.test(d)||v.test(d)||L.test(d)||b.test(d)||k.test(d))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
|
|
182
|
+
`+F.slice(y);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||v.test(f)||k.test(f))break;u+=`
|
|
183
|
+
`+d}!m&&!d.trim()&&(m=!0),l+=A+`
|
|
184
|
+
`,t=t.substring(A.length+1),f=F.slice(y)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(C=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:l,task:!!x,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=l}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let l=a.items[h].tokens.filter(f=>f.type==="space"),u=l.length>0&&l.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}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"):"",a=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:a}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=lc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
185
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<i.length;c++)n.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:n.align[c]});for(let c of a)n.rows.push(lc(c,n.header.length).map((h,l)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[l]})));return n}}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)===`
|
|
186
|
+
`?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 n=zi(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=w1(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=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)),hc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return hc(i,a,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 a=[...s[0]].length-1,n,o,c=a,h=0,l=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+a);(s=l.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){c+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){h+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+h);let u=[...s[0]][0].length,f=t.slice(0,a+s.index+u+o);if(Math.min(a,o)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}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),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(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,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,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}}}},Ye=class en{constructor(t){Vt(this,"tokens");Vt(this,"options");Vt(this,"state");Vt(this,"tokenizer");Vt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Xr,this.options.tokenizer=this.options.tokenizer||new da,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:ke,block:Ms.normal,inline:Wi.normal};this.options.pedantic?(r.block=Ms.pedantic,r.inline=Wi.pedantic):this.options.gfm&&(r.block=Ms.gfm,this.options.breaks?r.inline=Wi.breaks:r.inline=Wi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ms,inline:Wi}}static lex(t,r){return new en(r).lex(t)}static lexInline(t,r){return new en(r).inlineTokens(t)}lex(t){t=t.replace(ke.carriageReturn,`
|
|
187
|
+
`),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,a,n;for(this.options.pedantic&&(t=t.replace(ke.tabCharGlobal," ").replace(ke.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
188
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
189
|
+
`)?"":`
|
|
190
|
+
`)+o.raw,h.text+=`
|
|
191
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
192
|
+
`)?"":`
|
|
193
|
+
`)+o.raw,h.text+=`
|
|
194
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let c=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},l),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
195
|
+
`)?"":`
|
|
196
|
+
`)+o.raw,h.text+=`
|
|
197
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
198
|
+
`)?"":`
|
|
199
|
+
`)+o.raw,h.text+=`
|
|
200
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,h,l,u,f;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.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);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let d;if((u=(l=this.options.extensions)==null?void 0:l.inline)!=null&&u.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((f=this.options.extensions)!=null&&f.startInline){let y=1/0,x=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},x),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),n=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},fa=class{constructor(t){Vt(this,"options");Vt(this,"parser");this.options=t||Xr}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(ke.notSpaceStart))==null?void 0:n[0],a=t.replace(ke.endingNewline,"")+`
|
|
201
|
+
`;return s?'<pre><code class="language-'+Qe(s)+'">'+(i?a:Qe(a,!0))+`</code></pre>
|
|
202
|
+
`:"<pre><code>"+(i?a:Qe(a,!0))+`</code></pre>
|
|
203
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
204
|
+
${this.parser.parse(t)}</blockquote>
|
|
205
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
206
|
+
`}hr(t){return`<hr>
|
|
207
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let o=0;o<t.items.length;o++){let c=t.items[o];s+=this.listitem(c)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
|
|
208
|
+
`+s+"</"+a+`>
|
|
209
|
+
`}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+" "+Qe(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>
|
|
210
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
211
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
212
|
+
<thead>
|
|
213
|
+
`+r+`</thead>
|
|
214
|
+
`+s+`</table>
|
|
215
|
+
`}tablerow({text:t}){return`<tr>
|
|
216
|
+
${t}</tr>
|
|
217
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
218
|
+
`}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>${Qe(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),a=nc(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+Qe(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=nc(t);if(a===null)return Qe(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${Qe(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Qe(t.text)}},gl=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""}},Ue=class rn{constructor(t){Vt(this,"options");Vt(this,"renderer");Vt(this,"textRenderer");this.options=t||Xr,this.options.renderer=this.options.renderer||new fa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new gl}static parse(t,r){return new rn(r).parse(t)}static parseInline(t,r){return new rn(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=o,l=this.options.extensions.renderers[h.type].call({parser:this},h);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=l||"";continue}}let c=o;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"def":{i+=this.renderer.def(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let h=c,l=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],l+=`
|
|
219
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let c=o;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Ps,Qi=(Ps=class{constructor(t){Vt(this,"options");Vt(this,"block");this.options=t||Xr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}},Vt(Ps,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Vt(Ps,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ps),T1=class{constructor(...t){Vt(this,"defaults",nl());Vt(this,"options",this.setOptions);Vt(this,"parse",this.parseMarkdown(!0));Vt(this,"parseInline",this.parseMarkdown(!1));Vt(this,"Parser",Ue);Vt(this,"Renderer",fa);Vt(this,"TextRenderer",gl);Vt(this,"Lexer",Ye);Vt(this,"Tokenizer",da);Vt(this,"Hooks",Qi);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let c of o.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of o.rows)for(let h of c)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(c=>{let h=o[c].flat(1/0);i=i.concat(this.walkTokens(h,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let c=a.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new fa(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,c=i.renderer[o],h=a[o];a[o]=(...l)=>{let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new da(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,c=i.tokenizer[o],h=a[o];a[o]=(...l)=>{let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Qi;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,c=i.hooks[o],h=a[o];Qi.passThroughHooks.has(n)?a[o]=l=>{if(this.defaults.async&&Qi.passThroughHooksRespectAsync.has(n))return(async()=>{let f=await c.call(a,l);return h.call(a,f)})();let u=c.call(a,l);return h.call(a,u)}:a[o]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(a,l);return f===!1&&(f=await h.apply(a,l)),f})();let u=c.apply(a,l);return u===!1&&(u=h.apply(a,l)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let c=[];return c.push(n.call(this,o)),a&&(c=c.concat(a.call(this,o))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ye.lex(t,r??this.defaults)}parser(t,r){return Ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(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 n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,c=await(a.hooks?await a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(o,a),h=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let l=await(a.hooks?await a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(l):l})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let c=(a.hooks?a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(o,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
220
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Qe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Ur=new T1;function jt(e,t){return Ur.parse(e,t)}jt.options=jt.setOptions=function(e){return Ur.setOptions(e),jt.defaults=Ur.defaults,Md(jt.defaults),jt};jt.getDefaults=nl;jt.defaults=Xr;jt.use=function(...e){return Ur.use(...e),jt.defaults=Ur.defaults,Md(jt.defaults),jt};jt.walkTokens=function(e,t){return Ur.walkTokens(e,t)};jt.parseInline=Ur.parseInline;jt.Parser=Ue;jt.parser=Ue.parse;jt.Renderer=fa;jt.TextRenderer=gl;jt.Lexer=Ye;jt.lexer=Ye.lex;jt.Tokenizer=da;jt.Hooks=Qi;jt.parse=jt;jt.options;jt.setOptions;jt.use;jt.walkTokens;jt.parseInline;Ue.parse;Ye.lex;function Hd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(o,c){var h=c.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(l){var u,f;return(f=(u=l.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):o},[]);if(s.length){var a=new RegExp(`
|
|
221
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(o){return o.replace(a,`
|
|
222
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,c){var h=n.match(/(?:^|\n)( *)$/),l=h?h[1]:"",u=o;typeof o=="string"&&o.includes(`
|
|
223
|
+
`)&&(u=String(o).split(`
|
|
224
|
+
`).map(function(f,d){return d===0?f:"".concat(l).concat(f)}).join(`
|
|
225
|
+
`)),n+=u+i[c+1]}),n}var sn=typeof performance<"u"&&typeof performance.now=="function",Qr=p(()=>sn?performance.now():0,"now"),So="🧜 ",B1="Mermaid render",v1="Mermaid",_1={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},wi;wi=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),sn&&typeof performance.mark=="function")try{performance.mark(`${So}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=Qr();if(t.duration=r-t.start,sn&&typeof performance.measure=="function")try{performance.measure(`${So}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:B1,trackGroup:v1,color:_1[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,a=["ms % phase"],n=p((c,h)=>{const l=" ".repeat(h),u=c.duration.toFixed(1).padStart(8),f=i>0?`${(c.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${f} ${l}${c.name}`);for(const d of c.children)n(d,h+1);if(c.children.length>0){const d=c.children.reduce((y,x)=>y+x.duration,0),m=c.duration-d;if(m>.5){const y=m.toFixed(1).padStart(8);a.push(`${y} ${l} (self)`)}}},"walk");n(t,0);const o=Object.keys(this.buckets);if(o.length>0){a.push("—— buckets (summed) ——");for(const c of o)a.push(`${this.buckets[c].toFixed(1).padStart(8)} ${c}`)}console.log(`${So}mermaid render profile · ${s}
|
|
226
|
+
${a.join(`
|
|
227
|
+
`)}`)}},p(wi,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});function Yd(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
228
|
+
`).replace(/\n{2,}/g,`
|
|
229
|
+
`);return Hd(i)}p(Yd,"preprocessMarkdown");function Ud(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"})))??[]})}p(Ud,"nonMarkdownToLines");function Gd(e,t={}){const r=Yd(e,t),i=jt.lexer(r),s=[[]];let a=0;function n(o,c="normal"){o.type==="text"?o.text.split(`
|
|
230
|
+
`).forEach((l,u)=>{u!==0&&(a++,s.push([])),l.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&s[a].push({content:f,type:c})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return p(n,"processNode"),i.forEach(o=>{var c;o.type==="paragraph"?(c=o.tokens)==null||c.forEach(h=>{n(h)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}p(Gd,"markdownToLines");function jd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(jd,"nonMarkdownToHTML");function Xd(e,{markdownAutoWrap:t}={}){const r=jt.lexer(e);function i(s){var a,n,o;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(J.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Xd,"markdownToHTML");var L1=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function i(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e)}p(i,"FastDom"),i.prototype={constructor:i,runTasks:p(function(h){for(var l;l=h.shift();)l()},"runTasks"),measure:p(function(h,l){var u=l?h.bind(l):h;return this.reads.push(u),s(this),u},"measure"),mutate:p(function(h,l){var u=l?h.bind(l):h;return this.writes.push(u),s(this),u},"mutate"),clear:p(function(h){return n(this.reads,h)||n(this.writes,h)},"clear"),extend:p(function(h){if(typeof h!="object")throw new Error("expected object");var l=Object.create(this);return o(l,h),l.fastdom=this,l.initialize&&l.initialize(),l},"extend"),catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}p(s,"scheduleFlush");function a(h){var l=h.writes,u=h.reads,f;try{t("flushing reads",u.length),h.runTasks(u),t("flushing writes",l.length),h.runTasks(l)}catch(d){f=d}if(h.scheduled=!1,(u.length||l.length)&&s(h),f)if(t("task errored",f.message),h.catch)h.catch(f);else throw f}p(a,"flush");function n(h,l){var u=h.indexOf(l);return!!~u&&!!h.splice(u,1)}p(n,"remove");function o(h,l){for(var u in l)l.hasOwnProperty(u)&&(h[u]=l[u])}p(o,"mixin");var c=e.fastdom=e.fastdom||new i;return c})(typeof window<"u"?window:globalThis),Vd={initialize:p(function(){this._tasks=new Map},"initialize"),mutate:p(function(e,t){return an(this,"mutate",e,t)},"mutate"),measure:p(function(e,t){return an(this,"measure",e,t)},"measure"),clear:p(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function an(e,t,r,i){var s=e._tasks,a=e.fastdom,n,o=new Promise(function(c,h){n=a[t](function(){s.delete(o);try{c(i?r.call(i):r())}catch(l){h(l)}},i)});return s.set(o,n),o}p(an,"create");var{initialize:Jv,mutate:t_,measure:e_,clear:r_}=Vd,F1=Vd,A1=L1.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(F1),Gr=A1;function Zd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Zd,"splitTextToChars");function Kd(e,t){const r=Zd(t.content);return ml(e,[],r,t.type)}p(Kd,"splitWordToFitWidth");function ml(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?ml(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ml,"splitWordToFitWidthRecursion");function Qd(e,t){if(e.some(({content:r})=>r.includes(`
|
|
231
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return pa(e,t)}p(Qd,"splitLineToFitWidth");function pa(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 a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return pa(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,c]=Kd(t,a);r.push([o]),c.content&&e.unshift(c)}return pa(e,t,r)}p(pa,"splitLineToFitWidthRecursion");function on(e,t){t&&e.attr("style",t)}p(on,"applyStyle");var cc=16384;async function Jd(e,t,r,i,s=!1,a=Qt(),n=0){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,cc)}px`),o.attr("height",`${Math.min(10*r,cc)}px`);const c=o.append("xhtml:div"),h=ls(t.label)?await Yu(t.label.replace(fs.lineBreakRegex,`
|
|
232
|
+
`),a):We(t.label,a),l=t.isNode?"nodeLabel":"edgeLabel",u=c.append("span");u.html(h),on(u,t.labelStyle),u.attr("class",`${l} ${i}`),on(c,t.labelStyle),c.style("display","table-cell"),c.style("white-space","nowrap"),c.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(c.style("max-width",r+"px"),c.style("text-align","center")),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&c.attr("class","labelBkg");const f=await Gr.measure(()=>c.node().getBoundingClientRect());return f.width===r?(c.style("display","table"),c.style("white-space","break-spaces"),c.style("width",r+"px")):f.width<n&&(c.style("display","table"),c.style("width",n+"px"),c.style("text-align","center")),o.node()}p(Jd,"addHtmlSpan");function Ea(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}p(Ea,"createTspan");function tf(e,t,r){const i=e.append("text"),s=Ea(i,1,t);Ma(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(tf,"computeWidthOfText");function E1(e,t,r){var n;const i=e.append("text"),s=Ea(i,1,t);Ma(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}p(E1,"computeDimensionOfText");function ef(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),c=n.append("text").attr("y","-10.1");s&&c.attr("text-anchor","middle");let h=0;for(const l of r){const u=p(d=>tf(n,1.1,d)<=e,"checkWidth"),f=u(l)?[l]:Qd(l,u);for(const d of f){const m=Ea(c,h,1.1,s);Ma(m,d),h++}}if(i){const l=c.node().getBBox(),u=2;return o.attr("x",l.x-u).attr("y",l.y-u).attr("width",l.width+2*u).attr("height",l.height+2*u),n.node()}else return c.node()}p(ef,"createFormattedText");function nn(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}})}p(nn,"decodeHTMLEntities");function Ma(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(nn(r.content)):s.text(" "+nn(r.content))})}p(Ma,"updateTextContentAndStyles");async function rf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await wd(o)?await Ei(o,void 0,{class:"label-icon"}):`<i class='${We(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(rf,"replaceIconSubstring");var De=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:c=200,minWidth:h=0,addSvgBackground:l=!1}={},u)=>{if(J.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",l),a){const f=n?Xd(t,u):jd(t),d=await rf(Ar(f),u),m=t.replace(/\\\\/g,"\\"),y={isNode:o,label:ls(t)?m:d,labelStyle:r.replace("fill:","color:")};return await Jd(e,y,c,s,l,u,h)}else{const f=Ar(t.replace(/<br\s*\/?>/g,"<br/>")),d=n?Gd(f.replace("<br>","<br/>"),u):Ud(f),m=ef(c,e,d,t?l:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Dt(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Dt(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Dt(m).select("text").attr("style",x)}return i?Dt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Dt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText"),M1=new Set(["redux-color","redux-dark-color"]),O1=12,$1=64,yl=p(e=>Array.isArray(e)&&e.length>0,"hasPalette"),I1=p((e,t)=>e!=null&&M1.has(e)&&yl(t),"isColorTheme"),D1=/^[\w-]+$/,i_=p(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return D1.test(t)?t:"classic"},"safeLook"),sf=p(e=>yl(e)?e.length:0,"paletteSlotCount"),s_=p((e,t)=>yl(t)?sf(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=$1?e:O1,"colorSlotCount"),He=p((e,t,r,i)=>{if(t===void 0||!I1(r,i))return;const s=t%sf(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");function To(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const c of e){const[h,l]=c;c[0]=(h-i)*n-(l-s)*o+i,c[1]=(h-i)*o+(l-s)*n+s}}}function R1(e,t){return e[0]===t[0]&&e[1]===t[1]}function P1(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const h of n)To(h,o,s);const c=(function(h,l,u){const f=[];for(const b of h){const k=[...b];R1(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];l=Math.max(l,.1);const m=[];for(const b of f)for(let k=0;k<b.length-1;k++){const T=b[k],v=b[k+1];if(T[1]!==v[1]){const L=Math.min(T[1],v[1]);m.push({ymin:L,ymax:Math.max(T[1],v[1]),x:L===T[1]?T[0]:v[0],islope:(v[0]-T[0])/(v[1]-T[1])})}}if(m.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!m.length)return d;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>x);k++)b=k;m.splice(0,b+1).forEach((k=>{y.push({s:x,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=x))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||C%l==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const T=y[b].edge,v=y[k].edge;d.push([[Math.round(T.x),x],[Math.round(v.x),x]])}x+=u,y.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),C++}return d})(n,a,i);if(s){for(const h of n)To(h,o,-s);(function(h,l,u){const f=[];h.forEach((d=>f.push(...d))),To(f,l,u)})(c,o,-s)}return c}function ys(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 a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),P1(e,s,i,a||1)}class Cl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ys(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 Oa(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 q1 extends Cl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ys(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[h,l]of s)Oa([h,l])&&n.push([[h[0]-o,h[1]+c],[...l]],[[h[0]+o,h[1]-c],[...l]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class N1 extends Cl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class W1{constructor(t){this.helper=t}fillPolygons(t,r){const i=ys(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 a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const c=Oa(o),h=c/s,l=Math.ceil(h)-1,u=c-l*s,f=(o[0][0]+o[1][0])/2-s/4,d=Math.min(o[0][1],o[1][1]);for(let m=0;m<l;m++){const y=d+u+m*s,x=f-n+2*Math.random()*n,C=y-n+2*Math.random()*n,b=this.helper.ellipse(x,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class z1{constructor(t){this.helper=t}fillPolygons(t,r){const i=ys(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,a=[];return t.forEach((n=>{const o=Oa(n),c=Math.floor(o/(i+s)),h=(o+s-c*(i+s))/2;let l=n[0],u=n[1];l[0]>u[0]&&(l=n[1],u=n[0]);const f=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let d=0;d<c;d++){const m=d*(i+s),y=m+i,x=[l[0]+m*Math.cos(f)+h*Math.cos(f),l[1]+m*Math.sin(f)+h*Math.sin(f)],C=[l[0]+y*Math.cos(f)+h*Math.cos(f),l[1]+y*Math.sin(f)+h*Math.sin(f)];a.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),a}}class H1{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,a=ys(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=Oa(a),o=Math.round(n/(2*r));let c=a[0],h=a[1];c[0]>h[0]&&(c=a[1],h=a[0]);const l=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let u=0;u<o;u++){const f=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[c[0]+f*Math.cos(l),c[1]+f*Math.sin(l)],x=[c[0]+d*Math.cos(l),c[1]+d*Math.sin(l)],C=[y[0]+m*Math.cos(l+Math.PI/4),y[1]+m*Math.sin(l+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const Le={};class Y1{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const U1=0,Bo=1,uc=2,Os={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 vo(e,t){return e.type===t}function xl(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:U1,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Bo,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:uc,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!vo(a,uc);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return xl("M0,0"+e);s++,n=Os[a.text],i=a.text}else vo(a,Bo)?n=Os[i]:(s++,n=Os[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let c=s;c<s+n;c++){const h=r[c];if(!vo(h,Bo))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof Os[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:o};t.push(c),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function af(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function of(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=0,c=0;for(const{key:h,data:l}of e){switch(h){case"M":t.push({key:"M",data:[...l]}),[i,s]=l,[a,n]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],s=l[5],o=l[2],c=l[3];break;case"L":t.push({key:"L",data:[...l]}),[i,s]=l;break;case"H":i=l[0],t.push({key:"L",data:[i,s]});break;case"V":s=l[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-o),f=s+(s-c)):(u=i,f=s),t.push({key:"C",data:[u,f,...l]}),o=l[0],c=l[1],i=l[2],s=l[3];break}case"T":{const[u,f]=l;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-o),m=s+(s-c)):(d=i,m=s);const y=i+2*(d-i)/3,x=s+2*(m-s)/3,C=u+2*(d-u)/3,b=f+2*(m-f)/3;t.push({key:"C",data:[y,x,C,b,u,f]}),o=d,c=m,i=u,s=f;break}case"Q":{const[u,f,d,m]=l,y=i+2*(u-i)/3,x=s+2*(f-s)/3,C=d+2*(u-d)/3,b=m+2*(f-m)/3;t.push({key:"C",data:[y,x,C,b,d,m]}),o=u,c=f,i=d,s=m;break}case"A":{const u=Math.abs(l[0]),f=Math.abs(l[1]),d=l[2],m=l[3],y=l[4],x=l[5],C=l[6];u===0||f===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(nf(i,s,x,C,u,f,d,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=h}return t}function Hi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function nf(e,t,r,i,s,a,n,o,c,h){const l=(u=n,Math.PI*u/180);var u;let f=[],d=0,m=0,y=0,x=0;if(h)[d,m,y,x]=h;else{[e,t]=Hi(e,t,-l),[r,i]=Hi(r,i,-l);const z=(e-r)/2,E=(t-i)/2;let M=z*z/(s*s)+E*E/(a*a);M>1&&(M=Math.sqrt(M),s*=M,a*=M);const _=s*s,N=a*a,O=_*N-_*E*E-N*z*z,G=_*E*E+N*z*z,j=(o===c?-1:1)*Math.sqrt(Math.abs(O/G));y=j*s*E/a+(e+r)/2,x=j*-a*z/s+(t+i)/2,d=Math.asin(parseFloat(((t-x)/a).toFixed(9))),m=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),c&&d>m&&(d-=2*Math.PI),!c&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const z=m,E=r,M=i;m=c&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=nf(r=y+s*Math.cos(m),i=x+a*Math.sin(m),E,M,s,a,n,0,c,[m,z,y,x])}C=m-d;const b=Math.cos(d),k=Math.sin(d),T=Math.cos(m),v=Math.sin(m),L=Math.tan(C/4),A=4/3*s*L,F=4/3*a*L,Y=[e,t],D=[e+A*k,t-F*b],q=[r+A*v,i-F*T],tt=[r,i];if(D[0]=2*Y[0]-D[0],D[1]=2*Y[1]-D[1],h)return[D,q,tt].concat(f);{f=[D,q,tt].concat(f);const z=[];for(let E=0;E<f.length;E+=3){const M=Hi(f[E][0],f[E][1],l),_=Hi(f[E+1][0],f[E+1][1],l),N=Hi(f[E+2][0],f[E+2][1],l);z.push([M[0],M[1],_[0],_[1],N[0],N[1]])}return z}}const G1={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return ga(e,t,r)},ellipse:function(e,t,r,i,s){const a=hf(r,i,s);return ln(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return Er(e,t,r,i,s,!0)}};function lf(e,t,r,i,s){return{type:"path",ops:Er(e,t,r,i,s)}}function Xs(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...Er(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...Er(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?lf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function j1(e,t,r,i,s){return(function(a,n){return Xs(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function dc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=$s(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:$s(r[0],1.5*(1+.22*t.roughness),gc(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=$s(n,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:$s(n,1.5*(1+.22*t.roughness),gc(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of c)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function hf(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)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const c=1-r.curveFitting;return n+=Mt(n*c,r),o+=Mt(o*c,r),{increment:a,rx:n,ry:o}}function ln(e,t,r,i){const[s,a]=mc(i.increment,e,t,i.rx,i.ry,1,i.increment*ga(.1,ga(.4,1,r),r),r);let n=ma(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=mc(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=ma(o,null,r);n=n.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function fc(e,t,r,i,s,a,n,o,c){const h=e,l=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=Mt(.01*u,c),f+=Mt(.01*f,c);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const y=2*Math.PI/c.curveStepCount,x=Math.min(y/2,(m-d)/2),C=yc(x,h,l,u,f,d,m,1,c);if(!c.disableMultiStroke){const b=yc(x,h,l,u,f,d,m,1.5,c);C.push(...b)}return n&&(o?C.push(...Er(h,l,h+u*Math.cos(d),l+f*Math.sin(d),c),...Er(h,l,h+u*Math.cos(m),l+f*Math.sin(m),c)):C.push({op:"lineTo",data:[h,l]},{op:"lineTo",data:[h+u*Math.cos(d),l+f*Math.sin(d)]})),{type:"path",ops:C}}function pc(e,t){const r=of(af(xl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...Er(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[c,h,l,u,f,d]=o;i.push(...X1(c,h,l,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...Er(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function _o(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Mt(s,t),i[n][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function Jr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Le[s])switch(s){case"zigzag":Le[s]||(Le[s]=new q1(i));break;case"cross-hatch":Le[s]||(Le[s]=new N1(i));break;case"dots":Le[s]||(Le[s]=new W1(i));break;case"dashed":Le[s]||(Le[s]=new z1(i));break;case"zigzag-line":Le[s]||(Le[s]=new H1(i));break;default:s="hachure",Le[s]||(Le[s]=new Cl(i))}return Le[s]})(t,G1).fillPolygons(e,t)}function gc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function cf(e){return e.randomizer||(e.randomizer=new Y1(e.seed||0)),e.randomizer.next()}function ga(e,t,r,i=1){return r.roughness*i*(cf(r)*(t-e)+e)}function Mt(e,t,r=1){return ga(-e,e,t,r)}function Er(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=hn(e,t,r,i,s,!0,!1);if(n)return o;const c=hn(e,t,r,i,s,!0,!0);return o.concat(c)}function hn(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(o);let h=1;h=c<200?1:c>500?.4:-.0016668*c+1.233334;let l=s.maxRandomnessOffset||0;l*l*100>o&&(l=c/10);const u=l/2,f=.2+.2*cf(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=Mt(d,s,h),m=Mt(m,s,h);const y=[],x=()=>Mt(u,s,h),C=()=>Mt(l,s,h),b=s.preserveVertices;return n?y.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):y.push({op:"move",data:[e+(b?0:Mt(l,s,h)),t+(b?0:Mt(l,s,h))]}),n?y.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),m+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),m+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),m+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),m+t+2*(i-t)*f+C(),r+(b?0:C()),i+(b?0:C())]}),y}function $s(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return ma(i,null,r)}function ma(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const c=e[o];a[0]=[c[0],c[1]],a[1]=[c[0]+(n*e[o+1][0]-n*e[o-1][0])/6,c[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[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(...hn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function mc(e,t,r,i,s,a,n,o){const c=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const u=[t+i*Math.cos(l),r+s*Math.sin(l)];c.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const l=Mt(.5,o)-Math.PI/2;h.push([Mt(a,o)+t+.9*i*Math.cos(l-e),Mt(a,o)+r+.9*s*Math.sin(l-e)]);const u=2*Math.PI+l-.01;for(let f=l;f<u;f+=e){const d=[Mt(a,o)+t+i*Math.cos(f),Mt(a,o)+r+s*Math.sin(f)];c.push(d),h.push(d)}h.push([Mt(a,o)+t+i*Math.cos(l+2*Math.PI+.5*n),Mt(a,o)+r+s*Math.sin(l+2*Math.PI+.5*n)]),h.push([Mt(a,o)+t+.98*i*Math.cos(l+n),Mt(a,o)+r+.98*s*Math.sin(l+n)]),h.push([Mt(a,o)+t+.9*i*Math.cos(l+.5*n),Mt(a,o)+r+.9*s*Math.sin(l+.5*n)])}return[h,c]}function yc(e,t,r,i,s,a,n,o,c){const h=a+Mt(.1,c),l=[];l.push([Mt(o,c)+t+.9*i*Math.cos(h-e),Mt(o,c)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=n;u+=e)l.push([Mt(o,c)+t+i*Math.cos(u),Mt(o,c)+r+s*Math.sin(u)]);return l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),ma(l,null,c)}function X1(e,t,r,i,s,a,n,o){const c=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let l=[0,0];const u=o.disableMultiStroke?1:2,f=o.preserveVertices;for(let d=0;d<u;d++)d===0?c.push({op:"move",data:[n[0],n[1]]}):c.push({op:"move",data:[n[0]+(f?0:Mt(h[0],o)),n[1]+(f?0:Mt(h[0],o))]}),l=f?[s,a]:[s+Mt(h[d],o),a+Mt(h[d],o)],c.push({op:"bcurveTo",data:[e+Mt(h[d],o),t+Mt(h[d],o),r+Mt(h[d],o),i+Mt(h[d],o),l[0],l[1]]});return c}function Yi(e){return[...e]}function Cc(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(Yi(e[0]),Yi(e[1]),Yi(e[2]),Yi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(Yi(s[0]));for(let o=1;o+2<s.length;o++){const c=s[o];a[0]=[c[0],c[1]],a[1]=[c[0]+(n*s[o+1][0]-n*s[o-1][0])/6,c[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function Vs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function V1(e,t,r){const i=Vs(t,r);if(i===0)return Vs(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)),Vs(e,qr(t,r,s))}function qr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function cn(e,t,r,i){const s=i||[];if((function(o,c){const h=o[c+0],l=o[c+1],u=o[c+2],f=o[c+3];let d=3*l[0]-2*h[0]-f[0];d*=d;let m=3*l[1]-2*h[1]-f[1];m*=m;let y=3*u[0]-2*f[0]-h[0];y*=y;let x=3*u[1]-2*f[1]-h[1];return x*=x,d<y&&(d=y),m<x&&(m=x),d+m})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(Vs(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const c=e[t+0],h=e[t+1],l=e[t+2],u=e[t+3],f=qr(c,h,.5),d=qr(h,l,.5),m=qr(l,u,.5),y=qr(f,d,.5),x=qr(d,m,.5),C=qr(y,x,.5);cn([c,f,y,C],0,r,s),cn([C,x,m,u],0,r,s)}var a,n;return s}function Z1(e,t){return ya(e,0,e.length,t)}function ya(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let c=0,h=1;for(let l=t+1;l<r-1;++l){const u=V1(e[l],n,o);u>c&&(c=u,h=l)}return Math.sqrt(c)>i?(ya(e,t,h+1,i,a),ya(e,h,r,i,a)):(a.length||a.push(n),a.push(o)),a}function Lo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)cn(e,3*a,t,i);return r&&r>0?ya(i,0,i.length,r):i}const Me="none";class Ca{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,a){const n=this._o(a);return this._d("line",[lf(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],c=j1(t,r,i,s,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(_o([h],n)):o.push(Jr([h],n))}return n.stroke!==Me&&o.push(c),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],c=hf(i,s,n),h=ln(t,r,n,c);if(n.fill)if(n.fillStyle==="solid"){const l=ln(t,r,n,c).opset;l.type="fillPath",o.push(l)}else o.push(Jr([h.estimatedPoints],n));return n.stroke!==Me&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Xs(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,c){const h=this._o(c),l=[],u=fc(t,r,i,s,a,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const f=Object.assign({},h);f.disableMultiStroke=!0;const d=fc(t,r,i,s,a,n,!0,!1,f);d.type="fillPath",l.push(d)}else l.push((function(f,d,m,y,x,C,b){const k=f,T=d;let v=Math.abs(m/2),L=Math.abs(y/2);v+=Mt(.01*v,b),L+=Mt(.01*L,b);let A=x,F=C;for(;A<0;)A+=2*Math.PI,F+=2*Math.PI;F-A>2*Math.PI&&(A=0,F=2*Math.PI);const Y=(F-A)/b.curveStepCount,D=[];for(let q=A;q<=F;q+=Y)D.push([k+v*Math.cos(q),T+L*Math.sin(q)]);return D.push([k+v*Math.cos(F),T+L*Math.sin(F)]),D.push([k,T]),Jr([D],b)})(t,r,i,s,a,n,h));return h.stroke!==Me&&l.push(u),this._d("arc",l,h)}curve(t,r){const i=this._o(r),s=[],a=dc(t,i);if(i.fill&&i.fill!==Me)if(i.fillStyle==="solid"){const n=dc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const c=typeof o[0][0]=="number"?[o]:o;for(const h of c)h.length<3?n.push(...h):h.length===3?n.push(...Lo(Cc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...Lo(Cc(h),10,(1+i.roughness)/2))}n.length&&s.push(Jr([n],i))}return i.stroke!==Me&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Xs(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(_o([t],i)):s.push(Jr([t],i))),i.stroke!==Me&&s.push(a),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 a=i.fill&&i.fill!=="transparent"&&i.fill!==Me,n=i.stroke!==Me,o=!!(i.simplification&&i.simplification<1),c=(function(l,u,f){const d=of(af(xl(l))),m=[];let y=[],x=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...Lo(C,u)),C=[]},k=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:v,data:L}of d)switch(v){case"M":k(),x=[L[0],L[1]],y.push(x);break;case"L":b(),y.push([L[0],L[1]]);break;case"C":if(!C.length){const A=y.length?y[y.length-1]:x;C.push([A[0],A[1]])}C.push([L[0],L[1]]),C.push([L[2],L[3]]),C.push([L[4],L[5]]);break;case"Z":b(),y.push([x[0],x[1]])}if(k(),!f)return m;const T=[];for(const v of m){const L=Z1(v,f);L.length&&T.push(L)}return T})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=pc(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const l=pc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else s.push(_o(c,i));else s.push(Jr(c,i));return n&&(o?c.forEach((l=>{s.push(Xs(l,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Me};break;case"fillPath":n={d:this.opsToPath(a),stroke:Me,strokeWidth:0,fill:i.fill||Me};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Me,strokeWidth:i,fill:Me}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class K1{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ca(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.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,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,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 a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}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,a,n,o=!1,c){const h=this.gen.arc(t,r,i,s,a,n,o,c);return this.draw(h),h}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 Is="http://www.w3.org/2000/svg";class Q1{constructor(t,r){this.svg=t,this.gen=new Ca(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Is,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let c=null;switch(o.type){case"path":c=s.createElementNS(Is,"path"),c.setAttribute("d",this.opsToPath(o,n)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=s.createElementNS(Is,"path"),c.setAttribute("d",this.opsToPath(o,n)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(s,o,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Is,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}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,a,n,o=!1,c){const h=this.gen.arc(t,r,i,s,a,n,o,c);return this.draw(h)}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 dt={canvas:(e,t)=>new K1(e,t),svg:(e,t)=>new Q1(e,t),generator:e=>new Ca(e),newSeed:()=>Ca.newSeed()},J1=1,t2=3;async function bl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!kl(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const n=Rt().fontSize?Rt().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[c=vn.fontSize]=La(n),h=c*o+"px";i.style.minWidth=h,i.style.maxWidth=h}else i.style.width="100%";s(i)}p(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}p(bl,"configureLabelImages");function kl(e){var r;return e.nodeType===t2?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==J1||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(kl)}p(kl,"hasTextBesidesImages");var xc=3,e2=32,r2=p(async(e,t,r)=>{var C,b,k;const i=Rt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",ae(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(T=>({text:T,cssClass:"c4-descr"}))].filter(T=>T.text),c=t.width?Math.max(t.width-2*(t.padding??0),e2):((b=Rt().flowchart)==null?void 0:b.wrappingWidth)??200,l=((k=i.c4)==null?void 0:k.wrap)??!0?c:Number.POSITIVE_INFINITY,u=await Promise.all(o.map(async T=>{const v=a.append("g").attr("class",T.cssClass),L=await De(v,We(Ar(T.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return Dt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Dt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),f=Math.max(...u.map(({box:T})=>T.width),0);let d=0;for(const{el:T,box:v}of u)T.attr("transform",`translate(${f/2-v.x-v.width/2}, ${d-v.y})`),d+=v.height+xc;const m=u.length>0?d-xc:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-f/2}, ${-m/2})`);const y=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:a}},"c4LabelHelper"),bc=p((e,t)=>{const{x:r,y:i,width:s,height:a}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:a,top:i,left:r,bottom:i+a,right:r+t,toJSON:p(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:a}},"withMinWidth"),Tt=p(async(e,t,r)=>{var m,y;if(t.stereotype!==void 0)return r2(e,t,r);let i;const s=t.useHtmlLabels||ar((m=Rt())==null?void 0:m.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=a.insert("g").attr("class","label").attr("style",ae(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,h=t.labelType==="markdown",l=o&&!t.width?t.minWidth??0:0,u=await De(n,We(Ar(o),Rt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((y=Rt().flowchart)==null?void 0:y.wrappingWidth),minWidth:l,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:h},Rt()),f=((t==null?void 0:t.padding)??0)/2;let d;if(s){const x=u.children[0],C=Dt(u);await bl(x),d=await Gr.measure(()=>x.getBoundingClientRect()),d=bc(d,l),C.attr("width",d.width),C.attr("height",d.height)}else d=await Gr.measure(()=>u.getBBox()),d=bc(d,l);return s?n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):n.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:f,label:n}},"labelHelper"),Wr=p(async(e,t,r)=>{var c,h;const i=r.useHtmlLabels??ce(Rt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await De(s,We(Ar(t),Rt()),{useHtmlLabels:i,width:r.width||((h=(c=Rt())==null?void 0:c.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let o;if(ce(Rt())){const l=a.children[0],u=Dt(a);o=await Gr.measure(()=>l.getBoundingClientRect()),u.attr("width",o.width),u.attr("height",o.height)}else o=await Gr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),gt=p((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"),St=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Ht,"createPathFromPoints");function Mr(e,t,r,i,s,a){const n=[],c=r-e,h=i-t,l=c/a,u=2*Math.PI/l,f=t+h/2;for(let d=0;d<=50;d++){const m=d/50,y=e+m*c,x=f+s*Math.sin(u*(y-e));n.push({x:y,y:x})}return n}p(Mr,"generateFullSineWavePoints");function er(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);n.push({x:-d,y:-m})}return n}p(er,"generateCirclePoints");function un(e){const t=Array.from(e.childNodes).filter(c=>c.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(c=>c.getAttribute("d")).filter(c=>c!==null).join(" ");r.setAttribute("d",i);const s=t.find(c=>c.getAttribute("fill")!=="none"),a=t.find(c=>c.getAttribute("stroke")!=="none"),n=p((c,h)=>(c==null?void 0:c.getAttribute(h))??void 0,"getAttr");if(s){const c={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}if(a){const c={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}p(un,"mergePaths");var i2=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,c,h;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),c=a===0?0:o*s/a,h=o):(s<0&&(n=-n),c=n,h=s===0?0:n*a/s),{x:r+c,y:i+h}},"intersectRect"),kr=i2;function uf(e,t){return e.intersect(t)}p(uf,"intersectNode");var s2=uf;function df(e,t,r,i){var s=e.x,a=e.y,n=s-i.x,o=a-i.y,c=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/c);i.x<s&&(h=-h);var l=Math.abs(t*r*o/c);return i.y<a&&(l=-l),{x:s+h,y:a+l}}p(df,"intersectEllipse");var ff=df;function pf(e,t,r){return ff(e,t,t,r)}p(pf,"intersectCircle");var a2=pf;function gf(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,c=s*i.x+a*i.y+n,h=1e-6;if(o!==0&&c!==0&&dn(o,c))return;const l=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=l*e.x+u*e.y+f,m=l*t.x+u*t.y+f;if(Math.abs(d)<h&&Math.abs(m)<h&&dn(d,m))return;const y=s*u-l*a;if(y===0)return;const x=(a*f-u*n)/y,C=(l*n-s*f)/y;return{x,y:C}}}p(gf,"intersectLine");function dn(e,t){return e*t>0}p(dn,"sameSign");var o2=gf;function mf(e,t,r){let i=e.x,s=e.y,a=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){n=Math.min(n,l.x),o=Math.min(o,l.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let c=i-e.width/2-n,h=s-e.height/2-o;for(let l=0;l<t.length;l++){let u=t[l],f=t[l<t.length-1?l+1:0],d=o2(e,r,{x:c+u.x,y:h+u.y},{x:c+f.x,y:h+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(l,u){let f=l.x-r.x,d=l.y-r.y,m=Math.sqrt(f*f+d*d),y=u.x-r.x,x=u.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),a[0]):e}p(mf,"intersectPolygon");var n2=mf,ht={node:s2,circle:a2,ellipse:ff,polygon:n2,rect:kr},Re=p((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"),l2=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=Rt(),o=ce(n);return await De(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),mr=l2;function yf(e,t){const{labelStyles:r}=pt(t);t.labelStyle=r;const i=St(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,c=dt.svg(a),h=ut(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const l=c.circle(0,0,n*2,h),u=a.insert(()=>l,":first-child");return u.attr("class","anchor").attr("style",ae(o)),gt(t,u),t.intersect=function(f){return J.info("Circle intersect",t,n,f),ht.circle(t,n,f)},a}p(yf,"anchor");function fn(e,t,r,i,s,a,n){const c=(e+r)/2,h=(t+i)/2,l=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/s,m=f/a,y=Math.sqrt(d**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=c+x*a*Math.sin(l)*(n?-1:1),b=h-x*s*Math.cos(l)*(n?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let v=Math.atan2((i-b)/a,(r-C)/s)-k;n&&v<0&&(v+=2*Math.PI),!n&&v>0&&(v-=2*Math.PI);const L=[];for(let A=0;A<20;A++){const F=A/19,Y=k+F*v,D=C+s*Math.cos(Y),q=b+a*Math.sin(Y);L.push({x:D,y:q})}return L}p(fn,"generateArcPoints");function Cf(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Cf,"calculateArcSagitta");async function xf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=p(Y=>Y+n,"calcTotalHeight"),c=p(Y=>{const D=Y/2;return[D/(2.5+Y/50),D]},"calcEllipseRadius"),{shapeSvg:h,bbox:l}=await Tt(e,t,St(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:l.height),[f,d]=c(u),m=Cf(u,f,d),x=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+m-m,C=u,{cssStyles:b}=t,k=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...fn(-x/2,-C/2,-x/2,C/2,f,d,!1),{x:x/2,y:C/2},...fn(x/2,C/2,x/2,-C/2,f,d,!0)],T=dt.svg(h),v=ut(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=Ht(k),A=T.path(L,v),F=h.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${f/2}, 0)`),gt(t,F),t.intersect=function(Y){return ht.polygon(t,k,Y)},h}p(xf,"bowTieRect");async function bf(e,t,{config:{themeVariables:r}}){var A;const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=Math.max(n.width+h*2,t.width??0,80),u=Math.max(Math.min(l*.08,12),5),f=Math.max(n.height+h*2+u,t.height??0),d=-f/2+u,m=f/2,y=l*.72,x=[`M${-l/2},${d}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${l/2},${d}`,`A${l/2},${u} 0 0 0 ${-l/2},${d}`,"Z"].join(" "),{cssStyles:C}=t,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const Y=dt.svg(a).path(x,ut(t,{}));(A=b.node())==null||A.appendChild(Y),C&&b.attr("style",C)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",l/2).attr("ry",u).attr("style",`fill:none;stroke:${c};stroke-width:1px`),gt(t,b);const k=d+(m-d)/2;o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${k-n.height/2-(n.y-(n.top??0))})`);const T=12,v=p((F,Y,D)=>Array.from({length:T+1},(q,tt)=>{const z=Math.PI-tt*Math.PI/T;return{x:F*Math.cos(z),y:Y+D*u*Math.sin(z)}}),"arc"),L=[...v(l/2,d,-1),...v(y/2,m,1).reverse()];return t.intersect=function(F){return ht.polygon(t,L,F)},a}p(bf,"bucket");var kc=20,wc=8,h2=80,c2=8;function kf(e){const{themeVariables:t}=Rt(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:c2,fill:r,stroke:i,cssClass:"collapsed-group"}}}p(kf,"getCollapsedStyle");async function wf(e,t){var A;const r=kf((A=t.metadata)==null?void 0:A.containerType),{fill:i,stroke:s}=r,{nodeStyles:a}=pt(t),{shapeSvg:n,bbox:o}=await Tt(e,t,St(t)),{theme:c,themeVariables:h}=Rt();He(n,t.colorIndex,c,h.borderColorArray);const l=t.padding??8,u=o.height,f=Math.max(o.width+l*2,h2,(t==null?void 0:t.width)??0),d=Math.max(u+wc+kc+l*2,(t==null?void 0:t.height)??0),m=-f/2,y=-d/2,x=-28/2,C=n.select(".label");C&&(t.useHtmlLabels??ce(Rt())?C.attr("transform",`translate(${-o.width/2}, ${-o.height/2+x})`):C.attr("transform",`translate(0, ${-o.height/2+x})`));let b;if(t.look==="handDrawn"){const F=dt.svg(n),Y=ut(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),D=F.path(Re(m,y,f,d,r.rx),Y);b=n.insert(()=>D,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",ae(t.cssStyles))}else b=n.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",a).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",f).attr("height",d).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const k=y+l+u+wc;n.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",k).attr("x2",m+f-8).attr("y2",k).attr("stroke",s).attr("stroke-dasharray","3, 3");const T=k+kc/2,v=2.5,L=10;for(let F=-1;F<=1;F++)n.append("circle").attr("class","collapsed-indicator").attr("cx",F*L).attr("cy",T).attr("r",v).attr("fill",s);return gt(t,b),t.calcIntersect=function(F,Y){return ht.rect(F,Y)},t.intersect=function(F){return ht.rect(t,F)},n}p(wf,"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+")")}p(nr,"insertPolygonShape");var u2=["right","left","up","down"],wl="point",d2=p(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"),f2=p(e=>u2.filter(t=>e.has(t)).join("|")||wl,"getDirectionKey"),Sc={"right|left|up|down":p(({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":p(({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":p(({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":p(({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":p(({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":p(({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":p(({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":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({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:p(({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:p(({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:p(({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"),[wl]:()=>[{x:0,y:0}]},p2=p((e,t,r,i)=>{const s=d2(e),a=(r.padding??0)/2,n=t.height+4*a,o=n/2,c=i??t.width+2*o+2*a,h=f2(s);return(Sc[h]??Sc[wl])({height:n,midpoint:o,padding:a,width:c})},"getArrowPoints");async function Sf(e,t){const r=t,{shapeSvg:i,bbox:s}=await Tt(e,r,St(r)),a=r.padding??0,n=s.height+2*a,o=n/2,c=s.width+2*o+a,h=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&h>c?h:c,f=p2(r.directions??[],s,r,u),d=nr(i,u,n,f);return d.attr("style",r.style??null),gt(r,d),r.intersect=function(m){return ht.polygon(r,f,m)},i}p(Sf,"block_arrow");async function Tf(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=18,u=12,f=Math.max(n.width+h*2,t.width??0,90),d=Math.max(n.height+h*2+l,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=dt.svg(a).path(Re(-f/2,m,f,d,u),ut(t,{}));(b=x.node())==null||b.appendChild(T),y&&x.attr("style",y)}else x.append("rect").attr("x",-f/2).attr("y",m).attr("width",f).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-f/2).attr("y1",m+l).attr("x2",f/2).attr("y2",m+l).attr("style",`stroke:${c};stroke-width:1px`);for(let k=0;k<3;k++)x.append("circle").attr("cx",-f/2+12+k*9).attr("cy",m+l/2).attr("r",2.5).attr("style",`fill:${c};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-f/2+44).attr("y",m+4).attr("width",Math.max(f-56,10)).attr("height",l-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),gt(t,x);const C=m+l+(d-l)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return ht.rect(t,k)},a}p(Tf,"browser");var Ds=12;async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=((t==null?void 0:t.width)??c.width)+(t.look==="neo"?a*2:a+Ds),l=((t==null?void 0:t.height)??c.height)+(t.look==="neo"?n*2:n),u=0,f=h,d=-l,m=0,y=[{x:u+Ds,y:d},{x:f,y:d},{x:f,y:m},{x:u,y:m},{x:u,y:d+Ds},{x:u+Ds,y:d}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=dt.svg(o),k=ut(t,{}),T=Ht(y),v=b.path(T,k);x=o.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),C&&x.attr("style",C)}else x=nr(o,h,l,y);return i&&x.attr("style",i),gt(t,x),t.intersect=function(b){return ht.polygon(t,y,b)},o}p(Bf,"card");function vf(e,t){const{nodeStyles:r}=pt(t);t.label="";const i=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=dt.svg(i),c=ut(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=Ht(n),l=o.path(h,c),u=i.insert(()=>l,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return ht.polygon(t,n,f)},i}p(vf,"choice");async function Sl(e,t,r){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await Tt(e,t,St(t)),c=16,h=(r==null?void 0:r.padding)??o,l=Math.sqrt(n.width**2+n.height**2)/2,u=t.look==="neo"?l+c*2:l+h;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=dt.svg(a),y=ut(t,{}),x=m.circle(0,0,u*2,y);f=a.insert(()=>x,":first-child"),f.attr("class","basic label-container").attr("style",ae(d))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0);return gt(t,f),t.calcIntersect=function(m,y){const x=m.width/2;return ht.circle(m,x,y)},t.intersect=function(m){return J.info("Circle intersect",t,u,m),ht.circle(t,u,m)},a}p(Sl,"circle");async function _f(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:n}=await Tt(e,r,i),o=s.insert("rect",":first-child"),c=r.padding??0,h=r.positioned?r.width??0:a.width+c,l=r.positioned?r.height??0:a.height+c,u=r.positioned?-h/2:-a.width/2-n,f=r.positioned?-l/2:-a.height/2-n;return o.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",f).attr("width",h).attr("height",l),gt(r,o),r.intersect=function(d){return ht.rect(r,d)},s}p(_f,"composite");async function Lf(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await Tt(e,t,St(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=20,u=12,f=Math.max(n.width+h*2,t.width??0,90),d=Math.max(n.height+h*2+l,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=dt.svg(a).path(Re(-f/2,m,f,d,u),ut(t,{}));(b=x.node())==null||b.appendChild(T),y&&x.attr("style",y)}else x.append("rect").attr("x",-f/2).attr("y",m).attr("width",f).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-f/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"),gt(t,x);const C=m+l+(d-l)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return ht.rect(t,k)},a}p(Lf,"consoleWindow");function Ff(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},a={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
233
|
+
M ${s.x},${s.y} L ${n.x},${n.y}`}p(Ff,"createLine");function Af(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=dt.svg(s),c=ut(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=o.circle(0,0,a*2,c),l=Ff(a),u=o.path(l,c),f=s.insert(()=>h,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),gt(t,f),t.intersect=function(d){return J.info("crossedCircle intersect",t,{radius:a,point:d}),ht.circle(t,a,d)},s}p(Af,"crossedCircle");function pr(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);n.push({x:-d,y:-m})}return n}p(pr,"generateCirclePoints");async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+o,l=a.height+c,u=Math.max(5,l*.1),{cssStyles:f}=t,d=[...pr(h/2,-l/2,u,30,-90,0),{x:-h/2-u,y:u},...pr(h/2+u*2,-u,u,20,-180,-270),...pr(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-l/2},...pr(h/2,l/2,u,20,0,90)],m=[{x:h/2,y:-l/2-u},{x:-h/2,y:-l/2-u},...pr(h/2,-l/2,u,20,-90,0),{x:-h/2-u,y:-u},...pr(h/2+h*.1,-u,u,20,-180,-270),...pr(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:l/2},...pr(h/2,l/2,u,20,0,90),{x:-h/2,y:l/2+u},{x:h/2,y:l/2+u}],y=dt.svg(s),x=ut(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Ht(d).replace("Z",""),k=y.path(b,x),T=Ht(m),v=y.path(T,{...x}),L=s.insert("g",":first-child");return L.insert(()=>v,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),n.attr("transform",`translate(${-h/2+u-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),gt(t,L),t.intersect=function(A){return ht.polygon(t,m,A)},s}p(Ef,"curlyBraceLeft");function gr(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);n.push({x:d,y:m})}return n}p(gr,"generateCirclePoints");async function Mf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),l=a.height+(t.look==="neo"?c*2:c),u=Math.max(5,l*.1),{cssStyles:f}=t,d=[...gr(h/2,-l/2,u,20,-90,0),{x:h/2+u,y:-u},...gr(h/2+u*2,-u,u,20,-180,-270),...gr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:l/2},...gr(h/2,l/2,u,20,0,90)],m=[{x:-h/2,y:-l/2-u},{x:h/2,y:-l/2-u},...gr(h/2,-l/2,u,20,-90,0),{x:h/2+u,y:-u},...gr(h/2+u*2,-u,u,20,-180,-270),...gr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:l/2},...gr(h/2,l/2,u,20,0,90),{x:h/2,y:l/2+u},{x:-h/2,y:l/2+u}],y=dt.svg(s),x=ut(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Ht(d).replace("Z",""),k=y.path(b,x),T=Ht(m),v=y.path(T,{...x}),L=s.insert("g",":first-child");return L.insert(()=>v,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),gt(t,L),t.intersect=function(A){return ht.polygon(t,m,A)},s}p(Mf,"curlyBraceRight");function ue(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const f=o+u*l,d=e+r*Math.cos(f),m=t+r*Math.sin(f);n.push({x:-d,y:-m})}return n}p(ue,"generateCirclePoints");async function Of(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),l=a.height+(t.look==="neo"?c*2:c),u=Math.max(5,l*.1),{cssStyles:f}=t,d=[...ue(h/2,-l/2,u,30,-90,0),{x:-h/2-u,y:u},...ue(h/2+u*2,-u,u,20,-180,-270),...ue(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-l/2},...ue(h/2,l/2,u,20,0,90)],m=[...ue(-h/2+u+u/2,-l/2,u,20,-90,-180),{x:h/2-u/2,y:u},...ue(-h/2-u/2,-u,u,20,0,90),...ue(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...ue(-h/2+u+u/2,l/2,u,30,-180,-270)],y=[{x:h/2,y:-l/2-u},{x:-h/2,y:-l/2-u},...ue(h/2,-l/2,u,20,-90,0),{x:-h/2-u,y:-u},...ue(h/2+u*2,-u,u,20,-180,-270),...ue(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:l/2},...ue(h/2,l/2,u,20,0,90),{x:-h/2,y:l/2+u},{x:h/2-u-u/2,y:l/2+u},...ue(-h/2+u+u/2,-l/2,u,20,-90,-180),{x:h/2-u/2,y:u},...ue(-h/2-u/2,-u,u,20,0,90),...ue(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...ue(-h/2+u+u/2,l/2,u,30,-180,-270)],x=dt.svg(s),C=ut(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Ht(d).replace("Z",""),T=x.path(k,C),L=Ht(m).replace("Z",""),A=x.path(L,C),F=Ht(y),Y=x.path(F,{...C}),D=s.insert("g",":first-child");return D.insert(()=>Y,":first-child").attr("stroke-opacity",0),D.insert(()=>T,":first-child"),D.insert(()=>A,":first-child"),D.attr("class","text"),f&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${u-u/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),gt(t,D),t.intersect=function(q){return ht.polygon(t,y,q)},s}p(Of,"curlyBraces");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,c=5,{shapeSvg:h,bbox:l}=await Tt(e,t,St(t)),u=Math.max(c,l.height+n*2,(t==null?void 0:t.height)??0),f=u/2,d=f-Math.sqrt(Math.max(0,f**2-(l.height/2)**2)),m=Math.max(u/4,d),y=Math.max(o,l.width+a*2+m*2,(l.width+a*2)*1.25,(t==null?void 0:t.width)??0),{cssStyles:x}=t,C=dt.svg(h),b=ut(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=y,T=u,v=k-f,L=T/4,A=[{x:v,y:0},{x:L,y:0},{x:0,y:T/2},{x:L,y:T},{x:v,y:T},...er(-v,-T/2,f,50,270,90)],F=Ht(A),Y=C.path(F,b),D=h.insert(()=>Y,":first-child");return D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",i),D.attr("transform",`translate(${-y/2}, ${-u/2})`),gt(t,D),t.intersect=function(q){return ht.polygon(t,A,q)},h}p($f,"curvedTrapezoid");async function If(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.padding??20,c=Math.max(a.width+o*2,t.width??0,100),h=Math.min(Math.max(c*.23,16),56),l=h*.27,u=Math.max(a.height+o*2,t.height?t.height-(2*h-l):0),f=Math.min(c*.177,u*.45),d=u+2*h-l,m=-d/2,y=m+2*h-l,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const F=dt.svg(s),Y=ut(t,{}),D=F.path(Re(-c/2,y,c,u,f),Y),q=F.circle(0,m+h,h*2,Y);x.insert(()=>q,":first-child"),x.insert(()=>D,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-c/2).attr("y",y).attr("width",c).attr("height",u).attr("rx",f).attr("ry",f).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+h).attr("r",h).attr("style",i);gt(t,x);const b=y+u/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);const k=m+h,T=Math.asin(Math.min(1,(y-k)/h))*180/Math.PI,A=[...er(0,-k,h,24,180+T,-T),...er(-(-c/2+f),-(y+f),f,12,90,0),...er(-(-c/2+f),-(d/2-f),f,12,360,270),...er(-(c/2-f),-(d/2-f),f,12,270,180),...er(-(c/2-f),-(y+f),f,12,180,90)];return t.intersect=function(F){return ht.polygon(t,A,F)},s}p(If,"person");var g2=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),m2=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),y2=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Tc=8,Bc=8;async function Df(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s,o=t.width??0;if(t.width&&(t.width=t.width-n,t.width<Bc&&(t.width=Bc)),t.height){const b=o/2/(2.5+o/50);t.height=t.height-a-b*3,t.height<Tc&&(t.height=Tc)}const{shapeSvg:c,bbox:h,label:l}=await Tt(e,t,St(t)),u=Math.max(t.width??0,h.width)+n,f=u/2,d=f/(2.5+u/50),m=Math.max(t.height??0,h.height)+a+d;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=dt.svg(c),b=m2(0,0,u,m,f,d),k=y2(0,d,u,m,f,d),T=ut(t,{}),v=C.path(b,T),L=C.path(k,ut(t,{fill:"none"}));y=c.insert(()=>L,":first-child"),y=c.insert(()=>v,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=g2(0,0,u,m,f,d);y=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",ae(x)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-u/2}, ${-(m/2+d)})`),gt(t,y),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(C){const b=ht.rect(t,C),k=b.x-(t.x??0);if(f!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-k*k/(f*f));T>0&&(T=Math.sqrt(T)),T=d-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},c}p(Df,"cylinder");async function Mi(e,t,r){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await Tt(e,t,St(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,l=-c/2;let u,{rx:f,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const y=dt.svg(a),x=ut(t,{}),C=f||d?y.path(Re(h,l,o,c,f||0),x):y.rectangle(h,l,o,c,x);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",ae(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",ae(f)).attr("ry",ae(d)).attr("x",h).attr("y",l).attr("width",o).attr("height",c);return gt(t,u,t.look==="handDrawn"?void 0:{width:o,height:c}),t.calcIntersect=function(y,x){return ht.rect(y,x)},t.intersect=function(y){return ht.rect(t,y)},a}p(Mi,"drawRect");async function Rf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:n,height:o}=t,c={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Mi(e,t,c);if(t.look==="handDrawn"){const d=dt.svg(h),m=ut(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return h;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),h}const l=h.select(".basic.label-container"),u=(Number(l.attr("width"))||n)??0,f=(Number(l.attr("height"))||o)??0;return u>0&&f>0&&l.attr("stroke-dasharray",`${u} ${f}`),h}p(Rf,"datastore");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t)),h=o.width+s,l=o.height+a,u=l*.2,f=-h/2,d=-l/2-u/2,{cssStyles:m}=t,y=dt.svg(n),x=ut(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],b=y.polygon(C.map(T=>[T.x,T.y]),x),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),c.attr("transform",`translate(${f+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+u+(t.padding??0)/2-(o.y-(o.top??0))})`),gt(t,k),t.intersect=function(T){return ht.rect(t,T)},n}p(Pf,"dividedRectangle");async function qf(e,t){var m,y;const{labelStyles:r,nodeStyles:i}=pt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=Math.sqrt(c.width**2+c.height**2)/2,l=(t!=null&&t.width?(t==null?void 0:t.width)/2:h)+(n??0),u=l+s;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const x=dt.svg(o),C=ut(t,{roughness:.2,strokeWidth:2.5}),b=ut(t,{roughness:.2,strokeWidth:1.5}),k=x.circle(0,0,u*2,C),T=x.circle(0,0,l*2,b);f=o.insert("g",":first-child"),f.attr("class",ae(t.cssClasses)).attr("style",ae(d)),(m=f.node())==null||m.appendChild(k),(y=f.node())==null||y.appendChild(T)}else{f=o.insert("g",":first-child");const x=f.insert("circle",":first-child"),C=f.insert("circle");f.attr("class","basic label-container").attr("style",i),x.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return gt(t,f),t.intersect=function(x){return J.info("DoubleCircle intersect",t,u,x),ht.circle(t,u,x)},o}p(qf,"doublecircle");async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n}=await Tt(e,t,St(t)),{theme:o,themeVariables:c}=Rt();He(s,t.colorIndex,o,c.borderColorArray);const h=n??10,l=a.width/2+h*2,u=a.height/2+h*2;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=dt.svg(s),y=ut(t,{}),x=m.ellipse(0,0,l*2,u*2,y);f=s.insert(()=>x,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else f=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",l).attr("ry",u).attr("cx",0).attr("cy",0);return t.width=l*2,t.height=u*2,gt(t,f),t.calcIntersect=function(m,y){const x=m.width/2,C=m.height/2;return ht.ellipse(m,x,C,y)},t.intersect=function(m){return ht.ellipse(t,l,u,m)},s}p(Nf,"usecaseEllipse");function Wf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,c=dt.svg(a),{nodeBorder:h}=r,l=ut(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const u=c.circle(0,0,n*2,l),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),gt(t,f),t.intersect=function(d){return J.info("filledCircle intersect",t,{radius:n,point:d}),ht.circle(t,n,d)},a}p(Wf,"filledCircle");var vc=10,_c=10;async function zf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<vc&&(t.height=vc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<_c&&(t.width=_c));const{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),l=t!=null&&t.height?t==null?void 0:t.height:h+o.height,u=l,f=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:d}=t,m=dt.svg(n),y=ut(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Ht(f),C=m.path(x,y),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=l,gt(t,b),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-l/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return J.info("Triangle intersect",t,f,k),ht.polygon(t,f,k)},n}p(zf,"flippedTriangle");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.padding??12,c=Math.max(a.width+o*2,t.width??0,90),h=a.height+o*2,l=Math.max(Math.min(h*.16,14),8),u=Math.max(h+l,t.height??0),f=u-l,d=Math.max(c*.38,28),m=-u/2,y=[{x:-c/2,y:m},{x:-c/2+d,y:m},{x:-c/2+d,y:m+l},{x:c/2,y:m+l},{x:c/2,y:u/2},{x:-c/2,y:u/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:C}=t;let b;if(t.look==="handDrawn"){const v=dt.svg(s).path(x,ut(t,{}));b=s.insert(()=>v,":first-child").attr("class","basic label-container"),C&&b.attr("style",C)}else b=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?gt(t,b):gt(t,b,{width:c,height:u});const k=m+l+f/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(T){return ht.polygon(t,y,T)},s}p(Hf,"folder");function Yf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=pt(t);t.label="";const n=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);(r==="LR"||r==="RL")&&(c=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const l=-1*c/2,u=-1*h/2,f=dt.svg(n),d=ut(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=f.rectangle(l,u,c,h,d),y=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),gt(t,y);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(C){return ht.rect(t,C)},n}p(Yf,"forkJoin");async function Uf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:c,bbox:h}=await Tt(e,t,St(t)),l=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+o*2,u=l/2,f=u-Math.sqrt(Math.max(0,u**2-(h.height/2)**2)),d=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width)+f*2)+n*2,{cssStyles:m}=t,y=dt.svg(c),x=ut(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-d/2,y:-l/2},{x:d/2-u,y:-l/2},...er(-d/2+u,0,u,50,90,270),{x:d/2-u,y:l/2},{x:-d/2,y:l/2}],b=Ht(C),k=y.path(b,x),T=c.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),gt(t,T),t.intersect=function(v){return J.info("Pill intersect",t,{radius:u,point:v}),ht.polygon(t,C,v)},c}p(Uf,"halfRoundedRectangle");var C2=p((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 Gf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,c=t.look==="neo"?n:a,h=t.look==="neo"?o:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-c}const{shapeSvg:l,bbox:u}=await Tt(e,t,St(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+c,d=f/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,y=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-f/2},{x:m-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=dt.svg(l),k=ut(t,{}),T=C2(0,0,m,f,d),v=b.path(T,k);x=l.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),C&&x.attr("style",C)}else x=nr(l,m,f,y);return i&&x.attr("style",i),t.width=m,t.height=f,gt(t,x),t.intersect=function(b){return ht.polygon(t,y,b)},l}p(Gf,"hexagon");async function jf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await Tt(e,t,St(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,c=dt.svg(s),h=ut(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const l=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],u=Ht(l),f=c.path(u,h),d=s.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-n/2})`),gt(t,d),t.intersect=function(m){return J.info("Pill intersect",t,{points:l}),ht.polygon(t,l,m)},s}p(jf,"hourglass");async function Xf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,label:u}=await Tt(e,t,"icon-shape default"),f=t.pos==="t",d=o,m=o,{nodeBorder:y}=r,{stylesMap:x}=Or(t),C=-m/2,b=-d/2,k=t.label?8:0,T=dt.svg(h),v=ut(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const L=T.rectangle(C,b,m,d,v),A=Math.max(m,l.width),F=d+l.height+k,Y=T.rectangle(-A/2,-F/2,A,F,{...v,fill:"transparent",stroke:"none"}),D=h.insert(()=>L,":first-child"),q=h.insert(()=>Y);if(t.icon){const tt=h.append("g");tt.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const z=tt.node().getBBox(),E=z.width,M=z.height,_=z.x,N=z.y;tt.attr("transform",`translate(${-E/2-_},${f?l.height/2+k/2-M/2-N:-l.height/2-k/2-M/2-N})`),tt.attr("style",`color: ${x.get("stroke")??y};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-F/2:F/2-l.height})`),D.attr("transform",`translate(0,${f?l.height/2+k/2:-l.height/2-k/2})`),gt(t,q),t.intersect=function(tt){if(J.info("iconSquare intersect",t,tt),!t.label)return ht.rect(t,tt);const z=t.x??0,E=t.y??0,M=t.height??0;let _=[];return f?_=[{x:z-l.width/2,y:E-M/2},{x:z+l.width/2,y:E-M/2},{x:z+l.width/2,y:E-M/2+l.height+k},{x:z+m/2,y:E-M/2+l.height+k},{x:z+m/2,y:E+M/2},{x:z-m/2,y:E+M/2},{x:z-m/2,y:E-M/2+l.height+k},{x:z-l.width/2,y:E-M/2+l.height+k}]:_=[{x:z-m/2,y:E-M/2},{x:z+m/2,y:E-M/2},{x:z+m/2,y:E-M/2+d},{x:z+l.width/2,y:E-M/2+d},{x:z+l.width/2/2,y:E+M/2},{x:z-l.width/2,y:E+M/2},{x:z-l.width/2,y:E-M/2+d},{x:z-m/2,y:E-M/2+d}],ht.polygon(t,_,tt)},h}p(Xf,"icon");async function Vf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,label:u}=await Tt(e,t,"icon-shape default"),f=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Or(t),b=dt.svg(h),k=ut(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=C.get("fill");k.stroke=T??x;const v=h.append("g");t.icon&&v.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=v.node().getBBox(),A=L.width,F=L.height,Y=L.x,D=L.y,q=Math.max(A,F)*Math.SQRT2+f*2,tt=b.circle(0,0,q,k),z=Math.max(q,l.width),E=q+l.height+d,M=b.rectangle(-z/2,-E/2,z,E,{...k,fill:"transparent",stroke:"none"}),_=h.insert(()=>tt,":first-child"),N=h.insert(()=>M);return v.attr("transform",`translate(${-A/2-Y},${m?l.height/2+d/2-F/2-D:-l.height/2-d/2-F/2-D})`),v.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-E/2:E/2-l.height})`),_.attr("transform",`translate(0,${m?l.height/2+d/2:-l.height/2-d/2})`),gt(t,N),t.intersect=function(O){return J.info("iconSquare intersect",t,O),ht.rect(t,O)},h}p(Vf,"iconCircle");async function Zf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,halfPadding:u,label:f}=await Tt(e,t,"icon-shape default"),d=t.pos==="t",m=o+u*2,y=o+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=Or(t),k=-y/2,T=-m/2,v=t.label?8:0,L=dt.svg(h),A=ut(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??C;const Y=L.path(Re(k,T,y,m,5),A),D=Math.max(y,l.width),q=m+l.height+v,tt=L.rectangle(-D/2,-q/2,D,q,{...A,fill:"transparent",stroke:"none"}),z=h.insert(()=>Y,":first-child").attr("class","icon-shape2"),E=h.insert(()=>tt);if(t.icon){const M=h.append("g");M.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const _=M.node().getBBox(),N=_.width,O=_.height,G=_.x,j=_.y;M.attr("transform",`translate(${-N/2-G},${d?l.height/2+v/2-O/2-j:-l.height/2-v/2-O/2-j})`),M.attr("style",`color: ${b.get("stroke")??x};`)}return f.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-q/2:q/2-l.height})`),z.attr("transform",`translate(0,${d?l.height/2+v/2:-l.height/2-v/2})`),gt(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return ht.rect(t,M);const _=t.x??0,N=t.y??0,O=t.height??0;let G=[];return d?G=[{x:_-l.width/2,y:N-O/2},{x:_+l.width/2,y:N-O/2},{x:_+l.width/2,y:N-O/2+l.height+v},{x:_+y/2,y:N-O/2+l.height+v},{x:_+y/2,y:N+O/2},{x:_-y/2,y:N+O/2},{x:_-y/2,y:N-O/2+l.height+v},{x:_-l.width/2,y:N-O/2+l.height+v}]:G=[{x:_-y/2,y:N-O/2},{x:_+y/2,y:N-O/2},{x:_+y/2,y:N-O/2+m},{x:_+l.width/2,y:N-O/2+m},{x:_+l.width/2/2,y:N+O/2},{x:_-l.width/2,y:N+O/2},{x:_-l.width/2,y:N-O/2+m},{x:_-y/2,y:N-O/2+m}],ht.polygon(t,G,M)},h}p(Zf,"iconRounded");async function Kf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=pt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,halfPadding:u,label:f}=await Tt(e,t,"icon-shape default"),d=t.pos==="t",m=o+u*2,y=o+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=Or(t),k=-y/2,T=-m/2,v=t.label?8:0,L=dt.svg(h),A=ut(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??C;const Y=L.path(Re(k,T,y,m,.1),A),D=Math.max(y,l.width),q=m+l.height+v,tt=L.rectangle(-D/2,-q/2,D,q,{...A,fill:"transparent",stroke:"none"}),z=h.insert(()=>Y,":first-child"),E=h.insert(()=>tt);if(t.icon){const M=h.append("g");M.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const _=M.node().getBBox(),N=_.width,O=_.height,G=_.x,j=_.y;M.attr("transform",`translate(${-N/2-G},${d?l.height/2+v/2-O/2-j:-l.height/2-v/2-O/2-j})`),M.attr("style",`color: ${b.get("stroke")??x};`)}return f.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-q/2:q/2-l.height})`),z.attr("transform",`translate(0,${d?l.height/2+v/2:-l.height/2-v/2})`),gt(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return ht.rect(t,M);const _=t.x??0,N=t.y??0,O=t.height??0;let G=[];return d?G=[{x:_-l.width/2,y:N-O/2},{x:_+l.width/2,y:N-O/2},{x:_+l.width/2,y:N-O/2+l.height+v},{x:_+y/2,y:N-O/2+l.height+v},{x:_+y/2,y:N+O/2},{x:_-y/2,y:N+O/2},{x:_-y/2,y:N-O/2+l.height+v},{x:_-l.width/2,y:N-O/2+l.height+v}]:G=[{x:_-y/2,y:N-O/2},{x:_+y/2,y:N-O/2},{x:_+y/2,y:N-O/2+m},{x:_+l.width/2,y:N-O/2+m},{x:_+l.width/2/2,y:N+O/2},{x:_-l.width/2,y:N+O/2},{x:_-l.width/2,y:N-O/2+m},{x:_-y/2,y:N-O/2+m}],ht.polygon(t,G,M)},h}p(Kf,"iconSquare");async function Qf(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","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=pt(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,l=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,o??0);const{shapeSvg:u,bbox:f,label:d}=await Tt(e,t,"image-shape default"),m=t.pos==="t",y=-h/2,x=-l/2,C=t.label?8:0,b=dt.svg(u),k=ut(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(y,x,h,l,k),v=Math.max(h,f.width),L=l+f.height+C,A=b.rectangle(-v/2,-L/2,v,L,{...k,fill:"none",stroke:"none"}),F=u.insert(()=>T,":first-child"),Y=u.insert(()=>A);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",h),D.attr("height",l),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-h/2},${m?L/2-l:-L/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-l/2-f.height/2-C/2:l/2-f.height/2+C/2})`),F.attr("transform",`translate(0,${m?f.height/2+C/2:-f.height/2-C/2})`),gt(t,Y),t.intersect=function(D){if(J.info("iconSquare intersect",t,D),!t.label)return ht.rect(t,D);const q=t.x??0,tt=t.y??0,z=t.height??0;let E=[];return m?E=[{x:q-f.width/2,y:tt-z/2},{x:q+f.width/2,y:tt-z/2},{x:q+f.width/2,y:tt-z/2+f.height+C},{x:q+h/2,y:tt-z/2+f.height+C},{x:q+h/2,y:tt+z/2},{x:q-h/2,y:tt+z/2},{x:q-h/2,y:tt-z/2+f.height+C},{x:q-f.width/2,y:tt-z/2+f.height+C}]:E=[{x:q-h/2,y:tt-z/2},{x:q+h/2,y:tt-z/2},{x:q+h/2,y:tt-z/2+l},{x:q+f.width/2,y:tt-z/2+l},{x:q+f.width/2/2,y:tt+z/2},{x:q-f.width/2,y:tt+z/2},{x:q-f.width/2,y:tt-z/2+l},{x:q-h/2,y:tt-z/2+l}],ht.polygon(t,E,D)},u}p(Qf,"imageSquare");async function Jf(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a*2,t.height??0),l=Math.max(c.width+n*2,(t.width??0)-h),u=[{x:0,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=dt.svg(o),y=ut(t,{}),x=Ht(u),C=m.path(x,y);f=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=nr(o,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,gt(t,f),t.intersect=function(m){return ht.polygon(t,u,m)},o}p(Jf,"inv_trapezoid");async function tp(e,t){const{shapeSvg:r,bbox:i,label:s}=await Tt(e,t,"label"),a=r.insert("rect",":first-child");return a.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))})`),gt(t,a),t.intersect=function(c){return ht.rect(t,c)},r}p(tp,"labelRect");async function ep(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),u=[{x:0,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:-(3*h)/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=dt.svg(o),y=ut(t,{}),x=Ht(u),C=m.path(x,y);f=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=nr(o,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,gt(t,f),t.intersect=function(m){return ht.polygon(t,u,m)},o}p(ep,"lean_left");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=dt.svg(o),y=ut(t,{}),x=Ht(u),C=m.path(x,y);f=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=nr(o,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,gt(t,f),t.intersect=function(m){return ht.polygon(t,u,m)},o}p(rp,"lean_right");function ip(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),c=7,h=[{x:n,y:0},{x:0,y:o+c/2},{x:n-2*c,y:o+c/2},{x:0,y:2*o},{x:n,y:o-c/2},{x:2*c,y:o-c/2}],l=dt.svg(s),u=ut(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=Ht(h),d=l.path(f,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-o})`),gt(t,m),t.intersect=function(y){return J.info("lightningBolt intersect",t,y),ht.polygon(t,h,y)},s}p(ip,"lightningBolt");var x2=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),b2=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),k2=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Lc=10,Fc=10;async function sp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Fc&&(t.width=Fc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<Lc&&(t.height=Lc)}const{shapeSvg:o,bbox:c,label:h}=await Tt(e,t,St(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,u=l/2,f=u/(2.5+l/50),d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+f+n*2,m=d*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=dt.svg(o),b=b2(0,0,l,d,u,f,m),k=k2(0,f,l,d,u,f),T=ut(t,{}),v=C.path(b,T),L=C.path(k,T);o.insert(()=>L,":first-child").attr("class","line"),y=o.insert(()=>v,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=x2(0,0,l,d,u,f,m);y=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",ae(x)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-l/2}, ${-(d/2+f)})`),gt(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(C){const b=ht.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-k*k/(u*u));T>0&&(T=Math.sqrt(T)),T=f-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},o}p(sp,"linedCylinder");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:c,label:h}=await Tt(e,t,St(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(n??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:m}=t,y=dt.svg(o),x=ut(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-l/2-l/2*.1,y:-d/2},{x:-l/2-l/2*.1,y:d/2},...Mr(-l/2-l/2*.1,d/2,l/2+l/2*.1,d/2,f,.8),{x:l/2+l/2*.1,y:-d/2},{x:-l/2-l/2*.1,y:-d/2},{x:-l/2,y:-d/2},{x:-l/2,y:d/2*1.1},{x:-l/2,y:-d/2}],b=y.polygon(C.map(T=>[T.x,T.y]),x),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(c.x-(c.left??0))},${-u/2+(t.padding??0)-f-(c.y-(c.top??0))})`),gt(t,k),t.intersect=function(T){return ht.polygon(t,C,T)},o}p(ap,"linedWaveEdgedRect");var w2=56,Fo=72,Ac=8,Ec=2,S2=8,T2={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Mc=Math.PI/3,Oc=.6,Ao=p((e,t)=>{const r=t*Oc,i=t*Math.sqrt(1-Oc**2),s=Math.cos(Mc),a=-Math.sin(Mc),n=r*-a,o=e+r*s,c=i*s,h=i*a;return`M ${n-c} ${o-h} L ${n+c} ${o+h}`},"businessMarkerPathForCircle"),B2={normal:Ao(-24,12),hollow:Ao(-23,9),awesome:Ao(-21,13),icon:"M 12 -8 L 26 -26"},$c=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),Tl=p((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const o=dt.svg(e).path(r,ut(t,s?{fill:"none"}:{}));return e.insert(()=>o,":first-child").attr("class",i)}const a=e.append("path").attr("class",i).attr("d",r);return s&&a.attr("fill","none"),a},"appendActorPath"),v2=p((e,t,r,i,s,a,n=!1)=>{if(t.look==="handDrawn"){const h=dt.svg(e).circle(r,i,s*2,ut(t,n?{fill:"none"}:{}));return e.insert(()=>h,":first-child").attr("class",a)}const o=e.append("circle").attr("class",a).attr("cx",r).attr("cy",i).attr("r",s);return n&&o.attr("fill","none"),o},"appendActorCircle"),_2=p((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",B2[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function Cs(e,t,r,i){const{labelStyles:s,nodeStyles:a}=pt(t);t.labelStyle=s;const n=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:o,bbox:c,label:h}=await Tt(e,n,St(t,`usecase-actor-variant usecase-actor-${r}`)),l=t.accessibleName??t.label;l&&o.attr("role","img").attr("aria-label",l),h.attr("class","label actor-label usecase-actor-label");const{theme:u,themeVariables:f}=Rt();He(o,t.colorIndex,u,f.borderColorArray);let d,m;if(t.stereotype){const F=await Wr(o,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});d=F.label.attr("class","label usecase-stereotype"),m=F.bbox}const y=o.append("g").attr("class",`usecase-actor-glyph ${T2[r]}`).attr("style",a||null);await i(y,t),_2(y,t,r);const x=t.padding??S2,C=(m==null?void 0:m.height)??0,b=Fo+Ac+c.height+(m?C+Ec:0),k=Math.max(w2,c.width,(m==null?void 0:m.width)??0)+x*2,T=b+x*2,v=-b/2;y.attr("transform",`translate(0,${v+Fo/2})`);let L=v+Fo+Ac;d&&m&&(L+=C/2,$c(d,m,L),L+=C/2+Ec),$c(h,c,L+c.height/2);const A=o.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-k/2).attr("y",-T/2).attr("width",k).attr("height",T).attr("opacity",0).attr("aria-hidden","true");return gt(t,A),t.intersect=F=>ht.rect(t,F),o}p(Cs,"renderUsecaseActor");var L2=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function op(e,t){return Cs(e,t,"normal",(r,i)=>{Tl(r,i,L2,"usecase-actor-stick")})}p(op,"usecaseActor");var F2=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function np(e,t){return Cs(e,t,"awesome",(r,i)=>{Tl(r,i,F2,"usecase-actor-awesome-silhouette")})}p(np,"usecaseActorAwesome");var A2=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function lp(e,t){return Cs(e,t,"hollow",(r,i)=>{v2(r,i,0,-23,9,"usecase-actor-hollow-head",!0),Tl(r,i,A2,"usecase-actor-hollow-body",!0)})}p(lp,"usecaseActorHollow");var ti=52,Ic=42,Dc=-2,E2=p(async(e,t)=>{var h;const r=-ti/2,i=Dc-ti/2;if(t.look==="handDrawn"){const u=dt.svg(e).rectangle(r,i,ti,ti,ut(t,{}));e.insert(()=>u,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",ti).attr("height",ti).attr("rx",4).attr("ry",4);const s=t.icon??"",a=await wd(s.includes(":")?s:`fa:${s}`),n=await Ei(s,{height:Ic,width:Ic,fallbackPrefix:"fa"}),o=e.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),c=(h=o.node())==null?void 0:h.getBBox();c&&o.attr("transform",`translate(${-c.width/2-c.x},${Dc-c.height/2-c.y})`)},"drawIconActor");async function hp(e,t){return Cs(e,t,"icon",E2)}p(hp,"usecaseActorIcon");var Rc=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function cp(e,t){const r=t,{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const a=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:n,bbox:o,halfPadding:c,label:h}=await Tt(e,a,St(t,"usecase-business-shape"));h.attr("class","label usecase-label");const{theme:l,themeVariables:u}=Rt();He(n,t.colorIndex,l,u.borderColorArray);let f,d;if(r.stereotype){const z=await Wr(n,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=z.label.attr("class","label usecase-stereotype"),d=z.bbox}const m=d?2:0,y=o.height+((d==null?void 0:d.height)??0)+m,x=Math.max(o.width,(d==null?void 0:d.width)??0),C=c??10,b=x/2+C*2,k=y/2+C*2,T=Math.min(Math.max(C/5,1),C/2),v=x/2+T,L=b-T,A=v/b,F=L/b,Y=k*Math.sqrt(Math.max(0,1-A*A)),D=-k*Math.sqrt(Math.max(0,1-F*F));f&&d&&Rc(f,d,-y/2+d.height/2),Rc(h,o,y/2-o.height/2);let q;if(t.look==="handDrawn"){const E=dt.svg(n).ellipse(0,0,b*2,k*2,ut(t,{}));q=n.insert(()=>E,":first-child").attr("class","basic label-container usecase-business-ellipse")}else q=n.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",k).attr("cx",0).attr("cy",0);n.append("path").attr("class","usecase-business-marker").attr("d",`M ${v} ${Y} L ${L} ${D}`).attr("fill","none").attr("style",s||null);const tt=r.accessibleName??r.label;return tt&&n.attr("role","img").attr("aria-label",tt),gt(t,q),t.calcIntersect=(z,E)=>ht.ellipse(z,z.width/2,z.height/2,E),t.intersect=z=>ht.ellipse(t,b,k,z),n}p(cp,"usecaseBusiness");var Eo=8,Pc=4,M2=1,Mo=p((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-a})`)},"positionLabel"),O2=p(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:M2},"numericStrokeWidth");async function up(e,t){var z;const r=t,{labelStyles:i,nodeStyles:s}=pt(t),{stylesMap:a}=Or(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t,"usecase-json-table"));n.attr("role","img"),r.accessibleName&&n.attr("aria-label",r.accessibleName),c.attr("class","label usecase-json-title");const h=n.append("g").attr("class","usecase-json-table-grid"),l=[];for(const E of r.jsonRows??[]){const M=await Wr(h,E.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),_=await Wr(h,E.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});l.push({key:{label:M.label.attr("class","label usecase-json-key"),bbox:M.bbox},value:{label:_.label.attr("class","label usecase-json-value"),bbox:_.bbox}})}const u=Math.max(0,...l.map(({key:E})=>E.bbox.width))+Eo*2,f=Math.max(0,...l.map(({value:E})=>E.bbox.width))+Eo*2,d=o.width+Eo*2,m=Math.max(d,u+f),y=f+Math.max(0,m-u-f),x=o.height+Pc*2,C=l.map(({key:E,value:M})=>Math.max(E.bbox.height,M.bbox.height)+Pc*2),b=x+C.reduce((E,M)=>E+M,0),k=O2(a.get("stroke-width")),T=m+k*2,v=b+k*2,L=-m/2,A=-b/2,F=t.look==="handDrawn"?dt.svg(n):void 0,Y=F?ut(t,{}):void 0,D=p((E,M,_,N,O,G)=>{if(F&&Y){const j=F.rectangle(_,N,O,G,Y);return E.insert(()=>j,":first-child").attr("class",M)}return E.insert("rect",":first-child").attr("class",M).attr("x",_).attr("y",N).attr("width",O).attr("height",G).attr("style",s)},"insertCell"),q=D(n,"label-container usecase-json-border",-T/2,-v/2,T,v);D(h,"usecase-json-cell usecase-json-title-cell",L,A,m,x),(z=h.node())==null||z.append(c.node()),Mo(c,o,0,A+x/2);let tt=A+x;return l.forEach(({key:E,value:M},_)=>{var G;const N=C[_],O=h.append("g").attr("class","usecase-json-row").attr("data-row-index",_).attr("transform",`translate(0,${tt})`);D(O,"usecase-json-cell usecase-json-key-cell",L,0,u,N),D(O,"usecase-json-cell usecase-json-value-cell",L+u,0,y,N),(G=O.node())==null||G.append(E.label.node(),M.label.node()),Mo(E.label,E.bbox,L+u/2,N/2),Mo(M.label,M.bbox,L+u+y/2,N/2),tt+=N}),gt(t,q),t.intersect=E=>ht.rect(t,E),n}p(up,"usecaseJsonTable");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:c,bbox:h,label:l}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*o,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,d=u-2*o,m=f-2*o,y=-d/2,x=-m/2,{cssStyles:C}=t,b=dt.svg(c),k=ut(t,{}),T=[{x:y-o,y:x+o},{x:y-o,y:x+m+o},{x:y+d-o,y:x+m+o},{x:y+d-o,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x+m-o},{x:y+d+o,y:x+m-o},{x:y+d+o,y:x-o},{x:y+o,y:x-o},{x:y+o,y:x},{x:y,y:x},{x:y,y:x+o}],v=[{x:y,y:x+o},{x:y+d-o,y:x+o},{x:y+d-o,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Ht(T);let A=b.path(L,k);const F=Ht(v);let Y=b.path(F,k);t.look!=="handDrawn"&&(A=un(A),Y=un(Y));const D=c.insert("g",":first-child");return D.insert(()=>A),D.insert(()=>Y),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),gt(t,D),t.intersect=function(q){return ht.polygon(t,T,q)},c}p(dp,"multiRect");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=t.padding??0,c=t.look==="neo"?16:o,h=t.look==="neo"?12:o;let l=!0;(t.width||t.height)&&(l=!1,t.width=((t==null?void 0:t.width)??0)-c*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+c*2,f=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?f/4:f/8,m=f+(l?d/2:-d/2),y=-u/2,x=-m/2,C=10,{cssStyles:b}=t,k=Mr(y-C,x+m+C,y+u-C,x+m+C,d,.8),T=k==null?void 0:k[k.length-1],v=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...k,{x:y+u-C,y:T.y-C},{x:y+u,y:T.y-C},{x:y+u,y:T.y-2*C},{x:y+u+C,y:T.y-2*C},{x:y+u+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],L=[{x:y,y:x+C},{x:y+u-C,y:x+C},{x:y+u-C,y:T.y-C},{x:y+u,y:T.y-C},{x:y+u,y:x},{x:y,y:x}],A=dt.svg(s),F=ut(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const Y=Ht(v),D=A.path(Y,F),q=Ht(L),tt=A.path(q,F),z=s.insert(()=>D,":first-child");return z.insert(()=>tt),z.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&z.selectAll("path").attr("style",i),z.attr("transform",`translate(0,${-d/2})`),n.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d-(a.y-(a.top??0))})`),gt(t,z),t.intersect=function(E){return ht.polygon(t,v,E)},s}p(fp,"multiWaveEdgedRectangle");async function pp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i,t.useHtmlLabels||ce(Qt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t)),h=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),u=-h/2,f=-l/2,{cssStyles:d}=t,m=dt.svg(n),y=ut(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(u,f,h,l,y),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),c.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),gt(t,C),t.intersect=function(b){return ht.rect(t,b)},n}p(pp,"note");var $2=p((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 gp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Tt(e,t,St(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),c=n+o,h=.5,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=dt.svg(s),m=ut(t,{}),y=$2(0,0,c),x=d.path(y,m);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-c/2+h}, ${c/2})`),f&&u.attr("style",f)}else u=nr(s,c,c,l),u.attr("transform",`translate(${-c/2+h}, ${c/2})`);return i&&u.attr("style",i),gt(t,u),t.calcIntersect=function(d,m){const y=d.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return ht.polygon(d,x,m)},t.intersect=function(d){return this.calcIntersect(t,d)},s}p(gp,"question");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:c,label:h}=await Tt(e,t,St(t)),l=c.width+(t.look==="neo"?a*2:a),u=Math.max(c.height+(t.look==="neo"?n*2:n),t.height??0),f=u/4,m=-Math.max(l,(t.width??0)-f)/2,y=-u/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:b}=t,k=dt.svg(o),T=ut(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=Ht(C),L=k.path(v,T),A=o.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-x/2},0)`),h.attr("transform",`translate(${-x/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),gt(t,A),t.intersect=function(F){return ht.polygon(t,C,F)},o}p(mp,"rect_left_inv_arrow");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),c=t.description,h=t.label,l=await mr(o,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(ce(Rt())){const F=l.children[0],Y=Dt(l);u=F.getBoundingClientRect(),Y.attr("width",u.width),Y.attr("height",u.height)}J.info("Text 2",c);const f=c||[],d=l.getBBox(),m=await mr(o,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),y=m.children[0],x=Dt(m);u=y.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;Dt(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),Dt(l).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),T=-u.width/2-C,v=-u.height/2-C;let L,A;if(t.look==="handDrawn"){const F=dt.svg(a),Y=ut(t,{}),D=F.path(Re(T,v,b,k,t.rx||0),Y),q=F.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,Y);A=a.insert(()=>(J.debug("Rough node insert CXC",D),q),":first-child"),L=a.insert(()=>(J.debug("Rough node insert CXC",D),D),":first-child")}else L=n.insert("rect",":first-child"),A=n.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),A.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return gt(t,L),t.intersect=function(F){return ht.rect(t,F)},a}p(yp,"rectWithTitle");async function Cp(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 Mi(e,t,s)}p(Cp,"roundedRect");var Dr=8;async function xp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t)),h=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?Dr:Dr*2),l=((t==null?void 0:t.height)??o.height)+a*2,u=h-Dr,f=l,d=Dr-h/2,m=-l/2,{cssStyles:y}=t,x=dt.svg(n),C=ut(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+f},{x:d-Dr,y:m+f},{x:d-Dr,y:m},{x:d,y:m},{x:d,y:m+f}],k=x.polygon(b.map(v=>[v.x,v.y]),C),T=n.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",ae(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),c.attr("transform",`translate(${Dr/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),gt(t,T),t.intersect=function(v){return ht.rect(t,v)},n}p(xp,"shadedProcess");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:c,label:h}=await Tt(e,t,St(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2)*1.5,f=l,d=u/1.5,m=-f/2,y=-d/2,{cssStyles:x}=t,C=dt.svg(o),b=ut(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y},{x:m,y:y+d},{x:m+f,y:y+d},{x:m+f,y:y-d/2}],T=Ht(k),v=C.path(T,b),L=o.insert(()=>v,":first-child");return L.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-d/4+(t.padding??0)-(c.y-(c.top??0))})`),gt(t,L),t.intersect=function(A){return ht.polygon(t,k,A)},o}p(bp,"slopedRect");async function kp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},n=await Mi(e,t,a);if(t.colorIndex!==void 0){const{theme:o,themeVariables:c}=Rt();He(n,t.colorIndex,o,c.borderColorArray)}return n}p(kp,"squareRect");var pn=50,I2=p((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(pn-1))),a=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-a),h:i}},"stadiumDimensions");async function wp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?40:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),{w:h,h:l}=I2(c,a,n),u=l/2,{cssStyles:f}=t,d=dt.svg(o),m=ut(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-l/2},{x:h/2-u,y:-l/2},...er(-h/2+u,0,u,pn,90,270),{x:h/2-u,y:l/2},...er(h/2-u,0,u,pn,270,450)],x=Ht(y),C=d.path(x,m),b=o.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),gt(t,b),t.intersect=function(k){return ht.polygon(t,y,k)},o}p(wp,"stadium");async function Sp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Mi(e,t,r)}p(Sp,"state");function Tp(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,nodeBorder:c,nodeShadow:h}=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 l=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=dt.svg(l),f=ut(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:n,strokeWidth:2}),m=o??c,y=(t.width??0)*5/14,x=u.circle(0,0,y,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=l.insert(()=>d,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const T=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",v=T?`${T}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${v})`)}return gt(t,C),t.intersect=function(T){return ht.circle(t,(t.width??0)/2,T)},l}p(Tp,"stateEnd");function Bp(e,t,{config:{themeVariables:r}}){var o,c;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 a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const l=dt.svg(a).circle(0,0,t.width,Gb(i));n=a.insert(()=>l),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.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 h=((c=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:c.id)??"",l=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${l})`)}return gt(t,n),t.intersect=function(h){return ht.circle(t,(t.width??7)/2,h)},a}p(Bp,"stateStart");var ei=8;async function vp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.width+2*ei+a,t.width??0),l=Math.max(c.height+n,t.height??0),u=h-2*ei,f=l,d=-h/2,m=-l/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const x=dt.svg(o),C=ut(t,{}),b=x.rectangle(d,m,u+16,f,C),k=x.line(d+ei,m,d+ei,m+f,C),T=x.line(d+ei+u,m,d+ei+u,m+f,C);o.insert(()=>k,":first-child"),o.insert(()=>T,":first-child");const v=o.insert(()=>b,":first-child"),{cssStyles:L}=t;v.attr("class","basic label-container").attr("style",ae(L)),gt(t,v)}else{const x=nr(o,u,f,y);i&&x.attr("style",i),gt(t,x)}return t.intersect=function(x){return ht.polygon(t,y,x)},o}p(vp,"subroutine");var Oo=.2;async function _p(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Oo*(t.height+n*2),10));const{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,l=Oo*h,u=Oo*h,d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+l-l,m=h,y=-d/2,x=-m/2,{cssStyles:C}=t,b=dt.svg(o),k=ut(t,{}),T=[{x:y-l/2,y:x},{x:y+d+l/2,y:x},{x:y+d+l/2,y:x+m},{x:y-l/2,y:x+m}],v=[{x:y+d-l/2,y:x+m},{x:y+d+l/2,y:x+m},{x:y+d+l/2,y:x+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Ht(T),A=b.path(L,k),F=Ht(v),Y=b.path(F,{...k,fillStyle:"solid"}),D=o.insert(()=>Y,":first-child");return D.insert(()=>A,":first-child"),D.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),gt(t,D),t.intersect=function(q){return ht.polygon(t,T,q)},o}p(_p,"taggedRect");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await Tt(e,t,St(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/8,l=.2*o,u=.2*c,f=c+h,{cssStyles:d}=t,m=dt.svg(s),y=ut(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:f/2},...Mr(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,h,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],C=-o/2+o/2*.1,b=-f/2-u*.4,k=[{x:C+o-l,y:(b+c)*1.3},{x:C+o,y:b+c-u},{x:C+o,y:(b+c)*.9},...Mr(C+o,(b+c)*1.25,C+o-l,(b+c)*1.3,-c*.02,.5)],T=Ht(x),v=m.path(T,y),L=Ht(k),A=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>A,":first-child");return F.insert(()=>v,":first-child"),F.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),gt(t,F),t.intersect=function(Y){return ht.polygon(t,x,Y)},s}p(Lp,"taggedWaveEdgedRectangle");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await Tt(e,t,St(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),c=-n/2,h=-o/2,l=s.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",n).attr("height",o),gt(t,l),t.intersect=function(u){return ht.rect(t,u)},s}p(Fp,"text");var D2=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
234
|
+
a${s},${a} 0,0,1 0,${-i}
|
|
235
|
+
l${r},0
|
|
236
|
+
a${s},${a} 0,0,1 0,${i}
|
|
237
|
+
M${r},${-i}
|
|
238
|
+
a${s},${a} 0,0,0 0,${i}
|
|
239
|
+
l${-r},0`,"createCylinderPathD"),R2=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),P2=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),qc=5,Nc=10;async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,n=t.height??0;if(t.height&&(t.height=t.height-a,t.height<qc&&(t.height=qc)),t.width){const C=n/2/(2.5+n/50);t.width=t.width-a-C*3,t.width<Nc&&(t.width=Nc)}const{shapeSvg:o,bbox:c,label:h}=await Tt(e,t,St(t)),l=Math.max(t.height??0,c.height)+a,u=l/2,f=u/(2.5+l/50),d=Math.max(t.width??0,c.width)+f+a,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=dt.svg(o),C=R2(0,0,d,l,f,u),b=P2(0,0,d,l,f,u),k=x.path(C,ut(t,{})),T=x.path(b,ut(t,{fill:"none"}));y=o.insert(()=>T,":first-child"),y=o.insert(()=>k,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=D2(0,0,d,l,f,u);y=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",ae(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",f),y.attr("transform",`translate(${-d/2}, ${l/2} )`),h.attr("transform",`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),gt(t,y),t.intersect=function(x){const C=ht.rect(t,x),b=C.y-(t.y??0);if(u!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-f)){let k=f*f*(1-b*b/(u*u));k!=0&&(k=Math.sqrt(Math.abs(k))),k=f-k,x.x-(t.x??0)>0&&(k=-k),C.x+=k}return C},o}p(Ap,"tiltedCylinder");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),u=[{x:-3*h/6,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=dt.svg(o),y=ut(t,{}),x=Ht(u),C=m.path(x,y);f=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),d&&f.attr("style",d)}else f=nr(o,l,h,u);return i&&f.attr("style",i),t.width=l,t.height=h,gt(t,f),t.intersect=function(m){return ht.polygon(t,u,m)},o}p(Ep,"trapezoid");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,c=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<c&&(t.height=c),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:l}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,{cssStyles:d}=t,m=dt.svg(h),y=ut(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=Ht(x),b=m.path(C,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),gt(t,k),t.intersect=function(T){return ht.polygon(t,x,T)},h}p(Mp,"trapezoidalPentagon");var Wc=10,zc=10;async function Op(e,t){var T;const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<zc&&(t.width=zc),t.height=(t==null?void 0:t.height)??0,t.height<Wc&&(t.height=Wc));const{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t)),h=ar((T=Rt().flowchart)==null?void 0:T.htmlLabels),l=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:l+o.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:m}=t,y=dt.svg(n),x=ut(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Ht(d),b=y.path(C,x),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=l,t.height=u,gt(t,k),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(v){return J.info("Triangle intersect",t,d,v),ht.polygon(t,d,v)},n}p(Op,"triangle");async function $p(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:c,bbox:h,label:l}=await Tt(e,t,St(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,d=t.look==="neo"?f/4:f/8,m=f+(o?d:-d),{cssStyles:y}=t,C=14-u,b=C>0?C/2:0,k=dt.svg(c),T=ut(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=[{x:-u/2-b,y:m/2},...Mr(-u/2-b,m/2,u/2+b,m/2,d,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],L=Ht(v),A=k.path(L,T),F=c.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),l.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-f/2+(t.padding??0)-d-(h.y-(h.top??0))})`),gt(t,F),t.intersect=function(Y){return ht.polygon(t,v,Y)},c}p($p,"waveEdgedRectangle");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=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 T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:c}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,l=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n,u=l/8,f=l+u*2,{cssStyles:d}=t,m=dt.svg(o),y=ut(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:f/2},...Mr(-h/2,f/2,h/2,f/2,u,1),{x:h/2,y:-f/2},...Mr(h/2,-f/2,-h/2,-f/2,u,-1)],C=Ht(x),b=m.path(C,y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),gt(t,k),t.intersect=function(T){return ht.polygon(t,x,T)},o}p(Ip,"waveRectangle");var te=10;async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-te,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-te,10));const{shapeSvg:n,bbox:o,label:c}=await Tt(e,t,St(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+te,l=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+te,u=h-te,f=l-te,d=-u/2,m=-f/2,{cssStyles:y}=t,x=dt.svg(n),C=ut(t,{}),b=[{x:d-te,y:m-te},{x:d-te,y:m+f},{x:d+u,y:m+f},{x:d+u,y:m-te}],k=`M${d-te},${m-te} L${d+u},${m-te} L${d+u},${m+f} L${d-te},${m+f} L${d-te},${m-te}
|
|
240
|
+
M${d-te},${m} L${d+u},${m}
|
|
241
|
+
M${d},${m-te} L${d},${m+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=x.path(k,C),v=n.insert(()=>T,":first-child");return v.attr("transform",`translate(${te/2}, ${te/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(o.width/2)+te/2-(o.x-(o.left??0))}, ${-(o.height/2)+te/2-(o.y-(o.top??0))})`),gt(t,v),t.intersect=function(L){return ht.polygon(t,b,L)},n}p(Dp,"windowPane");var Hc=new Set(["redux-color","redux-dark-color"]),q2=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Bl(e,t){var At,Et,qt,Bt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Qt(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:c}=s;if(t.look==="handDrawn"){const{themeVariables:ct}=Qt(),{background:mt}=ct,Ft={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${mt}`]};await Bl(e,Ft)}const h=Qt();t.useHtmlLabels=h.htmlLabels;let l=((At=h.er)==null?void 0:At.diagramPadding)??10,u=((Et=h.er)==null?void 0:Et.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:m}=pt(t);if(r.attributes.length===0&&t.label){const ct={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};br(t.label,h)+ct.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const mt=await Mi(e,t,ct);if(i!=null&&Hc.has(i)){const Ft=r.colorIndex??0;mt.attr("data-color-id",`color-${Ft%c.length}`)}if(!ar(h.htmlLabels)){const Ft=mt.select("text"),Nt=(qt=Ft.node())==null?void 0:qt.getBBox();Ft.attr("transform",`translate(${-Nt.width/2}, 0)`)}return mt}h.htmlLabels||(l*=1.25,u*=1.25);let y=St(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await ii(x,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],T=[];let v=0,L=0,A=0,F=0,Y=!0,D=!0;for(const ct of r.attributes){const mt=await ii(x,ct.type,h,0,b,["attribute-type"],d);v=Math.max(v,mt.width+l);const Ft=await ii(x,ct.name,h,0,b,["attribute-name"],d);L=Math.max(L,Ft.width+l);const Nt=await ii(x,ct.keys.join(),h,0,b,["attribute-keys"],d);A=Math.max(A,Nt.width+l);const Ut=await ii(x,ct.comment,h,0,b,["attribute-comment"],d);F=Math.max(F,Ut.width+l);const R=Math.max(mt.height,Ft.height,Nt.height,Ut.height)+u;T.push({yOffset:b,rowHeight:R}),b+=R}let q=4;A<=l&&(Y=!1,A=0,q--),F<=l&&(D=!1,F=0,q--);const tt=x.node().getBBox();if(C.width+l*2-(v+L+A+F)>0){const ct=C.width+l*2-(v+L+A+F);v+=ct/q,L+=ct/q,A>0&&(A+=ct/q),F>0&&(F+=ct/q)}const z=v+L+A+F,E=dt.svg(x),M=ut(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let _=0;T.length>0&&(_=T.reduce((ct,mt)=>ct+((mt==null?void 0:mt.rowHeight)??0),0));const N=Math.max(tt.width+l*2,(t==null?void 0:t.width)||0,z),O=Math.max((_??0)+C.height,(t==null?void 0:t.height)||0),G=-N/2,j=-O/2;if(x.selectAll("g:not(:first-child)").each((ct,mt,Ft)=>{const Nt=Dt(Ft[mt]),Ut=Nt.attr("transform");let R=0,Lt=0;if(Ut){const we=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ut);we&&(R=parseFloat(we[1]),Lt=parseFloat(we[2]),Nt.attr("class").includes("attribute-name")?R+=v:Nt.attr("class").includes("attribute-keys")?R+=v+L:Nt.attr("class").includes("attribute-comment")&&(R+=v+L+A))}Nt.attr("transform",`translate(${G+l/2+R}, ${Lt+j+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(j+u/2)+")"),i!=null&&Hc.has(i)){const ct=r.colorIndex??0;x.attr("data-color-id",`color-${ct%c.length}`)}const lt=E.rectangle(G,j,N,O,M),bt=x.insert(()=>lt,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[ct,mt]of T.entries()){const Nt=(ct+1)%2===0&&mt.yOffset!==0,Ut=E.rectangle(G,C.height+j+(mt==null?void 0:mt.yOffset),N,mt==null?void 0:mt.rowHeight,{...M,fill:Nt?a:n,stroke:o});x.insert(()=>Ut,"g.label").attr("style",f.join("")).attr("class",`row-rect-${Nt?"even":"odd"}`)}const xt=1e-4;let kt=si(G,C.height+j,N+G,C.height+j,xt),ot=E.polygon(kt.map(ct=>[ct.x,ct.y]),M);if(x.insert(()=>ot).attr("class","divider"),kt=si(v+G,C.height+j,v+G,O+j,xt),ot=E.polygon(kt.map(ct=>[ct.x,ct.y]),M),x.insert(()=>ot).attr("class","divider"),Y){const ct=v+L+G;kt=si(ct,C.height+j,ct,O+j,xt),ot=E.polygon(kt.map(mt=>[mt.x,mt.y]),M),x.insert(()=>ot).attr("class","divider")}if(D){const ct=v+L+A+G;kt=si(ct,C.height+j,ct,O+j,xt),ot=E.polygon(kt.map(mt=>[mt.x,mt.y]),M),x.insert(()=>ot).attr("class","divider")}for(const ct of k){const mt=C.height+j+ct;kt=si(G,mt,N+G,mt,xt),ot=E.polygon(kt.map(Ft=>[Ft.x,Ft.y]),M),x.insert(()=>ot).attr("class","divider")}if(gt(t,bt),m&&t.look!=="handDrawn")if(i!=null&&q2.has(i))x.selectAll("path").attr("style",m);else{const ct=m.split(";"),mt=(Bt=ct==null?void 0:ct.filter(Ft=>Ft.includes("stroke")))==null?void 0:Bt.map(Ft=>`${Ft}`).join("; ");x.selectAll("path").attr("style",mt??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ct){return ht.rect(t,ct)},x}p(Bl,"erBox");async function ii(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==gh(t)&&(t=gh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const c=o.node().appendChild(await De(o,t,{width:br(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let l=c.children[0];for(l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">");l.childNodes[0];)l=l.childNodes[0],l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">")}let h=c.getBBox();if(ar(r.htmlLabels)){const l=c.children[0];l.style.textAlign="start";const u=Dt(c);h=l.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}p(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}]}p(si,"lineToPolygon");async function Rp(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",St(t)).attr("id",t.domId||t.id);let o=null,c=null,h=null,l=null,u=0,f=0,d=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ji(o,{text:`«${b}»`},0),u=o.node().getBBox().height}c=n.insert("g").attr("class","label-group text"),await Ji(c,t,0,["font-weight: bolder"]);const m=c.node().getBBox();f=m.height,h=n.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Ji(h,b,y,[b.parseClassifier()]);y+=k+a}d=h.node().getBBox().height,d<=0&&(d=s/2),l=n.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const k=await Ji(l,b,x,[b.parseClassifier()]);x+=k+a}let C=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-m.width/2}, ${u})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+f+s*2})`),C=n.node().getBBox(),l.attr("transform",`translate(0, ${u+f+(d?d+s*4:s*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}p(Rp,"textHelper");async function Ji(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Qt();let n="useHtmlLabels"in t?t.useHtmlLabels:ar(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),ls(o)&&(n=!0);const c=await De(s,Mn(Ar(o)),{width:br(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,l=1;if(n){const u=c.children[0],f=Dt(c);l=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(l+=u.innerHTML.split("<mrow>").length-1),await bl(u),h=u.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{i.includes("font-weight: bolder")&&Dt(c).selectAll("tspan").attr("font-weight",""),l=c.children.length;const u=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=c.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*l)+r)+")"),h.height}p(Ji,"addText");async function Pp(e,t){var _,N;const r=Rt(),{theme:i,themeVariables:s}=r,{useGradient:a,borderColorArray:n}=s,o=r.class.padding??12,c=o,h=t.useHtmlLabels??ar(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:f}=await Rp(e,t,r,h,c);He(u,t.colorIndex,i,n);const{labelStyles:d,nodeStyles:m}=pt(t);t.labelStyle=d,t.cssStyles=l.styles||"";const y=((_=l.styles)==null?void 0:_.join(";"))||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const x=l.members.length===0&&l.methods.length===0&&!((N=r.class)!=null&&N.hideEmptyMembersBox),C=dt.svg(u),b=ut(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Math.max(t.width??0,f.width);let T=Math.max(t.height??0,f.height);const v=(t.height??0)>f.height;l.members.length===0&&l.methods.length===0?T+=c:l.members.length>0&&l.methods.length===0&&(T+=c*2);const L=-k/2,A=-T/2;let F=x?o*2:l.members.length===0&&l.methods.length===0?-o:0;v&&(F=o*2);const Y=C.rectangle(L-o,A-o-(x?o:l.members.length===0&&l.methods.length===0?-o/2:0),k+2*o,T+2*o+F,b),D=u.insert(()=>Y,":first-child");D.attr("class","basic label-container outer-path");const q=D.node().getBBox(),tt=u.select(".annotation-group").node().getBBox().height-(x?o/2:0)||0,z=u.select(".label-group").node().getBBox().height-(x?o/2:0)||0,E=u.select(".members-group").node().getBBox().height-(x?o/2:0)||0,M=(tt+z+A+o-(A-o-(x?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(u.selectAll(".text").each((O,G,j)=>{var At,Et;const lt=Dt(j[G]),bt=lt.attr("transform");let xt=0;if(bt){const Bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(bt);Bt&&(xt=parseFloat(Bt[2]))}let kt=xt+A+o-(x?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(lt.attr("class").includes("methods-group")){const qt=Math.max(E,c/2);v?kt=Math.max(M,tt+z+qt+A+c*2+o)+c*2:kt=tt+z+qt+A+c*4+o}l.members.length===0&&l.methods.length===0&&((At=r.class)!=null&&At.hideEmptyMembersBox)&&(l.annotations.length>0?kt=xt-c:kt=xt),h||(kt-=4);let ot=L;(lt.attr("class").includes("label-group")||lt.attr("class").includes("annotation-group"))&&(ot=-((Et=lt.node())==null?void 0:Et.getBBox().width)/2||0,u.selectAll("text").each(function(qt,Bt,ct){window.getComputedStyle(ct[Bt]).textAnchor==="middle"&&(ot=0)})),lt.attr("transform",`translate(${ot}, ${kt})`)}),l.members.length>0||l.methods.length>0||x){const O=tt+z+A+o,G=C.line(q.x,O,q.x+q.width,O+.001,b);u.insert(()=>G).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(x||l.members.length>0||l.methods.length>0){const O=tt+z+E+A+c*2+o,G=C.line(q.x,v?Math.max(M,O):O,q.x+q.width,(v?Math.max(M,O):O)+.001,b);u.insert(()=>G).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(l.look!=="handDrawn"&&u.selectAll("path").attr("style",y),D.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",y),!h){const O=RegExp(/color\s*:\s*([^;]*)/),G=O.exec(y);if(G){const j=G[0].replace("color","fill");u.selectAll("tspan").attr("style",j)}else if(d){const j=O.exec(d);if(j){const lt=j[0].replace("color","fill");u.selectAll("tspan").attr("style",lt)}}}return gt(t,D),t.intersect=function(O){return ht.rect(t,O)},u}p(Pp,"classBox");async function qp(e,t){var q,tt;const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,c="verifyMethod"in t,h=St(t),l=Rt(),{themeVariables:u}=l,{borderColorArray:f,requirementEdgeLabelBackground:d}=u,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let x;c?x=await Je(y,`<<${s.type}>>`,0,t.labelStyle):x=await Je(y,"<<Element>>",0,t.labelStyle);let C=x;const b=await Je(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=b+o,c){const z=await Je(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=z;const E=await Je(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=E;const M=await Je(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=M,await Je(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const z=await Je(y,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,m);C+=z,await Je(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,m)}const k=(((q=y.node())==null?void 0:q.getBBox().width)??200)+n,T=(((tt=y.node())==null?void 0:tt.getBBox().height)??200)+n,v=-k/2,L=-T/2,A=dt.svg(y),F=ut(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const Y=A.rectangle(v,L,k,T,F),D=y.insert(()=>Y,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",i),f!=null&&f.length){const z=t.colorIndex??0;y.attr("data-color-id",`color-${z%f.length}`)}if(y.selectAll(".label").each((z,E,M)=>{const _=Dt(M[E]),N=_.attr("transform");let O=0,G=0;if(N){const xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);xt&&(O=parseFloat(xt[1]),G=parseFloat(xt[2]))}const j=G-T/2;let lt=v+n/2;(E===0||E===1)&&(lt=O),_.attr("transform",`translate(${lt}, ${j+n})`)}),C>x+b+o){const z=L+x+b+o;let E;if(t.look==="neo"){const N=[[v,z],[v+k,z],[v+k,z+.001],[v,z+.001]];E=A.polygon(N,F)}else E=A.line(v,z,v+k,z,F);y.insert(()=>E).attr("class","divider")}return gt(t,D),t.intersect=function(z){return ht.rect(t,z)},i&&t.look!=="handDrawn"&&(d||f!=null&&f.length)&&y.selectAll("path").attr("style",i),y}p(qp,"requirementBox");async function Je(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=Rt(),o=n.htmlLabels??!0,c=await De(a,Mn(Ar(t)),{width:br(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let h;if(o){const l=c.children[0],u=Dt(c);s==="start"&&Dt(l).style("text-align","left"),h=l.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}else{const l=c.children[0];for(const u of l.children)i&&u.setAttribute("style",i);if(s==="start"){l.setAttribute("text-anchor","start");for(const u of l.children)u.setAttribute("text-anchor","start")}h=c.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}p(Je,"addText");var N2=p(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 Np(e,t,{config:r}){var tt,z;const{labelStyles:i,nodeStyles:s}=pt(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:c,label:h}=await Tt(e,t,St(t)),l=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((tt=r==null?void 0:r.kanban)!=null&&tt.ticketBaseUrl)&&(u=(z=r==null?void 0:r.kanban)==null?void 0:z.ticketBaseUrl.replace("#TICKET#",t.ticket),f=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;f?{label:m,bbox:y}=await Wr(f,"ticket"in t&&t.ticket||"",d):{label:m,bbox:y}=await Wr(o,"ticket"in t&&t.ticket||"",d);const{label:x,bbox:C}=await Wr(o,"assigned"in t&&t.assigned||"",d);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,T=Math.max(y.height,C.height)/2,v=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+T,L=-k/2,A=-v/2;h.attr("transform","translate("+(l-k/2)+", "+(-T-c.height/2)+")"),m.attr("transform","translate("+(l-k/2)+", "+(-T+c.height/2)+")"),x.attr("transform","translate("+(l+k/2-C.width-2*a)+", "+(-T+c.height/2)+")");let F;const{rx:Y,ry:D}=t,{cssStyles:q}=t;if(t.look==="handDrawn"){const E=dt.svg(o),M=ut(t,{}),_=Y||D?E.path(Re(L,A,k,v,Y||0),M):E.rectangle(L,A,k,v,M);F=o.insert(()=>_,":first-child"),F.attr("class","basic label-container").attr("style",q||null)}else{F=o.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",Y??5).attr("ry",D??5).attr("x",L).attr("y",A).attr("width",k).attr("height",v);const E="priority"in t&&t.priority;if(E){const M=o.append("line"),_=L+2,N=A+Math.floor((Y??0)/2),O=A+v-Math.floor((Y??0)/2);M.attr("x1",_).attr("y1",N).attr("x2",_).attr("y2",O).attr("stroke-width","4").attr("stroke",N2(E))}}return gt(t,F),t.height=v,t.intersect=function(E){return ht.rect(t,E)},o}p(Np,"kanbanItem");async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Tt(e,t,St(t)),c=a.width+10*n,h=a.height+8*n,l=.15*c,{cssStyles:u}=t,f=a.width+20,d=a.height+20,m=Math.max(c,f),y=Math.max(h,d);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
|
|
242
|
+
a${l},${l} 1 0,0 ${m*.25},${-1*y*.1}
|
|
243
|
+
a${l},${l} 1 0,0 ${m*.25},0
|
|
244
|
+
a${l},${l} 1 0,0 ${m*.25},0
|
|
245
|
+
a${l},${l} 1 0,0 ${m*.25},${y*.1}
|
|
246
|
+
|
|
247
|
+
a${l},${l} 1 0,0 ${m*.15},${y*.33}
|
|
248
|
+
a${l*.8},${l*.8} 1 0,0 0,${y*.34}
|
|
249
|
+
a${l},${l} 1 0,0 ${-1*m*.15},${y*.33}
|
|
250
|
+
|
|
251
|
+
a${l},${l} 1 0,0 ${-1*m*.25},${y*.15}
|
|
252
|
+
a${l},${l} 1 0,0 ${-1*m*.25},0
|
|
253
|
+
a${l},${l} 1 0,0 ${-1*m*.25},0
|
|
254
|
+
a${l},${l} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
255
|
+
|
|
256
|
+
a${l},${l} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
257
|
+
a${l*.8},${l*.8} 1 0,0 0,${-1*y*.34}
|
|
258
|
+
a${l},${l} 1 0,0 ${m*.1},${-1*y*.33}
|
|
259
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=dt.svg(s),k=ut(t,{}),T=b.path(C,k);x=s.insert(()=>T,":first-child"),x.attr("class","basic label-container").attr("style",ae(u))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),gt(t,x),t.calcIntersect=function(b,k){return ht.rect(b,k)},t.intersect=function(b){return J.info("Bang intersect",t,b),ht.rect(t,b)},s}p(Wp,"bang");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Tt(e,t,St(t)),c=a.width+2*n,h=a.height+2*n,l=.15*c,u=.25*c,f=.35*c,d=.2*c,{cssStyles:m}=t;let y;const x=`M0 0
|
|
260
|
+
a${l},${l} 0 0,1 ${c*.25},${-1*c*.1}
|
|
261
|
+
a${f},${f} 1 0,1 ${c*.4},${-1*c*.1}
|
|
262
|
+
a${u},${u} 1 0,1 ${c*.35},${c*.2}
|
|
263
|
+
|
|
264
|
+
a${l},${l} 1 0,1 ${c*.15},${h*.35}
|
|
265
|
+
a${d},${d} 1 0,1 ${-1*c*.15},${h*.65}
|
|
266
|
+
|
|
267
|
+
a${u},${l} 1 0,1 ${-1*c*.25},${c*.15}
|
|
268
|
+
a${f},${f} 1 0,1 ${-1*c*.5},0
|
|
269
|
+
a${l},${l} 1 0,1 ${-1*c*.25},${-1*c*.15}
|
|
270
|
+
|
|
271
|
+
a${l},${l} 1 0,1 ${-1*c*.1},${-1*h*.35}
|
|
272
|
+
a${d},${d} 1 0,1 ${c*.1},${-1*h*.65}
|
|
273
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=dt.svg(s),b=ut(t,{}),k=C.path(x,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",ae(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-c/2}, ${-h/2})`),gt(t,y),t.calcIntersect=function(C,b){return ht.rect(C,b)},t.intersect=function(C){return J.info("Cloud intersect",t,C),ht.rect(t,C)},s}p(zp,"cloud");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=pt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await Tt(e,t,St(t)),c=a.width+8*n,h=a.height+2*n,l=5,u=t.look==="neo"?`
|
|
274
|
+
M${-c/2} ${h/2-l}
|
|
275
|
+
v${-h+2*l}
|
|
276
|
+
q0,-${l} ${l},-${l}
|
|
277
|
+
h${c-2*l}
|
|
278
|
+
q${l},0 ${l},${l}
|
|
279
|
+
v${h-l}
|
|
280
|
+
H${-c/2}
|
|
281
|
+
Z
|
|
282
|
+
`:`
|
|
283
|
+
M${-c/2} ${h/2-l}
|
|
284
|
+
v${-h+2*l}
|
|
285
|
+
q0,-${l} ${l},-${l}
|
|
286
|
+
h${c-2*l}
|
|
287
|
+
q${l},0 ${l},${l}
|
|
288
|
+
v${h-2*l}
|
|
289
|
+
q0,${l} ${-l},${l}
|
|
290
|
+
h${-(c-2*l)}
|
|
291
|
+
q${-l},0 ${-l},${-l}
|
|
292
|
+
Z
|
|
293
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),gt(t,f),t.calcIntersect=function(d,m){return ht.rect(d,m)},t.intersect=function(d){return ht.rect(t,d)},s}p(Hp,"defaultMindmapNode");async function Yp(e,t){const r={padding:t.padding??0};return Sl(e,t,r)}p(Yp,"mindmapCircle");var W2=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:kp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Cp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:wp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:vp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Df},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Rf},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Hf},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:bf},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Lf},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Tf},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:If},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Sl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Wp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:zp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:gp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Gf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ep},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Ep},{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:Jf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:qf},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Fp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Bf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:xp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Bp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Tp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Yf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:jf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Ef},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Mf},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Of},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ip},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:$p},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Uf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ap},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:sp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:$f},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Pf},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Op},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Dp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Wf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Mp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:zf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:bp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:dp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:xf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Af},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Lp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:_p},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ip},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:mp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:ap}],z2=p(()=>{const t=[...Object.entries({state:Sp,choice:vf,note:pp,composite:_f,rectWithTitle:yp,labelRect:tp,block_arrow:Sf,collapsedGroup:wf,iconSquare:Kf,iconCircle:Vf,icon:Xf,iconRounded:Zf,imageSquare:Qf,anchor:yf,kanbanItem:Np,mindmapCircle:Yp,defaultMindmapNode:Hp,classBox:Pp,erBox:Bl,requirementBox:qp,usecaseActor:op,usecaseActorHollow:lp,usecaseActorAwesome:np,usecaseActorIcon:hp,usecaseBusiness:cp,usecaseEllipse:Nf,usecaseJsonTable:up}),...W2.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Up=z2();function H2(e){return e in Up}p(H2,"isValidShape");var xs=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),$a=new Map;async function Gp(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Up[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",ae(t.look)),t.tooltip&&s.attr("title",t.tooltip),$a.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Gp,"insertNode");var a_=p((e,t)=>{$a.set(t.id,e)},"setNodeElem"),o_=p(()=>{$a.clear()},"clear"),n_=p(e=>{const t=$a.get(e.id);J.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"),Y2=p(async(e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,h=o,{labelStyles:l,nodeStyles:u,borderStyles:f,backgroundStyles:d}=pt(t),m=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);He(m,t.colorIndex,i,c);const y=ar(r.flowchart.htmlLabels),x=t.direction==="LR",C=m.insert("g").attr("class","cluster-label swimlane-label"),b=await De(C,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let k=b.getBBox();if(y){const M=b.children[0],_=Dt(b);k=M.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}const T=t.padding??0,v=t.width<=k.width+T?k.width+T:t.width;t.width<=k.width+T?t.diff=(v-t.width)/2-T:t.diff=-T;const L=t.height,A=t.y-L/2,F=t.y+L/2,Y=t.x-v/2,D=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:A+L/3,q=x?4:0,tt=k.height+2*q;let z,E;if(x){const M=Math.max(tt,k.height+2*q),_=Y+M,N=Math.max(0,v-M);if(t.look==="handDrawn"){const j=dt.svg(m),lt=ut(t,{roughness:.7,fill:n,stroke:h,seed:a}),bt=ut(t,{roughness:.7,fill:"none",stroke:h,seed:a}),xt=j.rectangle(Y,A,M,L,lt);z=m.insert(()=>xt,":first-child").attr("class","swimlane-title");const kt=j.rectangle(_,A,N,L,bt);E=m.insert(()=>kt,":first-child").attr("class","swimlane-body"),z.select("path:nth-child(2)").attr("style",f.join(";")),z.select("path").attr("style",d.join(";").replace("fill","stroke"))}else z=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),z.attr("class","swimlane-title").attr("style",u).attr("x",Y).attr("y",A).attr("width",M).attr("height",L).attr("fill",n).attr("stroke",h),E.attr("class","swimlane-body").attr("style",u).attr("x",_).attr("y",A).attr("width",N).attr("height",L).attr("fill","none").attr("stroke",h);const O=Y+M/2,G=t.y;C.attr("transform",`translate(${O}, ${G}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{const M=Math.max(0,D-A),_=Math.min(tt,M),N=A+_,O=Math.max(0,F-N),G=t.x-v/2;if(t.look==="handDrawn"){const bt=dt.svg(m),xt=ut(t,{roughness:.7,fill:n,stroke:h,fillWeight:3,seed:a}),kt=ut(t,{roughness:.7,fill:"none",stroke:h,seed:a}),ot=bt.rectangle(G,A,v,_,xt);z=m.insert(()=>ot,":first-child").attr("class","swimlane-title");const At=bt.rectangle(G,N,v,O,kt);E=m.insert(()=>At,":first-child").attr("class","swimlane-body"),z.select("path:nth-child(2)").attr("style",f.join(";")),z.select("path").attr("style",d.join(";").replace("fill","stroke"))}else z=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),z.attr("class","swimlane-title").attr("style",u).attr("x",G).attr("y",A).attr("width",v).attr("height",_).attr("fill",n).attr("stroke",h),E.attr("class","swimlane-body").attr("style",u).attr("x",G).attr("y",N).attr("width",v).attr("height",O).attr("fill","none").attr("stroke",h);const j=t.x-k.width/2,lt=A+(_-k.height)/2;C.attr("transform",`translate(${j}, ${lt})`)}if(J.trace("Swimlane data ",t,JSON.stringify(t)),l){const M=C.select("span");M&&M.attr("style",l)}return t.offsetX=0,t.width=v,t.height=L,t.offsetY=k.height-T/2,t.intersect=function(M){return kr(t,M)},{cluster:m,labelBBox:k}},"swimlane"),jp=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l,borderStyles:u,backgroundStyles:f}=pt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);He(d,t.colorIndex,i,c);const m=ce(r),y=d.insert("g").attr("class","cluster-label ");let x;t.labelType==="markdown"?x=await De(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):x=await mr(y,t.label,t.labelStyle||"",!1,!0);let C=x.getBBox();if(ce(r)){const Y=x.children[0],D=Dt(x);C=Y.getBoundingClientRect(),D.attr("width",C.width),D.attr("height",C.height)}const b=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height,T=t.x-b/2,v=t.y-k/2;J.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){const Y=dt.svg(d),D=ut(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),q=Y.path(Re(T,v,b,k,0),D);L=d.insert(()=>(J.debug("Rough node insert CXC",q),q),":first-child"),L.select("path:nth-child(2)").attr("style",u.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",v).attr("width",b).attr("height",k);const{subGraphTitleTopMargin:A}=xs(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),h){const Y=y.select("span");Y&&Y.attr("style",h)}const F=L.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=C.height-t.padding/2,t.intersect=function(Y){return kr(t,Y)},{cluster:d,labelBBox:C}},"rect"),U2=p((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,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return kr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),G2=p(async(e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,borderColorArray:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:l}=s,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);He(u,t.colorIndex,i,o);const f=u.insert("g",":first-child"),d=u.insert("g").attr("class","cluster-label");let m=u.append("rect");const y=await mr(d,t.label,t.labelStyle,void 0,!0);let x=y.getBBox();if(ce(r)){const q=y.children[0],tt=Dt(y);x=q.getBoundingClientRect(),tt.attr("width",x.width),tt.attr("height",x.height)}const C=0*t.padding,b=C/2,k=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+C;t.width<=x.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+C,v=t.height+C-x.height-6,L=t.x-k/2,A=t.y-T/2;t.width=k;const F=t.y-t.height/2-b+x.height+2;let Y;if(t.look==="handDrawn"){const q=t.cssClasses.includes("statediagram-cluster-alt"),tt=dt.svg(u),z=t.rx||t.ry?tt.path(Re(L,A,k,T,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:l,seed:a}):tt.rectangle(L,A,k,T,{seed:a});Y=u.insert(()=>z,":first-child");const E=tt.rectangle(L,F,k,v,{fill:q?n:c,fillStyle:q?"hachure":"solid",stroke:l,seed:a});Y=u.insert(()=>z,":first-child"),m=u.insert(()=>E),Y.attr("class","outer"),m.attr("class","inner")}else Y=f.insert("rect",":first-child"),Y.attr("class","outer").attr("x",L).attr("y",A).attr("width",k).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",L).attr("y",F).attr("width",k).attr("height",v);d.attr("transform",`translate(${t.x-x.width/2}, ${A+1-(ce(r)?0:3)})`);const D=Y.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(q){return kr(t,q)},{cluster:u,labelBBox:x}},"roundedWithTitle"),j2=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Rt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:l}=pt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=ce(r),d=u.insert("g").attr("class","cluster-label "),m=await De(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let y=m.getBBox();if(ce(r)){const A=m.children[0],F=Dt(m);y=A.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,k=t.y-C/2;J.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const A=dt.svg(u),F=ut(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),Y=A.path(Re(b,k,x,C,t.rx),F);T=u.insert(()=>(J.debug("Rough node insert CXC",Y),Y),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",l.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:v}=xs(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),o){const A=d.select("span");A&&A.attr("style",o)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return kr(t,A)},{cluster:u,labelBBox:y}},"kanbanSection"),X2=p((e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,nodeBorder:o,borderColorArray:c}=s,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);He(h,t.colorIndex,i,c);const l=h.insert("g",":first-child"),u=0*t.padding,f=t.width+u;t.diff=-t.padding;const d=t.height+u,m=t.x-f/2,y=t.y-d/2;t.width=f;let x;if(t.look==="handDrawn"){const k=dt.svg(h).rectangle(m,y,f,d,{fill:n??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});x=h.insert(()=>k,":first-child").attr("class","divider")}else{x=l.insert("rect",":first-child");let b="outer";t.look,b="divider",x.attr("class",b).attr("x",m).attr("y",y).attr("width",f).attr("height",d).attr("data-look",t.look)}const C=x.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return kr(t,b)},{cluster:h,labelBBox:{}}},"divider"),V2=p(async(e,t,r)=>{var v;J.info(`Creating ${r.cssClass} for `,t.id,t);const i=Rt(),{theme:s,themeVariables:a,handDrawnSeed:n}=i,{borderColorArray:o}=a,{labelStyles:c,borderStyles:h}=pt(t),l=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);He(l,t.colorIndex,s,o);const u=ce(i),f=l.insert("g").attr("class","cluster-label");let d={width:0,height:0};const m=(v=t.label)==null?void 0:v.trim();if(m){let L;if(t.labelType==="markdown"?L=await De(f,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):L=await mr(f,t.label,t.labelStyle||"",!1,!0),d=L.getBBox(),u){const A=L.children[0],F=Dt(L);d=A.getBoundingClientRect(),F.attr("width",d.width),F.attr("height",d.height)}}const y=t.width<=d.width+t.padding?d.width+t.padding:t.width;t.width<=d.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,b=t.y-x/2;let k;if(t.look==="handDrawn"){const L=dt.svg(l),A=ut(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:n,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),F=L.path(Re(C,b,y,x,r.rx),A);k=l.insert(()=>F,":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";"))}else k=l.insert("rect",":first-child"),k.attr("rx",r.rx).attr("ry",r.rx).attr("x",C).attr("y",b).attr("width",y).attr("height",x).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&k.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:L}=xs(i);if(f.attr("transform",`translate(${t.x-d.width/2}, ${t.y-t.height/2+L})`),c){const A=f.select("span");A&&A.attr("style",c)}}const T=k.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=d.height-t.padding/2,t.intersect=function(L){return kr(t,L)},{cluster:l,labelBBox:d}},"createContainerGroup"),Z2=p(async(e,t)=>{const{themeVariables:r}=Rt(),i=r.flowContainerStroke||r.secondaryBorderColor;return V2(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),K2=p((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,a=Math.max(e.width,t.width+i),n=r==="package"?Math.max(e.height,s+e.padding*2):e.height,o=e.x-a/2,c=e.y-n/2;return{boundaryType:r,width:a,height:n,x:o,y:c,bodyY:c+s,bodyHeight:n-s,tabHeight:s,tabWidth:r==="package"?Math.min(a,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),Q2=p(async(e,t)=>{var z;J.info("Creating usecase system boundary for ",t.id,t);const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l}=pt(t),{stylesMap:u}=Or(t),f=t.boundaryType||"rect",d=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${f} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",f).attr("data-look",t.look);He(d,t.colorIndex,i,c);const m=ce(r),y=d.insert("g").attr("class","cluster-label system-boundary-title"),x=await De(y,t.label,{style:h,useHtmlLabels:m,isNode:!0});let C=x.getBBox();if(m){const E=x.children[0],M=Dt(x);C=E.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const b=K2(t,C),{width:k,height:T,x:v,y:L,bodyY:A,bodyHeight:F,tabHeight:Y,tabWidth:D}=b;t.diff=t.width<=C.width+t.padding?(k-t.width)/2-t.padding:-t.padding;const q=ut(t,{fill:u.get("fill")||n,stroke:u.get("stroke")||o,strokeWidth:((z=u.get("stroke-width"))==null?void 0:z.replace("px",""))||1,seed:a});if(t.look==="handDrawn"){const E=dt.svg(d),M=E.rectangle(v,A,k,F,q);if(d.insert(()=>M,":first-child").attr("class","boundary-body label-container"),f==="package"){const _=E.rectangle(v,L,D,Y,q);d.insert(()=>_,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else d.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",l).attr("x",v).attr("y",A).attr("width",k).attr("height",F),f==="package"&&d.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",l).attr("x",v).attr("y",L).attr("width",D).attr("height",Y);const{subGraphTitleTopMargin:tt}=xs(r);return f==="package"?y.attr("transform",`translate(${v+(D-C.width)/2}, ${L+(Y-C.height)/2})`):y.attr("transform",`translate(${t.x-C.width/2}, ${L+tt})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),t.offsetX=0,t.width=k,t.height=T,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(E){return kr(t,E)},{cluster:d,labelBBox:C}},"usecaseSystemBoundary"),J2=jp,tw={rect:jp,squareRect:J2,roundedWithTitle:G2,noteGroup:U2,divider:X2,kanbanSection:j2,flowGroup:Z2,usecaseSystemBoundary:Q2,swimlane:Y2},ew=new Set(["noteGroup","divider"]),l_=p(e=>!ew.has(e??"rect"),"clusterPaintsTitle"),Xp=new Map,rw=p(async(e,t)=>{const r=t.shape||"rect",i=await tw[r](e,t);return Xp.set(t.id,i),i},"insertCluster"),h_=p(()=>{Xp=new Map},"clear"),Ui=p((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"),ye={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},Yc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ts(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Kt(e),t=Kt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}p(ts,"calculateDeltaAndAngle");var Kt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),iw=p(e=>({x:p(function(t,r,i){let s=0;const a=Kt(i[0]).x<Kt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ye,e.arrowTypeStart)){const{angle:d,deltaX:m}=ts(i[0],i[1]);s=ye[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ye,e.arrowTypeEnd)){const{angle:d,deltaX:m}=ts(i[i.length-1],i[i.length-2]);s=ye[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const n=Math.abs(Kt(t).x-Kt(i[i.length-1]).x),o=Math.abs(Kt(t).y-Kt(i[i.length-1]).y),c=Math.abs(Kt(t).x-Kt(i[0]).x),h=Math.abs(Kt(t).y-Kt(i[0]).y),l=ye[e.arrowTypeStart],u=ye[e.arrowTypeEnd],f=1;if(n<u&&n>0&&o<u){let d=u+f-n;d*=a==="right"?-1:1,s-=d}if(c<l&&c>0&&h<l){let d=l+f-c;d*=a==="right"?-1:1,s+=d}return Kt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=Kt(i[0]).y<Kt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ye,e.arrowTypeStart)){const{angle:d,deltaY:m}=ts(i[0],i[1]);s=ye[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ye,e.arrowTypeEnd)){const{angle:d,deltaY:m}=ts(i[i.length-1],i[i.length-2]);s=ye[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const n=Math.abs(Kt(t).y-Kt(i[i.length-1]).y),o=Math.abs(Kt(t).x-Kt(i[i.length-1]).x),c=Math.abs(Kt(t).y-Kt(i[0]).y),h=Math.abs(Kt(t).x-Kt(i[0]).x),l=ye[e.arrowTypeStart],u=ye[e.arrowTypeEnd],f=1;if(n<u&&n>0&&o<u){let d=u+f-n;d*=a==="up"?-1:1,s-=d}if(c<l&&c>0&&h<l){let d=l+f-c;d*=a==="up"?-1:1,s+=d}return Kt(t).y+s},"y")}),"getLineFunctionsWithOffset"),sw=p((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&Uc(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&Uc(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),aw={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},arrow_hierarchy:{type:"hierarchy",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}},ow=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Uc=p((e,t,r,i,s,a,n=!1,o)=>{var m;if(!r||r==="none")return;const c=aw[r],h=c&&ow.includes(c.type);if(!c){J.warn(`Unknown arrow type: ${r}`);return}const l=c.type,d=`${s}_${a}-${l}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),x=`${d}_${y}`;if(!document.getElementById(x)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=x,b.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),c.fill&&T.setAttribute("fill",o)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),nw=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Rt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),xa=new Map,de=new Map,c_=p(()=>{xa.clear(),de.clear()},"clear"),u_=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Gi=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),lw=p(async(e,t)=>{const r=Rt();let i=ce(r);const{labelStyles:s}=pt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await De(e,t.label,{style:Gi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),J.info("abc82",t,t.labelType);let l,u;if(i){const d=h.children[0],m=Dt(h);l=await Gr.measure(()=>d.getBoundingClientRect()),u=l,m.attr("width",l.width),m.attr("height",l.height)}else{const d=Dt(h).select("text").node();await Gr.measure(()=>{l=h.getBBox(),d&&typeof d.getBBox=="function"?u=d.getBBox():u=l})}n.attr("transform",Ui(u,i)),xa.set(t.id,a),t.width=l.width,t.height=l.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await mr(m,t.startLabelLeft,Gi(t.labelStyle)||"",!1,!1);f=y;let x=y.getBBox();if(i){const C=y.children[0],b=Dt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ui(x,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).startLeft=d,es(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await mr(m,t.startLabelRight,Gi(t.labelStyle)||"",!1,!1);f=y;let x=y.getBBox();if(i){const C=y.children[0],b=Dt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ui(x,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).startRight=d,es(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await mr(d,t.endLabelLeft,Gi(t.labelStyle)||"",!1,!1);f=y;let x=y.getBBox();if(i){const C=y.children[0],b=Dt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ui(x,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).endLeft=d,es(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await mr(d,t.endLabelRight,Gi(t.labelStyle)||"",!1,!1);f=y;let x=y.getBBox();if(i){const C=y.children[0],b=Dt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ui(x,i)),de.get(t.id)||de.set(t.id,{}),de.get(t.id).endRight=d,es(f,t.endLabelRight)}return h},"insertEdgeLabel");function es(e,t){ce(Rt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(es,"setTerminalWidth");var hw=p((e,t)=>{J.debug("Moving label abc88 ",e.id,e.label,xa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Rt(),{subGraphTitleTotalMargin:s}=xs(i);if(e.label){const a=xa.get(e.id);let n=e.x,o=e.y;if(r){const c=Ge.calcLabelPosition(r);J.debug("Moving label "+e.label+" from (",n,",",o,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(n=c.x,o=c.y)}a.attr("transform",`translate(${n}, ${o+s/2})`)}if(e.startLabelLeft){const a=de.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const c=Ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=de.get(e.id).startRight;let n=e.x,o=e.y;if(r){const c=Ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=de.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const c=Ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=de.get(e.id).endRight;let n=e.x,o=e.y;if(r){const c=Ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),cw=p((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!((n=e==null?void 0:e.id)!=null&&n.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),uw=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),dw=p((e,t,r)=>{J.debug(`intersection calc abc89:
|
|
294
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
295
|
+
insidePoint : ${JSON.stringify(r)}
|
|
296
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-a:n+a;const c=e.height/2,h=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*c){let u=r.y<t.y?t.y-c-s:s-c-t.y;o=l*u/h;const f={x:r.x<t.x?r.x+o:r.x-l+o,y:r.y<t.y?r.y+h-u:r.y-h+u};return o===0&&(f.x=t.x,f.y=t.y),l===0&&(f.x=t.x),h===0&&(f.y=t.y),J.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${l}, r ${o}`,f),f}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let u=h*o/l,f=r.x<t.x?r.x+l-o:r.x-l+o,d=r.y<t.y?r.y+u:r.y-u;return J.debug(`sides calc abc89, Q ${h}, q ${u}, R ${l}, r ${o}`,{_x:f,_y:d}),o===0&&(f=t.x,d=t.y),l===0&&(f=t.x),h===0&&(d=t.y),{x:f,y:d}}},"intersection"),Gc=p((e,t)=>{J.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(J.info("abc88 checking point",a,t),!uw(t,a)&&!s){const n=dw(t,i,a);J.debug("abc88 inside",a,i,n),J.debug("abc88 intersection",n,t);let o=!1;r.forEach(c=>{o=o||c.x===n.x&&c.y===n.y}),r.some(c=>c.x===n.x&&c.y===n.y)?J.warn("abc88 no intersect",n,r):r.push(n),s=!0}else J.warn("abc88 outside",a,i),i=a,s||r.push(a)}),J.debug("returning points",r),r},"cutPathAtIntersect");function Vp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Vp,"extractCornerPoints");var jc=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),fw=p(function(e){const{cornerPointPositions:t}=Vp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=jc(s,n,5),c=jc(a,n,5),h=c.x-o.x,l=c.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let f={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){J.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;n.x===o.x?f={x:h<0?o.x-d+u:o.x+d-u,y:l<0?o.y-u:o.y+u}:f={x:h<0?o.x-u:o.x+u,y:l<0?o.y-d+u:o.y+d-u}}else J.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(f,c)}else r.push(e[i]);return r},"fixCorners"),pw=p((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),c=Number.isFinite(o)?Math.max(0,o):0,h=Array(c).fill(`${s} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),gw=p(function(e,t,r,i,s,a,n,o=!1){var O;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:c,layout:h}=Rt();let l=t.points,u=!1;const f=s;var d=a;const m=[];for(const G in t.cssCompiledStyles)Cd(G)||m.push(t.cssCompiledStyles[G]);if(h==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(l)&&l.length>=2)if(l.length===2)l=[f.intersect(l[0]),d.intersect(l[1])];else{const G=l.slice(1,-1),j=G[0],lt=G[G.length-1],bt=.5,xt=Math.abs(l[l.length-1].x-lt.x)<bt&&Math.abs(l[l.length-1].y-lt.y)<bt,kt=f.intersect(j),ot=xt?lt:d.intersect(lt),At=Math.abs(ot.x-lt.x)<bt&&Math.abs(ot.y-lt.y)<bt,qt=Math.abs(kt.x-j.x)<bt&&Math.abs(kt.y-j.y)<bt?[]:[kt],Bt=At?[]:[ot];l=[...qt,...G,...Bt]}l=cw(t,l)}else d.intersect&&f.intersect&&!o&&(l=l.slice(1,t.points.length-1),l.unshift(f.intersect(l[0])),l.push(d.intersect(l[l.length-1])));const y=btoa(JSON.stringify(l));t.toCluster&&(J.info("to cluster abc88",r.get(t.toCluster)),l=Gc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(J.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Gc(l.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let x=l.filter(G=>!Number.isNaN(G.y));const C=nw(t.curve);C!=="rounded"&&(x=fw(x));let b=qs;switch(C){case"linear":b=qs;break;case"basis":b=Po;break;case"cardinal":b=yu;break;case"bumpX":b=gu;break;case"bumpY":b=pu;break;case"catmullRom":b=xu;break;case"monotoneX":b=fu;break;case"monotoneY":b=du;break;case"natural":b=uu;break;case"step":b=cu;break;case"stepAfter":b=hu;break;case"stepBefore":b=lu;break;case"rounded":b=qs;break;default:b=Po}const{x:k,y:T}=iw(t),v=_m().x(k).y(T).curve(b);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let A,F=C==="rounded"?Zp(Kp(x,t),5):v(x);const Y=Array.isArray(t.style)?t.style:[t.style];let D=Y.find(G=>G==null?void 0:G.startsWith("stroke:")),q="";t.animate&&(q="edge-animation-fast"),t.animation&&(q="edge-animation-"+t.animation);let tt=!1;if(t.look==="handDrawn"){const G=dt.svg(e);Object.assign([],x);const j=G.path(F,{roughness:.3,seed:c});L+=" transition",A=Dt(j).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",Y?Y.reduce((bt,xt)=>bt+";"+xt,""):"");let lt=A.attr("d");A.attr("d",lt),e.node().appendChild(A.node())}else{const G=m.join(";"),j=Y?Y.reduce((At,Et)=>At+Et+";",""):"",lt=(G?G+";"+j+";":j)+";"+(Y?Y.reduce((At,Et)=>At+";"+Et,""):"");A=e.append("path").attr("d",F).attr("id",`${n}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",lt),D=(O=lt.match(/stroke:([^;]+)/))==null?void 0:O[1],tt=t.animate===!0||!!t.animation||G.includes("animation");const bt=A.node(),xt=typeof bt.getTotalLength=="function"?bt.getTotalLength():0,kt=Yc[t.arrowTypeStart]||0,ot=Yc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!tt){const Et=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?pw(xt,kt,ot):`0 ${kt} ${xt-kt-ot} ${ot}`}; stroke-dashoffset: 0;`;A.attr("style",Et+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",t.id),A.attr("data-points",y),A.attr("data-look",ae(t.look)),t.showPoints&&x.forEach(G=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",G.x).attr("cy",G.y)});let z="";(Rt().flowchart.arrowMarkerAbsolute||Rt().state.arrowMarkerAbsolute)&&(z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,z=z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),J.info("arrowTypeStart",t.arrowTypeStart),J.info("arrowTypeEnd",t.arrowTypeEnd);const E=!tt&&(t==null?void 0:t.look)==="neo";sw(A,t,z,n,i,E,D);const M=Math.floor(l.length/2),_=l[M];Ge.isLabelCoordinateInPath(_,A.attr("d"))||(u=!0);let N={};return u&&(N.updatedPath=l),N.originalPath=t.points,N},"insertEdge");function Zp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],c=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,l=n.y-o.y,u=c.x-n.x,f=c.y-n.y,d=Math.hypot(h,l),m=Math.hypot(u,f);if(d<s||m<s){r+=`L${n.x},${n.y}`;continue}const y=h/d,x=l/d,C=u/m,b=f/m,k=y*C+x*b,T=Math.max(-1,Math.min(1,k)),v=Math.acos(T);if(v<s||Math.abs(Math.PI-v)<s){r+=`L${n.x},${n.y}`;continue}const L=Math.min(t/Math.sin(v/2),d/2,m/2),A=n.x-y*L,F=n.y-x*L,Y=n.x+C*L,D=n.y+b*L;r+=`L${A},${F}`,r+=`Q${n.x},${n.y} ${Y},${D}`}}return r}p(Zp,"generateRoundedPath");function gn(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}}p(gn,"calculateDeltaAndAngle");function Kp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&ye[t.arrowTypeStart]){const s=ye[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=gn(a,n),c=s*Math.cos(o),h=s*Math.sin(o);r[0].x=a.x+c,r[0].y=a.y+h}const i=e.length;if(i>=2&&ye[t.arrowTypeEnd]){const s=ye[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=gn(n,a),c=s*Math.cos(o),h=s*Math.sin(o);r[i-1].x=a.x-c,r[i-1].y=a.y-h}return r}p(Kp,"applyMarkerOffsetsToPoints");var mw=p((e,t,r,i)=>{t.forEach(s=>{Nw[s](e,r,i)})},"insertMarkers"),yw=p((e,t,r)=>{J.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").attr("markerUnits","userSpaceOnUse").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"),Cw=p((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").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),xw=p((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").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),bw=p((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").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),kw=p((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").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),ww=p((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"),Sw=p((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"),Tw=p((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"),Bw=p((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"),vw=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{transitionColor:a}=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",`${a}`)},"barbNeo"),_w=p((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"),Lw=p((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"),Fw=p((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"),Aw=p((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"),Ew=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=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",`${a}`),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",`${a}`)},"only_one_neo"),Mw=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=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");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const c=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");c.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),c.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Ow=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=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",`${a}`),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",`${a}`)},"one_or_more_neo"),$w=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=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");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const c=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");c.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),c.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Iw=p((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
|
|
297
|
+
L20,10
|
|
298
|
+
M20,10
|
|
299
|
+
L0,20`)},"requirement_arrow"),Dw=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=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",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
300
|
+
L20,10
|
|
301
|
+
M20,10
|
|
302
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Rw=p((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"),Pw=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s,n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),qw=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),Nw={extension:yw,composition:Cw,aggregation:xw,dependency:bw,lollipop:kw,point:ww,circle:Sw,cross:Tw,barb:Bw,barbNeo:vw,hierarchy:qw,only_one:_w,zero_or_one:Lw,one_or_more:Fw,zero_or_more:Aw,only_one_neo:Ew,zero_or_one_neo:Mw,one_or_more_neo:Ow,zero_or_more_neo:$w,requirement_arrow:Iw,requirement_contains:Rw,requirement_arrow_neo:Dw,requirement_contains_neo:Pw},Ww=mw,zw={common:fs,getConfig:Qt,insertCluster:rw,insertEdge:gw,insertEdgeLabel:lw,insertMarkers:Ww,insertNode:Gp,interpolateToCurve:el,labelHelper:Tt,log:J,positionEdgeLabel:hw},Hw=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],cs=Object.create(null),Qp=p(e=>{for(const t of e)cs[t.name]=t},"registerLayoutLoaders"),Yw=p(()=>{const e=p(async()=>await Pt(()=>import("./elk-276RUBZZ-dM3Y1d2a.js"),__vite__mapDeps([0,1,2,3,4,5])),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...Hw.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),Uw=p(()=>{Qp([{name:"dagre",loader:p(async()=>await Pt(()=>import("./dagre-6A5THRUB-CXzwdR-6.js"),__vite__mapDeps([6,2,3,4,5])),"loader")},{name:"swimlane",loader:p(async()=>await Pt(()=>import("./swimlanes-2SLR337P-culFSb1R.js"),__vite__mapDeps([7,1,2,3,4,5])),"loader")},{name:"cose-bilkent",loader:p(async()=>await Pt(()=>import("./cose-bilkent-JH36ORCC-BAuXqkne.js"),__vite__mapDeps([8,9,3,4])),"loader")},...Yw()])},"registerDefaultLayoutLoaders");Uw();var d_=p(async(e,t)=>{if(!Object.hasOwn(cs,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const s of e.nodes){const a=s.domId||s.id;s.domId=`${e.diagramId}-${a}`}const r=cs[e.layoutAlgorithm],i=await r.loader();return Ub(t,e.config),i.render(e,t,zw,{algorithm:r.algorithm})},"render"),$o="dagre",f_=p((e="",{fallback:t=$o}={})=>{if(Object.hasOwn(cs,e))return e;for(const r of[t,$o])if(Object.hasOwn(cs,r))return J.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${$o} is registered.`)},"getRegisteredLayoutAlgorithm"),vl="comm",Jp="rule",tg="decl",Gw="@media",jw="@import",Xw="@supports",Vw="@namespace",mn="@keyframes",eg="@layer",Zw="@scope",Kw=Math.abs,ns=String.fromCharCode;function rg(e){return e.trim()}function yn(e,t,r){return e.replace(t,r)}function ni(e,t){return e.charCodeAt(t)|0}function vi(e,t,r){return e.slice(t,r)}function tr(e){return e.length}function ig(e){return e.length}function Rs(e,t){return t.push(e),e}var Ia=1,_i=1,sg=0,ze=0,ie=0,Oi="";function _l(e,t,r,i,s,a,n,o){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Ia,column:_i,length:n,return:"",siblings:o}}function Qw(){return ie}function Jw(){return ie=ze>0?ni(Oi,--ze):0,_i--,ie===10&&(_i=1,Ia--),ie}function je(){return ie=ze<sg?ni(Oi,ze++):0,_i++,ie===10&&(_i=1,Ia++),ie}function _r(){return ni(Oi,ze)}function Zs(){return ze}function Da(e,t){return vi(Oi,e,t)}function us(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function tS(e){return Ia=_i=1,sg=tr(Oi=e),ze=0,[]}function eS(e){return Oi="",e}function Io(e){return rg(Da(ze-1,Cn(e===91?e+2:e===40?e+1:e)))}function rS(e){for(;(ie=_r())&&ie<33;)je();return us(e)>2||us(ie)>3?"":" "}function iS(e,t){for(;--t&&je()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return Da(e,Zs()+(t<6&&_r()==32&&je()==32))}function Cn(e){for(;je();)switch(ie){case e:return ze;case 34:case 39:e!==34&&e!==39&&Cn(ie);break;case 40:e===41&&Cn(e);break;case 92:je();break}return ze}function sS(e,t){for(;je()&&e+ie!==57;)if(e+ie===84&&_r()===47)break;return"/*"+Da(t,ze-1)+"*"+ns(e===47?e:je())}function aS(e){for(;!us(_r());)je();return Da(e,ze)}function oS(e){return eS(Ks("",null,null,null,[""],e=tS(e),0,[0],e))}function Ks(e,t,r,i,s,a,n,o,c){for(var h=0,l=0,u=n,f=0,d=0,m=0,y=1,x=1,C=1,b=0,k=0,T="",v=s,L=a,A=i,F=T;x;)switch(m=k,k=je()){case 40:m!=108&&ni(F,u-1)==58?(b++,F+="("):F+=Io(k);break;case 41:b--,F+=")";break;case 34:case 39:case 91:F+=Io(k);break;case 9:case 10:case 13:case 32:if(b>0){F+=ns(k);break}F+=rS(m);break;case 92:F+=iS(Zs()-1,7);continue;case 47:switch(_r()){case 42:case 47:Rs(nS(sS(je(),Zs()),t,r,c),c),(us(m||1)==5||us(_r()||1)==5)&&tr(F)&&vi(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:o[h++]=tr(F)*C;case 125*y:case 59:case 0:if(b>0&&k){F+=ns(k);break}switch(k){case 0:case 125:x=0;case 59+l:C==-1&&(F=yn(F,/\f/g,"")),d>0&&(tr(F)-u||y===0)&&Rs(d>32?Vc(F+";",i,r,u-1,c):Vc(yn(F," ","")+";",i,r,u-2,c),c);break;case 59:F+=";";default:if(Rs(A=Xc(F,t,r,h,l,s,o,T,v=[],L=[],u,a),a),k===123)if(l===0)Ks(F,t,A,A,v,a,u,o,L);else{switch(f){case 99:if(ni(F,3)===110)break;case 108:if(ni(F,2)===97)break;default:l=0;case 100:case 109:case 115:}l?Ks(e,A,A,i&&Rs(Xc(e,A,A,0,0,s,o,T,s,v=[],u,L),L),s,L,u,o,i?v:L):Ks(F,A,A,A,[""],L,0,o,L)}}h=l=d=0,y=C=1,T=F="",u=n;break;case 58:u=1+tr(F),d=m;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&Jw()==125)continue}switch(F+=ns(k),k*y){case 38:C=l>0?1:(F+="\f",-1);break;case 44:if(b>0)break;o[h++]=(tr(F)-1)*C,C=1;break;case 64:_r()===45&&(F+=Io(je())),f=_r(),l=u=tr(T=F+=aS(Zs())),k++;break;case 45:m===45&&tr(F)==2&&(y=0)}}return a}function Xc(e,t,r,i,s,a,n,o,c,h,l,u){for(var f=s-1,d=s===0?a:[""],m=ig(d),y=0,x=0,C=0;y<i;++y)for(var b=0,k=vi(e,f+1,f=Kw(x=n[y])),T=e;b<m;++b)(T=rg(x>0?d[b]+" "+k:yn(k,/&\f/g,d[b])))&&(c[C++]=T);return _l(e,t,r,s===0?Jp:o,c,h,l,u)}function nS(e,t,r,i){return _l(e,t,r,vl,ns(Qw()),vi(e,2,-2),0,i)}function Vc(e,t,r,i,s){return _l(e,t,r,tg,vi(e,0,i),vi(e,i+1,-1),i,s)}function xn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function lS(e,t,r,i){switch(e.type){case eg:if(e.children.length)break;case jw:case Vw:case tg:return e.return=e.return||e.value;case vl:return"";case mn:return e.return=e.value+"{"+xn(e.children,i)+"}";case Jp:if(!tr(e.value=e.props.join(",")))return""}return tr(r=xn(e.children,i))?e.return=e.value+"{"+r+"}":""}function hS(e){var t=ig(e);return function(r,i,s,a){for(var n="",o=0;o<t;o++)n+=e[o](r,i,s,a)||"";return n}}var ag="c4",cS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),uS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./c4Diagram-YGBWAQC7-i5_GqhJa.js");return{diagram:t}},__vite__mapDeps([10,11,3,4]));return{id:ag,diagram:e}},"loader"),dS={id:ag,detector:cS,loader:uS},fS=dS,og="flowchart-v2",pS=p(e=>/^\s*(graph|flowchart)/.test(e),"detector"),gS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-KWPJA3E3-B6DYlbkV.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]));return{id:og,diagram:e}},"loader"),mS={id:og,detector:pS,loader:gS},yS=mS,ng="agentflow",CS=p(e=>/^\s*agentflow-beta\b/.test(e),"detector"),xS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-22UHCM2B-B7iv_V2D.js");return{diagram:t}},__vite__mapDeps([17,13,14,15,11,16,3,4]));return{id:ng,diagram:e}},"loader"),bS={id:ng,detector:CS,loader:xS},kS=bS,lg="swimlane",wS=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),SS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-TC7HE7FX-kzTmK2BP.js");return{diagram:t}},__vite__mapDeps([18,12,13,14,15,11,16,3,4]));return{id:lg,diagram:e}},"loader"),TS={id:lg,detector:wS,loader:SS},BS=TS,hg="er",vS=p(e=>/^\s*erDiagram/.test(e),"detector"),_S=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./erDiagram-OPXOYQCR-iWrUegxy.js");return{diagram:t}},__vite__mapDeps([19,14,15,16,3,4]));return{id:hg,diagram:e}},"loader"),LS={id:hg,detector:vS,loader:_S},FS=LS,cg="gitGraph",AS=p(e=>/^\s*gitGraph/.test(e),"detector"),ES=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-X574FWY7-DguFgcbW.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,3,4]));return{id:cg,diagram:e}},"loader"),MS={id:cg,detector:AS,loader:ES},OS=MS,ug="gantt",$S=p(e=>/^\s*gantt/.test(e),"detector"),IS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ganttDiagram-FUAMR5RP-D7dSWZcC.js");return{diagram:t}},__vite__mapDeps([24,3,4]));return{id:ug,diagram:e}},"loader"),DS={id:ug,detector:$S,loader:IS},RS=DS,dg="info",PS=p(e=>/^\s*info/.test(e),"detector"),qS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./infoDiagram-VRGFBTTK-CuiuO3uo.js");return{diagram:t}},__vite__mapDeps([25,23,3,4]));return{id:dg,diagram:e}},"loader"),NS={id:dg,detector:PS,loader:qS},fg="pie",WS=p(e=>/^\s*pie/.test(e),"detector"),zS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./pieDiagram-5QR66LMP-BooBSBug.js");return{diagram:t}},__vite__mapDeps([26,22,23,3,4,27]));return{id:fg,diagram:e}},"loader"),HS={id:fg,detector:WS,loader:zS},pg="quadrantChart",YS=p(e=>/^\s*quadrantChart/.test(e),"detector"),US=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-O4NWA36T-CkXC6VCh.js");return{diagram:t}},__vite__mapDeps([28,3,4]));return{id:pg,diagram:e}},"loader"),GS={id:pg,detector:YS,loader:US},jS=GS,gg="xychart",XS=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),VS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./xychartDiagram-PMCCYNJV-C51PiF4p.js");return{diagram:t}},__vite__mapDeps([29,3,4]));return{id:gg,diagram:e}},"loader"),ZS={id:gg,detector:XS,loader:VS},KS=ZS,mg="requirement",QS=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),JS=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./requirementDiagram-PLB6GJNP-PWpD4zpQ.js");return{diagram:t}},__vite__mapDeps([30,14,15,3,4]));return{id:mg,diagram:e}},"loader"),tT={id:mg,detector:QS,loader:JS},eT=tT,yg="sequence",rT=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),iT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-PO4LG4MO-DA673J_w.js");return{diagram:t}},__vite__mapDeps([31,21,11,3,4]));return{id:yg,diagram:e}},"loader"),sT={id:yg,detector:rT,loader:iT},aT=sT,Cg="classDiagram",oT=p(e=>/^\s*classDiagram/.test(e),"detector"),nT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-NBCMYWYE-BGXszxjn.js");return{diagram:t}},__vite__mapDeps([32,13,14,15,11,3,4]));return{id:Cg,diagram:e}},"loader"),lT={id:Cg,detector:oT,loader:nT},hT=lT,xg="stateDiagram",cT=p(e=>/^\s*stateDiagram/.test(e),"detector"),uT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-GCMORJYK-D7O0UyHr.js");return{diagram:t}},__vite__mapDeps([33,14,15,11,3,4]));return{id:xg,diagram:e}},"loader"),dT={id:xg,detector:cT,loader:uT},fT=dT,bg="journey",pT=p(e=>/^\s*journey/.test(e),"detector"),gT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./journeyDiagram-ZHPQQLJL-Bd1YE2gP.js");return{diagram:t}},__vite__mapDeps([34,13,11,27,3,4]));return{id:bg,diagram:e}},"loader"),mT={id:bg,detector:pT,loader:gT},yT=mT,CT=p((e,t,r)=>{J.debug(`rendering svg for syntax error
|
|
303
|
+
`);const i=Nb(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Uu(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"),kg={draw:CT},xT=kg,bT={db:{},renderer:kg,parser:{parse:p(()=>{},"parse")}},kT=bT,wg="flowchart-elk",wT=p((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),ST=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-KWPJA3E3-B6DYlbkV.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,15,11,16]));return{id:wg,diagram:e}},"loader"),TT={id:wg,detector:wT,loader:ST},BT=TT,Sg="timeline",vT=p(e=>/^\s*timeline/.test(e),"detector"),_T=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./timeline-definition-EJHVYXUP-6GIO5p-k.js");return{diagram:t}},__vite__mapDeps([35,27,3,4]));return{id:Sg,diagram:e}},"loader"),LT={id:Sg,detector:vT,loader:_T},FT=LT,Tg="mindmap",AT=p(e=>/^\s*mindmap/.test(e),"detector"),ET=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./mindmap-definition-NLK3R4M7-BlticnKl.js");return{diagram:t}},__vite__mapDeps([36,14,15,3,4]));return{id:Tg,diagram:e}},"loader"),MT={id:Tg,detector:AT,loader:ET},OT=MT,Bg="kanban",$T=p(e=>/^\s*kanban/.test(e),"detector"),IT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./kanban-definition-PNTS6WVX-BlQzv_X1.js");return{diagram:t}},__vite__mapDeps([37,13,3,4]));return{id:Bg,diagram:e}},"loader"),DT={id:Bg,detector:$T,loader:IT},RT=DT,vg="sankey",PT=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),qT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-IPEJSGJF-5Qm39Vfz.js");return{diagram:t}},__vite__mapDeps([38,3,4]));return{id:vg,diagram:e}},"loader"),NT={id:vg,detector:PT,loader:qT},WT=NT,_g="packet",zT=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),HT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-MLGK6HIB-BbwGHK4g.js");return{diagram:t}},__vite__mapDeps([39,22,23,3,4]));return{id:_g,diagram:e}},"loader"),YT={id:_g,detector:zT,loader:HT},Lg="radar",UT=p(e=>/^\s*radar-beta/.test(e),"detector"),GT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-MPIPVDR6-BbSSZfM3.js");return{diagram:t}},__vite__mapDeps([40,22,23,3,4]));return{id:Lg,diagram:e}},"loader"),jT={id:Lg,detector:UT,loader:GT},Fg="block",XT=p(e=>/^\s*block(-beta)?/.test(e),"detector"),VT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./blockDiagram-BEXU5L5S-TCFoK_k-.js");return{diagram:t}},__vite__mapDeps([41,13,3,4,5,16]));return{id:Fg,diagram:e}},"loader"),ZT={id:Fg,detector:XT,loader:VT},KT=ZT,Ag="treeView",QT=p(e=>/^\s*treeView-beta/.test(e),"detector"),JT=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-CDSNMT55-DccMMNJ-.js");return{diagram:t}},__vite__mapDeps([42,21,22,23,3,4]));return{id:Ag,diagram:e}},"loader"),tB={id:Ag,detector:QT,loader:JT},eB=tB,Eg="architecture",rB=p(e=>/^\s*architecture/.test(e),"detector"),iB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./architectureDiagram-NJMV4G6O-DFTRvl66.js");return{diagram:t}},__vite__mapDeps([43,22,23,3,4,9]));return{id:Eg,diagram:e}},"loader"),sB={id:Eg,detector:rB,loader:iB},aB=sB,Mg="eventmodeling",oB=p(e=>/^\s*eventmodeling/.test(e),"detector"),nB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-ATOU4E4O-NJ7EB5Qg.js");return{diagram:t}},__vite__mapDeps([44,22,23,3,4]));return{id:Mg,diagram:e}},"loader"),lB={id:Mg,detector:oB,loader:nB},hB=lB,Og="ishikawa",cB=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-OU5B5YK6-wBS1_40m.js");return{diagram:t}},__vite__mapDeps([45,3,4]));return{id:Og,diagram:e}},"loader"),dB={id:Og,detector:cB,loader:uB},$g="venn",fB=p(e=>/^\s*venn-beta/.test(e),"detector"),pB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./vennDiagram-UO4OBE2U-PbtBvPRE.js");return{diagram:t}},__vite__mapDeps([46,3,4]));return{id:$g,diagram:e}},"loader"),gB={id:$g,detector:fB,loader:pB},mB=gB,Ig="treemap",yB=p(e=>/^\s*treemap/.test(e),"detector"),CB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-3UASUU5V-BMvi7gSi.js");return{diagram:t}},__vite__mapDeps([47,22,15,23,3,4]));return{id:Ig,diagram:e}},"loader"),xB={id:Ig,detector:yB,loader:CB},Dg="usecase",bB=p(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),kB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./usecaseDiagram-POWQR4AR-BAGHDBzZ.js");return{diagram:t}},__vite__mapDeps([48,14,15,3,4]));return{id:Dg,diagram:e}},"loader"),wB={id:Dg,detector:bB,loader:kB},Rg="wardley",SB=p(e=>/^\s*wardley-beta/i.test(e),"detector"),TB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VNRHLVJA-9scbtDvX.js");return{diagram:t}},__vite__mapDeps([49,22,23,3,4]));return{id:Rg,diagram:e}},"loader"),BB={id:Rg,detector:SB,loader:TB},vB=BB,Pg="cynefin",_B=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./cynefinDiagram-VND7K2PF-DuPlljFS.js");return{diagram:t}},__vite__mapDeps([50,22,23,3,4]));return{id:Pg,diagram:e}},"loader"),FB={id:Pg,detector:_B,loader:LB},qg="railroad",AB=p(e=>/^\s*railroad-beta/i.test(e),"detector"),EB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./railroadDiagram-XR7U4H2S-BphzYiW-.js");return{diagram:t}},__vite__mapDeps([51,52,22,23,3,4]));return{id:qg,diagram:e}},"loader"),MB={id:qg,detector:AB,loader:EB},Ng="railroadEbnf",OB=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),$B=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ebnfDiagram-ZINNZB2B-BBfPNM85.js");return{diagram:t}},__vite__mapDeps([53,52,22,23,3,4]));return{id:Ng,diagram:e}},"loader"),IB={id:Ng,detector:OB,loader:$B},Wg="railroadAbnf",DB=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),RB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./abnfDiagram-O67JEVCF-B4qWcqra.js");return{diagram:t}},__vite__mapDeps([54,52,22,23,3,4]));return{id:Wg,diagram:e}},"loader"),PB={id:Wg,detector:DB,loader:RB},zg="railroadPeg",qB=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),NB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./pegDiagram-GJSIUBJH-BbXsP47B.js");return{diagram:t}},__vite__mapDeps([55,52,22,23,3,4]));return{id:zg,diagram:e}},"loader"),WB={id:zg,detector:qB,loader:NB},Zc=!1,Ra=p(()=>{Zc||(Zc=!0,aa("error",kT,e=>e.toLowerCase().trim()==="error"),aa("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{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:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),zo(BT,OT,aB),zo(kS,fS,RT,hT,FS,RS,NS,HS,eT,aT,BS,yS,FT,OS,fT,yT,jS,WT,YT,KS,KT,hB,eB,jT,dB,xB,MB,IB,PB,WB,mB,vB,FB,wB))},"addDiagrams"),zB=p(async()=>{J.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Hr).map(async([r,{detector:i,loader:s}])=>{if(s)try{jo(r)}catch{try{const{diagram:a,id:n}=await s();aa(n,a,i)}catch(a){throw J.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Hr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){J.error(`Failed to load ${t.length} external diagrams`);for(const r of t)J.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),HB="graphics-document document";function Hg(e,t){e.attr("role",HB),t!==""&&e.attr("aria-roledescription",t)}p(Hg,"setA11yDiagramInfo");function Yg(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)}}}p(Yg,"addSVGa11yTitleDescription");var zr,ba=(zr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var f,d,m;const i=typeof t=="string"?{cleaned:t}:t,s=Qt(),a=Sa(i.cleaned,s);try{jo(a)}catch{const y=My(a);if(!y)throw new Mu(`Diagram ${a} not found.`);const{id:x,diagram:C}=await y();aa(x,C)}const{db:n,parser:o,renderer:c,init:h}=jo(a);o.parser&&(o.parser.yy=n),(f=n.clear)==null||f.call(n),h==null||h(s),r.title&&((d=n.setDiagramTitle)==null||d.call(n,r.title));let l=i.cleaned;if(n.preserveCommentsWhenParsing&&i.withComments){const y=s.maxTextSize??vn.maxTextSize;i.withComments.length>y?J.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${y}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):l=i.withComments}const u=Wk(l)+`
|
|
304
|
+
`;return i.frontmatterLineOffset&&((m=n.setFrontmatterLineOffset)==null||m.call(n,i.frontmatterLineOffset)),await o.parse(u),new zr(a,u,n,o,c)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(zr,"Diagram"),zr),Kc=[],YB=p(()=>{Kc.forEach(e=>{e()}),Kc=[]},"attachFunctions"),UB=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ug(e){const t=e.match(Eu);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
305
|
+
`).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
|
|
306
|
+
`):t[2];let s=Yb(i,{schema:Hb})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}p(Ug,"extractFrontMatter");var GB=p(e=>e.replace(/\r\n?/g,`
|
|
307
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),jB=p(e=>{const{text:t,metadata:r}=Ug(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),XB=p(e=>{const t=Ge.detectInit(e)??{},r=Ge.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:Lk(e),directive:t}},"processDirectives");function Ll(e){const t=e,r=GB(e),i=jB(r),s=XB(i.text),a=ol(i.config,s.directive),n=s.text,o=UB(n),c=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:o,withComments:n,frontmatterLineOffset:c},title:i.title,config:a}}p(Ll,"preprocessDiagram");function Gg(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Gg,"toBase64");var VB=5e4,ZB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",KB="sandbox",QB="loose",JB="http://www.w3.org/2000/svg",tv="http://www.w3.org/1999/xlink",ev="http://www.w3.org/1999/xhtml",rv="100%",iv="100%",sv="border:0;margin:0;",av="margin:0",ov="allow-top-navigation-by-user-activation allow-popups",nv='The "iframe" tag is not supported by your browser.',lv=["foreignobject"],hv=["dominant-baseline"];function Fl(e){const t=Ll(e);ia();let r;try{r=Sa(t.code.cleaned,Qt())}catch{r=void 0}return _n(r),pC(t.config??{}),t}p(Fl,"processAndSetConfigs");async function jg(e,t){Ra();try{const{code:r,config:i}=Fl(e);return{diagramType:(await ba.fromText(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}finally{_n(void 0)}}p(jg,"parse");var Qc=p((e,t,r=[])=>{const i=Du(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),cv=p((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 o=ce(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{ec(c.styles)||o.forEach(h=>{r.insertRule(Qc(c.id,h,c.styles),r.cssRules.length)}),ec(c.textStyles)||r.insertRule(Qc(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(h=>h.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=Go(s)+`
|
|
308
|
+
`}else i+=`${e.themeCSS}
|
|
309
|
+
`;return i+Go(r)},"createCssStyles"),uv=p((e,t)=>xn(oS(`${e}{${t}}`),hS([p(function(i,s,a,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===mn)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[Gw,Xw,eg,Zw,"@container","@starting-style"],mn].includes(i.type)||(J.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=vl))},"addNamespace"),lS])),"compileCSS"),dv=p((e,t,r,i)=>{const s=cv(e,r),a=IC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return uv(i,a)},"createUserStyles"),fv=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ar(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),pv=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":iv,i=Gg(`<body style="${av}">${e}</body>`);return`<iframe style="width:${rv};height:${r};${sv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${ov}">
|
|
310
|
+
${nv}
|
|
311
|
+
</iframe>`},"putIntoIFrame"),Jc=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",JB);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function bn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(bn,"sandboxedIframe");var gv=p((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),mv=p(async function(e,t,r){var E,M,_,N,O,G;Ra();const i=Fl(t);let s=i.code;t=s.cleaned;const a=Qt();J.debug(a),t.length>((a==null?void 0:a.maxTextSize)??VB)&&(t=ZB,s={raw:t,cleaned:t});const n=`#${e}`,o="i"+e,c="#"+o,h="d"+e,l="#"+h,u=p(()=>{const lt=Dt(d?c:l).node();lt&&"remove"in lt&<.remove()},"removeTempElements");let f=Dt(document.body);const d=a.securityLevel===KB,m=a.securityLevel===QB,y=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const j=bn(Dt(r),o);f=Dt(j.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Dt(r);Jc(f,e,h,`font-family: ${y}`,tv)}else{if(gv(document,e,h,o),d){const j=bn(Dt(document.body),o);f=Dt(j.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Dt("body");Jc(f,e,h)}let x,C;try{x=await ba.fromText(s,{title:i.title})}catch(j){if(a.suppressErrorRendering)throw u(),j;x=await ba.fromText("error"),C=j}const b=f.select(l).node(),k=x.type,T=b.firstChild,v=T.firstChild,L=(M=(E=x.renderer).getClasses)==null?void 0:M.call(E,t,x),A=dv(a,k,L,n),F=document.createElement("style");F.innerHTML=A,T.insertBefore(F,v);try{await x.renderer.draw(t,e,"12.0.0",x)}catch(j){throw a.suppressErrorRendering?u():xT.draw(t,e,"12.0.0"),j}const Y=f.select(`${l} svg`),D=(N=(_=x.db).getAccTitle)==null?void 0:N.call(_),q=(G=(O=x.db).getAccDescription)==null?void 0:G.call(O);Vg(k,Y,D,q);const z=p(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",ev);let j=f.select(l).node().innerHTML;if(J.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),j=fv(j,d,ar(a.arrowMarkerAbsolute)),d){const lt=f.select(l+" svg").node();j=pv(j,lt)}else m||(j=Si.sanitize(j,{ADD_TAGS:lv,ADD_ATTR:hv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return YB(),j},"serializeSvg")();if(C)throw C;return u(),{diagramType:k,svg:z,bindFunctions:x.db.bindFunctions}},"renderDiagram"),yv=p(async function(e,t,r){try{return await mv(e,t,r)}finally{_n(void 0)}},"render");function Xg(e={}){var s;const t=se({},e);t!=null&&t.fontFamily&&!((s=t.themeVariables)!=null&&s.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),dC(t);const r=Fr.theme;t!=null&&t.theme&&Object.hasOwn(yr,t.theme)?t.themeVariables=yr[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=yr[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?uC(t):Ru();Bn(i.logLevel),Ra()}p(Xg,"initialize");var Cv=p((e,t={})=>{const{code:r}=Ll(e);return ba.fromText(r,t)},"getDiagramFromText");function Vg(e,t,r,i){Hg(t,e),Yg(t,r,i,t.attr("id"))}p(Vg,"addA11yInfo");var jr=Object.freeze({render:yv,parse:jg,getDiagramFromText:Cv,initialize:Xg,getConfig:Qt,setConfig:Pu,getSiteConfig:Ru,updateSiteConfig:fC,reset:p(()=>{ia()},"reset"),globalReset:p(()=>{ia(Fr)},"globalReset"),defaultConfig:Fr});Bn(Qt().logLevel);ia(Qt());var xv=p((e,t,r)=>{J.warn(e),al(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"),Zg=p(async function(e={querySelector:".mermaid"}){try{await bv(e)}catch(t){if(al(t)&&J.error(t.str),$e.parseError&&$e.parseError(t),!e.suppressErrors)throw J.error("Use the suppressErrors option to suppress these errors"),t}},"run"),bv=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=jr.getConfig();J.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");J.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(J.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),jr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Ge.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const c of Array.from(s)){if(J.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=c.innerHTML,n=Hd(Ge.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=Ge.detectInit(n);l&&J.debug("Detected early reinit: ",l);try{const{svg:u,bindFunctions:f}=await tm(h,n,c);c.innerHTML=u,e&&await e(h),f&&f(c)}catch(u){xv(u,o,$e.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Kg=p(function(e){jr.initialize(e)},"initialize"),kv=p(async function(e,t,r){J.warn("mermaid.init is deprecated. Please use run instead."),e&&Kg(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Zg(i)},"init"),wv=p(async(e,{lazyLoad:t=!0}={})=>{Ra(),zo(...e),t===!1&&await zB()},"registerExternalDiagrams"),Qg=p(function(){if($e.startOnLoad){const{startOnLoad:e}=jr.getConfig();e&&$e.run().catch(t=>J.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Qg,!1);var Sv=p(function(e){$e.parseError=e},"setParseErrorHandler"),ka=[],Do=!1,Jg=p(async()=>{if(!Do){for(Do=!0;ka.length>0;){const e=ka.shift();if(e)try{await e()}catch(t){J.error("Error executing queue",t)}}Do=!1}},"executeQueue"),Tv=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,n)=>{jr.parse(e,t).then(o=>{a(o),r(o)},o=>{var c;J.error("Error parsing",o),(c=$e.parseError)==null||c.call($e,o),n(o),i(o)})}),"performCall");ka.push(s),Jg().catch(i)}),"parse"),tm=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((n,o)=>{jr.render(e,t,r).then(c=>{n(c),i(c)},c=>{var h;J.error("Error parsing",c),(h=$e.parseError)==null||h.call($e,c),o(c),s(c)})}),"performCall");ka.push(a),Jg().catch(s)}),"render"),Bv=p(()=>Object.keys(Hr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),$e={startOnLoad:!0,mermaidAPI:jr,parse:Tv,render:tm,init:kv,run:Zg,registerExternalDiagrams:wv,registerLayoutLoaders:Qp,initialize:Kg,parseError:void 0,contentLoaded:Qg,setParseErrorHandler:Sv,detectType:Sa,registerIconPacks:mk,getRegisteredDiagramsMetadata:Bv},vv=$e;/*! Check if previously processed *//*!
|
|
312
|
+
* Wait for document loaded before starting the execution
|
|
313
|
+
*/const p_=Object.freeze(Object.defineProperty({__proto__:null,default:vv},Symbol.toStringTag,{value:"Module"}));export{gh as $,DC as A,$v as B,I1 as C,i_ as D,yl as E,s_ as F,Lr as G,M1 as H,sf as I,Hb as J,Pm as K,Qt as L,YC as M,ol as N,vn as O,Ok as P,Nb as Q,Py as R,E1 as S,xk as T,ls as U,Mv as V,La as W,TC as X,Yu as Y,Tk as Z,p as _,PC as a,Mk as a0,ds as a1,Ae as a2,H as a3,U as a4,MC as a5,Gu as a6,rw as a7,Gp as a8,n_ as a9,Yc as aA,De as aB,gk as aC,zm as aD,pt as aE,Cd as aF,gt as aG,a_ as aH,Gd as aI,p_ as aJ,It as aa,rr as ab,Ei as ac,mk as ad,sl as ae,dt as af,ye as ag,Ww as ah,o_ as ai,c_ as aj,h_ as ak,gw as al,u_ as am,xa as an,lw as ao,xs as ap,de as aq,Tt as ar,Ns as as,Ub as at,hw as au,Ld as av,He as aw,vu as ax,Ev as ay,l_ as az,RC as b,Rt as c,Uu as d,se as e,br as f,NC as g,Up as h,ht as i,We as j,Dt as k,J as l,fs as m,Ad as n,Ov as o,f_ as p,WC as q,d_ as r,qC as s,zC as t,Ge as u,Yb as v,Dk as w,H2 as x,jv as y,Si as z};
|