gitnexus 1.6.11-rc.8 → 1.6.11
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 +95 -26
- package/dist/_shared/graph/types.d.ts +81 -2
- package/dist/_shared/graph/types.d.ts.map +1 -1
- package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -1
- package/dist/_shared/integrations/circuit-breaker.js.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -1
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -1
- package/dist/_shared/language-detection.d.ts.map +1 -1
- package/dist/_shared/language-detection.js +2 -0
- package/dist/_shared/language-detection.js.map +1 -1
- package/dist/_shared/languages.d.ts +2 -1
- package/dist/_shared/languages.d.ts.map +1 -1
- package/dist/_shared/languages.js +1 -0
- package/dist/_shared/languages.js.map +1 -1
- package/dist/_shared/lbug/schema-constants.d.ts +2 -2
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -1
- package/dist/_shared/lbug/schema-constants.js +4 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -1
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/finalize-algorithm.js +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.d.ts +3 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/language-classification.js +4 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -1
- package/dist/_shared/scope-resolution/reference-site.d.ts +10 -0
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/registries/field-registry.js.map +1 -1
- package/dist/_shared/scope-resolution/registries/method-registry.js.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -1
- package/dist/_shared/scope-resolution/scope-tree.js.map +1 -1
- package/dist/_shared/scope-resolution/types.d.ts +15 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
- package/dist/cli/ai-context.d.ts +4 -0
- package/dist/cli/ai-context.js +90 -14
- package/dist/cli/analyze-config.js +14 -0
- package/dist/cli/analyze-options.d.ts +14 -0
- package/dist/cli/analyze-watch.d.ts +20 -0
- package/dist/cli/analyze-watch.js +434 -0
- package/dist/cli/analyze.js +27 -9
- package/dist/cli/auto-sync.d.ts +1 -0
- package/dist/cli/auto-sync.js +107 -0
- package/dist/cli/command-banner.d.ts +15 -0
- package/dist/cli/command-banner.js +42 -0
- package/dist/cli/detect-changes-format.js +21 -0
- package/dist/cli/doctor.d.ts +7 -0
- package/dist/cli/doctor.js +14 -0
- package/dist/cli/group.js +7 -1
- package/dist/cli/help-i18n.js +4 -0
- package/dist/cli/i18n/en.d.ts +18 -3
- package/dist/cli/i18n/en.js +18 -3
- package/dist/cli/i18n/resources.d.ts +33 -3
- package/dist/cli/i18n/zh-CN.d.ts +15 -0
- package/dist/cli/i18n/zh-CN.js +18 -3
- package/dist/cli/index.js +34 -7
- package/dist/cli/mcp.d.ts +15 -0
- package/dist/cli/mcp.js +44 -0
- package/dist/cli/optional-grammars.d.ts +3 -2
- package/dist/cli/optional-grammars.js +19 -3
- package/dist/cli/setup.js +41 -15
- package/dist/cli/update-notice.d.ts +34 -0
- package/dist/cli/update-notice.js +91 -0
- package/dist/cli/update.d.ts +21 -0
- package/dist/cli/update.js +93 -0
- package/dist/cli/watch.d.ts +1 -20
- package/dist/cli/watch.js +5 -371
- package/dist/core/analysis-feature-registry.d.ts +2 -0
- package/dist/core/analysis-feature-registry.js +15 -0
- package/dist/core/analyzer-identity.js +21 -3
- package/dist/core/auto-sync/analysis-worker-launch.d.ts +30 -0
- package/dist/core/auto-sync/analysis-worker-launch.js +166 -0
- package/dist/core/auto-sync/config.d.ts +33 -0
- package/dist/core/auto-sync/config.js +320 -0
- package/dist/core/auto-sync/index.d.ts +6 -0
- package/dist/core/auto-sync/index.js +6 -0
- package/dist/core/auto-sync/path-security.d.ts +9 -0
- package/dist/core/auto-sync/path-security.js +251 -0
- package/dist/core/auto-sync/repo.d.ts +1 -0
- package/dist/core/auto-sync/repo.js +6 -0
- package/dist/core/auto-sync/runner.d.ts +44 -0
- package/dist/core/auto-sync/runner.js +428 -0
- package/dist/core/auto-sync/starter.d.ts +50 -0
- package/dist/core/auto-sync/starter.js +497 -0
- package/dist/core/auto-sync/state.d.ts +37 -0
- package/dist/core/auto-sync/state.js +119 -0
- package/dist/core/group/config-parser.js +8 -1
- package/dist/core/group/cross-impact.d.ts +3 -0
- package/dist/core/group/cross-impact.js +36 -4
- package/dist/core/group/extractors/http-patterns/java.js +22 -8
- package/dist/core/group/extractors/http-patterns/kotlin.js +86 -31
- package/dist/core/group/extractors/http-patterns/node.js +145 -8
- package/dist/core/group/extractors/http-patterns/python.js +11 -7
- package/dist/core/group/extractors/http-route-extractor.js +63 -17
- package/dist/core/group/extractors/java-workspace-extractor.js +244 -31
- package/dist/core/group/group-lock.js +5 -6
- package/dist/core/group/normalization.d.ts +38 -1
- package/dist/core/group/normalization.js +59 -3
- package/dist/core/group/service.d.ts +11 -0
- package/dist/core/group/service.js +13 -1
- package/dist/core/group/storage.js +2 -2
- package/dist/core/group/sync.d.ts +24 -1
- package/dist/core/group/sync.js +46 -8
- package/dist/core/group/types.d.ts +13 -0
- package/dist/core/incremental/derived-writeback.d.ts +36 -0
- package/dist/core/incremental/derived-writeback.js +68 -0
- package/dist/core/incremental/spring-config-drift.d.ts +12 -0
- package/dist/core/incremental/spring-config-drift.js +46 -0
- package/dist/core/incremental/subgraph-extract.d.ts +7 -4
- package/dist/core/incremental/subgraph-extract.js +30 -5
- package/dist/core/ingestion/asyncapi/document.d.ts +226 -0
- package/dist/core/ingestion/asyncapi/document.js +758 -0
- package/dist/core/ingestion/asyncapi/protocol.d.ts +79 -0
- package/dist/core/ingestion/asyncapi/protocol.js +203 -0
- package/dist/core/ingestion/call-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/zig.js +4 -0
- package/dist/core/ingestion/call-extractors/zig-static-gating.d.ts +100 -0
- package/dist/core/ingestion/call-extractors/zig-static-gating.js +319 -0
- package/dist/core/ingestion/call-processor.js +3 -1
- package/dist/core/ingestion/class-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/zig.js +32 -0
- package/dist/core/ingestion/class-extractors/generic.js +4 -1
- package/dist/core/ingestion/class-types.d.ts +6 -2
- package/dist/core/ingestion/destination-key.d.ts +59 -0
- package/dist/core/ingestion/destination-key.js +61 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +6 -2
- package/dist/core/ingestion/entry-point-scoring.js +8 -44
- package/dist/core/ingestion/export-detection.d.ts +37 -0
- package/dist/core/ingestion/export-detection.js +60 -0
- package/dist/core/ingestion/field-extractors/configs/zig.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/zig.js +49 -0
- package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/generic.js +12 -1
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.d.ts +26 -0
- package/dist/core/ingestion/frameworks/spring/actuator-runtime.js +843 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.d.ts +5 -0
- package/dist/core/ingestion/frameworks/spring/analysis-features.js +9 -0
- package/dist/core/ingestion/frameworks/spring/annotation-arguments.js +8 -1
- package/dist/core/ingestion/frameworks/spring/argument-facts.d.ts +80 -0
- package/dist/core/ingestion/frameworks/spring/argument-facts.js +85 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.d.ts +1 -0
- package/dist/core/ingestion/frameworks/spring/config-bindings.js +2 -1
- package/dist/core/ingestion/frameworks/spring/destinations.d.ts +539 -0
- package/dist/core/ingestion/frameworks/spring/destinations.js +840 -0
- package/dist/core/ingestion/frameworks/spring/dynamic-lookups.d.ts +22 -0
- package/dist/core/ingestion/frameworks/spring/dynamic-lookups.js +124 -0
- package/dist/core/ingestion/frameworks/spring/message-producers.d.ts +78 -0
- package/dist/core/ingestion/frameworks/spring/message-producers.js +90 -0
- package/dist/core/ingestion/frameworks/spring/non-http-handlers.d.ts +29 -0
- package/dist/core/ingestion/frameworks/spring/vendor-prefixes.d.ts +7 -0
- package/dist/core/ingestion/frameworks/spring/vendor-prefixes.js +22 -0
- package/dist/core/ingestion/import-resolvers/configs/zig.d.ts +13 -0
- package/dist/core/ingestion/import-resolvers/configs/zig.js +26 -0
- package/dist/core/ingestion/import-resolvers/zig.d.ts +34 -0
- package/dist/core/ingestion/import-resolvers/zig.js +193 -0
- package/dist/core/ingestion/language-config.d.ts +177 -0
- package/dist/core/ingestion/language-config.js +719 -0
- package/dist/core/ingestion/language-provider.d.ts +178 -1
- package/dist/core/ingestion/language-provider.js +22 -0
- package/dist/core/ingestion/languages/csharp/razor-view-components.d.ts +62 -0
- package/dist/core/ingestion/languages/csharp/razor-view-components.js +954 -0
- package/dist/core/ingestion/languages/csharp/resolution-config.d.ts +3 -0
- package/dist/core/ingestion/languages/csharp/resolution-config.js +6 -1
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -0
- package/dist/core/ingestion/languages/index.d.ts +1 -0
- package/dist/core/ingestion/languages/index.js +2 -0
- package/dist/core/ingestion/languages/java/analysis-features.d.ts +1 -1
- package/dist/core/ingestion/languages/java/analysis-features.js +14 -6
- package/dist/core/ingestion/languages/java/capture-side-channel.d.ts +8 -0
- package/dist/core/ingestion/languages/java/capture-side-channel.js +34 -0
- package/dist/core/ingestion/languages/java/captures.js +22 -1
- package/dist/core/ingestion/languages/java/lombok-synthesizer.d.ts +42 -0
- package/dist/core/ingestion/languages/java/lombok-synthesizer.js +439 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.d.ts +2 -0
- package/dist/core/ingestion/languages/java/spring-actuator.js +62 -0
- package/dist/core/ingestion/languages/java/spring-di.d.ts +17 -1
- package/dist/core/ingestion/languages/java/spring-di.js +44 -2
- package/dist/core/ingestion/languages/java/spring-dynamic-lookup.d.ts +8 -0
- package/dist/core/ingestion/languages/java/spring-dynamic-lookup.js +62 -0
- package/dist/core/ingestion/languages/java/spring-message-producers.d.ts +20 -0
- package/dist/core/ingestion/languages/java/spring-message-producers.js +83 -0
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.d.ts +11 -1
- package/dist/core/ingestion/languages/java/spring-non-http-handlers.js +13 -3
- package/dist/core/ingestion/languages/java.js +18 -8
- package/dist/core/ingestion/languages/jvm/accessor-synthesis.d.ts +99 -0
- package/dist/core/ingestion/languages/jvm/accessor-synthesis.js +173 -0
- package/dist/core/ingestion/languages/jvm/beanspec.d.ts +17 -0
- package/dist/core/ingestion/languages/jvm/beanspec.js +42 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +15 -0
- package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +50 -0
- package/dist/core/ingestion/languages/kotlin/captures.js +24 -1
- package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.d.ts +26 -0
- package/dist/core/ingestion/languages/kotlin/lombok-synthesizer.js +417 -0
- package/dist/core/ingestion/languages/kotlin/scope-resolver.js +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.d.ts +4 -0
- package/dist/core/ingestion/languages/kotlin/spring-actuator.js +172 -0
- package/dist/core/ingestion/languages/kotlin/spring-config-bindings.d.ts +18 -0
- package/dist/core/ingestion/languages/kotlin/spring-config-bindings.js +411 -0
- package/dist/core/ingestion/languages/kotlin/spring-di.d.ts +51 -1
- package/dist/core/ingestion/languages/kotlin/spring-di.js +86 -6
- package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.d.ts +8 -0
- package/dist/core/ingestion/languages/kotlin/spring-dynamic-lookup.js +77 -0
- package/dist/core/ingestion/languages/kotlin/spring-message-producers.d.ts +17 -0
- package/dist/core/ingestion/languages/kotlin/spring-message-producers.js +119 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.d.ts +16 -0
- package/dist/core/ingestion/languages/kotlin/spring-non-http-handlers.js +77 -2
- package/dist/core/ingestion/languages/kotlin.js +24 -0
- package/dist/core/ingestion/languages/python.js +2 -0
- package/dist/core/ingestion/languages/rust/query.js +8 -8
- package/dist/core/ingestion/languages/zig/captures.d.ts +260 -0
- package/dist/core/ingestion/languages/zig/captures.js +2070 -0
- package/dist/core/ingestion/languages/zig/index.d.ts +4 -0
- package/dist/core/ingestion/languages/zig/index.js +4 -0
- package/dist/core/ingestion/languages/zig/interpret.d.ts +36 -0
- package/dist/core/ingestion/languages/zig/interpret.js +176 -0
- package/dist/core/ingestion/languages/zig/query.d.ts +3 -0
- package/dist/core/ingestion/languages/zig/query.js +426 -0
- package/dist/core/ingestion/languages/zig/range-binding.d.ts +37 -0
- package/dist/core/ingestion/languages/zig/range-binding.js +373 -0
- package/dist/core/ingestion/languages/zig/scope-resolver.d.ts +12 -0
- package/dist/core/ingestion/languages/zig/scope-resolver.js +58 -0
- package/dist/core/ingestion/languages/zig/simple-hooks.d.ts +25 -0
- package/dist/core/ingestion/languages/zig/simple-hooks.js +143 -0
- package/dist/core/ingestion/languages/zig.d.ts +32 -0
- package/dist/core/ingestion/languages/zig.js +130 -0
- package/dist/core/ingestion/method-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/zig.js +120 -0
- package/dist/core/ingestion/method-extractors/generic.js +16 -4
- package/dist/core/ingestion/method-types.d.ts +10 -4
- package/dist/core/ingestion/model/field-registry.d.ts +3 -3
- package/dist/core/ingestion/model/field-registry.js +11 -7
- package/dist/core/ingestion/model/method-registry.d.ts +3 -3
- package/dist/core/ingestion/model/method-registry.js +13 -8
- package/dist/core/ingestion/model/registration-table.js +3 -0
- package/dist/core/ingestion/model/type-registry.js +8 -4
- package/dist/core/ingestion/pipeline-phases/di.js +47 -14
- package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
- package/dist/core/ingestion/pipeline-phases/index.js +1 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +7 -1
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +79 -91
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +2 -1
- package/dist/core/ingestion/pipeline-phases/processes.js +39 -4
- package/dist/core/ingestion/pipeline-phases/routes.js +27 -18
- package/dist/core/ingestion/pipeline-phases/runner.d.ts +4 -1
- package/dist/core/ingestion/pipeline-phases/runner.js +34 -14
- package/dist/core/ingestion/pipeline-phases/scan.js +82 -1
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.d.ts +2 -0
- package/dist/core/ingestion/pipeline-phases/spring-auto-configuration.js +8 -0
- package/dist/core/ingestion/pipeline-phases/spring-destinations.d.ts +123 -0
- package/dist/core/ingestion/pipeline-phases/spring-destinations.js +688 -0
- package/dist/core/ingestion/pipeline.d.ts +30 -1
- package/dist/core/ingestion/pipeline.js +52 -14
- package/dist/core/ingestion/resolve-references.js +5 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.d.ts +16 -0
- package/dist/core/ingestion/route-extractors/constant-resolver.js +10 -0
- package/dist/core/ingestion/route-extractors/java-const-resolver.d.ts +27 -1
- package/dist/core/ingestion/route-extractors/java-const-resolver.js +161 -13
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.d.ts +12 -18
- package/dist/core/ingestion/route-extractors/kotlin-const-resolver.js +214 -33
- package/dist/core/ingestion/route-extractors/kotlin-spring.d.ts +13 -0
- package/dist/core/ingestion/route-extractors/kotlin-spring.js +259 -0
- package/dist/core/ingestion/route-extractors/python-decorator-handler.d.ts +6 -0
- package/dist/core/ingestion/route-extractors/python-decorator-handler.js +16 -0
- package/dist/core/ingestion/route-extractors/spring-shared.d.ts +30 -1
- package/dist/core/ingestion/route-extractors/spring-shared.js +77 -9
- package/dist/core/ingestion/route-extractors/spring.js +9 -5
- package/dist/core/ingestion/scope-extractor.js +8 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +62 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +4 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +2 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +28 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +11 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +23 -2
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +24 -3
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.d.ts +11 -1
- package/dist/core/ingestion/scope-resolution/passes/callable-value-flow.js +26 -6
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +11 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +29 -3
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +8 -1
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +35 -9
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +1 -4
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +277 -9
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +2 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +7 -3
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +43 -9
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +71 -10
- package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -0
- package/dist/core/ingestion/tree-sitter-queries.js +161 -0
- package/dist/core/ingestion/type-extractors/zig.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/zig.js +17 -0
- package/dist/core/ingestion/utils/ast-helpers.d.ts +40 -1
- package/dist/core/ingestion/utils/ast-helpers.js +124 -6
- package/dist/core/ingestion/utils/callable-flow-captures.d.ts +9 -0
- package/dist/core/ingestion/utils/callable-flow-captures.js +75 -14
- package/dist/core/ingestion/utils/test-file-path.d.ts +28 -0
- package/dist/core/ingestion/utils/test-file-path.js +87 -0
- package/dist/core/ingestion/variable-extractors/configs/zig.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/zig.js +71 -0
- package/dist/core/ingestion/workers/parse-worker.js +85 -14
- package/dist/core/install-context.d.ts +4 -0
- package/dist/core/install-context.js +152 -0
- package/dist/core/lbug/csv-generator.d.ts +10 -1
- package/dist/core/lbug/csv-generator.js +92 -22
- package/dist/core/lbug/graph-emit-sink.d.ts +3 -2
- package/dist/core/lbug/graph-emit-sink.js +4 -2
- package/dist/core/lbug/lbug-adapter.d.ts +100 -5
- package/dist/core/lbug/lbug-adapter.js +236 -24
- package/dist/core/lbug/schema.d.ts +6 -5
- package/dist/core/lbug/schema.js +84 -22
- package/dist/core/net/url-guard.d.ts +6 -0
- package/dist/core/net/url-guard.js +147 -0
- package/dist/core/package-version.d.ts +5 -0
- package/dist/core/package-version.js +10 -0
- package/dist/core/run-analyze.d.ts +21 -4
- package/dist/core/run-analyze.js +426 -117
- package/dist/core/search/fts-indexes.d.ts +19 -1
- package/dist/core/search/fts-indexes.js +28 -1
- package/dist/core/tree-sitter/parser-loader.js +16 -0
- package/dist/core/update-cache.d.ts +39 -0
- package/dist/core/update-cache.js +141 -0
- package/dist/core/update-check.d.ts +31 -0
- package/dist/core/update-check.js +274 -0
- package/dist/mcp/local/local-backend.d.ts +27 -13
- package/dist/mcp/local/local-backend.js +148 -60
- package/dist/mcp/repository-policy.d.ts +5 -1
- package/dist/mcp/repository-policy.js +48 -4
- package/dist/mcp/resources.js +10 -1
- package/dist/mcp/server.js +8 -9
- package/dist/mcp/tools.js +32 -22
- package/dist/server/analyze-launch.d.ts +2 -0
- package/dist/server/analyze-launch.js +2 -0
- package/dist/server/analyze-worker-protocol.d.ts +6 -1
- package/dist/server/analyze-worker.d.ts +1 -0
- package/dist/server/analyze-worker.js +38 -20
- package/dist/server/api.d.ts +5 -1
- package/dist/server/api.js +105 -88
- package/dist/server/git-clone.d.ts +40 -16
- package/dist/server/git-clone.js +253 -199
- package/dist/server/grep-params.d.ts +18 -0
- package/dist/server/grep-params.js +83 -0
- package/dist/server/grep-scan.d.ts +23 -0
- package/dist/server/grep-scan.js +107 -0
- package/dist/server/grep-worker.d.ts +1 -0
- package/dist/server/grep-worker.js +12 -0
- package/dist/server/mcp-http.d.ts +8 -0
- package/dist/server/mcp-http.js +16 -1
- package/dist/server/update-controller.d.ts +29 -0
- package/dist/server/update-controller.js +82 -0
- package/dist/storage/file-lock.d.ts +15 -0
- package/dist/storage/file-lock.js +155 -0
- package/dist/storage/fs-atomic.d.ts +24 -0
- package/dist/storage/fs-atomic.js +86 -2
- package/dist/storage/global-dir.d.ts +2 -0
- package/dist/storage/global-dir.js +6 -0
- package/dist/storage/parse-cache.d.ts +45 -7
- package/dist/storage/parse-cache.js +189 -42
- package/dist/storage/parsedfile-store.d.ts +41 -60
- package/dist/storage/parsedfile-store.js +247 -171
- package/dist/storage/repo-manager.d.ts +10 -4
- package/dist/storage/repo-manager.js +35 -25
- package/dist/storage/repo-meta.d.ts +34 -0
- package/dist/storage/v8-sidecar.d.ts +48 -0
- package/dist/storage/v8-sidecar.js +347 -0
- package/dist/types/pipeline.d.ts +14 -0
- package/dist/utils/process-identity.d.ts +2 -0
- package/dist/utils/process-identity.js +35 -0
- package/package.json +10 -4
- package/scripts/assert-web-assets.mjs +35 -0
- package/scripts/build-web.js +72 -0
- package/scripts/build.js +31 -28
- package/scripts/cross-platform-tests.ts +5 -0
- package/skills/gitnexus-cli.md +5 -1
- package/web/assets/ProcessFlowModal-DAeX2BHW.js +24 -0
- package/web/assets/{abnfDiagram-QNN2D4NM-Cq2djWWe.js → abnfDiagram-PAR5IXJI-J3OdeHLl.js} +1 -1
- package/web/assets/{agent-BWAXPjC5.js → agent-BMRqXorA.js} +6 -4
- package/web/assets/architecture-7GRP2DOG-M7G3SWCO-G3sWyX6M.js +1 -0
- package/web/assets/architectureDiagram-2PNWDENW-ysKcRlGT.js +36 -0
- package/web/assets/blockDiagram-PUWGUBOA-oLXTa1lY.js +129 -0
- package/web/assets/c4Diagram-3NLNHZP5-D3iu4eC0.js +38 -0
- package/web/assets/{chunk-2SREHG4O-Dip42xOq.js → chunk-2NMSUPJH-B24w-wng.js} +1 -1
- package/web/assets/{chunk-VJFVEZTB-CX66F2ep.js → chunk-32MCUW2P-ByUyt0Sa.js} +3 -3
- package/web/assets/{chunk-4RFN2BYJ-DHHWuC-n.js → chunk-3NPNU5GP-DocZ07Sg.js} +1 -1
- package/web/assets/{chunk-XNMVGMAZ-Cg_LnPtj.js → chunk-3SMGFRGC-CAu4JRLv.js} +1 -1
- package/web/assets/{chunk-W44A43WB-BN8EQc_u.js → chunk-4CAJECRU-DRYMwG9z.js} +1 -1
- package/web/assets/chunk-4OADUZ5Q-CxrSvOwZ.js +10 -0
- package/web/assets/{chunk-DMV4VAQV-Bn6WXDSX.js → chunk-5IQCK5RY-CCMhl4so.js} +2 -2
- package/web/assets/{chunk-RRFMTAIC-CMN0wcYA.js → chunk-5MVFYWFU-Db9KvrYO.js} +1 -1
- package/web/assets/chunk-CLS4B6BI-Uvx5QNsu.js +168 -0
- package/web/assets/chunk-DZP67EKU-B3Mt380j.js +70 -0
- package/web/assets/{chunk-6L755F7B-CMhLBxi2.js → chunk-EICP7K5X-CqwE9hui.js} +1 -1
- package/web/assets/{chunk-BI6VK774-D0oaWk8V.js → chunk-GDY2UAB4-CtQQR0a8.js} +1 -1
- package/web/assets/chunk-H7VHZCWX-CE1nAmt6.js +1 -0
- package/web/assets/chunk-IJBDOHL6-BUKtY6oF.js +1 -0
- package/web/assets/{chunk-OIYT25JQ-CQ6KOZGX.js → chunk-JFFVMJIA-0fJenqia.js} +1 -1
- package/web/assets/{chunk-HNC4WDU7-DoU3KnA7.js → chunk-JZGDI5JK-BeTMSSkJ.js} +1 -1
- package/web/assets/{chunk-EQFTRU2I-1ix7TzW9.js → chunk-KD6SPIPN-Qp1Pflah.js} +1 -1
- package/web/assets/chunk-NF366YI6-CpSpya3n.js +231 -0
- package/web/assets/chunk-NUDPKBEF-CU1-BQIW.js +34 -0
- package/web/assets/{chunk-SATU7PGQ-B1zhgOvc.js → chunk-OJINMHTS-zOCQe4eI.js} +1 -1
- package/web/assets/{chunk-E5QJAATJ-dh-5CtIV.js → chunk-Q6NGPIAH-yyBomb63.js} +1 -1
- package/web/assets/chunk-QJSWEUOL-D_rf9gPD.js +128 -0
- package/web/assets/chunk-R7JDMUKV-CRoqKpD6.js +1 -0
- package/web/assets/{chunk-VE5CLXGZ-C1vB7wpY.js → chunk-RCXAM2GK-CUqrWQDV.js} +1 -1
- package/web/assets/{chunk-66DQ2XMT-CM0xjFAN.js → chunk-RT4MAWR3-zXy9-Lvt.js} +1 -1
- package/web/assets/{chunk-TZUXEDM2-B7p9AcTw.js → chunk-SFMINX4W-J2UrvMpD.js} +1 -1
- package/web/assets/{chunk-LORZLZWG-B57uGw2N.js → chunk-SLDQ463B-CHY6e_bQ.js} +2 -2
- package/web/assets/{chunk-FWYVLQTC-BgDItRzJ.js → chunk-TCEHX7R3-CXPDEVbm.js} +1 -1
- package/web/assets/{chunk-224SPVON-B8gxtXpy.js → chunk-VQC2EELJ-Dc8fIy4R.js} +1 -1
- package/web/assets/chunk-VRZKL3EH-DB3KixTQ.js +1 -0
- package/web/assets/{chunk-A7VWPJGB-B4O3oQdQ.js → chunk-VTHDQ7BV-b7FsPQZO.js} +1 -1
- package/web/assets/chunk-VY2OSTJR-Dkgc3Brg.js +2 -0
- package/web/assets/chunk-WUBWJARI-7FwILJ3k.js +2 -0
- package/web/assets/{chunk-D6VWDJW2-BxcBdZ9c.js → chunk-YBMQ5JGJ-BSnyWZmd.js} +1 -1
- package/web/assets/chunk-YDMLL4PJ-IHhMngTz.js +2 -0
- package/web/assets/chunk-Z6V44ARX-BjCEsF0Q.js +62 -0
- package/web/assets/chunk-ZJJ7VQJP-Dz089b-K.js +321 -0
- package/web/assets/chunk-ZNLK7HRR-B0iFpmW4.js +1 -0
- package/web/assets/chunk-ZQN7UHIL-Cy7KAjQt.js +1 -0
- package/web/assets/{chunk-L5GCOVLC-CE2w8Nm_.js → chunk-ZS6VBONO-DBjJO0w9.js} +2 -2
- package/web/assets/{chunk-NV3KIAZN-5yvcpMiu.js → chunk-ZUNWM646-DNRJyNPe.js} +1 -1
- package/web/assets/classDiagram-FGAMPOII-C5Ibyode.js +1 -0
- package/web/assets/classDiagram-v2-AI5RJEK4-C5Ibyode.js +1 -0
- package/web/assets/{cose-bilkent-RZA4XIPR-BHpK4Crp.js → cose-bilkent-Q72C2OJ3-DMeFXnK8.js} +1 -1
- package/web/assets/cynefin-OW5HDTMX-6OCTWOGG-vlqakYcO.js +1 -0
- package/web/assets/{cynefinDiagram-TR7LZUCG-C3Iar9lZ.js → cynefinDiagram-2OOWUY4M-BY6DZkTt.js} +1 -1
- package/web/assets/dagre-MPVFI544-DWO70fy_.js +4 -0
- package/web/assets/diagram-AE4NWXFW-f7JRVRUL.js +24 -0
- package/web/assets/{diagram-L7DVE3PN-GIRyVUtt.js → diagram-BUJID5UG-BXZv1rCS.js} +2 -2
- package/web/assets/{diagram-JCD7PQ7C-DC5-9FRr.js → diagram-C44CZ5NI-CRNfvjCq.js} +1 -1
- package/web/assets/diagram-EYOLEXXS-DZOjKQVE.js +30 -0
- package/web/assets/diagram-P7B6PWOJ-D3SQmw3_.js +3 -0
- package/web/assets/{ebnfDiagram-DRHRQJWO-D8_CI4ZF.js → ebnfDiagram-FTPZ3PV6-jKWpIDN2.js} +1 -1
- package/web/assets/erDiagram-H3ERR26V-BqJntEuJ.js +99 -0
- package/web/assets/eventmodeling-NTZA5JFV-WKSWQHFS-Bq4FqtBL.js +1 -0
- package/web/assets/flowDiagram-YHGXBVSY-Dnlk2bEu.js +1 -0
- package/web/assets/ganttDiagram-RWFTB7ED-Bl6Y1K5T.js +292 -0
- package/web/assets/gitGraph-4MIJSDKK-JH2HKYUO-B3yc4GkH.js +1 -0
- package/web/assets/gitGraphDiagram-MAR6GKOP-CkNvsrdw.js +106 -0
- package/web/assets/{index-CJDpyH-n.css → index-C2_aej58.css} +1 -1
- package/web/assets/{index-DDRie6_8.js → index-Dj3vQOHK.js} +51 -51
- package/web/assets/info-A6RAGUB7-3TX3OFWW-BM3N5_Dv.js +1 -0
- package/web/assets/infoDiagram-LV547AFH-COkFutAf.js +2 -0
- package/web/assets/{ishikawaDiagram-4JDSWWDM-DmqWtjkl.js → ishikawaDiagram-PUJQGNDS-Bb8FylSR.js} +2 -2
- package/web/assets/{journeyDiagram-QUS3FAKT-XAzVzrQW.js → journeyDiagram-EW5QJT4W-BzoHUBhM.js} +4 -4
- package/web/assets/{kanban-definition-D4L7SQKK-YurRnmYn.js → kanban-definition-JSQERAZB-Uy2Pi0yQ.js} +4 -4
- package/web/assets/katex-CZ4GXH2S-C0Fcou7U.js +257 -0
- package/web/assets/{mindmap-definition-66QP5TD6-ChrWWnil.js → mindmap-definition-VBJCLQLM-B-CnOnt_.js} +3 -3
- package/web/assets/packet-AYTQ26CC-MKII6P3Y-Bd52ZE3V.js +1 -0
- package/web/assets/{pegDiagram-YKIO5C6U-QGeQLEq2.js → pegDiagram-7WILOQTJ-D9sneKXg.js} +1 -1
- package/web/assets/pie-WAS4IAKB-6B4OPMJ5-DW5Xy69Z.js +1 -0
- package/web/assets/pieDiagram-EFA7CBSB-Dx2NQofL.js +39 -0
- package/web/assets/{quadrantDiagram-VO5QLCXA-B7098wSc.js → quadrantDiagram-WARVYA7P-DPKL9_0A.js} +3 -3
- package/web/assets/radar-RG4KPBEZ-UPTR3XUL-CkzibT2h.js +1 -0
- package/web/assets/railroad-74A4TZTK-MEFUPFMS-D9zF-mDN.js +1 -0
- package/web/assets/railroad-abnf-HS5TGJTU-R5YG2S5D-ruacjUbX.js +1 -0
- package/web/assets/railroad-ebnf-LZEXJU2U-G5QEX2L6-S1zc5OiO.js +1 -0
- package/web/assets/railroad-peg-WCYAUIDC-H5I2ZRY2-Cbcr0XzY.js +1 -0
- package/web/assets/{railroadDiagram-M77LTMSB-AXu4vxk_.js → railroadDiagram-5NIQVNLQ-DsweTo14.js} +1 -1
- package/web/assets/{requirementDiagram-RASO5HTO-B-l8InpK.js → requirementDiagram-SXREGOKZ-CXwdNSVR.js} +4 -4
- package/web/assets/{sankeyDiagram-F32LOJ6L-Kd7zjJgX.js → sankeyDiagram-VV74M2VP-CA6jtP9P.js} +3 -3
- package/web/assets/{sequenceDiagram-URATNSBD-BlcdY9DS.js → sequenceDiagram-52ZFIFDL-k_5rEbzm.js} +15 -15
- package/web/assets/src-Df5C1Nz4.js +1 -0
- package/web/assets/stateDiagram-3QAKPIVI-BejHTf31.js +1 -0
- package/web/assets/stateDiagram-v2-HN2P4RDZ-BrfoRuOc.js +1 -0
- package/web/assets/swimlanes-QLVP42QD-CQSVO5D6.js +1 -0
- package/web/assets/swimlanesDiagram-JKPDBFCN-DrWB9kcD.js +8 -0
- package/web/assets/{timeline-definition-WJXWRH4I-DUfp1R3E.js → timeline-definition-GS45XAXW-C0Ks8rPP.js} +4 -4
- package/web/assets/treeView-Q6P3EWNA-ZRJGANNQ-DmKOCo6L.js +1 -0
- package/web/assets/treemap-WGGIJYW6-K64VN5AS-DO3xY92U.js +1 -0
- package/web/assets/{vennDiagram-K3VCMQLI-Bj-FN-XS.js → vennDiagram-QIQU2ZRJ-rgPiS837.js} +3 -3
- package/web/assets/wardley-WFR3VGLG-D67OWCCH-DiDPBNft.js +1 -0
- package/web/assets/wardleyDiagram-U6YNM66N-DRVr7SPi.js +78 -0
- package/web/assets/{xychartDiagram-5VRUVLCW-CK_rbSWE.js → xychartDiagram-XJAZEDNM-COtlZzYb.js} +3 -3
- package/web/index.html +19 -17
- package/web/assets/ProcessFlowModal-Badh2Pbg.js +0 -24
- package/web/assets/architecture-TIHT7OUA-V6N4J3SY-fTePvLoe.js +0 -1
- package/web/assets/architectureDiagram-OT7VKSJ7-mKEXxkeF.js +0 -36
- package/web/assets/blockDiagram-54WLDVWM-Dg_hrRWE.js +0 -132
- package/web/assets/c4Diagram-X2LASM7V-CnhoT4aV.js +0 -10
- package/web/assets/chunk-2AEHWXPW-CV4r6-1I.js +0 -127
- package/web/assets/chunk-5VCL7Z4A-CQ-2dYWj.js +0 -1
- package/web/assets/chunk-6BELYETK-ChsYtfHW.js +0 -1
- package/web/assets/chunk-7CWYLC5S-DRgGkkpF.js +0 -2
- package/web/assets/chunk-7FYTHRHK-CsmYIswB.js +0 -32
- package/web/assets/chunk-KRXBNO2N-C-UNuKKf.js +0 -1
- package/web/assets/chunk-LAHSG3N2-Bz4hcn0N.js +0 -321
- package/web/assets/chunk-LIEV3EAG-pyKGssV3.js +0 -1
- package/web/assets/chunk-NLANEA3F-XpH_NPA5.js +0 -62
- package/web/assets/chunk-PE7DX7ZZ-CCvRVj43.js +0 -10
- package/web/assets/chunk-Q67WD55A-BWCH2SVz.js +0 -156
- package/web/assets/chunk-SZD42YQK-ijyKKVr1.js +0 -70
- package/web/assets/chunk-TFPGFQPA-Dj6a-0pC.js +0 -231
- package/web/assets/chunk-TGVD4F4B-BMc31Gj2.js +0 -2
- package/web/assets/chunk-UAT7B5JY-DW-A_fpI.js +0 -1
- package/web/assets/chunk-VY5UBI4V-yxPQAWxw.js +0 -1
- package/web/assets/chunk-WJBAP47W-BckNkuEN.js +0 -1
- package/web/assets/classDiagram-VPOSVPXH-BjOiXA_C.js +0 -1
- package/web/assets/classDiagram-v2-5VFNUXQA-BjOiXA_C.js +0 -1
- package/web/assets/cynefin-VYW2F7L2-2VAHYKR6-DAsF6GZv.js +0 -1
- package/web/assets/dagre-K64A6Z3X-CUwi79mA.js +0 -4
- package/web/assets/diagram-2TLGJV2N-C2F5Nfym.js +0 -30
- package/web/assets/diagram-KFBZAVDW-Dfmf_4ti.js +0 -3
- package/web/assets/diagram-YP3FGXHI-CyNFYtkd.js +0 -24
- package/web/assets/erDiagram-SZLJLQMB-CohQjznC.js +0 -85
- package/web/assets/eventmodeling-45OFAUF4-AOUJWSLX-BvTc6iQi.js +0 -1
- package/web/assets/flowDiagram-BWE6NHOH-B6RnEvD9.js +0 -1
- package/web/assets/ganttDiagram-2QTCJSNI-Cks_mEcF.js +0 -292
- package/web/assets/gitGraph-TEB2WS4Q-U5VWYIBC-Dy7CCSZ5.js +0 -1
- package/web/assets/gitGraphDiagram-VVZAVV5G-CG41cIVc.js +0 -106
- package/web/assets/info-DKCQHKI2-DX6KST54-BLJg1ikX.js +0 -1
- package/web/assets/infoDiagram-FY4PZKRE-BJ3vPVwW.js +0 -2
- package/web/assets/katex-C5OPUE3Q-Bnbavtmu.js +0 -257
- package/web/assets/packet-7NZHBO7P-5WG45QPS-KUxcuvaA.js +0 -1
- package/web/assets/pie-RZYD4A2V-2OCZ2VTD-DPs08kJY.js +0 -1
- package/web/assets/pieDiagram-YPY3TKG5-BuT3MYzm.js +0 -39
- package/web/assets/radar-I7S5WNFK-EPLSA35B-w5F0K3a7.js +0 -1
- package/web/assets/railroad-3IZDKUUU-PWFQV6Y6-Bu668yqY.js +0 -1
- package/web/assets/railroad-abnf-AHOZXSZD-JYYJX3BS-B6ghpETS.js +0 -1
- package/web/assets/railroad-ebnf-EBAXGLYW-RBZ4ONAP-D-XmHh3M.js +0 -1
- package/web/assets/railroad-peg-LSFZ7HO6-KHNPXGPG-mhkrhzEn.js +0 -1
- package/web/assets/src-C5sx_gMp.js +0 -1
- package/web/assets/stateDiagram-DODFXNG5-DTdHc-fF.js +0 -1
- package/web/assets/stateDiagram-v2-JNMM5JRA-DioNLDDo.js +0 -1
- package/web/assets/swimlanes-OSWOYLSK-CA0ofdwY.js +0 -2
- package/web/assets/swimlanesDiagram-RHGX2RDE-PkwUdckC.js +0 -8
- package/web/assets/treeView-QDETBFTQ-EHYTSQNO-C5lpBgPm.js +0 -1
- package/web/assets/treemap-6X3UGDF4-CCWCF7EK-BB0ZyO-B.js +0 -1
- package/web/assets/wardley-OPB4EBWU-6OWERDVT-CEA3Nq0j.js +0 -1
- package/web/assets/wardleyDiagram-XK6FUAWV-CVV0dHFr.js +0 -78
- /package/web/assets/{sizeCapture-5GORAGP4-BEqQzsxs.js → sizeCapture-FGA5AGYP-BEqQzsxs.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{T as t,V as n,n as r,p as i,q as a,y as o}from"./chunk-LIEV3EAG-pyKGssV3.js";import{$ as s,A as c,K as l,R as u,T as d,U as f,Y as p,_ as m,a as h,j as g,z as _}from"./chunk-2AEHWXPW-CV4r6-1I.js";import{t as v}from"./chunk-6BELYETK-ChsYtfHW.js";import{n as y,r as b}from"./chunk-WJBAP47W-BckNkuEN.js";import"./chunk-STOV2HOB-GnExfzIX.js";import{a as x}from"./chunk-7CWYLC5S-DRgGkkpF.js";import{t as S}from"./chunk-JQRUD6KW-Dbva2Z17.js";import"./chunk-L5GCOVLC-CE2w8Nm_.js";import{t as C}from"./chunk-DMV4VAQV-Bn6WXDSX.js";import"./chunk-HNC4WDU7-DoU3KnA7.js";import"./chunk-SATU7PGQ-B1zhgOvc.js";import"./chunk-224SPVON-B8gxtXpy.js";import"./chunk-EQFTRU2I-1ix7TzW9.js";import"./chunk-E5QJAATJ-dh-5CtIV.js";import"./chunk-66DQ2XMT-CM0xjFAN.js";import"./chunk-D6VWDJW2-BxcBdZ9c.js";import"./chunk-BI6VK774-D0oaWk8V.js";import"./chunk-XNMVGMAZ-Cg_LnPtj.js";import"./chunk-4RFN2BYJ-DHHWuC-n.js";import"./chunk-FWYVLQTC-BgDItRzJ.js";import"./chunk-RRFMTAIC-CMN0wcYA.js";import"./chunk-TZUXEDM2-B7p9AcTw.js";import"./chunk-OIYT25JQ-CQ6KOZGX.js";import"./chunk-NV3KIAZN-5yvcpMiu.js";import{t as w}from"./chunk-A7VWPJGB-B4O3oQdQ.js";var T=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=f,this.getAccTitle=d,this.setDiagramTitle=c,this.getDiagramTitle=g,this.getAccDescription=l,this.setAccDescription=u}static{e(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=_,t=h();return x({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{y(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){s(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function E(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(E,`buildHierarchy`);var D=e((t,n)=>{S(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=O(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=E(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),O=e(e=>e.name?String(e.name):``,`getItemName`),k={parser:{yy:void 0},parse:e(async e=>{try{let t=await C(`treemap`,e);a.debug(`Treemap AST:`,t);let n=k.parser?.yy;if(!(n instanceof T))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);D(t,n)}catch(e){throw a.error(`Error parsing treemap:`,e),e}},`parse`)},A=10,j=10,M=25,N={draw:e((s,c,l,u)=>{let d=u.db,f=d.getConfig(),m=f.padding??A,g=d.getDiagramTitle(),_=d.getRoot(),{themeVariables:y}=h();if(!_)return;let x=g?30:0,S=v(c),C=f.nodeWidth?f.nodeWidth*j:960,T=f.nodeHeight?f.nodeHeight*j:500,E=C,D=T+x;S.attr(`viewBox`,`0 0 ${E} ${D}`),p(S,D,E,f.useMaxWidth);let O;try{let t=f.valueFormat||`,`;if(t===`$0,0`)O=e(e=>`$`+r(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),i=n?n[0]:``;O=e(e=>`$`+r(`,`+i)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);O=e(e=>`$`+r(n||``)(e),`valueFormat`)}else O=r(t)}catch(e){a.error(`Error creating format function:`,e),O=r(`,`)}let k=i().range([`transparent`,y.cScale0,y.cScale1,y.cScale2,y.cScale3,y.cScale4,y.cScale5,y.cScale6,y.cScale7,y.cScale8,y.cScale9,y.cScale10,y.cScale11]),N=i().range([`transparent`,y.cScalePeer0,y.cScalePeer1,y.cScalePeer2,y.cScalePeer3,y.cScalePeer4,y.cScalePeer5,y.cScalePeer6,y.cScalePeer7,y.cScalePeer8,y.cScalePeer9,y.cScalePeer10,y.cScalePeer11]),P=i().range([y.cScaleLabel0,y.cScaleLabel1,y.cScaleLabel2,y.cScaleLabel3,y.cScaleLabel4,y.cScaleLabel5,y.cScaleLabel6,y.cScaleLabel7,y.cScaleLabel8,y.cScaleLabel9,y.cScaleLabel10,y.cScaleLabel11]);g&&S.append(`text`).attr(`x`,E/2).attr(`y`,x/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(g);let F=S.append(`g`).attr(`transform`,`translate(0, ${x})`).attr(`class`,`treemapContainer`),I=o(_).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),L=t().size([C,T]).paddingTop(e=>e.children&&e.children.length>0?M+j:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?j:0).paddingRight(e=>e.children&&e.children.length>0?j:0).paddingBottom(e=>e.children&&e.children.length>0?j:0).round(!0)(I),R=L.descendants().filter(e=>e.children&&e.children.length>0),z=F.selectAll(`.treemapSection`).data(R).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,M).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),z.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,M),z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>k(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>N(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),z.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,M/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${c}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=f.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),f.showValues!==!1&&z.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,M/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?O(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let B=L.leaves(),V=B.length>20,H=V?16:38,U=V?14:28,W=V?4:8,G=V?4:6,K=V?2:4,q=V?8:10,J=V?1:2,Y=F.selectAll(`.treemapLeafGroup`).data(B).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);Y.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`stroke-width`,3),Y.append(`clipPath`).attr(`id`,(e,t)=>`clip-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),Y.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${H}px;fill:`+P(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-2*K,s=i-2*K;if(o<q||s<q){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>W;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(G,Math.min(U,Math.round(c*l))),d=c+J+u;for(;d>s&&c>W&&(c--,u=Math.max(G,Math.min(U,Math.round(c*l))),!(u<G&&c===W));)t.style(`font-size`,`${c}px`),d=c+J+u;t.style(`font-size`,`${c}px`),V?(c<W||s<W)&&t.style(`display`,`none`):(a.getComputedTextLength()>o||c<W||s<c)&&t.style(`display`,`none`)}),f.showValues!==!1&&Y.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${U}px;fill:`+P(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.value?O(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(G,Math.min(U,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+J;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*K;t.node().getComputedTextLength()>u||s+o>l||o<G?t.style(`display`,`none`):t.style(`display`,null)}),w(S,f.diagramPadding??8,`flowchart`,f?.useMaxWidth||!1)},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},P={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},F={parser:k,get db(){return new T},renderer:N,styles:e(({treemap:e}={})=>{let t=x(m(),h().themeVariables),n=x(P,e),r=n.titleColor??t.titleColor,i=n.labelColor??t.textColor,a=n.valueColor??t.textColor;return`
|
|
1
|
+
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{I as t,T as n,V as r,n as i,p as a,q as o}from"./chunk-H7VHZCWX-CE1nAmt6.js";import{F as s,M as c,O as l,Q as u,V as d,X as f,Y as p,h as m,l as h,q as g,v as _}from"./chunk-QJSWEUOL-D_rf9gPD.js";import{t as v}from"./chunk-IJBDOHL6-BUKtY6oF.js";import{n as y,t as b}from"./chunk-ZNLK7HRR-B0iFpmW4.js";import"./chunk-STOV2HOB-GnExfzIX.js";import{a as x}from"./chunk-VY2OSTJR-Dkgc3Brg.js";import{t as S}from"./chunk-JQRUD6KW-Dbva2Z17.js";import"./chunk-ZS6VBONO-DBjJO0w9.js";import{t as C}from"./chunk-5IQCK5RY-CCMhl4so.js";import"./chunk-JZGDI5JK-BeTMSSkJ.js";import"./chunk-OJINMHTS-zOCQe4eI.js";import"./chunk-VQC2EELJ-Dc8fIy4R.js";import"./chunk-KD6SPIPN-Qp1Pflah.js";import"./chunk-Q6NGPIAH-yyBomb63.js";import"./chunk-RT4MAWR3-zXy9-Lvt.js";import"./chunk-YBMQ5JGJ-BSnyWZmd.js";import"./chunk-GDY2UAB4-CtQQR0a8.js";import"./chunk-3SMGFRGC-CAu4JRLv.js";import"./chunk-3NPNU5GP-DocZ07Sg.js";import"./chunk-TCEHX7R3-CXPDEVbm.js";import"./chunk-5MVFYWFU-Db9KvrYO.js";import"./chunk-SFMINX4W-J2UrvMpD.js";import"./chunk-JFFVMJIA-0fJenqia.js";import"./chunk-ZUNWM646-DNRJyNPe.js";import{t as w}from"./chunk-VTHDQ7BV-b7FsPQZO.js";var T=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=u,this.getAccTitle=d,this.setDiagramTitle=s,this.getDiagramTitle=f,this.getAccDescription=g,this.setAccDescription=p}static{e(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=_,t=h();return x({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{y(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){m(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function E(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(E,`buildHierarchy`);var D=e((t,n)=>{S(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=O(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=E(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),O=e(e=>e.name?String(e.name):``,`getItemName`),k={parser:{yy:void 0},parse:e(async e=>{try{let t=await C(`treemap`,e);o.debug(`Treemap AST:`,t);let n=k.parser?.yy;if(!(n instanceof T))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);D(t,n)}catch(e){throw o.error(`Error parsing treemap:`,e),e}},`parse`)},A=10,j=10,M=25,N={draw:e((s,c,u,d)=>{let f=d.db,p=f.getConfig(),m=p.padding??A,g=f.getDiagramTitle(),_=f.getRoot(),{themeVariables:y}=h();if(!_)return;let x=g?30:0,S=v(c),C=p.nodeWidth?p.nodeWidth*j:960,T=p.nodeHeight?p.nodeHeight*j:500,E=C,D=T+x;S.attr(`viewBox`,`0 0 ${E} ${D}`),l(S,D,E,p.useMaxWidth);let O;try{let t=p.valueFormat||`,`;if(t===`$0,0`)O=e(e=>`$`+i(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;O=e(e=>`$`+i(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);O=e(e=>`$`+i(n||``)(e),`valueFormat`)}else O=i(t)}catch(e){o.error(`Error creating format function:`,e),O=i(`,`)}let k=a().range([`transparent`,y.cScale0,y.cScale1,y.cScale2,y.cScale3,y.cScale4,y.cScale5,y.cScale6,y.cScale7,y.cScale8,y.cScale9,y.cScale10,y.cScale11]),N=a().range([`transparent`,y.cScalePeer0,y.cScalePeer1,y.cScalePeer2,y.cScalePeer3,y.cScalePeer4,y.cScalePeer5,y.cScalePeer6,y.cScalePeer7,y.cScalePeer8,y.cScalePeer9,y.cScalePeer10,y.cScalePeer11]),P=a().range([y.cScaleLabel0,y.cScaleLabel1,y.cScaleLabel2,y.cScaleLabel3,y.cScaleLabel4,y.cScaleLabel5,y.cScaleLabel6,y.cScaleLabel7,y.cScaleLabel8,y.cScaleLabel9,y.cScaleLabel10,y.cScaleLabel11]);g&&S.append(`text`).attr(`x`,E/2).attr(`y`,x/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(g);let F=S.append(`g`).attr(`transform`,`translate(0, ${x})`).attr(`class`,`treemapContainer`),I=t(_).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),L=n().size([C,T]).paddingTop(e=>e.children&&e.children.length>0?M+j:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?j:0).paddingRight(e=>e.children&&e.children.length>0?j:0).paddingBottom(e=>e.children&&e.children.length>0?j:0).round(!0)(I),R=L.descendants().filter(e=>e.children&&e.children.length>0),z=F.selectAll(`.treemapSection`).data(R).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,M).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),z.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,M),z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>k(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>N(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),z.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,M/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${c}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=r(this),n=e.data.name;t.text(n);let i=e.x1-e.x0,a;a=p.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),p.showValues!==!1&&z.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,M/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?O(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let B=L.leaves(),V=B.length>20,H=V?16:38,U=V?14:28,W=V?4:8,G=V?4:6,K=V?2:4,q=V?8:10,J=V?1:2,Y=F.selectAll(`.treemapLeafGroup`).data(B).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);Y.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`stroke-width`,3),Y.append(`clipPath`).attr(`id`,(e,t)=>`clip-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),Y.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${H}px;fill:`+P(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.data.name).each(function(e){let t=r(this),n=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=n-2*K,s=i-2*K;if(o<q||s<q){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>W;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(G,Math.min(U,Math.round(c*l))),d=c+J+u;for(;d>s&&c>W&&(c--,u=Math.max(G,Math.min(U,Math.round(c*l))),!(u<G&&c===W));)t.style(`font-size`,`${c}px`),d=c+J+u;t.style(`font-size`,`${c}px`),V?(c<W||s<W)&&t.style(`display`,`none`):(a.getComputedTextLength()>o||c<W||s<c)&&t.style(`display`,`none`)}),p.showValues!==!1&&Y.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${U}px;fill:`+P(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.value?O(e.value):``).each(function(e){let t=r(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let i=r(n).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(G,Math.min(U,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+J;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*K;t.node().getComputedTextLength()>u||s+o>l||o<G?t.style(`display`,`none`):t.style(`display`,null)}),w(S,p.diagramPadding??8,`flowchart`,p?.useMaxWidth||!1)},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},P={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},F={parser:k,get db(){return new T},renderer:N,styles:e(({treemap:e}={})=>{let t=x(c(),h().themeVariables),n=x(P,e),r=n.titleColor??t.titleColor,i=n.labelColor??t.textColor,a=n.valueColor??t.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${n.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${n.sectionStrokeWidth};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{q as t}from"./chunk-H7VHZCWX-CE1nAmt6.js";import{F as n,O as r,Q as i,V as a,X as o,Y as s,h as c,l,q as u,v as d,y as f}from"./chunk-QJSWEUOL-D_rf9gPD.js";import{t as p}from"./chunk-IJBDOHL6-BUKtY6oF.js";import{r as m,t as h}from"./chunk-2NMSUPJH-B24w-wng.js";import"./chunk-STOV2HOB-GnExfzIX.js";import{a as g}from"./chunk-VY2OSTJR-Dkgc3Brg.js";import{t as _}from"./chunk-JQRUD6KW-Dbva2Z17.js";import"./chunk-ZS6VBONO-DBjJO0w9.js";import{t as v}from"./chunk-5IQCK5RY-CCMhl4so.js";import"./chunk-JZGDI5JK-BeTMSSkJ.js";import"./chunk-OJINMHTS-zOCQe4eI.js";import"./chunk-VQC2EELJ-Dc8fIy4R.js";import"./chunk-KD6SPIPN-Qp1Pflah.js";import"./chunk-Q6NGPIAH-yyBomb63.js";import"./chunk-RT4MAWR3-zXy9-Lvt.js";import"./chunk-YBMQ5JGJ-BSnyWZmd.js";import"./chunk-GDY2UAB4-CtQQR0a8.js";import"./chunk-3SMGFRGC-CAu4JRLv.js";import"./chunk-3NPNU5GP-DocZ07Sg.js";import"./chunk-TCEHX7R3-CXPDEVbm.js";import"./chunk-5MVFYWFU-Db9KvrYO.js";import"./chunk-SFMINX4W-J2UrvMpD.js";import"./chunk-JFFVMJIA-0fJenqia.js";import"./chunk-ZUNWM646-DNRJyNPe.js";import{t as y}from"./chunk-T5OCTHI4-DdZvN-9i.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}e(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}e(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}e(k,`remapErrorLines`);function A(e){let t=e.split(`
|
|
2
|
+
`),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e<t.length;e++){let n=t[e];n.trim()===``||T.test(n)||w.test(n)||C.test(n)||i.push(n.replace(/\t/g,` `))}if(!D(i))return{text:e,lineMap:n};let a=O(i),o=[],s=0;for(let e=0;e<=r;e++)o.push(t[e]),s++,n.set(s,e+1);for(let e=r+1;e<t.length;e++){let r=t[e],i=r.trim(),c=e+1;if(i===``){o.push(r),s++,n.set(s,c);continue}if(T.test(r)){o.push(r),s++,n.set(s,c);continue}if(w.test(r)){o.push(r),s++,n.set(s,c);continue}if(C.test(r))continue;let l=r.replace(/\t/g,` `),u=x.exec(l);if(u?.index!==void 0){let e=u.index,t=Math.round(e/a)+1,r=e+1;for(;r<l.length&&S.test(l[r]);)r++;for(;r<l.length&&l[r]===` `;)r++;let i=l.slice(r).trimEnd();if(!i)throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let d=E.repeat(t);o.push(d+i),s++,n.set(s,c)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(b.test(l))o.push(r),s++,n.set(s,c);else{if(/^\s+/.test(l))throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);o.push(r),s++,n.set(s,c)}}}return{text:o.join(`
|
|
3
|
+
`),lineMap:n}}e(A,`preprocessBoxDrawing`);var j=new y(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=e(()=>{j.reset(),c()},`clear`),N=e(()=>j.records.stack[0],`getRoot`),P=e(()=>j.records.cnt,`getCount`),F=d.treeView,I=e(()=>g(F,l().treeView),`getConfig`),L={clear:M,addNode:e((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:I,getAccTitle:a,getAccDescription:u,getDiagramTitle:o,setAccDescription:s,setAccTitle:i,setDiagramTitle:n},R=e(e=>{_(e,L);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,o=t.iconAnnotation,s=o===void 0?void 0:o||`none`,c=t.descAnnotation||void 0,u=c?f(c,l()):void 0;L.addNode(e,n,i,a,s,u)}},`populate`),z={parse:e(async e=>{let{text:n,lineMap:r}=A(e);try{let e=await v(`treeView`,n);t.debug(e),R(e)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},B={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:`<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>`},file:{body:`<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>`}}};function V(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}e(V,`detectIcon`);function H(e,t){return e.includes(`:`)?e:e in B.icons||!t?`${B.prefix}:${e}`:`${t}:${e}`}e(H,`qualifyIcon`);function U(e,t){if(e.icon!==`none`){if(e.icon)return H(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=V(e.name,t);if(n===`none`)return;if(n)return H(n,t.defaultIconPack)}return`${B.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}e(U,`getNodeIcon`),m([{name:B.prefix,icons:B}]);var W=14,G=4,K=16,q=e(async(t,n)=>{let r=[],i=e(e=>{let t=U(e,n);t&&r.push({icon:t,node:e}),e.children.forEach(i)},`collect`);i(t);let a=await Promise.all(r.map(async({icon:e,node:t})=>({id:t.id,svg:await h(e,{height:W,width:W})})));return new Map(a.map(({id:e,svg:t})=>[e,t]))},`resolveNodeIcons`),J=e((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=W+G,l=U(n,i),u=l!==void 0;l&&o.append(`g`).attr(`class`,`treeView-node-icon`).attr(`transform`,`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(n.id)??``);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),Y=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),X=e((t,n,r,i)=>{let a=0,o=0,s=[],c=e((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=J(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;Y(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=e((e,n=0)=>{c(t,e,r,n),e.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=e.BBox;if(e.children.length){let{y:n,height:s}=e.children[e.children.length-1].BBox;Y(t,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+K;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),Z={draw:e(async(e,n,i,a)=>{t.debug(`Rendering treeView diagram
|
|
4
|
+
`+e);let o=a.db,s=o.getRoot(),c=o.getConfig(),l=p(n),u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=X(u,s,c,await q(s,c));l.attr(`viewBox`,`-${c.lineThickness/2} 0 ${f} ${d}`),r(l,d,f,c.useMaxWidth)},`draw`)},Q={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},$={db:L,renderer:Z,parser:z,styles:e(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=g(Q,e);return`
|
|
5
|
+
.treeView-node-label {
|
|
6
|
+
font-size: ${t};
|
|
7
|
+
fill: ${n};
|
|
8
|
+
white-space: pre;
|
|
9
|
+
}
|
|
10
|
+
.treeView-node-dir {
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
}
|
|
13
|
+
.treeView-node-line {
|
|
14
|
+
stroke: ${r};
|
|
15
|
+
}
|
|
16
|
+
.treeView-node-icon {
|
|
17
|
+
color: ${i};
|
|
18
|
+
}
|
|
19
|
+
.treeView-node-description {
|
|
20
|
+
font-size: ${t};
|
|
21
|
+
fill: ${a};
|
|
22
|
+
font-style: italic;
|
|
23
|
+
white-space: pre;
|
|
24
|
+
}
|
|
25
|
+
.treeView-highlight-bg {
|
|
26
|
+
fill: ${o};
|
|
27
|
+
stroke: ${s};
|
|
28
|
+
stroke-width: 1;
|
|
29
|
+
}
|
|
30
|
+
`},`styles`)};export{$ as diagram};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as t,q as n}from"./chunk-H7VHZCWX-CE1nAmt6.js";import{B as r,F as i,Q as a,V as o,X as s,Y as c,h as l,l as u,q as d,v as f,y as p,z as m}from"./chunk-QJSWEUOL-D_rf9gPD.js";import"./chunk-STOV2HOB-GnExfzIX.js";import{a as h,g as ee,l as g}from"./chunk-VY2OSTJR-Dkgc3Brg.js";import{t as te}from"./chunk-JQRUD6KW-Dbva2Z17.js";import{d as ne}from"./chunk-ZS6VBONO-DBjJO0w9.js";import{t as re}from"./chunk-5IQCK5RY-CCMhl4so.js";import"./chunk-JZGDI5JK-BeTMSSkJ.js";import"./chunk-OJINMHTS-zOCQe4eI.js";import"./chunk-VQC2EELJ-Dc8fIy4R.js";import"./chunk-KD6SPIPN-Qp1Pflah.js";import"./chunk-Q6NGPIAH-yyBomb63.js";import"./chunk-RT4MAWR3-zXy9-Lvt.js";import"./chunk-YBMQ5JGJ-BSnyWZmd.js";import"./chunk-GDY2UAB4-CtQQR0a8.js";import"./chunk-3SMGFRGC-CAu4JRLv.js";import"./chunk-3NPNU5GP-DocZ07Sg.js";import"./chunk-TCEHX7R3-CXPDEVbm.js";import"./chunk-5MVFYWFU-Db9KvrYO.js";import"./chunk-SFMINX4W-J2UrvMpD.js";import"./chunk-JFFVMJIA-0fJenqia.js";import"./chunk-ZUNWM646-DNRJyNPe.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=e(function(e){n.debug(`options str`,e)},`setOptions`),ae=e(function(){return{}},`getOptions`),oe=e(function(){x(),l()},`clear`);function x(){S={}}e(x,`reset`);var se=f.eventmodeling,ce=e(()=>h({...se,...u().eventmodeling}),`getConfig`),S={};function C(){let e=le,{ast:t}=S,r=E();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=N(i,t.dataEntities,r);e=q(e,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(n.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=q(e,{$kind:y,index:a,frame:i,sourceFrame:t})})):e=q(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:L(e.swimlanes)},e}e(C,`getState`);function w(e){S.ast=e}e(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}e(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}e(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}e(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}e(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}e(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}e(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=u();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}e(M,`calculateEntityVisualProps`);function N(e,t,r){let i=u(),a=p(O(e.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},c=`<b>${g(a,r.textMaxWidth,s)}</b>`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=p(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let n=t.find(t=>t.name===e.dataReference?.$refText);n&&(o=n.dataBlockValue,o=o.substring(o.indexOf(`{
|
|
2
|
+
`)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=p(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`<br/>`)}let l=o!==void 0;l&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${o}</code>`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=ee(c,d),m=l?f.width/3:f.width,h={content:c,width:m,height:f.height};return n.debug(`[${e.name}] ${e.entityIdentifier} text`,h),h}e(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}e(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}e(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}e(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}e(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+T.swimlaneGap}return f}e(R,`evolveFramePositioned`);function z(e,t){return e===0&&t.sourceFrames.length===0}e(z,`isFirstFrame`);function B(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}e(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}e(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}e(H,`findBoxByLineIndex`);function U(e,t){let n=t;if(ne(n.frame)||z(n.index,n.frame))return[];let r=V(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let i;return i=n.sourceFrame?V(e.boxes,n.sourceFrame):H(e.boxes,r.swimlane.index,n.index-1),i===void 0?[]:[{$kind:b,frame:n.frame,index:n.index,sourceBox:i,targetBox:r}]}e(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}e(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(e,t){let r=ue[t.$kind];if(r==null)return[];let i=r(e,t);return n.debug(`decided events`,i),i}e(G,`decide`);function K(e,t){let r=t.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},e);return n.debug(`evolve events`,{state:e,newState:r,events:t}),r}e(K,`evolve`);function q(e,t){return K(e,G(e,t))}e(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:a,getAccTitle:o,getAccDescription:d,setAccDescription:c,setDiagramTitle:i,getDiagramTitle:s,setAst:w,getDiagramProps:E,getState:C},Y={parse:e(async e=>{let t=await re(`eventmodeling`,e);n.debug(t),J.setAst(t),te(t,J)},`parse`)},fe=r()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}e(X,`renderD3Box`);function Z(e,t){return e>t}e(Z,`dirUpwards`);function Q(e,t,r,i){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;n.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}e(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}e($,`renderD3Swimlane`);var pe={parser:Y,db:J,renderer:{draw:e(function(e,i,a,o){if(n.debug(`in eventmodeling renderer`,e+`
|
|
3
|
+
`,`id:`,i,a),!fe)throw Error(`EventModeling config not found`);let s=o.db,{themeVariables:c,eventmodeling:l}=r(),u=t(`[id="${i}"]`),d=s.getDiagramProps(),f=s.getState(),p=`em-arrowhead-${i}`,h=c.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,c)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,p,c)),u.append(`defs`).append(`marker`).attr(`id`,p).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),m(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:e(e=>``,`getStyles`)};export{pe as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{q as t}from"./chunk-
|
|
1
|
+
import{t as e}from"./chunk-AQ6EADP3-CZhslHi-.js";import{q as t}from"./chunk-H7VHZCWX-CE1nAmt6.js";import"./chunk-QJSWEUOL-D_rf9gPD.js";import"./chunk-IJBDOHL6-BUKtY6oF.js";import{n,r,t as i}from"./chunk-SLDQ463B-CHY6e_bQ.js";import{t as a}from"./chunk-JQRUD6KW-Dbva2Z17.js";import"./chunk-ZS6VBONO-DBjJO0w9.js";import{n as o}from"./chunk-5IQCK5RY-CCMhl4so.js";import"./chunk-JZGDI5JK-BeTMSSkJ.js";import"./chunk-OJINMHTS-zOCQe4eI.js";import"./chunk-VQC2EELJ-Dc8fIy4R.js";import"./chunk-KD6SPIPN-Qp1Pflah.js";import{n as s}from"./chunk-Q6NGPIAH-yyBomb63.js";import"./chunk-RT4MAWR3-zXy9-Lvt.js";import"./chunk-YBMQ5JGJ-BSnyWZmd.js";import"./chunk-GDY2UAB4-CtQQR0a8.js";import"./chunk-3SMGFRGC-CAu4JRLv.js";import"./chunk-3NPNU5GP-DocZ07Sg.js";import"./chunk-TCEHX7R3-CXPDEVbm.js";import"./chunk-5MVFYWFU-Db9KvrYO.js";import"./chunk-SFMINX4W-J2UrvMpD.js";import"./chunk-JFFVMJIA-0fJenqia.js";import"./chunk-ZUNWM646-DNRJyNPe.js";var c=s().RailroadEbnf.parser.LangiumParser,l=e(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=e(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=e(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=e((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=e(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=e(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=e(e=>{a(e,r),e.title&&r.setTitle(e.title),e.rules.map(e=>r.addRule(m(e)))},`populateDb`),g={parser:{parse:e(e=>{r.clear(),t.debug(`[EBNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);let i=n.value;t.debug(`[EBNF Parser] Parsed rules:`,i.rules.length),h(i),t.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:r}},db:r,renderer:n,styles:i};export{g as diagram};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{r as e,t}from"./chunk-AQ6EADP3-CZhslHi-.js";import{V as n,q as r}from"./chunk-H7VHZCWX-CE1nAmt6.js";import{B as i,F as a,Q as o,R as s,S as c,V as l,X as u,Y as d,b as f,h as p,q as m}from"./chunk-QJSWEUOL-D_rf9gPD.js";import"./chunk-5IMINLNL-DOdTeQri.js";import"./chunk-ZNLK7HRR-B0iFpmW4.js";import"./chunk-2NMSUPJH-B24w-wng.js";import"./chunk-STOV2HOB-GnExfzIX.js";import{n as h,o as g}from"./chunk-VY2OSTJR-Dkgc3Brg.js";import"./chunk-DZP67EKU-B3Mt380j.js";import"./chunk-Z6V44ARX-BjCEsF0Q.js";import"./chunk-VRZKL3EH-DB3KixTQ.js";import"./chunk-ZQN7UHIL-Cy7KAjQt.js";import"./chunk-4OADUZ5Q-CxrSvOwZ.js";import{n as _,r as v}from"./chunk-YDMLL4PJ-IHhMngTz.js";import{t as y}from"./chunk-RCXAM2GK-CUqrWQDV.js";import{t as b}from"./chunk-VTHDQ7BV-b7FsPQZO.js";var x=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],i=[1,7],a=[1,9],o=[1,10],s=[1,11],c=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],h=[1,19],g=[1,28],_=[1,29],v=[1,20],y=[1,18],b=[1,21],x=[1,22],S=[2,6],C=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],w=[1,36],T=[1,37],E=[1,38],D=[1,39],O=[1,40],k=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],A=[1,46],j=[1,47],M=[1,57],N=[43,51,53,54,55,74,75],P=[1,70],F=[1,68],I=[1,65],L=[1,69],R=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],V=[1,77],H=[1,76],U=[69,70,71,72,73],W=[1,91],G=[6,9,45,50],K=[6,9,12,44,45,50,51,52],q=[1,101],J=[1,100],Y=[1,99],X=[18,61],ee=[1,110],te=[1,109],ne=[20,43,51,53,54,55],Z=[18,61,64,66],Q={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},e(n,S,{1:[2,1]}),e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:w,70:T,71:E,72:D,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,r,{5:44}),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),e(C,[2,39]),{15:45,43:A,44:j},{15:48,43:A,44:j},{15:49,43:A,44:j},{10:50,43:h,51:v,53:y,54:b,55:x},{10:51,43:h,51:v,53:y,54:b,55:x},{15:52,43:A,44:j},{17:53,18:[1,54],56:55,57:56,61:M},{10:58,43:h,51:v,53:y,54:b,55:x},{68:59,74:[1,60],75:[1,61]},e(N,[2,77]),e(N,[2,78]),e(N,[2,79]),e(N,[2,80]),e(N,[2,81]),e(C,[2,23]),e(C,[2,24]),e(C,[2,25]),{6:[1,63],7:5,8:6,9:i,10:8,21:a,23:o,25:s,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:p,41:m,43:h,46:g,47:_,51:v,53:y,54:b,55:x},{12:P,42:64,44:F,45:I,48:66,49:67,51:L,52:R},e(z,[2,41]),e(z,[2,42]),{15:72,43:A,44:j,45:I},{12:P,42:73,44:F,45:I,48:66,49:67,51:L,52:R},{6:B,9:V,19:[1,75],35:74,50:H},{12:[1,79],14:[1,80]},e(C,[2,16],{67:35,11:81,16:[1,82],45:I,69:w,70:T,71:E,72:D,73:O}),{18:[1,83]},e(C,[2,13]),{17:84,18:[2,63],56:55,57:56,61:M},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:w,70:T,71:E,72:D,73:O},e(U,[2,82]),e(U,[2,83]),e(C,[2,31]),e(C,S),{6:B,9:V,35:90,45:W,50:H},{43:[1,92],44:[1,93]},e(G,[2,47],{49:94,12:P,44:F,51:L,52:R}),e(K,[2,49]),e(K,[2,54]),e(K,[2,55]),e(K,[2,56]),e(K,[2,57]),e(C,[2,45],{45:I}),{6:B,9:V,35:95,45:W,50:H},e(C,[2,32]),{10:97,36:96,43:h,51:v,53:y,54:b,55:x},e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),{13:98,43:q,53:J,76:Y},{15:102,43:A,44:j},{10:103,43:h,51:v,53:y,54:b,55:x},{17:104,18:[1,105],56:55,57:56,61:M},e(C,[2,11]),{18:[2,64]},e(X,[2,65],{59:106,60:107,63:108,65:ee,66:te}),e([18,61,65,66],[2,71]),{61:[2,70]},e(C,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(C,[2,40]),{12:P,44:F,48:113,49:67,51:L,52:R},e(z,[2,43]),e(z,[2,44]),e(K,[2,50]),e(C,[2,46]),{10:115,20:[1,114],43:h,51:v,53:y,54:b,55:x},e(ne,[2,34]),e(C,[2,7]),e(C,[2,84]),e(C,[2,85]),e(C,[2,86]),{12:[1,116],45:I},{12:[1,118],14:[1,117]},{18:[1,119]},e(C,[2,14]),e(X,[2,66],{60:120,64:[1,121],66:te}),e(X,[2,67]),e(Z,[2,72]),e(X,[2,75]),e(Z,[2,74]),{17:122,18:[1,123],56:55,57:56,61:M},{15:124,43:A,44:j},e(G,[2,48],{49:94,12:P,44:F,51:L,52:R}),{6:B,9:V,35:125,50:H},e(ne,[2,35]),{13:126,43:q,53:J,76:Y},{15:127,43:A,44:j},{13:128,43:q,53:J,76:Y},e(C,[2,12]),e(X,[2,68]),{63:129,65:ee},{18:[1,130]},e(C,[2,19]),e(C,[2,22],{16:[1,131],45:I}),e(C,[2,33]),e(C,[2,10]),{12:[1,132],45:I},e(C,[2,9]),e(Z,[2,73]),e(C,[2,17]),{17:133,18:[1,134],56:55,57:56,61:M},{13:135,43:q,53:J,76:Y},{18:[1,136]},e(C,[2,20]),e(C,[2,8]),e(C,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,typeof h.yylloc>`u`&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e;return e=i.pop()||h.lex()||p,typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((S===null||typeof S>`u`)&&(S=x()),T=s[w]&&s[w][S]),typeof T>`u`||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),typeof E<`u`)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Q.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),23;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),25;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin(`block`),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin(`block_bq`);break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return t.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin(`style`),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin(`style`),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return t.yytext[0];case 82:return 6}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}})();function $(){this.yy={}}return t($,`Parser`),$.prototype=Q,Q.Parser=$,new $})();x.parser=x;var S=x,C=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction=`TB`,this.Cardinality={ZERO_OR_ONE:`ZERO_OR_ONE`,ZERO_OR_MORE:`ZERO_OR_MORE`,ONE_OR_MORE:`ONE_OR_MORE`,ONLY_ONE:`ONLY_ONE`,MD_PARENT:`MD_PARENT`},this.Identification={NON_IDENTIFYING:`NON_IDENTIFYING`,IDENTIFYING:`IDENTIFYING`},this.setAccTitle=o,this.getAccTitle=l,this.setAccDescription=d,this.getAccDescription=m,this.setDiagramTitle=a,this.getDiagramTitle=u,this.getConfig=t(()=>i().er,`getConfig`),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{t(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,r.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:`erBox`,look:i().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),r.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let n=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=``),n.attributes.push(t[i]),r.debug(`Added attribute `,t[i].name)}addRelationship(e,t,n,i){let a;if(this.subGraphLookup.has(e))a=e;else{let t=this.addEntity(e);if(!t)return;a=t.id}let o;if(this.subGraphLookup.has(n))o=n;else{let e=this.addEntity(n);if(!e)return;o=e.id}let s={entityA:a,roleA:t,entityB:o,relSpec:i};this.relationships.push(s),r.debug(`Added new relationship :`,s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}addCssStyles(e,t){for(let n of e){let e=this.entities.get(n),r=this.subGraphLookup.get(n);if(t){if(e)for(let n of t)e.cssStyles.push(n);if(r){r.cssStyles||=[];for(let e of t)r.cssStyles.push(e)}}}}addClass(e,t){e.forEach(e=>{let n=this.classes.get(e);n===void 0&&(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t&&t.forEach(function(e){if(/color/.exec(e)){let t=e.replace(`fill`,`bgFill`);n.textStyles.push(t)}n.styles.push(e)})})}addSubGraph(e,n,i){let a=e.text.trim(),o=i.text,s=t(e=>{let t=new Set,n;return{nodeList:e.filter(e=>{if(e?.stmt)return e.stmt===`dir`&&(n=e.value),!1;if(typeof e!=`string`)return!1;let r=e.trim();return!r||t.has(r)?!1:(t.add(r),!0)}),dir:n}},`uniq`)(n.flat()),c=s.nodeList,l=s.dir;a??=`subGraph`+this.subCount,o||=``,o=this.sanitizeText(o),this.subCount+=1;let u={id:a,nodes:c,title:o.trim(),classes:[],cssStyles:[],dir:l,labelType:this.sanitizeNodeLabelType(i?.type)};return r.info(`Adding`,u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(a,u),a}getSubGraphs(){return this.subGraphs}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n;let r=this.subGraphLookup.get(n);if(r)for(let e of t)r.classes.push(e)}}subgraphNodeCache(e){let t=new Set;for(let n of e)for(let e of n.nodes)t.add(e);return t}makeUniq(e,t){let n=this.subgraphNodeCache(t),i=[];return e.nodes.forEach((t,a)=>{n.has(t)?r.warn(`Entity '${t}' already belongs to another subgraph and will be ignored`):i.push(e.nodes[a])}),{nodes:i}}sanitizeText(e){return s.sanitizeText(e,i())}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,p()}getData(){let e=[],t=[],n=i(),r=this.getSubGraphs(),a=new Map,o=new Map;for(let e=r.length-1;e>=0;e--){let t=r[e];t.nodes.length>0&&o.set(t.id,!0);for(let e of t.nodes)a.set(e,t.id)}for(let t=r.length-1;t>=0;t--){let i=r[t];e.push({id:i.id,label:i.title,labelStyle:``,labelType:i.labelType,parentId:a.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssStyles:i.cssStyles,cssClasses:i.classes.join(` `),shape:`rect`,dir:i.dir,isGroup:!0,look:n.look})}let s=new Set(r.map(e=>e.id)),c=0;for(let t of this.entities.keys()){if(s.has(t))continue;let n=this.entities.get(t);n&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(` `)),n.colorIndex=c++,e.push({...n,parentId:a.get(t),isGroup:!1}))}let l=0;for(let e of this.relationships){let r={id:h(e.entityA,e.entityB,{prefix:`id`,counter:l++}),type:`normal`,curve:`basis`,start:e.entityA,end:e.entityB,label:e.roleA,labelpos:`c`,thickness:`normal`,classes:`relationshipLine`,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType==`IDENTIFYING`?`solid`:`dashed`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.direction}}},w={};e(w,{draw:()=>T});var T=t(async function(e,t,a,o){r.info(`REF0:`),r.info(`Drawing er diagram (unified)`,t);let{securityLevel:s,er:c,layout:l}=i(),u=o.db.getData(),d=y(t,s);u.type=o.type,u.layoutAlgorithm=_(l),u.config.flowchart.nodeSpacing=c?.nodeSpacing||140,u.config.flowchart.rankSpacing=c?.rankSpacing||80,u.direction=o.db.getDirection();let{config:f}=u,{look:p}=f;p===`neo`?u.markers=[`only_one_neo`,`zero_or_one_neo`,`one_or_more_neo`,`zero_or_more_neo`]:u.markers=[`only_one`,`zero_or_one`,`one_or_more`,`zero_or_more`],u.diagramId=t,await v(u,d),u.layoutAlgorithm===`elk`&&d.select(`.edges`).lower();let m=d.selectAll(`[id*="-background"]`);Array.from(m).length>0&&m.each(function(){let e=n(this),t=e.attr(`id`).replace(`-background`,``),r=d.select(`#${CSS.escape(t)}`);if(!r.empty()){let t=r.attr(`transform`);e.attr(`transform`,t)}}),g.insertTitle(d,`erDiagramTitleText`,c?.titleTopMargin??25,o.db.getDiagramTitle()),b(d,8,`erDiagram`,c?.useMaxWidth??!0)},`draw`),E=t((e,t)=>{let n=c;return f(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),D=new Set([`redux-color`,`redux-dark-color`]),O=t(e=>{let{theme:t,look:n,bkgColorArray:r,borderColorArray:i}=e;if(!D.has(t))return``;let a=r?.length>0,o=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)o+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${n}"][data-color-id="color-${t}"].node path {
|
|
9
|
+
stroke: ${i[t]};
|
|
10
|
+
${a?`fill: ${r[t]};`:``}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${n}"][data-color-id="color-${t}"].node rect {
|
|
14
|
+
stroke: ${i[t]};
|
|
15
|
+
${a?`fill: ${r[t]};`:``}
|
|
16
|
+
}
|
|
17
|
+
`;return o},`genColor`),k={parser:S,get db(){return new C},renderer:w,styles:t(e=>{let{look:t,theme:n,erEdgeLabelBackground:r,strokeWidth:i}=e;return`
|
|
18
|
+
${O(e)}
|
|
19
|
+
.entityBox {
|
|
20
|
+
fill: ${e.mainBkg};
|
|
21
|
+
stroke: ${e.nodeBorder};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.relationshipLabelBox {
|
|
25
|
+
fill: ${e.tertiaryColor};
|
|
26
|
+
opacity: 0.7;
|
|
27
|
+
background-color: ${e.tertiaryColor};
|
|
28
|
+
rect {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.labelBkg {
|
|
34
|
+
background-color: ${D.has(n)&&r?r:E(e.tertiaryColor,.5)};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.edgeLabel {
|
|
38
|
+
background-color: ${D.has(n)&&r?r:e.edgeLabelBackground};
|
|
39
|
+
}
|
|
40
|
+
.edgeLabel .label rect {
|
|
41
|
+
fill: ${D.has(n)&&r?r:e.edgeLabelBackground};
|
|
42
|
+
}
|
|
43
|
+
.edgeLabel .label text {
|
|
44
|
+
fill: ${e.textColor};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.edgeLabel .label {
|
|
48
|
+
fill: ${e.nodeBorder};
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.label {
|
|
53
|
+
font-family: ${e.fontFamily};
|
|
54
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.edge-pattern-dashed {
|
|
58
|
+
stroke-dasharray: 8,8;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.node rect,
|
|
62
|
+
.node circle,
|
|
63
|
+
.node ellipse,
|
|
64
|
+
.node polygon
|
|
65
|
+
{
|
|
66
|
+
fill: ${e.mainBkg};
|
|
67
|
+
stroke: ${e.nodeBorder};
|
|
68
|
+
stroke-width: ${t===`neo`?i:`1px`};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.relationshipLine {
|
|
72
|
+
stroke: ${e.lineColor};
|
|
73
|
+
stroke-width: ${t===`neo`?i:`1px`};
|
|
74
|
+
fill: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.marker {
|
|
78
|
+
fill: none !important;
|
|
79
|
+
stroke: ${e.lineColor} !important;
|
|
80
|
+
stroke-width: 1;
|
|
81
|
+
}
|
|
82
|
+
[data-look=neo].labelBkg {
|
|
83
|
+
background-color: ${E(e.tertiaryColor,.5)};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster rect {
|
|
87
|
+
fill: ${e.clusterBkg??e.mainBkg};
|
|
88
|
+
stroke: ${e.clusterBorder??e.nodeBorder};
|
|
89
|
+
stroke-width: 1px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cluster text {
|
|
93
|
+
fill: ${e.titleColor??e.textColor};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cluster-label text {
|
|
97
|
+
fill: ${e.titleColor??e.textColor};
|
|
98
|
+
}
|
|
99
|
+
`},`getStyles`)};export{k as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-ZS6VBONO-DBjJO0w9.js";import{t as e}from"./chunk-OJINMHTS-zOCQe4eI.js";export{e as createEventModelingServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-H7VHZCWX-CE1nAmt6.js";import"./chunk-QJSWEUOL-D_rf9gPD.js";import"./chunk-5IMINLNL-DOdTeQri.js";import"./chunk-ZNLK7HRR-B0iFpmW4.js";import"./chunk-2NMSUPJH-B24w-wng.js";import"./chunk-STOV2HOB-GnExfzIX.js";import"./chunk-VY2OSTJR-Dkgc3Brg.js";import"./chunk-DZP67EKU-B3Mt380j.js";import"./chunk-Z6V44ARX-BjCEsF0Q.js";import"./chunk-VRZKL3EH-DB3KixTQ.js";import"./chunk-ZQN7UHIL-Cy7KAjQt.js";import"./chunk-4OADUZ5Q-CxrSvOwZ.js";import"./chunk-NUDPKBEF-CU1-BQIW.js";import"./chunk-YDMLL4PJ-IHhMngTz.js";import"./chunk-AZZRMDJM-y-xJBuMz.js";import"./chunk-EICP7K5X-CqwE9hui.js";import"./chunk-RCXAM2GK-CUqrWQDV.js";import"./chunk-VTHDQ7BV-b7FsPQZO.js";import{r as e}from"./chunk-CLS4B6BI-Uvx5QNsu.js";export{e as diagram};
|