diff --git a/docs/_docset.yml b/docs/_docset.yml index a31228d0b..6dc37d812 100644 --- a/docs/_docset.yml +++ b/docs/_docset.yml @@ -78,6 +78,7 @@ toc: - file: conditionals.md - file: dropdowns.md - file: definition-lists.md + - file: diagrams.md - file: example_blocks.md - file: file_inclusion.md - file: frontmatter.md diff --git a/docs/syntax/diagrams.md b/docs/syntax/diagrams.md new file mode 100644 index 000000000..5f2ffb5ca --- /dev/null +++ b/docs/syntax/diagrams.md @@ -0,0 +1,232 @@ +# Diagrams + +You can create and embed diagrams using Mermaid.js, a docs-as-code diagramming tool. + +Using Mermaid diagrams has several advantages: + +- Diagrams as code: You can version and edit diagrams without having to use third-party tools. +- Easier contribution: External contributors can add or edit new diagrams easily. +- Consistent look and feel: All Mermaid diagrams are rendered using the same style. +- Improved accessibility: Text can be copied and read by a text-to-speech engine. + +## Create Mermaid diagrams + +To create a Mermaid, you can use the following editors: + +- [Mermaid Live Editor](https://mermaid.live/): Instantly previews Mermaid diagrams. +- [Mermaid Chart](https://www.mermaidchart.com/app/dashboard): Visual editor for Mermaid. +- Create diagrams in Visual Studio Code and preview them using the [VS Code extension](https://docs.mermaidchart.com/plugins/visual-studio-code). +- Other tools, including AI tools, can generate Mermaid diagrams. + +For reference documentation on the Mermaid language, refer to [mermaid.js](https://mermaid.js.org). + +## Syntax guidelines + +When creating Mermaid diagrams, keep these guidelines in mind: + +- Use clear, descriptive node names. +- Use comments (`%% comment text`) to document complex diagrams. +- Break complex diagrams into smaller, more manageable ones. +- Use consistent naming conventions throughout your diagrams. + +## Supported Diagram Types + +Mermaid.js supports various diagram types to visualize different kinds of information: + +- Flowcharts: Visualize processes and workflows. +- Sequence Diagrams: Show interactions between components over time. +- Gantt Charts: Illustrate project schedules and timelines. +- Class Diagrams: Represent object-oriented structures. +- Entity Relationship Diagrams: Model database structures. +- State Diagrams: Illustrate state machines and transitions. +- Pie Charts: Display proportional data. +- User Journey Maps: Visualize user experiences. + +For a full list of supported diagrams, see the [Mermaid.js](https://mermaid.js.org/intro/) documentation. + +### Flowcharts + +This is an example flowchart made with Mermaid: + +:::::{tab-set} + +::::{tab-item} Output + +```mermaid +flowchart LR +A[Jupyter Notebook] --> C +B[MyST Markdown] --> C +C(mystmd) --> D{AST} +D <--> E[LaTeX] +E --> F[PDF] +D --> G[Word] +D --> H[React] +D --> I[HTML] +D <--> J[JATS] +``` + +:::: + +::::{tab-item} Markdown +````markdown +```mermaid +flowchart LR +A[Jupyter Notebook] --> C +B[MyST Markdown] --> C +C(mystmd) --> D{AST} +D <--> E[LaTeX] +E --> F[PDF] +D --> G[Word] +D --> H[React] +D --> I[HTML] +D <--> J[JATS] +``` +```` +:::: + +::::: + + +### Sequence diagrams + +This is an example sequence diagram made with Mermaid: + +:::::{tab-set} + +::::{tab-item} Output + +```mermaid +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop HealthCheck + John->>John: Fight against hypochondria + end + Note right of John: Rational thoughts
prevail! + John-->>Alice: Great! + John->>Bob: How about you? + Bob-->>John: Jolly good! +``` + +:::: + +::::{tab-item} Markdown +````markdown +```mermaid +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop HealthCheck + John->>John: Fight against hypochondria + end + Note right of John: Rational thoughts
prevail! + John-->>Alice: Great! + John->>Bob: How about you? + Bob-->>John: Jolly good! +``` +```` +:::: + +::::: + +### Gantt charts + +This is an example Gantt chart made with Mermaid: + +:::::{tab-set} + +::::{tab-item} Output + +```mermaid +gantt +dateFormat YYYY-MM-DD +title Adding GANTT diagram to mermaid +excludes weekdays 2014-01-10 + +section A section +Completed task :done, des1, 2014-01-06,2014-01-08 +Active task :active, des2, 2014-01-09, 3d +Future task : des3, after des2, 5d +Future task2 : des4, after des3, 5d +``` + +:::: + +::::{tab-item} Markdown +````markdown +```mermaid +gantt +dateFormat YYYY-MM-DD +title Adding GANTT diagram to mermaid +excludes weekdays 2014-01-10 + +section A section +Completed task :done, des1, 2014-01-06,2014-01-08 +Active task :active, des2, 2014-01-09, 3d +Future task : des3, after des2, 5d +Future task2 : des4, after des3, 5d +``` +```` +:::: + +::::: + +### Class diagrams + +This is an example class diagram made with Mermaid: + +:::::{tab-set} + +::::{tab-item} Output + +```mermaid +classDiagram +Class01 <|-- AveryLongClass : Cool +Class03 *-- Class04 +Class05 o-- Class06 +Class07 .. Class08 +Class09 --> C2 : Where am i? +Class09 --* C3 +Class09 --|> Class07 +Class07 : equals() +Class07 : Object[] elementData +Class01 : size() +Class01 : int chimp +Class01 : int gorilla +Class08 <--> C2: Cool label +``` + +:::: + +::::{tab-item} Markdown +````markdown +```mermaid +classDiagram +Class01 <|-- AveryLongClass : Cool +Class03 *-- Class04 +Class05 o-- Class06 +Class07 .. Class08 +Class09 --> C2 : Where am i? +Class09 --* C3 +Class09 --|> Class07 +Class07 : equals() +Class07 : Object[] elementData +Class01 : size() +Class01 : int chimp +Class01 : int gorilla +Class08 <--> C2: Cool label +``` +```` +:::: + +::::: + +## Troubleshooting + +These are the most common issues when creating Mermaid diagrams and their solution: + +- Syntax errors: Ensure proper indentation and syntax. +- Rendering issues: Check for unsupported characters or syntax. +- Performance: Simplify diagrams with many nodes for better performance. \ No newline at end of file diff --git a/src/Elastic.Markdown/.prettierignore b/src/Elastic.Markdown/.prettierignore index 1b8ac8894..bd6d7b7f6 100644 --- a/src/Elastic.Markdown/.prettierignore +++ b/src/Elastic.Markdown/.prettierignore @@ -1,3 +1,5 @@ # Ignore artifacts: build coverage +mermaid.js +mermaid.tiny.js diff --git a/src/Elastic.Markdown/Assets/main.ts b/src/Elastic.Markdown/Assets/main.ts index 0f20fe427..4184618fc 100644 --- a/src/Elastic.Markdown/Assets/main.ts +++ b/src/Elastic.Markdown/Assets/main.ts @@ -52,9 +52,9 @@ document.addEventListener('htmx:beforeRequest', function (event) { } } }) - document.body.addEventListener('htmx:oobBeforeSwap', function (event) { // This is needed to scroll to the top of the page when the content is swapped + if ( event.target.id === 'main-container' || event.target.id === 'markdown-content' || diff --git a/src/Elastic.Markdown/Assets/markdown/mermaid.css b/src/Elastic.Markdown/Assets/markdown/mermaid.css new file mode 100644 index 000000000..2cdf50edd --- /dev/null +++ b/src/Elastic.Markdown/Assets/markdown/mermaid.css @@ -0,0 +1,91 @@ +.mermaid { + @apply border-grey-10 mt-4 rounded-md border-2 font-sans; + + font-size: 0.875em !important; + + .nodeLabel { + @apply font-mono; + font-size: 0.875em !important; + } + .labelText { + @apply font-mono; + font-size: 0.875em !important; + } + .loopText { + @apply font-mono; + font-size: 0.875em !important; + } + .noteText { + @apply font-mono; + font-size: 0.875em !important; + } + .messageText { + @apply font-mono; + font-size: 0.875em !important; + } + text.actor { + @apply font-mono; + font-size: 0.875em !important; + } + .actor { + stroke: var(--color-blue-elastic-50); + fill: var(--color-blue-elastic-10); + } + text.actor { + fill: var(--color-ink-dark); + stroke: none; + @apply font-mono; + font-size: 0.875em !important; + } + + .actor-line { + stroke: var(--color-grey-70); + } + + .messageLine0 { + stroke-width: 1.5; + stroke: black; + } + + .messageLine1 { + stroke-width: 1.5; + stroke: var(--color-ink-dark); + } + + #arrowhead { + fill: var(--color-ink-dark); + } + + .messageText { + fill: var(--color-ink-dark); + stroke: none; + @apply font-mono; + font-size: 1em; + } + + .labelBox { + stroke: #ccccff; + fill: #ececff; + } + + .labelText { + fill: var(--color-ink-dark); + stroke: none; + @apply font-mono; + } + + .loopText { + fill: var(--color-ink-dark); + stroke: none; + font-size: 1em; + } + .note { + fill: var(--color-yellow-10) !important; + stroke: var(--color-yellow-50) !important; + font-size: 1em !important; + } + + rect.background { + display: none; + } +} diff --git a/src/Elastic.Markdown/Assets/mermaid.js b/src/Elastic.Markdown/Assets/mermaid.js new file mode 100644 index 000000000..81bc10908 --- /dev/null +++ b/src/Elastic.Markdown/Assets/mermaid.js @@ -0,0 +1,26 @@ +var mermaidInitialize = function () { + mermaid.initialize({ + startOnLoad: false, theme: 'base', + themeVariables: { + fontFamily: 'inherit', + altFontFamily: 'inherit', + fontSize: '0.875em', + }, + fontFamily: 'inherit', altFontFamily: 'inherit', + "sequence": { + "actorFontFamily": "inherit", + "noteFontFamily": "inherit", + "messageFontFamily": "inherit" + }, + "journey": { + "taskFontFamily": "inherit" + } + }); + mermaid.run({ + nodes: document.querySelectorAll('.mermaid'), + }); +} + +document.addEventListener('htmx:load', function () { + mermaidInitialize() +}) diff --git a/src/Elastic.Markdown/Assets/styles.css b/src/Elastic.Markdown/Assets/styles.css index e1b19ba7a..3ad0a6486 100644 --- a/src/Elastic.Markdown/Assets/styles.css +++ b/src/Elastic.Markdown/Assets/styles.css @@ -5,6 +5,7 @@ @import './markdown/list.css'; @import './markdown/tabs.css'; @import './markdown/code.css'; +@import './markdown/mermaid.css'; @import './copybutton.css'; @import './markdown/admonition.css'; @import './markdown/dropdown.css'; diff --git a/src/Elastic.Markdown/IO/MarkdownFile.cs b/src/Elastic.Markdown/IO/MarkdownFile.cs index 6552f2ea7..fccb58101 100644 --- a/src/Elastic.Markdown/IO/MarkdownFile.cs +++ b/src/Elastic.Markdown/IO/MarkdownFile.cs @@ -13,6 +13,7 @@ using Elastic.Markdown.IO.Navigation; using Elastic.Markdown.Links.CrossLinks; using Elastic.Markdown.Myst; +using Elastic.Markdown.Myst.CodeBlocks; using Elastic.Markdown.Myst.Directives; using Elastic.Markdown.Myst.FrontMatter; using Elastic.Markdown.Myst.InlineParsers; @@ -152,6 +153,8 @@ public string Url /// because we need to minimally parse to see the anchors anchor validation is deferred. public IReadOnlyDictionary? AnchorRemapping { get; set; } + public bool HasMermaidBlock { get; private set; } + private void ValidateAnchorRemapping() { if (AnchorRemapping is null) @@ -187,6 +190,9 @@ public async Task ParseFullAsync(Cancel ctx) _ = await MinimalParseAsync(ctx); var document = await GetParseDocumentAsync(ctx); + + HasMermaidBlock = document.Descendants().Any(b => b.Language == "mermaid"); + return document; } @@ -333,7 +339,7 @@ private YamlFrontMatter ProcessYamlFrontMatter(MarkdownDocument document) Title = deprecatedTitle; } - // set title on yaml front matter manually. + // set title on YAML front matter manually. // frontmatter gets passed around as page information throughout fm.Title = Title; return fm; @@ -359,7 +365,7 @@ private YamlFrontMatter ReadYamlFrontMatter(string raw) public static string CreateHtml(MarkdownDocument document) { - //we manually render title and optionally append an applies block embedded in yaml front matter. + //we manually render the title and optionally append an `applies block` embedded in YAML front matter. var h1 = document.Descendants().FirstOrDefault(h => h.Level == 1); if (h1 is not null) _ = document.Remove(h1); diff --git a/src/Elastic.Markdown/Myst/Directives/AppliesToDirective.cs b/src/Elastic.Markdown/Myst/CodeBlocks/AppliesToCodeBlock.cs similarity index 72% rename from src/Elastic.Markdown/Myst/Directives/AppliesToDirective.cs rename to src/Elastic.Markdown/Myst/CodeBlocks/AppliesToCodeBlock.cs index b42574e0f..8c4e518c6 100644 --- a/src/Elastic.Markdown/Myst/Directives/AppliesToDirective.cs +++ b/src/Elastic.Markdown/Myst/CodeBlocks/AppliesToCodeBlock.cs @@ -2,14 +2,12 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -using Elastic.Markdown.Myst.CodeBlocks; using Elastic.Markdown.Myst.FrontMatter; using Markdig.Parsers; -namespace Elastic.Markdown.Myst.Directives; +namespace Elastic.Markdown.Myst.CodeBlocks; - -public class AppliesToDirective(BlockParser parser, ParserContext context) +public class AppliesToCodeBlock(BlockParser parser, ParserContext context) : EnhancedCodeBlock(parser, context), IApplicableToElement { public ApplicableTo? AppliesTo { get; set; } diff --git a/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockHtmlRenderer.cs b/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockHtmlRenderer.cs index 40fdd26e6..dbfafd869 100644 --- a/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockHtmlRenderer.cs +++ b/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockHtmlRenderer.cs @@ -42,7 +42,7 @@ public static void RenderCodeBlockLines(HtmlRenderer renderer, EnhancedCodeBlock if (indent >= commonIndent) slice.Start += commonIndent; - if (!hasCode) + if (!hasCode && block.Language != "mermaid") { _ = renderer.Write($""); hasCode = true; @@ -115,7 +115,7 @@ private static int CountIndentation(StringSlice slice) protected override void Write(HtmlRenderer renderer, EnhancedCodeBlock block) { - if (block is AppliesToDirective appliesToDirective) + if (block is AppliesToCodeBlock appliesToDirective) { RenderAppliesToHtml(renderer, appliesToDirective); return; @@ -229,9 +229,9 @@ protected override void Write(HtmlRenderer renderer, EnhancedCodeBlock block) } [SuppressMessage("Reliability", "CA2012:Use ValueTasks correctly")] - private static void RenderAppliesToHtml(HtmlRenderer renderer, AppliesToDirective appliesToDirective) + private static void RenderAppliesToHtml(HtmlRenderer renderer, AppliesToCodeBlock appliesToCodeBlock) { - var appliesTo = appliesToDirective.AppliesTo; + var appliesTo = appliesToCodeBlock.AppliesTo; var slice = ApplicableToDirective.Create(appliesTo); if (appliesTo is null || appliesTo == FrontMatter.ApplicableTo.All) return; diff --git a/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockParser.cs b/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockParser.cs index 6269e3459..243c596e9 100644 --- a/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockParser.cs +++ b/src/Elastic.Markdown/Myst/CodeBlocks/EnhancedCodeBlockParser.cs @@ -34,7 +34,7 @@ protected override EnhancedCodeBlock CreateFencedBlock(BlockProcessor processor) var lineSpan = processor.Line.AsSpan(); var codeBlock = lineSpan.IndexOf("{applies_to}") > -1 - ? new AppliesToDirective(this, context) + ? new AppliesToCodeBlock(this, context) { IndentCount = processor.Indent } @@ -110,7 +110,7 @@ public override bool Close(BlockProcessor processor, Block block) if (lines.Lines is null) return base.Close(processor, block); - if (codeBlock is not AppliesToDirective appliesToDirective) + if (codeBlock is not AppliesToCodeBlock appliesToDirective) ProcessCodeBlock(lines, language, codeBlock, context); else ProcessAppliesToDirective(appliesToDirective, lines); @@ -118,23 +118,23 @@ public override bool Close(BlockProcessor processor, Block block) return base.Close(processor, block); } - private static void ProcessAppliesToDirective(AppliesToDirective appliesToDirective, StringLineGroup lines) + private static void ProcessAppliesToDirective(AppliesToCodeBlock appliesToCodeBlock, StringLineGroup lines) { var yaml = lines.ToSlice().AsSpan().ToString(); try { var applicableTo = YamlSerialization.Deserialize(yaml); - appliesToDirective.AppliesTo = applicableTo; - if (appliesToDirective.AppliesTo.Warnings is null) + appliesToCodeBlock.AppliesTo = applicableTo; + if (appliesToCodeBlock.AppliesTo.Warnings is null) return; - foreach (var warning in appliesToDirective.AppliesTo.Warnings) - appliesToDirective.EmitWarning(warning); + foreach (var warning in appliesToCodeBlock.AppliesTo.Warnings) + appliesToCodeBlock.EmitWarning(warning); applicableTo.Warnings = null; } catch (Exception e) { - appliesToDirective.EmitError($"Unable to parse applies_to directive: {yaml}", e); + appliesToCodeBlock.EmitError($"Unable to parse applies_to directive: {yaml}", e); } } diff --git a/src/Elastic.Markdown/Myst/CodeBlocks/SupportedLanguages.cs b/src/Elastic.Markdown/Myst/CodeBlocks/SupportedLanguages.cs index 4bca40a69..4ab170b06 100644 --- a/src/Elastic.Markdown/Myst/CodeBlocks/SupportedLanguages.cs +++ b/src/Elastic.Markdown/Myst/CodeBlocks/SupportedLanguages.cs @@ -27,6 +27,7 @@ public static class CodeBlock { "javascript", "js, jsx" }, // JavaScript { "json", "jsonc" }, // JSON { "kotlin", "kt" }, // Kotlin + { "mermaid", ""}, { "markdown", "md, mkdown, mkd" }, // Markdown { "nginx", "nginxconf" }, // Nginx { "php", "" }, // PHP diff --git a/src/Elastic.Markdown/Myst/Directives/DirectiveBlockParser.cs b/src/Elastic.Markdown/Myst/Directives/DirectiveBlockParser.cs index b2a3cf803..9a5d37a40 100644 --- a/src/Elastic.Markdown/Myst/Directives/DirectiveBlockParser.cs +++ b/src/Elastic.Markdown/Myst/Directives/DirectiveBlockParser.cs @@ -46,7 +46,6 @@ public DirectiveBlockParser() { "grid", 26 }, { "grid-item-card", 26 }, { "card", 25 }, - { "mermaid", 20 }, { "aside", 4 }, { "margin", 4 }, { "sidebar", 4 }, @@ -92,12 +91,6 @@ protected override DirectiveBlock CreateFencedBlock(BlockProcessor processor) if (info.IndexOf("{figure-md}") > 0) return new FigureBlock(this, context); - // this is currently listed as unsupported - // leaving the parsing in until we are confident we don't want this - // for dev-docs - if (info.IndexOf("{mermaid}") > 0) - return new MermaidBlock(this, context); - if (info.IndexOf("{include}") > 0) return new IncludeBlock(this, context); diff --git a/src/Elastic.Markdown/Myst/Directives/DirectiveHtmlRenderer.cs b/src/Elastic.Markdown/Myst/Directives/DirectiveHtmlRenderer.cs index 6721ac15a..d0bc0d327 100644 --- a/src/Elastic.Markdown/Myst/Directives/DirectiveHtmlRenderer.cs +++ b/src/Elastic.Markdown/Myst/Directives/DirectiveHtmlRenderer.cs @@ -29,9 +29,6 @@ protected override void Write(HtmlRenderer renderer, DirectiveBlock directiveBlo switch (directiveBlock) { - case MermaidBlock mermaidBlock: - WriteMermaid(renderer, mermaidBlock); - return; case FigureBlock imageBlock: WriteFigure(renderer, imageBlock); return; @@ -206,12 +203,6 @@ private static void WriteTabItem(HtmlRenderer renderer, TabItemBlock block) RenderRazorSlice(slice, renderer); } - private static void WriteMermaid(HtmlRenderer renderer, MermaidBlock block) - { - var slice = Mermaid.Create(new MermaidViewModel { DirectiveBlock = block }); - RenderRazorSliceRawContent(slice, renderer, block); - } - private static void WriteLiteralIncludeBlock(HtmlRenderer renderer, IncludeBlock block) { if (!block.Found || block.IncludePath is null) @@ -289,71 +280,7 @@ private static void WriteSettingsBlock(HtmlRenderer renderer, SettingsBlock bloc } [SuppressMessage("Reliability", "CA2012:Use ValueTasks correctly")] - private static void RenderRazorSlice(RazorSlice slice, HtmlRenderer renderer) => slice.RenderAsync(renderer.Writer).GetAwaiter().GetResult(); - - [SuppressMessage("Reliability", "CA2012:Use ValueTasks correctly")] - private static void RenderRazorSliceRawContent(RazorSlice slice, HtmlRenderer renderer, DirectiveBlock obj) - where T : DirectiveViewModel - { - var html = slice.RenderAsync().GetAwaiter().GetResult(); - var blocks = html.Split("[CONTENT]", 2, StringSplitOptions.RemoveEmptyEntries); - _ = renderer.Write(blocks[0]); - foreach (var o in obj) - Render(o); - - _ = renderer.Write(blocks[1]); - - void RenderLeaf(LeafBlock p) - { - _ = renderer.WriteLeafRawLines(p, true, false, false); - renderer.EnableHtmlForInline = false; - foreach (var oo in p.Inline ?? []) - { - if (oo is SubstitutionLeaf sl) - _ = renderer.Write(sl.Replacement); - else if (oo is LiteralInline li) - renderer.Write(li); - else if (oo is LineBreakInline) - _ = renderer.WriteLine(); - else if (oo is Role r) - { - _ = renderer.Write(new string(r.DelimiterChar, r.DelimiterCount)); - renderer.WriteChildren(r); - } - - else - _ = renderer.Write($"(LeafBlock: {oo.GetType().Name}"); - } - - renderer.EnableHtmlForInline = true; - } + private static void RenderRazorSlice(RazorSlice slice, HtmlRenderer renderer) => + slice.RenderAsync(renderer.Writer).GetAwaiter().GetResult(); - void RenderListBlock(ListBlock l) - { - foreach (var bb in l) - { - if (bb is LeafBlock lbi) - RenderLeaf(lbi); - else if (bb is ListItemBlock ll) - { - _ = renderer.Write(ll.TriviaBefore); - _ = renderer.Write("-"); - foreach (var lll in ll) - Render(lll); - } - else - _ = renderer.Write($"(ListBlock: {l.GetType().Name}"); - } - } - - void Render(Block o) - { - if (o is LeafBlock p) - RenderLeaf(p); - else if (o is ListBlock l) - RenderListBlock(l); - else - _ = renderer.Write($"(Block: {o.GetType().Name}"); - } - } } diff --git a/src/Elastic.Markdown/Myst/Directives/MermaidBlock.cs b/src/Elastic.Markdown/Myst/Directives/MermaidBlock.cs deleted file mode 100644 index 92ff65313..000000000 --- a/src/Elastic.Markdown/Myst/Directives/MermaidBlock.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information -namespace Elastic.Markdown.Myst.Directives; - -public class MermaidBlock(DirectiveBlockParser parser, ParserContext context) : DirectiveBlock(parser, context) -{ - public override string Directive => "mermaid"; - - public override void FinalizeAndValidate(ParserContext context) - { - } -} diff --git a/src/Elastic.Markdown/Slices/Directives/Code.cshtml b/src/Elastic.Markdown/Slices/Directives/Code.cshtml index 5178bc778..cd8389727 100644 --- a/src/Elastic.Markdown/Slices/Directives/Code.cshtml +++ b/src/Elastic.Markdown/Slices/Directives/Code.cshtml @@ -1,13 +1,22 @@ @inherits RazorSlice -
-
- @if (!string.IsNullOrEmpty(Model.Caption)) - { -
- @Model.Caption - -
- } -
@if (!string.IsNullOrEmpty(Model.ApiCallHeader)) { @Model.ApiCallHeader }@(Model.RenderBlock())
+@if (Model.Language == "mermaid") +{ +
+%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '1em'}}}%%
+		@(Model.RenderBlock())
+	
+} +else { +
+
+ @if (!string.IsNullOrEmpty(Model.Caption)) + { +
+ @Model.Caption + +
+ } +
@if (!string.IsNullOrEmpty(Model.ApiCallHeader)) { @Model.ApiCallHeader }@(Model.RenderBlock())
+
-
+} diff --git a/src/Elastic.Markdown/Slices/Directives/Mermaid.cshtml b/src/Elastic.Markdown/Slices/Directives/Mermaid.cshtml deleted file mode 100644 index dd908b1b3..000000000 --- a/src/Elastic.Markdown/Slices/Directives/Mermaid.cshtml +++ /dev/null @@ -1,4 +0,0 @@ -@inherits RazorSlice -
- [CONTENT] -
\ No newline at end of file diff --git a/src/Elastic.Markdown/Slices/Directives/_ViewModels.cs b/src/Elastic.Markdown/Slices/Directives/_ViewModels.cs index 9680d896b..6f5a680f4 100644 --- a/src/Elastic.Markdown/Slices/Directives/_ViewModels.cs +++ b/src/Elastic.Markdown/Slices/Directives/_ViewModels.cs @@ -122,8 +122,6 @@ public class SettingsViewModel public required Func RenderMarkdown { get; init; } } -public class MermaidViewModel : DirectiveViewModel; - public class StepperViewModel : DirectiveViewModel; public class StepViewModel : DirectiveViewModel diff --git a/src/Elastic.Markdown/Slices/Layout/_Scripts.cshtml b/src/Elastic.Markdown/Slices/Layout/_Scripts.cshtml deleted file mode 100644 index 1d625db25..000000000 --- a/src/Elastic.Markdown/Slices/Layout/_Scripts.cshtml +++ /dev/null @@ -1,21 +0,0 @@ -@inherits RazorSlice - - - - - - - - - - - - - - - - - - - - diff --git a/src/Elastic.Markdown/Slices/_Layout.cshtml b/src/Elastic.Markdown/Slices/_Layout.cshtml index 0838d11c0..0913ece89 100644 --- a/src/Elastic.Markdown/Slices/_Layout.cshtml +++ b/src/Elastic.Markdown/Slices/_Layout.cshtml @@ -48,6 +48,11 @@
@await RenderBodyAsync() + @if (Model.CurrentDocument.HasMermaidBlock) + { + + + }
@await RenderPartialAsync(_PrevNextNav.Create(Model)) diff --git a/src/Elastic.Markdown/_static/mermaid.js b/src/Elastic.Markdown/_static/mermaid.js new file mode 100644 index 000000000..ac509ac2e --- /dev/null +++ b/src/Elastic.Markdown/_static/mermaid.js @@ -0,0 +1,2 @@ +!function(){var i=function(){mermaid.initialize({startOnLoad:!1,theme:"base",themeVariables:{fontFamily:"inherit",altFontFamily:"inherit",fontSize:"0.875em"},fontFamily:"inherit",altFontFamily:"inherit",sequence:{actorFontFamily:"inherit",noteFontFamily:"inherit",messageFontFamily:"inherit"},journey:{taskFontFamily:"inherit"}}),mermaid.run({nodes:document.querySelectorAll(".mermaid")})};document.addEventListener("htmx:load",function(){i()})}(); +//# sourceMappingURL=mermaid.js.map diff --git a/src/Elastic.Markdown/_static/mermaid.js.map b/src/Elastic.Markdown/_static/mermaid.js.map new file mode 100644 index 000000000..3f032a0f3 --- /dev/null +++ b/src/Elastic.Markdown/_static/mermaid.js.map @@ -0,0 +1 @@ +{"mappings":"C,A,WCAA,IAAI,EAAoB,WACpB,QAAQ,UAAU,CAAC,CACf,YAAa,CAAA,EAAO,MAAO,OAC3B,eAAgB,CACZ,WAAY,UACZ,cAAe,UACf,SAAU,SACd,EACA,WAAY,UAAW,cAAe,UACtC,SAAY,CACR,gBAAmB,UACnB,eAAkB,UAClB,kBAAqB,SACzB,EACA,QAAW,CACP,eAAkB,SACtB,CACJ,GACA,QAAQ,GAAG,CAAC,CACR,MAAO,SAAS,gBAAgB,CAAC,WACrC,EACJ,EAEA,SAAS,gBAAgB,CAAC,YAAa,WACnC,GACJ,E","sources":["","Assets/mermaid.js"],"sourcesContent":["(function () {\nvar $c5aff1012d4e5656$var$mermaidInitialize = function() {\n mermaid.initialize({\n startOnLoad: false,\n theme: 'base',\n themeVariables: {\n fontFamily: 'inherit',\n altFontFamily: 'inherit',\n fontSize: '0.875em'\n },\n fontFamily: 'inherit',\n altFontFamily: 'inherit',\n \"sequence\": {\n \"actorFontFamily\": \"inherit\",\n \"noteFontFamily\": \"inherit\",\n \"messageFontFamily\": \"inherit\"\n },\n \"journey\": {\n \"taskFontFamily\": \"inherit\"\n }\n });\n mermaid.run({\n nodes: document.querySelectorAll('.mermaid')\n });\n};\ndocument.addEventListener('htmx:load', function() {\n $c5aff1012d4e5656$var$mermaidInitialize();\n});\n\n})();\n//# sourceMappingURL=mermaid.js.map\n","var mermaidInitialize = function () {\n mermaid.initialize({\n startOnLoad: false, theme: 'base',\n themeVariables: {\n fontFamily: 'inherit',\n altFontFamily: 'inherit',\n fontSize: '0.875em',\n },\n fontFamily: 'inherit', altFontFamily: 'inherit',\n \"sequence\": {\n \"actorFontFamily\": \"inherit\",\n \"noteFontFamily\": \"inherit\",\n \"messageFontFamily\": \"inherit\"\n },\n \"journey\": {\n \"taskFontFamily\": \"inherit\"\n }\n });\n mermaid.run({\n nodes: document.querySelectorAll('.mermaid'),\n });\n}\n\ndocument.addEventListener('htmx:load', function () {\n mermaidInitialize()\n})\n"],"names":["$c5aff1012d4e5656$var$mermaidInitialize","mermaid","initialize","startOnLoad","theme","themeVariables","fontFamily","altFontFamily","fontSize","run","nodes","document","querySelectorAll","addEventListener"],"version":3,"file":"mermaid.js.map"} \ No newline at end of file diff --git a/src/Elastic.Markdown/_static/mermaid.tiny.js b/src/Elastic.Markdown/_static/mermaid.tiny.js new file mode 100644 index 000000000..93676db60 --- /dev/null +++ b/src/Elastic.Markdown/_static/mermaid.tiny.js @@ -0,0 +1,1995 @@ +"use strict";var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var wot=Object.create;var Fm=Object.defineProperty;var Eot=Object.getOwnPropertyDescriptor;var vot=Object.getOwnPropertyNames;var Aot=Object.getPrototypeOf,Lot=Object.prototype.hasOwnProperty;var a=(e,t)=>Fm(e,"name",{value:t,configurable:!0});var x=(e,t)=>()=>(e&&(t=e(e=0)),t);var bs=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Be=(e,t)=>{for(var r in t)Fm(e,r,{get:t[r],enumerable:!0})},qy=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vot(t))!Lot.call(e,i)&&i!==r&&Fm(e,i,{get:()=>t[i],enumerable:!(n=Eot(t,i))||n.enumerable});return e},je=(e,t,r)=>(qy(e,t,"default"),r&&qy(r,t,"default")),Ki=(e,t,r)=>(r=e!=null?wot(Aot(e)):{},qy(t||!e||!e.__esModule?Fm(r,"default",{value:e,enumerable:!0}):r,e)),Rot=e=>qy(Fm({},"__esModule",{value:!0}),e);var Hy=bs((lC,cC)=>{"use strict";(function(e,t){typeof lC=="object"&&typeof cC<"u"?cC.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(lC,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",s="minute",o="hour",l="day",u="week",h="month",f="quarter",d="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(v){var R=["th","st","nd","rd"],B=v%100;return"["+v+(R[(B-20)%10]||R[B]||R[0])+"]"},"ordinal")},k=a(function(v,R,B){var I=String(v);return!I||I.length>=R?v:""+Array(R+1-I.length).join(B)+v},"m"),T={s:k,z:a(function(v){var R=-v.utcOffset(),B=Math.abs(R),I=Math.floor(B/60),M=B%60;return(R<=0?"+":"-")+k(I,2,"0")+":"+k(M,2,"0")},"z"),m:a(function v(R,B){if(R.date()1)return v(N[0])}else{var E=R.name;L[E]=R,M=E}return!I&&M&&(_=M),M||!I&&_},"t"),w=a(function(v,R){if(D(v))return v.clone();var B=typeof R=="object"?R:{};return B.date=v,B.args=arguments,new F(B)},"O"),A=T;A.l=$,A.i=D,A.w=function(v,R){return w(v,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var F=function(){function v(B){this.$L=$(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[C]=!0}a(v,"M");var R=v.prototype;return R.parse=function(B){this.$d=function(I){var M=I.date,O=I.utc;if(M===null)return new Date(NaN);if(A.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var N=M.match(g);if(N){var E=N[2]-1||0,V=(N[7]||"0").substring(0,3);return O?new Date(Date.UTC(N[1],E,N[3]||1,N[4]||0,N[5]||0,N[6]||0,V)):new Date(N[1],E,N[3]||1,N[4]||0,N[5]||0,N[6]||0,V)}}return new Date(M)}(B),this.init()},R.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},R.$utils=function(){return A},R.isValid=function(){return this.$d.toString()!==m},R.isSame=function(B,I){var M=w(B);return this.startOf(I)<=M&&M<=this.endOf(I)},R.isAfter=function(B,I){return w(B){"use strict";t7=Ki(Hy(),1),Yo={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},P={trace:a((...e)=>{},"trace"),debug:a((...e)=>{},"debug"),info:a((...e)=>{},"info"),warn:a((...e)=>{},"warn"),error:a((...e)=>{},"error"),fatal:a((...e)=>{},"fatal")},$m=a(function(e="fatal"){let t=Yo.fatal;typeof e=="string"?e.toLowerCase()in Yo&&(t=Yo[e]):typeof e=="number"&&(t=e),P.trace=()=>{},P.debug=()=>{},P.info=()=>{},P.warn=()=>{},P.error=()=>{},P.fatal=()=>{},t<=Yo.fatal&&(P.fatal=console.error?console.error.bind(console,$s("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",$s("FATAL"))),t<=Yo.error&&(P.error=console.error?console.error.bind(console,$s("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",$s("ERROR"))),t<=Yo.warn&&(P.warn=console.warn?console.warn.bind(console,$s("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",$s("WARN"))),t<=Yo.info&&(P.info=console.info?console.info.bind(console,$s("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",$s("INFO"))),t<=Yo.debug&&(P.debug=console.debug?console.debug.bind(console,$s("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$s("DEBUG"))),t<=Yo.trace&&(P.trace=console.debug?console.debug.bind(console,$s("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",$s("TRACE")))},"setLogLevel"),$s=a(e=>`%c${(0,t7.default)().format("ss.SSS")} : ${e} : `,"format")});var Dot,Hh,uC,e7,Yy=x(()=>{"use strict";Dot=Object.freeze({left:0,top:0,width:16,height:16}),Hh=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),uC=Object.freeze({...Dot,...Hh}),e7=Object.freeze({...uC,body:"",hidden:!1})});var Iot,r7,n7=x(()=>{"use strict";Yy();Iot=Object.freeze({width:null,height:null}),r7=Object.freeze({...Iot,...Hh})});var hC,Xy,i7=x(()=>{"use strict";hC=a((e,t,r,n="")=>{let i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return t&&!Xy(h)?null:h}let s=i[0],o=s.split("-");if(o.length>1){let l={provider:n,prefix:o.shift(),name:o.join("-")};return t&&!Xy(l)?null:l}if(r&&n===""){let l={provider:n,prefix:"",name:s};return t&&!Xy(l,r)?null:l}return null},"stringToIcon"),Xy=a((e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,"validateIconName")});function s7(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}var a7=x(()=>{"use strict";a(s7,"mergeIconTransformations")});function fC(e,t){let r=s7(e,t);for(let n in e7)n in Hh?n in e&&!(n in r)&&(r[n]=Hh[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}var o7=x(()=>{"use strict";Yy();a7();a(fC,"mergeIconData")});function l7(e,t){let r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function s(o){if(r[o])return i[o]=[];if(!(o in i)){i[o]=null;let l=n[o]&&n[o].parent,u=l&&s(l);u&&(i[o]=[l].concat(u))}return i[o]}return a(s,"resolve"),(t||Object.keys(r).concat(Object.keys(n))).forEach(s),i}var c7=x(()=>{"use strict";a(l7,"getIconsTree")});function u7(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),s={};function o(l){s=fC(n[l]||i[l],s)}return a(o,"parse"),o(t),r.forEach(o),fC(e,s)}function dC(e,t){if(e.icons[t])return u7(e,t,[]);let r=l7(e,[t])[t];return r?u7(e,t,r):null}var h7=x(()=>{"use strict";o7();c7();a(u7,"internalGetIconData");a(dC,"getIconData")});function pC(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;let n=e.split(Not);if(n===null||!n.length)return e;let i=[],s=n.shift(),o=Mot.test(s);for(;;){if(o){let l=parseFloat(s);isNaN(l)?i.push(s):i.push(Math.ceil(l*t*r)/r)}else i.push(s);if(s=n.shift(),s===void 0)return i.join("");o=!o}}var Not,Mot,f7=x(()=>{"use strict";Not=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Mot=/^-?[0-9.]*[0-9]+[0-9.]*$/g;a(pC,"calculateSize")});function Oot(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;n>=0;){let i=e.indexOf(">",n),s=e.indexOf("",s);if(o===-1)break;r+=e.slice(i+1,s).trim(),e=e.slice(0,n).trim()+e.slice(o+1)}return{defs:r,content:e}}function Pot(e,t){return e?""+e+""+t:t}function d7(e,t,r){let n=Oot(e);return Pot(n.defs,t+n.content+r)}var p7=x(()=>{"use strict";a(Oot,"splitSVGDefs");a(Pot,"mergeDefsAndContent");a(d7,"wrapSVGContent")});function mC(e,t){let r={...uC,...e},n={...r7,...t},i={left:r.left,top:r.top,width:r.width,height:r.height},s=r.body;[r,n].forEach(y=>{let b=[],k=y.hFlip,T=y.vFlip,_=y.rotate;k?T?_+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):T&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let L;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:L=i.height/2+i.top,b.unshift("rotate(90 "+L.toString()+" "+L.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:L=i.width/2+i.left,b.unshift("rotate(-90 "+L.toString()+" "+L.toString()+")");break}_%2===1&&(i.left!==i.top&&(L=i.left,i.left=i.top,i.top=L),i.width!==i.height&&(L=i.width,i.width=i.height,i.height=L)),b.length&&(s=d7(s,'',""))});let o=n.width,l=n.height,u=i.width,h=i.height,f,d;o===null?(d=l===null?"1em":l==="auto"?h:l,f=pC(d,u/h)):(f=o==="auto"?u:o,d=l===null?pC(f,h/u):l==="auto"?h:l);let p={},m=a((y,b)=>{Bot(b)||(p[y]=b.toString())},"setAttr");m("width",f),m("height",d);let g=[i.left,i.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:s}}var Bot,m7=x(()=>{"use strict";Yy();n7();f7();p7();Bot=a(e=>e==="unset"||e==="undefined"||e==="none","isUnsetKeyword");a(mC,"iconToSVG")});function gC(e,t=$ot){let r=[],n;for(;n=Fot.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{let o=typeof t=="function"?t(s):t+(Got++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}var Fot,$ot,Got,g7=x(()=>{"use strict";Fot=/\sid="(\S+)"/g,$ot="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),Got=0;a(gC,"replaceIDs")});function yC(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in t)r+=" "+n+'="'+t[n]+'"';return'"+e+""}var y7=x(()=>{"use strict";a(yC,"iconToHTML")});var b7=bs((PNt,x7)=>{"use strict";var Yh=1e3,Xh=Yh*60,Kh=Xh*60,lu=Kh*24,Vot=lu*7,zot=lu*365.25;x7.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Wot(e);if(r==="number"&&isFinite(e))return t.long?jot(e):Uot(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Wot(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*zot;case"weeks":case"week":case"w":return r*Vot;case"days":case"day":case"d":return r*lu;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Kh;case"minutes":case"minute":case"mins":case"min":case"m":return r*Xh;case"seconds":case"second":case"secs":case"sec":case"s":return r*Yh;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}a(Wot,"parse");function Uot(e){var t=Math.abs(e);return t>=lu?Math.round(e/lu)+"d":t>=Kh?Math.round(e/Kh)+"h":t>=Xh?Math.round(e/Xh)+"m":t>=Yh?Math.round(e/Yh)+"s":e+"ms"}a(Uot,"fmtShort");function jot(e){var t=Math.abs(e);return t>=lu?Ky(e,t,lu,"day"):t>=Kh?Ky(e,t,Kh,"hour"):t>=Xh?Ky(e,t,Xh,"minute"):t>=Yh?Ky(e,t,Yh,"second"):e+" ms"}a(jot,"fmtLong");function Ky(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}a(Ky,"plural")});var T7=bs((FNt,k7)=>{"use strict";function qot(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=l,r.humanize=b7(),r.destroy=h,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let d=0;for(let p=0;p{if(D==="%%")return"%";L++;let w=r.formatters[$];if(typeof w=="function"){let A=b[L];D=w.call(k,A),b.splice(L,1),L--}return D}),r.formatArgs.call(k,b),(k.log||r.log).apply(k,b)}return a(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:a(()=>p!==null?p:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),"get"),set:a(b=>{p=b},"set")}),typeof r.init=="function"&&r.init(y),y}a(r,"createDebug");function n(f,d){let p=r(this.namespace+(typeof d>"u"?":":d)+f);return p.log=this.log,p}a(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d=(typeof f=="string"?f:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}a(i,"enable");function s(f,d){let p=0,m=0,g=-1,y=0;for(;p"-"+d)].join(",");return r.enable(""),f}a(o,"disable");function l(f){for(let d of r.skips)if(s(f,d))return!1;for(let d of r.names)if(s(f,d))return!0;return!1}a(l,"enabled");function u(f){return f instanceof Error?f.stack||f.message:f}a(u,"coerce");function h(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return a(h,"destroy"),r.enable(r.load()),r}a(qot,"setup");k7.exports=qot});var S7=bs((ks,Qy)=>{"use strict";ks.formatArgs=Yot;ks.save=Xot;ks.load=Kot;ks.useColors=Hot;ks.storage=Qot();ks.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();ks.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Hot(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}a(Hot,"useColors");function Yot(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Qy.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}a(Yot,"formatArgs");ks.log=console.debug||console.log||(()=>{});function Xot(e){try{e?ks.storage.setItem("debug",e):ks.storage.removeItem("debug")}catch{}}a(Xot,"save");function Kot(){let e;try{e=ks.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}a(Kot,"load");function Qot(){try{return localStorage}catch{}}a(Qot,"localstorage");Qy.exports=T7()(ks);var{formatters:Zot}=Qy.exports;Zot.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var zNt,_7=x(()=>{"use strict";i7();h7();m7();g7();y7();zNt=Ki(S7(),1)});var Jot,xC,C7,w7,tlt,Fl,Qh=x(()=>{"use strict";zt();_7();Jot={body:'?',height:80,width:80},xC=new Map,C7=new Map,w7=a(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(P.debug("Registering icon pack:",t.name),"loader"in t)C7.set(t.name,t.loader);else if("icons"in t)xC.set(t.name,t.icons);else throw P.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),tlt=a(async(e,t)=>{let r=hC(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=xC.get(n);if(!i){let o=C7.get(n);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await o(),prefix:n},xC.set(n,i)}catch(l){throw P.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let s=dC(i,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),Fl=a(async(e,t)=>{let r;try{r=await tlt(e,t?.fallbackPrefix)}catch(s){P.error(s),r=Jot}let n=mC(r,t);return yC(gC(n.body),n.attributes)},"getIconSVG")});function Zy(e){for(var t=[],r=1;r{"use strict";a(Zy,"dedent")});var Jy,cu,E7,tx=x(()=>{"use strict";Jy=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,cu=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E7=/\s*%%.*\n/gm});var Zh,kC=x(()=>{"use strict";Zh=class extends Error{static{a(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}});var uu,Jh,ex,TC,v7,hu=x(()=>{"use strict";zt();tx();kC();uu={},Jh=a(function(e,t){e=e.replace(Jy,"").replace(cu,"").replace(E7,` +`);for(let[r,{detector:n}]of Object.entries(uu))if(n(e,t))return r;throw new Zh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ex=a((...e)=>{for(let{id:t,detector:r,loader:n}of e)TC(t,r,n)},"registerLazyLoadedDiagrams"),TC=a((e,t,r)=>{uu[e]&&P.warn(`Detector with key ${e} already exists. Overwriting.`),uu[e]={detector:t,loader:r},P.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),v7=a(e=>uu[e].loader,"getDiagramLoader")});var Gm,A7,SC=x(()=>{"use strict";Gm=function(){var e=a(function(te,vt,It,yt){for(It=It||{},yt=te.length;yt--;It[te[yt]]=vt);return It},"o"),t=[1,24],r=[1,25],n=[1,26],i=[1,27],s=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],b=[1,32],k=[1,33],T=[1,34],_=[1,35],L=[1,36],C=[1,37],D=[1,38],$=[1,39],w=[1,40],A=[1,41],F=[1,42],S=[1,43],v=[1,44],R=[1,45],B=[1,46],I=[1,47],M=[1,48],O=[1,50],N=[1,51],E=[1,52],V=[1,53],G=[1,54],J=[1,55],rt=[1,56],nt=[1,57],ct=[1,58],pt=[1,59],Lt=[1,60],bt=[14,42],ut=[14,34,36,37,38,39,40,41,42,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],it=[12,14,34,36,37,38,39,40,41,42,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],st=[1,82],X=[1,83],H=[1,84],at=[1,85],W=[12,14,42],mt=[12,14,33,42],q=[12,14,33,42,76,77,79,80],Z=[12,33],ye=[34,36,37,38,39,40,41,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],ot={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:a(function(vt,It,yt,ht,wt,Q,Nt){var z=Q.length-1;switch(wt){case 3:ht.setDirection("TB");break;case 4:ht.setDirection("BT");break;case 5:ht.setDirection("RL");break;case 6:ht.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ht.setC4Type(Q[z-3]);break;case 19:ht.setTitle(Q[z].substring(6)),this.$=Q[z].substring(6);break;case 20:ht.setAccDescription(Q[z].substring(15)),this.$=Q[z].substring(15);break;case 21:this.$=Q[z].trim(),ht.setTitle(this.$);break;case 22:case 23:this.$=Q[z].trim(),ht.setAccDescription(this.$);break;case 28:Q[z].splice(2,0,"ENTERPRISE"),ht.addPersonOrSystemBoundary(...Q[z]),this.$=Q[z];break;case 29:Q[z].splice(2,0,"SYSTEM"),ht.addPersonOrSystemBoundary(...Q[z]),this.$=Q[z];break;case 30:ht.addPersonOrSystemBoundary(...Q[z]),this.$=Q[z];break;case 31:Q[z].splice(2,0,"CONTAINER"),ht.addContainerBoundary(...Q[z]),this.$=Q[z];break;case 32:ht.addDeploymentNode("node",...Q[z]),this.$=Q[z];break;case 33:ht.addDeploymentNode("nodeL",...Q[z]),this.$=Q[z];break;case 34:ht.addDeploymentNode("nodeR",...Q[z]),this.$=Q[z];break;case 35:ht.popBoundaryParseStack();break;case 39:ht.addPersonOrSystem("person",...Q[z]),this.$=Q[z];break;case 40:ht.addPersonOrSystem("external_person",...Q[z]),this.$=Q[z];break;case 41:ht.addPersonOrSystem("system",...Q[z]),this.$=Q[z];break;case 42:ht.addPersonOrSystem("system_db",...Q[z]),this.$=Q[z];break;case 43:ht.addPersonOrSystem("system_queue",...Q[z]),this.$=Q[z];break;case 44:ht.addPersonOrSystem("external_system",...Q[z]),this.$=Q[z];break;case 45:ht.addPersonOrSystem("external_system_db",...Q[z]),this.$=Q[z];break;case 46:ht.addPersonOrSystem("external_system_queue",...Q[z]),this.$=Q[z];break;case 47:ht.addContainer("container",...Q[z]),this.$=Q[z];break;case 48:ht.addContainer("container_db",...Q[z]),this.$=Q[z];break;case 49:ht.addContainer("container_queue",...Q[z]),this.$=Q[z];break;case 50:ht.addContainer("external_container",...Q[z]),this.$=Q[z];break;case 51:ht.addContainer("external_container_db",...Q[z]),this.$=Q[z];break;case 52:ht.addContainer("external_container_queue",...Q[z]),this.$=Q[z];break;case 53:ht.addComponent("component",...Q[z]),this.$=Q[z];break;case 54:ht.addComponent("component_db",...Q[z]),this.$=Q[z];break;case 55:ht.addComponent("component_queue",...Q[z]),this.$=Q[z];break;case 56:ht.addComponent("external_component",...Q[z]),this.$=Q[z];break;case 57:ht.addComponent("external_component_db",...Q[z]),this.$=Q[z];break;case 58:ht.addComponent("external_component_queue",...Q[z]),this.$=Q[z];break;case 60:ht.addRel("rel",...Q[z]),this.$=Q[z];break;case 61:ht.addRel("birel",...Q[z]),this.$=Q[z];break;case 62:ht.addRel("rel_u",...Q[z]),this.$=Q[z];break;case 63:ht.addRel("rel_d",...Q[z]),this.$=Q[z];break;case 64:ht.addRel("rel_l",...Q[z]),this.$=Q[z];break;case 65:ht.addRel("rel_r",...Q[z]),this.$=Q[z];break;case 66:ht.addRel("rel_b",...Q[z]),this.$=Q[z];break;case 67:Q[z].splice(0,1),ht.addRel("rel",...Q[z]),this.$=Q[z];break;case 68:ht.updateElStyle("update_el_style",...Q[z]),this.$=Q[z];break;case 69:ht.updateRelStyle("update_rel_style",...Q[z]),this.$=Q[z];break;case 70:ht.updateLayoutConfig("update_layout_config",...Q[z]),this.$=Q[z];break;case 71:this.$=[Q[z]];break;case 72:Q[z].unshift(Q[z-1]),this.$=Q[z];break;case 73:case 75:this.$=Q[z].trim();break;case 74:let $t={};$t[Q[z-1].trim()]=Q[z].trim(),this.$=$t;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt},{13:70,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt},{13:71,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt},{13:72,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt},{13:73,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt},{14:[1,74]},e(bt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt}),e(bt,[2,14]),e(ut,[2,16],{12:[1,76]}),e(bt,[2,36],{12:[1,77]}),e(it,[2,19]),e(it,[2,20]),{25:[1,78]},{27:[1,79]},e(it,[2,23]),{35:80,75:81,76:st,77:X,79:H,80:at},{35:86,75:81,76:st,77:X,79:H,80:at},{35:87,75:81,76:st,77:X,79:H,80:at},{35:88,75:81,76:st,77:X,79:H,80:at},{35:89,75:81,76:st,77:X,79:H,80:at},{35:90,75:81,76:st,77:X,79:H,80:at},{35:91,75:81,76:st,77:X,79:H,80:at},{35:92,75:81,76:st,77:X,79:H,80:at},{35:93,75:81,76:st,77:X,79:H,80:at},{35:94,75:81,76:st,77:X,79:H,80:at},{35:95,75:81,76:st,77:X,79:H,80:at},{35:96,75:81,76:st,77:X,79:H,80:at},{35:97,75:81,76:st,77:X,79:H,80:at},{35:98,75:81,76:st,77:X,79:H,80:at},{35:99,75:81,76:st,77:X,79:H,80:at},{35:100,75:81,76:st,77:X,79:H,80:at},{35:101,75:81,76:st,77:X,79:H,80:at},{35:102,75:81,76:st,77:X,79:H,80:at},{35:103,75:81,76:st,77:X,79:H,80:at},{35:104,75:81,76:st,77:X,79:H,80:at},e(W,[2,59]),{35:105,75:81,76:st,77:X,79:H,80:at},{35:106,75:81,76:st,77:X,79:H,80:at},{35:107,75:81,76:st,77:X,79:H,80:at},{35:108,75:81,76:st,77:X,79:H,80:at},{35:109,75:81,76:st,77:X,79:H,80:at},{35:110,75:81,76:st,77:X,79:H,80:at},{35:111,75:81,76:st,77:X,79:H,80:at},{35:112,75:81,76:st,77:X,79:H,80:at},{35:113,75:81,76:st,77:X,79:H,80:at},{35:114,75:81,76:st,77:X,79:H,80:at},{35:115,75:81,76:st,77:X,79:H,80:at},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt},{12:[1,118],33:[1,117]},{35:119,75:81,76:st,77:X,79:H,80:at},{35:120,75:81,76:st,77:X,79:H,80:at},{35:121,75:81,76:st,77:X,79:H,80:at},{35:122,75:81,76:st,77:X,79:H,80:at},{35:123,75:81,76:st,77:X,79:H,80:at},{35:124,75:81,76:st,77:X,79:H,80:at},{35:125,75:81,76:st,77:X,79:H,80:at},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(bt,[2,15]),e(ut,[2,17],{21:22,19:130,22:t,23:r,24:n,26:i,28:s}),e(bt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:n,26:i,28:s,34:o,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_,51:L,52:C,53:D,54:$,55:w,56:A,57:F,58:S,59:v,60:R,61:B,62:I,63:M,64:O,65:N,66:E,67:V,68:G,69:J,70:rt,71:nt,72:ct,73:pt,74:Lt}),e(it,[2,21]),e(it,[2,22]),e(W,[2,39]),e(mt,[2,71],{75:81,35:132,76:st,77:X,79:H,80:at}),e(q,[2,73]),{78:[1,133]},e(q,[2,75]),e(q,[2,76]),e(W,[2,40]),e(W,[2,41]),e(W,[2,42]),e(W,[2,43]),e(W,[2,44]),e(W,[2,45]),e(W,[2,46]),e(W,[2,47]),e(W,[2,48]),e(W,[2,49]),e(W,[2,50]),e(W,[2,51]),e(W,[2,52]),e(W,[2,53]),e(W,[2,54]),e(W,[2,55]),e(W,[2,56]),e(W,[2,57]),e(W,[2,58]),e(W,[2,60]),e(W,[2,61]),e(W,[2,62]),e(W,[2,63]),e(W,[2,64]),e(W,[2,65]),e(W,[2,66]),e(W,[2,67]),e(W,[2,68]),e(W,[2,69]),e(W,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(Z,[2,28]),e(Z,[2,29]),e(Z,[2,30]),e(Z,[2,31]),e(Z,[2,32]),e(Z,[2,33]),e(Z,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(ut,[2,18]),e(bt,[2,38]),e(mt,[2,72]),e(q,[2,74]),e(W,[2,24]),e(W,[2,35]),e(ye,[2,25]),e(ye,[2,26],{12:[1,138]}),e(ye,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:a(function(vt,It){if(It.recoverable)this.trace(vt);else{var yt=new Error(vt);throw yt.hash=It,yt}},"parseError"),parse:a(function(vt){var It=this,yt=[0],ht=[],wt=[null],Q=[],Nt=this.table,z="",$t=0,U=0,Tt=0,gt=2,Yt=1,Mt=Q.slice.call(arguments,1),kt=Object.create(this.lexer),Ge={yy:{}};for(var Pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Pt)&&(Ge.yy[Pt]=this.yy[Pt]);kt.setInput(vt,Ge.yy),Ge.yy.lexer=kt,Ge.yy.parser=this,typeof kt.yylloc>"u"&&(kt.yylloc={});var nr=kt.yylloc;Q.push(nr);var Ze=kt.options&&kt.options.ranges;typeof Ge.yy.parseError=="function"?this.parseError=Ge.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yr(jt){yt.length=yt.length-2*jt,wt.length=wt.length-jt,Q.length=Q.length-jt}a(yr,"popStack");function Je(){var jt;return jt=ht.pop()||kt.lex()||Yt,typeof jt!="number"&&(jt instanceof Array&&(ht=jt,jt=ht.pop()),jt=It.symbols_[jt]||jt),jt}a(Je,"lex");for(var ke,He,Te,ur,yn,we,Oe={},Ae,xe,he,ge;;){if(Te=yt[yt.length-1],this.defaultActions[Te]?ur=this.defaultActions[Te]:((ke===null||typeof ke>"u")&&(ke=Je()),ur=Nt[Te]&&Nt[Te][ke]),typeof ur>"u"||!ur.length||!ur[0]){var be="";ge=[];for(Ae in Nt[Te])this.terminals_[Ae]&&Ae>gt&&ge.push("'"+this.terminals_[Ae]+"'");kt.showPosition?be="Parse error on line "+($t+1)+`: +`+kt.showPosition()+` +Expecting `+ge.join(", ")+", got '"+(this.terminals_[ke]||ke)+"'":be="Parse error on line "+($t+1)+": Unexpected "+(ke==Yt?"end of input":"'"+(this.terminals_[ke]||ke)+"'"),this.parseError(be,{text:kt.match,token:this.terminals_[ke]||ke,line:kt.yylineno,loc:nr,expected:ge})}if(ur[0]instanceof Array&&ur.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Te+", token: "+ke);switch(ur[0]){case 1:yt.push(ke),wt.push(kt.yytext),Q.push(kt.yylloc),yt.push(ur[1]),ke=null,He?(ke=He,He=null):(U=kt.yyleng,z=kt.yytext,$t=kt.yylineno,nr=kt.yylloc,Tt>0&&Tt--);break;case 2:if(xe=this.productions_[ur[1]][1],Oe.$=wt[wt.length-xe],Oe._$={first_line:Q[Q.length-(xe||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(xe||1)].first_column,last_column:Q[Q.length-1].last_column},Ze&&(Oe._$.range=[Q[Q.length-(xe||1)].range[0],Q[Q.length-1].range[1]]),we=this.performAction.apply(Oe,[z,U,$t,Ge.yy,ur[1],wt,Q].concat(Mt)),typeof we<"u")return we;xe&&(yt=yt.slice(0,-1*xe*2),wt=wt.slice(0,-1*xe),Q=Q.slice(0,-1*xe)),yt.push(this.productions_[ur[1]][0]),wt.push(Oe.$),Q.push(Oe._$),he=Nt[yt[yt.length-2]][yt[yt.length-1]],yt.push(he);break;case 3:return!0}}return!0},"parse")},Jt=function(){var te={EOF:1,parseError:a(function(It,yt){if(this.yy.parser)this.yy.parser.parseError(It,yt);else throw new Error(It)},"parseError"),setInput:a(function(vt,It){return this.yy=It||this.yy||{},this._input=vt,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:a(function(){var vt=this._input[0];this.yytext+=vt,this.yyleng++,this.offset++,this.match+=vt,this.matched+=vt;var It=vt.match(/(?:\r\n?|\n).*/g);return It?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),vt},"input"),unput:a(function(vt){var It=vt.length,yt=vt.split(/(?:\r\n?|\n)/g);this._input=vt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-It),this.offset-=It;var ht=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),yt.length-1&&(this.yylineno-=yt.length-1);var wt=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:yt?(yt.length===ht.length?this.yylloc.first_column:0)+ht[ht.length-yt.length].length-yt[0].length:this.yylloc.first_column-It},this.options.ranges&&(this.yylloc.range=[wt[0],wt[0]+this.yyleng-It]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(vt){this.unput(this.match.slice(vt))},"less"),pastInput:a(function(){var vt=this.matched.substr(0,this.matched.length-this.match.length);return(vt.length>20?"...":"")+vt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var vt=this.match;return vt.length<20&&(vt+=this._input.substr(0,20-vt.length)),(vt.substr(0,20)+(vt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var vt=this.pastInput(),It=new Array(vt.length+1).join("-");return vt+this.upcomingInput()+` +`+It+"^"},"showPosition"),test_match:a(function(vt,It){var yt,ht,wt;if(this.options.backtrack_lexer&&(wt={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&&(wt.yylloc.range=this.yylloc.range.slice(0))),ht=vt[0].match(/(?:\r\n?|\n).*/g),ht&&(this.yylineno+=ht.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ht?ht[ht.length-1].length-ht[ht.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+vt[0].length},this.yytext+=vt[0],this.match+=vt[0],this.matches=vt,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(vt[0].length),this.matched+=vt[0],yt=this.performAction.call(this,this.yy,this,It,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),yt)return yt;if(this._backtrack){for(var Q in wt)this[Q]=wt[Q];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var vt,It,yt,ht;this._more||(this.yytext="",this.match="");for(var wt=this._currentRules(),Q=0;QIt[0].length)){if(It=yt,ht=Q,this.options.backtrack_lexer){if(vt=this.test_match(yt,wt[Q]),vt!==!1)return vt;if(this._backtrack){It=!1;continue}else return!1}else if(!this.options.flex)break}return It?(vt=this.test_match(It,wt[ht]),vt!==!1?vt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var It=this.next();return It||this.lex()},"lex"),begin:a(function(It){this.conditionStack.push(It)},"begin"),popState:a(function(){var It=this.conditionStack.length-1;return It>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(It){return It=this.conditionStack.length-1-Math.abs(It||0),It>=0?this.conditionStack[It]:"INITIAL"},"topState"),pushState:a(function(It){this.begin(It)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(It,yt,ht,wt){var Q=wt;switch(ht){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return te}();ot.lexer=Jt;function ve(){this.yy={}}return a(ve,"Parser"),ve.prototype=ot,ot.Parser=ve,new ve}();Gm.parser=Gm;A7=Gm});var _C,Hr,tf=x(()=>{"use strict";_C=a((e,t,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>_C(e,s,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=_C(e[s],t[s],{depth:r-1,clobber:n})):(n||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Hr=_C});var rx,L7,R7=x(()=>{"use strict";rx={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:a(e=>e>=255?255:e<0?0:e,"r"),g:a(e=>e>=255?255:e<0?0:e,"g"),b:a(e=>e>=255?255:e<0?0:e,"b"),h:a(e=>e%360,"h"),s:a(e=>e>=100?100:e<0?0:e,"s"),l:a(e=>e>=100?100:e<0?0:e,"l"),a:a(e=>e>=1?1:e<0?0:e,"a")},toLinear:a(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:a((e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:a(({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let i=r<.5?r*(1+t):r+t-r*t,s=2*r-i;switch(n){case"r":return rx.hue2rgb(s,i,e+.3333333333333333)*255;case"g":return rx.hue2rgb(s,i,e)*255;case"b":return rx.hue2rgb(s,i,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:a(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;let i=Math.max(e,t,r),s=Math.min(e,t,r),o=(i+s)/2;if(n==="l")return o*100;if(i===s)return 0;let l=i-s,u=o>.5?l/(2-i-s):l/(i+s);if(n==="s")return u*100;switch(i){case e:return((t-r)/l+(t{"use strict";elt={clamp:a((e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:a(e=>Math.round(e*1e10)/1e10,"round")},D7=elt});var rlt,N7,M7=x(()=>{"use strict";rlt={dec2hex:a(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},N7=rlt});var nlt,de,Ja=x(()=>{"use strict";R7();I7();M7();nlt={channel:L7,lang:D7,unit:N7},de=nlt});var Xo,Rn,Vm=x(()=>{"use strict";Ja();Xo={};for(let e=0;e<=255;e++)Xo[e]=de.unit.dec2hex(e);Rn={ALL:0,RGB:1,HSL:2}});var CC,O7,P7=x(()=>{"use strict";Vm();CC=class{static{a(this,"Type")}constructor(){this.type=Rn.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Rn.ALL}is(t){return this.type===t}},O7=CC});var wC,B7,F7=x(()=>{"use strict";Ja();P7();Vm();wC=class{static{a(this,"Channels")}constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new O7}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Rn.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=de.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=de.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=de.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=de.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=de.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=de.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is(Rn.HSL)&&r!==void 0?r:(this._ensureHSL(),de.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is(Rn.HSL)&&r!==void 0?r:(this._ensureHSL(),de.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is(Rn.HSL)&&r!==void 0?r:(this._ensureHSL(),de.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is(Rn.RGB)&&r!==void 0?r:(this._ensureRGB(),de.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is(Rn.RGB)&&r!==void 0?r:(this._ensureRGB(),de.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is(Rn.RGB)&&r!==void 0?r:(this._ensureRGB(),de.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Rn.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Rn.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Rn.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Rn.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Rn.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Rn.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},B7=wC});var ilt,$l,zm=x(()=>{"use strict";F7();ilt=new B7({r:0,g:0,b:0,a:0},"transparent"),$l=ilt});var $7,fu,EC=x(()=>{"use strict";zm();Vm();$7={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:a(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match($7.re);if(!t)return;let r=t[1],n=parseInt(r,16),i=r.length,s=i%4===0,o=i>4,l=o?1:17,u=o?8:4,h=s?0:-1,f=o?255:15;return $l.set({r:(n>>u*(h+3)&f)*l,g:(n>>u*(h+2)&f)*l,b:(n>>u*(h+1)&f)*l,a:s?(n&f)*l/255:1},e)},"parse"),stringify:a(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`#${Xo[Math.round(t)]}${Xo[Math.round(r)]}${Xo[Math.round(n)]}${Xo[Math.round(i*255)]}`:`#${Xo[Math.round(t)]}${Xo[Math.round(r)]}${Xo[Math.round(n)]}`},"stringify")},fu=$7});var nx,Wm,G7=x(()=>{"use strict";Ja();zm();nx={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:a(e=>{let t=e.match(nx.hueRe);if(t){let[,r,n]=t;switch(n){case"grad":return de.channel.clamp.h(parseFloat(r)*.9);case"rad":return de.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return de.channel.clamp.h(parseFloat(r)*360)}}return de.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:a(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(nx.re);if(!r)return;let[,n,i,s,o,l]=r;return $l.set({h:nx._hue2deg(n),s:de.channel.clamp.s(parseFloat(i)),l:de.channel.clamp.l(parseFloat(s)),a:o?de.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},"parse"),stringify:a(e=>{let{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${de.lang.round(t)}, ${de.lang.round(r)}%, ${de.lang.round(n)}%, ${i})`:`hsl(${de.lang.round(t)}, ${de.lang.round(r)}%, ${de.lang.round(n)}%)`},"stringify")},Wm=nx});var ix,vC,V7=x(()=>{"use strict";EC();ix={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:a(e=>{e=e.toLowerCase();let t=ix.colors[e];if(t)return fu.parse(t)},"parse"),stringify:a(e=>{let t=fu.stringify(e);for(let r in ix.colors)if(ix.colors[r]===t)return r},"stringify")},vC=ix});var z7,Um,W7=x(()=>{"use strict";Ja();zm();z7={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:a(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(z7.re);if(!r)return;let[,n,i,s,o,l,u,h,f]=r;return $l.set({r:de.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:de.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:de.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?de.channel.clamp.a(f?parseFloat(h)/100:parseFloat(h)):1},e)},"parse"),stringify:a(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${de.lang.round(t)}, ${de.lang.round(r)}, ${de.lang.round(n)}, ${de.lang.round(i)})`:`rgb(${de.lang.round(t)}, ${de.lang.round(r)}, ${de.lang.round(n)})`},"stringify")},Um=z7});var slt,Dn,Ko=x(()=>{"use strict";EC();G7();V7();W7();Vm();slt={format:{keyword:vC,hex:fu,rgb:Um,rgba:Um,hsl:Wm,hsla:Wm},parse:a(e=>{if(typeof e!="string")return e;let t=fu.parse(e)||Um.parse(e)||Wm.parse(e)||vC.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:a(e=>!e.changed&&e.color?e.color:e.type.is(Rn.HSL)||e.data.r===void 0?Wm.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Um.stringify(e):fu.stringify(e),"stringify")},Dn=slt});var alt,sx,AC=x(()=>{"use strict";Ja();Ko();alt=a((e,t)=>{let r=Dn.parse(e);for(let n in t)r[n]=de.channel.clamp[n](t[n]);return Dn.stringify(r)},"change"),sx=alt});var olt,Ci,LC=x(()=>{"use strict";Ja();zm();Ko();AC();olt=a((e,t,r=0,n=1)=>{if(typeof e!="number")return sx(e,{a:t});let i=$l.set({r:de.channel.clamp.r(e),g:de.channel.clamp.g(t),b:de.channel.clamp.b(r),a:de.channel.clamp.a(n)});return Dn.stringify(i)},"rgba"),Ci=olt});var llt,du,U7=x(()=>{"use strict";Ja();Ko();llt=a((e,t)=>de.lang.round(Dn.parse(e)[t]),"channel"),du=llt});var clt,j7,q7=x(()=>{"use strict";Ja();Ko();clt=a(e=>{let{r:t,g:r,b:n}=Dn.parse(e),i=.2126*de.channel.toLinear(t)+.7152*de.channel.toLinear(r)+.0722*de.channel.toLinear(n);return de.lang.round(i)},"luminance"),j7=clt});var ult,H7,Y7=x(()=>{"use strict";q7();ult=a(e=>j7(e)>=.5,"isLight"),H7=ult});var hlt,wi,X7=x(()=>{"use strict";Y7();hlt=a(e=>!H7(e),"isDark"),wi=hlt});var flt,ax,RC=x(()=>{"use strict";Ja();Ko();flt=a((e,t,r)=>{let n=Dn.parse(e),i=n[t],s=de.channel.clamp[t](i+r);return i!==s&&(n[t]=s),Dn.stringify(n)},"adjustChannel"),ax=flt});var dlt,qt,K7=x(()=>{"use strict";RC();dlt=a((e,t)=>ax(e,"l",t),"lighten"),qt=dlt});var plt,ee,Q7=x(()=>{"use strict";RC();plt=a((e,t)=>ax(e,"l",-t),"darken"),ee=plt});var mlt,ft,Z7=x(()=>{"use strict";Ko();AC();mlt=a((e,t)=>{let r=Dn.parse(e),n={};for(let i in t)t[i]&&(n[i]=r[i]+t[i]);return sx(e,n)},"adjust"),ft=mlt});var glt,J7,tI=x(()=>{"use strict";Ko();LC();glt=a((e,t,r=50)=>{let{r:n,g:i,b:s,a:o}=Dn.parse(e),{r:l,g:u,b:h,a:f}=Dn.parse(t),d=r/100,p=d*2-1,m=o-f,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,b=1-y,k=n*y+l*b,T=i*y+u*b,_=s*y+h*b,L=o*d+f*(1-d);return Ci(k,T,_,L)},"mix"),J7=glt});var ylt,Wt,eI=x(()=>{"use strict";Ko();tI();ylt=a((e,t=100)=>{let r=Dn.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,J7(r,e,t)},"invert"),Wt=ylt});var rI=x(()=>{"use strict";LC();U7();X7();K7();Q7();Z7();eI()});var Gs=x(()=>{"use strict";rI()});var Gl,Vl,jm=x(()=>{"use strict";Gl="#ffffff",Vl="#f2f2f2"});var kn,ef=x(()=>{"use strict";Gs();kn=a((e,t)=>t?ft(e,{s:-40,l:10}):ft(e,{s:-40,l:-10}),"mkBorder")});var IC,nI,iI=x(()=>{"use strict";Gs();jm();ef();IC=class{static{a(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ft(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ft(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||kn(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||kn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||kn(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||kn(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wt(this.tertiaryColor),this.lineColor=this.lineColor||Wt(this.background),this.arrowheadColor=this.arrowheadColor||Wt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ee(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ee(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||qt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ee(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ee(this.mainBkg,10)):(this.rowOdd=this.rowOdd||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||qt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},nI=a(e=>{let t=new IC;return t.calculate(e),t},"getThemeVariables")});var NC,sI,aI=x(()=>{"use strict";Gs();ef();NC=class{static{a(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=qt(this.primaryColor,16),this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.background),this.secondaryBorderColor=kn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=kn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=qt(Wt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ci(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=ee("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ee(this.sectionBkgColor,10),this.taskBorderColor=Ci(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ci(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||qt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ee(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=qt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=qt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=qt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=ft(this.primaryColor,{h:64}),this.fillType3=ft(this.secondaryColor,{h:64}),this.fillType4=ft(this.primaryColor,{h:-64}),this.fillType5=ft(this.secondaryColor,{h:-64}),this.fillType6=ft(this.primaryColor,{h:128}),this.fillType7=ft(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330});for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},sI=a(e=>{let t=new NC;return t.calculate(e),t},"getThemeVariables")});var MC,zl,qm=x(()=>{"use strict";Gs();ef();jm();MC=class{static{a(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ft(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=kn(this.primaryColor,this.darkMode),this.secondaryBorderColor=kn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=kn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Ci(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ee(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ee(this.tertiaryColor,40);for(let t=0;t{this[n]==="calculated"&&(this[n]=void 0)}),typeof t!="object"){this.updateColors();return}let r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},zl=a(e=>{let t=new MC;return t.calculate(e),t},"getThemeVariables")});var OC,oI,lI=x(()=>{"use strict";Gs();jm();ef();OC=class{static{a(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=qt("#cde498",10),this.primaryBorderColor=kn(this.primaryColor,this.darkMode),this.secondaryBorderColor=kn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=kn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.primaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=ee(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ft(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ft(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ft(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ft(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ft(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ft(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ft(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ft(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ft(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ee(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ee(this.tertiaryColor,40);for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},oI=a(e=>{let t=new OC;return t.calculate(e),t},"getThemeVariables")});var PC,cI,uI=x(()=>{"use strict";Gs();ef();jm();PC=class{static{a(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=qt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ft(this.primaryColor,{h:-160}),this.primaryBorderColor=kn(this.primaryColor,this.darkMode),this.secondaryBorderColor=kn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=kn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||qt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=qt(this.contrast,55),this.border2=this.contrast,this.actorBorder=qt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},cI=a(e=>{let t=new PC;return t.calculate(e),t},"getThemeVariables")});var Vs,ox=x(()=>{"use strict";iI();aI();qm();lI();uI();Vs={base:{getThemeVariables:nI},dark:{getThemeVariables:sI},default:{getThemeVariables:zl},forest:{getThemeVariables:oI},neutral:{getThemeVariables:cI}}});var to,hI=x(()=>{"use strict";to={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}});var fI,dI,pI,We,zs=x(()=>{"use strict";ox();hI();fI={...to,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Vs.default.getThemeVariables(),sequence:{...to.sequence,messageFont:a(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:a(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:a(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...to.gantt,tickInterval:void 0,useWidth:void 0},c4:{...to.c4,useWidth:void 0,personFont:a(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:a(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:a(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:a(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:a(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:a(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:a(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:a(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:a(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:a(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:a(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:a(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:a(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:a(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:a(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:a(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:a(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:a(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:a(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:a(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:a(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:a(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...to.pie,useWidth:984},xyChart:{...to.xyChart,useWidth:void 0},requirement:{...to.requirement,useWidth:void 0},packet:{...to.packet},radar:{...to.radar}},dI=a((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...dI(e[n],"")]:[...r,t+n],[]),"keyify"),pI=new Set(dI(fI,"")),We=fI});var rf,xlt,BC=x(()=>{"use strict";zs();zt();rf=a(e=>{if(P.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>rf(t));return}for(let t of Object.keys(e)){if(P.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!pI.has(t)||e[t]==null){P.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){P.debug("sanitizing object",t),rf(e[t]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)t.includes(n)&&(P.debug("sanitizing css option",t),e[t]=xlt(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}P.debug("After sanitization",e)}},"sanitizeDirective"),xlt=a(e=>{let t=0,r=0;for(let n of e){if(t{"use strict";tf();zt();ox();zs();BC();Wl=Object.freeze(We),Qi=Hr({},Wl),nf=[],Hm=Hr({},Wl),lx=a((e,t)=>{let r=Hr({},e),n={};for(let i of t)bI(i),n=Hr(n,i);if(r=Hr(r,n),n.theme&&n.theme in Vs){let i=Hr({},gI),s=Hr(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Vs&&(r.themeVariables=Vs[r.theme].getThemeVariables(s))}return Hm=r,TI(Hm),Hm},"updateCurrentConfig"),FC=a(e=>(Qi=Hr({},Wl),Qi=Hr(Qi,e),e.theme&&Vs[e.theme]&&(Qi.themeVariables=Vs[e.theme].getThemeVariables(e.themeVariables)),lx(Qi,nf),Qi),"setSiteConfig"),yI=a(e=>{gI=Hr({},e)},"saveConfigFromInitialize"),xI=a(e=>(Qi=Hr(Qi,e),lx(Qi,nf),Qi),"updateSiteConfig"),$C=a(()=>Hr({},Qi),"getSiteConfig"),cx=a(e=>(TI(e),Hr(Hm,e),Re()),"setConfig"),Re=a(()=>Hr({},Hm),"getConfig"),bI=a(e=>{e&&(["secure",...Qi.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(P.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&bI(e[t])}))},"sanitize"),kI=a(e=>{rf(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),nf.push(e),lx(Qi,nf)},"addDirective"),Ym=a((e=Qi)=>{nf=[],lx(e,nf)},"reset"),blt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},mI={},klt=a(e=>{mI[e]||(P.warn(blt[e]),mI[e]=!0)},"issueWarning"),TI=a(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&klt("LAZY_LOAD_DEPRECATED")},"checkConfig")});function Li(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:fx;SI&&SI(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let s=r(i);s!==i&&(Tlt(t)||(t[n]=s),i=s)}e[i]=!0}return e}function Llt(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:Glt(),t=a(Kt=>OI(Kt),"DOMPurify");if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Jm.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:l,Element:u,NodeFilter:h,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:m}=e,g=u.prototype,y=Zm(g,"cloneNode"),b=Zm(g,"remove"),k=Zm(g,"nextSibling"),T=Zm(g,"childNodes"),_=Zm(g,"parentNode");if(typeof o=="function"){let Kt=r.createElement("template");Kt.content&&Kt.content.ownerDocument&&(r=Kt.content.ownerDocument)}let L,C="",{implementation:D,createNodeIterator:$,createDocumentFragment:w,getElementsByTagName:A}=r,{importNode:F}=n,S=RI();t.isSupported=typeof DI=="function"&&typeof _=="function"&&D&&D.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:v,ERB_EXPR:R,TMPLIT_EXPR:B,DATA_ATTR:I,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:E}=LI,{IS_ALLOWED_URI:V}=LI,G=null,J=qe({},[...wI,...VC,...zC,...WC,...EI]),rt=null,nt=qe({},[...vI,...UC,...AI,...hx]),ct=Object.seal(II(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pt=null,Lt=null,bt=!0,ut=!0,it=!1,st=!0,X=!1,H=!0,at=!1,W=!1,mt=!1,q=!1,Z=!1,ye=!1,ot=!0,Jt=!1,ve="user-content-",te=!0,vt=!1,It={},yt=null,ht=qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),wt=null,Q=qe({},["audio","video","img","source","image","track"]),Nt=null,z=qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",U="http://www.w3.org/2000/svg",Tt="http://www.w3.org/1999/xhtml",gt=Tt,Yt=!1,Mt=null,kt=qe({},[$t,U,Tt],GC),Ge=qe({},["mi","mo","mn","ms","mtext"]),Pt=qe({},["annotation-xml"]),nr=qe({},["title","style","font","a","script"]),Ze=null,yr=["application/xhtml+xml","text/html"],Je="text/html",ke=null,He=null,Te=r.createElement("form"),ur=a(function(et){return et instanceof RegExp||et instanceof Function},"isRegexOrFunction"),yn=a(function(){let et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(He&&He===et)){if((!et||typeof et!="object")&&(et={}),et=pu(et),Ze=yr.indexOf(et.PARSER_MEDIA_TYPE)===-1?Je:et.PARSER_MEDIA_TYPE,ke=Ze==="application/xhtml+xml"?GC:fx,G=xa(et,"ALLOWED_TAGS")?qe({},et.ALLOWED_TAGS,ke):J,rt=xa(et,"ALLOWED_ATTR")?qe({},et.ALLOWED_ATTR,ke):nt,Mt=xa(et,"ALLOWED_NAMESPACES")?qe({},et.ALLOWED_NAMESPACES,GC):kt,Nt=xa(et,"ADD_URI_SAFE_ATTR")?qe(pu(z),et.ADD_URI_SAFE_ATTR,ke):z,wt=xa(et,"ADD_DATA_URI_TAGS")?qe(pu(Q),et.ADD_DATA_URI_TAGS,ke):Q,yt=xa(et,"FORBID_CONTENTS")?qe({},et.FORBID_CONTENTS,ke):ht,pt=xa(et,"FORBID_TAGS")?qe({},et.FORBID_TAGS,ke):{},Lt=xa(et,"FORBID_ATTR")?qe({},et.FORBID_ATTR,ke):{},It=xa(et,"USE_PROFILES")?et.USE_PROFILES:!1,bt=et.ALLOW_ARIA_ATTR!==!1,ut=et.ALLOW_DATA_ATTR!==!1,it=et.ALLOW_UNKNOWN_PROTOCOLS||!1,st=et.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=et.SAFE_FOR_TEMPLATES||!1,H=et.SAFE_FOR_XML!==!1,at=et.WHOLE_DOCUMENT||!1,q=et.RETURN_DOM||!1,Z=et.RETURN_DOM_FRAGMENT||!1,ye=et.RETURN_TRUSTED_TYPE||!1,mt=et.FORCE_BODY||!1,ot=et.SANITIZE_DOM!==!1,Jt=et.SANITIZE_NAMED_PROPS||!1,te=et.KEEP_CONTENT!==!1,vt=et.IN_PLACE||!1,V=et.ALLOWED_URI_REGEXP||NI,gt=et.NAMESPACE||Tt,Ge=et.MATHML_TEXT_INTEGRATION_POINTS||Ge,Pt=et.HTML_INTEGRATION_POINTS||Pt,ct=et.CUSTOM_ELEMENT_HANDLING||{},et.CUSTOM_ELEMENT_HANDLING&&ur(et.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ct.tagNameCheck=et.CUSTOM_ELEMENT_HANDLING.tagNameCheck),et.CUSTOM_ELEMENT_HANDLING&&ur(et.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ct.attributeNameCheck=et.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),et.CUSTOM_ELEMENT_HANDLING&&typeof et.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ct.allowCustomizedBuiltInElements=et.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(ut=!1),Z&&(q=!0),It&&(G=qe({},EI),rt=[],It.html===!0&&(qe(G,wI),qe(rt,vI)),It.svg===!0&&(qe(G,VC),qe(rt,UC),qe(rt,hx)),It.svgFilters===!0&&(qe(G,zC),qe(rt,UC),qe(rt,hx)),It.mathMl===!0&&(qe(G,WC),qe(rt,AI),qe(rt,hx))),et.ADD_TAGS&&(G===J&&(G=pu(G)),qe(G,et.ADD_TAGS,ke)),et.ADD_ATTR&&(rt===nt&&(rt=pu(rt)),qe(rt,et.ADD_ATTR,ke)),et.ADD_URI_SAFE_ATTR&&qe(Nt,et.ADD_URI_SAFE_ATTR,ke),et.FORBID_CONTENTS&&(yt===ht&&(yt=pu(yt)),qe(yt,et.FORBID_CONTENTS,ke)),te&&(G["#text"]=!0),at&&qe(G,["html","head","body"]),G.table&&(qe(G,["tbody"]),delete pt.tbody),et.TRUSTED_TYPES_POLICY){if(typeof et.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof et.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=et.TRUSTED_TYPES_POLICY,C=L.createHTML("")}else L===void 0&&(L=Vlt(m,i)),L!==null&&typeof C=="string"&&(C=L.createHTML(""));Ai&&Ai(et),He=et}},"_parseConfig"),we=qe({},[...VC,...zC,...Rlt]),Oe=qe({},[...WC,...Dlt]),Ae=a(function(et){let Bt=_(et);(!Bt||!Bt.tagName)&&(Bt={namespaceURI:gt,tagName:"template"});let Xt=fx(et.tagName),tr=fx(Bt.tagName);return Mt[et.namespaceURI]?et.namespaceURI===U?Bt.namespaceURI===Tt?Xt==="svg":Bt.namespaceURI===$t?Xt==="svg"&&(tr==="annotation-xml"||Ge[tr]):!!we[Xt]:et.namespaceURI===$t?Bt.namespaceURI===Tt?Xt==="math":Bt.namespaceURI===U?Xt==="math"&&Pt[tr]:!!Oe[Xt]:et.namespaceURI===Tt?Bt.namespaceURI===U&&!Pt[tr]||Bt.namespaceURI===$t&&!Ge[tr]?!1:!Oe[Xt]&&(nr[Xt]||!we[Xt]):!!(Ze==="application/xhtml+xml"&&Mt[et.namespaceURI]):!1},"_checkValidNamespace"),xe=a(function(et){Xm(t.removed,{element:et});try{_(et).removeChild(et)}catch{b(et)}},"_forceRemove"),he=a(function(et,Bt){try{Xm(t.removed,{attribute:Bt.getAttributeNode(et),from:Bt})}catch{Xm(t.removed,{attribute:null,from:Bt})}if(Bt.removeAttribute(et),et==="is")if(q||Z)try{xe(Bt)}catch{}else try{Bt.setAttribute(et,"")}catch{}},"_removeAttribute"),ge=a(function(et){let Bt=null,Xt=null;if(mt)et=""+et;else{let xn=CI(et,/^[\r\n\t ]+/);Xt=xn&&xn[0]}Ze==="application/xhtml+xml"&>===Tt&&(et=''+et+"");let tr=L?L.createHTML(et):et;if(gt===Tt)try{Bt=new p().parseFromString(tr,Ze)}catch{}if(!Bt||!Bt.documentElement){Bt=D.createDocument(gt,"template",null);try{Bt.documentElement.innerHTML=Yt?C:tr}catch{}}let rn=Bt.body||Bt.documentElement;return et&&Xt&&rn.insertBefore(r.createTextNode(Xt),rn.childNodes[0]||null),gt===Tt?A.call(Bt,at?"html":"body")[0]:at?Bt.documentElement:rn},"_initDocument"),be=a(function(et){return $.call(et.ownerDocument||et,et,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),jt=a(function(et){return et instanceof d&&(typeof et.nodeName!="string"||typeof et.textContent!="string"||typeof et.removeChild!="function"||!(et.attributes instanceof f)||typeof et.removeAttribute!="function"||typeof et.setAttribute!="function"||typeof et.namespaceURI!="string"||typeof et.insertBefore!="function"||typeof et.hasChildNodes!="function")},"_isClobbered"),An=a(function(et){return typeof l=="function"&&et instanceof l},"_isNode");function ne(Kt,et,Bt){ux(Kt,Xt=>{Xt.call(t,et,Bt,He)})}a(ne,"_executeHooks");let Si=a(function(et){let Bt=null;if(ne(S.beforeSanitizeElements,et,null),jt(et))return xe(et),!0;let Xt=ke(et.nodeName);if(ne(S.uponSanitizeElement,et,{tagName:Xt,allowedTags:G}),et.hasChildNodes()&&!An(et.firstElementChild)&&Ei(/<[/\w!]/g,et.innerHTML)&&Ei(/<[/\w!]/g,et.textContent)||et.nodeType===Jm.progressingInstruction||H&&et.nodeType===Jm.comment&&Ei(/<[/\w]/g,et.data))return xe(et),!0;if(!G[Xt]||pt[Xt]){if(!pt[Xt]&&Pr(Xt)&&(ct.tagNameCheck instanceof RegExp&&Ei(ct.tagNameCheck,Xt)||ct.tagNameCheck instanceof Function&&ct.tagNameCheck(Xt)))return!1;if(te&&!yt[Xt]){let tr=_(et)||et.parentNode,rn=T(et)||et.childNodes;if(rn&&tr){let xn=rn.length;for(let Wr=xn-1;Wr>=0;--Wr){let Xi=y(rn[Wr],!0);Xi.__removalCount=(et.__removalCount||0)+1,tr.insertBefore(Xi,k(et))}}}return xe(et),!0}return et instanceof u&&!Ae(et)||(Xt==="noscript"||Xt==="noembed"||Xt==="noframes")&&Ei(/<\/no(script|embed|frames)/i,et.innerHTML)?(xe(et),!0):(X&&et.nodeType===Jm.text&&(Bt=et.textContent,ux([v,R,B],tr=>{Bt=Km(Bt,tr," ")}),et.textContent!==Bt&&(Xm(t.removed,{element:et.cloneNode()}),et.textContent=Bt)),ne(S.afterSanitizeElements,et,null),!1)},"_sanitizeElements"),fn=a(function(et,Bt,Xt){if(ot&&(Bt==="id"||Bt==="name")&&(Xt in r||Xt in Te))return!1;if(!(ut&&!Lt[Bt]&&Ei(I,Bt))){if(!(bt&&Ei(M,Bt))){if(!rt[Bt]||Lt[Bt]){if(!(Pr(et)&&(ct.tagNameCheck instanceof RegExp&&Ei(ct.tagNameCheck,et)||ct.tagNameCheck instanceof Function&&ct.tagNameCheck(et))&&(ct.attributeNameCheck instanceof RegExp&&Ei(ct.attributeNameCheck,Bt)||ct.attributeNameCheck instanceof Function&&ct.attributeNameCheck(Bt))||Bt==="is"&&ct.allowCustomizedBuiltInElements&&(ct.tagNameCheck instanceof RegExp&&Ei(ct.tagNameCheck,Xt)||ct.tagNameCheck instanceof Function&&ct.tagNameCheck(Xt))))return!1}else if(!Nt[Bt]){if(!Ei(V,Km(Xt,N,""))){if(!((Bt==="src"||Bt==="xlink:href"||Bt==="href")&&et!=="script"&&Elt(Xt,"data:")===0&&wt[et])){if(!(it&&!Ei(O,Km(Xt,N,"")))){if(Xt)return!1}}}}}}return!0},"_isValidAttribute"),Pr=a(function(et){return et!=="annotation-xml"&&CI(et,E)},"_isBasicCustomElement"),vr=a(function(et){ne(S.beforeSanitizeAttributes,et,null);let{attributes:Bt}=et;if(!Bt||jt(et))return;let Xt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:rt,forceKeepAttr:void 0},tr=Bt.length;for(;tr--;){let rn=Bt[tr],{name:xn,namespaceURI:Wr,value:Xi}=rn,iu=ke(xn),Ln=xn==="value"?Xi:vlt(Xi);if(Xt.attrName=iu,Xt.attrValue=Ln,Xt.keepAttr=!0,Xt.forceKeepAttr=void 0,ne(S.uponSanitizeAttribute,et,Xt),Ln=Xt.attrValue,Jt&&(iu==="id"||iu==="name")&&(he(xn,et),Ln=ve+Ln),H&&Ei(/((--!?|])>)|<\/(style|title)/i,Ln)){he(xn,et);continue}if(Xt.forceKeepAttr||(he(xn,et),!Xt.keepAttr))continue;if(!st&&Ei(/\/>/i,Ln)){he(xn,et);continue}X&&ux([v,R,B],ie=>{Ln=Km(Ln,ie," ")});let ya=ke(et.nodeName);if(fn(ya,iu,Ln)){if(L&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Wr)switch(m.getAttributeType(ya,iu)){case"TrustedHTML":{Ln=L.createHTML(Ln);break}case"TrustedScriptURL":{Ln=L.createScriptURL(Ln);break}}try{Wr?et.setAttributeNS(Wr,xn,Ln):et.setAttribute(xn,Ln),jt(et)?xe(et):_I(t.removed)}catch{}}}ne(S.afterSanitizeAttributes,et,null)},"_sanitizeAttributes"),ci=a(function Kt(et){let Bt=null,Xt=be(et);for(ne(S.beforeSanitizeShadowDOM,et,null);Bt=Xt.nextNode();)ne(S.uponSanitizeShadowNode,Bt,null),Si(Bt),vr(Bt),Bt.content instanceof s&&Kt(Bt.content);ne(S.afterSanitizeShadowDOM,et,null)},"_sanitizeShadowDOM");return t.sanitize=function(Kt){let et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=null,Xt=null,tr=null,rn=null;if(Yt=!Kt,Yt&&(Kt=""),typeof Kt!="string"&&!An(Kt))if(typeof Kt.toString=="function"){if(Kt=Kt.toString(),typeof Kt!="string")throw Qm("dirty is not a string, aborting")}else throw Qm("toString is not a function");if(!t.isSupported)return Kt;if(W||yn(et),t.removed=[],typeof Kt=="string"&&(vt=!1),vt){if(Kt.nodeName){let Xi=ke(Kt.nodeName);if(!G[Xi]||pt[Xi])throw Qm("root node is forbidden and cannot be sanitized in-place")}}else if(Kt instanceof l)Bt=ge(""),Xt=Bt.ownerDocument.importNode(Kt,!0),Xt.nodeType===Jm.element&&Xt.nodeName==="BODY"||Xt.nodeName==="HTML"?Bt=Xt:Bt.appendChild(Xt);else{if(!q&&!X&&!at&&Kt.indexOf("<")===-1)return L&&ye?L.createHTML(Kt):Kt;if(Bt=ge(Kt),!Bt)return q?null:ye?C:""}Bt&&mt&&xe(Bt.firstChild);let xn=be(vt?Kt:Bt);for(;tr=xn.nextNode();)Si(tr),vr(tr),tr.content instanceof s&&ci(tr.content);if(vt)return Kt;if(q){if(Z)for(rn=w.call(Bt.ownerDocument);Bt.firstChild;)rn.appendChild(Bt.firstChild);else rn=Bt;return(rt.shadowroot||rt.shadowrootmode)&&(rn=F.call(n,rn,!0)),rn}let Wr=at?Bt.outerHTML:Bt.innerHTML;return at&&G["!doctype"]&&Bt.ownerDocument&&Bt.ownerDocument.doctype&&Bt.ownerDocument.doctype.name&&Ei(MI,Bt.ownerDocument.doctype.name)&&(Wr=" +`+Wr),X&&ux([v,R,B],Xi=>{Wr=Km(Wr,Xi," ")}),L&&ye?L.createHTML(Wr):Wr},t.setConfig=function(){let Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yn(Kt),W=!0},t.clearConfig=function(){He=null,W=!1},t.isValidAttribute=function(Kt,et,Bt){He||yn({});let Xt=ke(Kt),tr=ke(et);return fn(Xt,tr,Bt)},t.addHook=function(Kt,et){typeof et=="function"&&Xm(S[Kt],et)},t.removeHook=function(Kt,et){if(et!==void 0){let Bt=Clt(S[Kt],et);return Bt===-1?void 0:wlt(S[Kt],Bt,1)[0]}return _I(S[Kt])},t.removeHooks=function(Kt){S[Kt]=[]},t.removeAllHooks=function(){S=RI()},t}var DI,SI,Tlt,Slt,_lt,Ai,Ws,II,jC,qC,ux,Clt,_I,Xm,wlt,fx,GC,CI,Km,Elt,vlt,xa,Ei,Qm,wI,VC,zC,Rlt,WC,Dlt,EI,vI,UC,AI,hx,Ilt,Nlt,Mlt,Olt,Plt,NI,Blt,Flt,MI,$lt,LI,Jm,Glt,Vlt,RI,Ul,HC=x(()=>{"use strict";({entries:DI,setPrototypeOf:SI,isFrozen:Tlt,getPrototypeOf:Slt,getOwnPropertyDescriptor:_lt}=Object),{freeze:Ai,seal:Ws,create:II}=Object,{apply:jC,construct:qC}=typeof Reflect<"u"&&Reflect;Ai||(Ai=a(function(t){return t},"freeze"));Ws||(Ws=a(function(t){return t},"seal"));jC||(jC=a(function(t,r,n){return t.apply(r,n)},"apply"));qC||(qC=a(function(t,r){return new t(...r)},"construct"));ux=Li(Array.prototype.forEach),Clt=Li(Array.prototype.lastIndexOf),_I=Li(Array.prototype.pop),Xm=Li(Array.prototype.push),wlt=Li(Array.prototype.splice),fx=Li(String.prototype.toLowerCase),GC=Li(String.prototype.toString),CI=Li(String.prototype.match),Km=Li(String.prototype.replace),Elt=Li(String.prototype.indexOf),vlt=Li(String.prototype.trim),xa=Li(Object.prototype.hasOwnProperty),Ei=Li(RegExp.prototype.test),Qm=Alt(TypeError);a(Li,"unapply");a(Alt,"unconstruct");a(qe,"addToSet");a(Llt,"cleanArray");a(pu,"clone");a(Zm,"lookupGetter");wI=Ai(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),VC=Ai(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zC=Ai(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Rlt=Ai(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),WC=Ai(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Dlt=Ai(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),EI=Ai(["#text"]),vI=Ai(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),UC=Ai(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),AI=Ai(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hx=Ai(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ilt=Ws(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Nlt=Ws(/<%[\w\W]*|[\w\W]*%>/gm),Mlt=Ws(/\$\{[\w\W]*/gm),Olt=Ws(/^data-[\-\w.\u00B7-\uFFFF]+$/),Plt=Ws(/^aria-[\-\w]+$/),NI=Ws(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Blt=Ws(/^(?:\w+script|data):/i),Flt=Ws(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),MI=Ws(/^html$/i),$lt=Ws(/^[a-z][.\w]*(-[.\w]+)+$/i),LI=Object.freeze({__proto__:null,ARIA_ATTR:Plt,ATTR_WHITESPACE:Flt,CUSTOM_ELEMENT:$lt,DATA_ATTR:Olt,DOCTYPE_NAME:MI,ERB_EXPR:Nlt,IS_ALLOWED_URI:NI,IS_SCRIPT_OR_DATA:Blt,MUSTACHE_EXPR:Ilt,TMPLIT_EXPR:Mlt}),Jm={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Glt=a(function(){return typeof window>"u"?null:window},"getGlobal"),Vlt=a(function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},"_createTrustedTypesPolicy"),RI=a(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");a(OI,"createDOMPurify");Ul=OI()});function Ult(){let e="data-temp-href-target";Ul.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ul.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}var af,zlt,Wlt,BI,PI,er,jlt,qlt,Hlt,Ylt,FI,Xlt,Ne,Klt,Qlt,eo,YC,Zlt,Jlt,tct,XC,Tn,mu,jl,Rt,Fe=x(()=>{"use strict";HC();af=//gi,zlt=a(e=>e?FI(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Wlt=(()=>{let e=!1;return()=>{e||(Ult(),e=!0)}})();a(Ult,"setupDompurifyHooks");BI=a(e=>(Wlt(),Ul.sanitize(e)),"removeScript"),PI=a((e,t)=>{if(t.flowchart?.htmlLabels!==!1){let r=t.securityLevel;r==="antiscript"||r==="strict"?e=BI(e):r!=="loose"&&(e=FI(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=Ylt(e))}return e},"sanitizeMore"),er=a((e,t)=>e&&(t.dompurifyConfig?e=Ul.sanitize(PI(e,t),t.dompurifyConfig).toString():e=Ul.sanitize(PI(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),jlt=a((e,t)=>typeof e=="string"?er(e,t):e.flat().map(r=>er(r,t)),"sanitizeTextOrArray"),qlt=a(e=>af.test(e),"hasBreaks"),Hlt=a(e=>e.split(af),"splitBreaks"),Ylt=a(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),FI=a(e=>e.replace(af,"#br#"),"breakToPlaceholder"),Xlt=a(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),Ne=a(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Klt=a(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Qlt=a(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),eo=a(function(e){let t=e.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,e.split(t).length-1),"countOccurrence"),Zlt=a((e,t)=>{let r=YC(e,"~"),n=YC(t,"~");return r===1&&n===1},"shouldCombineSets"),Jlt=a(e=>{let t=YC(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),s=n.lastIndexOf("~");for(;i!==-1&&s!==-1&&i!==s;)n[i]="<",n[s]=">",i=n.indexOf("~"),s=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),tct=a(()=>window.MathMLElement!==void 0,"isMathMLSupported"),XC=/\$\$(.*)\$\$/g,Tn=a(e=>(e.match(XC)?.length??0)>0,"hasKatex"),mu=a(async(e,t)=>{e=await jl(e,t);let r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),jl=a(async(e,t)=>Tn(e)?tct()||t.legacyMathML||t.forceLegacyMathML?e.replace(XC,"Katex is unsupported in mermaid.tiny.js. Please use mermaid.js or mermaid.min.js."):e.replace(XC,"MathML is unsupported in this environment."):e,"renderKatex"),Rt={getRows:zlt,sanitizeText:er,sanitizeTextOrArray:jlt,hasBreaks:qlt,splitBreaks:Hlt,lineBreakRegex:af,removeScript:BI,getUrl:Xlt,evaluate:Ne,getMax:Klt,getMin:Qlt}});var ect,rct,Rr,ql,Gn=x(()=>{"use strict";zt();ect=a(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),rct=a(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),Rr=a(function(e,t,r,n){let i=rct(t,r,n);ect(e,i)},"configureSvgSize"),ql=a(function(e,t,r,n){let i=t.node().getBBox(),s=i.width,o=i.height;P.info(`SVG bounds: ${s}x${o}`,i);let l=0,u=0;P.info(`Graph bounds: ${l}x${u}`,e),l=s+r*2,u=o+r*2,P.info(`Calculated bounds: ${l}x${u}`),Rr(t,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox")});var dx,nct,$I,GI,KC=x(()=>{"use strict";zt();dx={},nct=a((e,t,r)=>{let n="";return e in dx&&dx[e]?n=dx[e](r):P.warn(`No theme found for ${e}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${n} + + ${t} +`},"getStyles"),$I=a((e,t)=>{t!==void 0&&(dx[e]=t)},"addStylesForDiagram"),GI=nct});var tg={};Be(tg,{clear:()=>Ye,getAccDescription:()=>ar,getAccTitle:()=>ir,getDiagramTitle:()=>or,setAccDescription:()=>sr,setAccTitle:()=>rr,setDiagramTitle:()=>xr});var QC,ZC,JC,tw,Ye,rr,ir,sr,ar,xr,or,Sn=x(()=>{"use strict";Fe();$n();QC="",ZC="",JC="",tw=a(e=>er(e,Re()),"sanitizeText"),Ye=a(()=>{QC="",JC="",ZC=""},"clear"),rr=a(e=>{QC=tw(e).replace(/^\s+/g,"")},"setAccTitle"),ir=a(()=>QC,"getAccTitle"),sr=a(e=>{JC=tw(e).replace(/\n\s+/g,` +`)},"setAccDescription"),ar=a(()=>JC,"getAccDescription"),xr=a(e=>{ZC=tw(e)},"setDiagramTitle"),or=a(()=>ZC,"getDiagramTitle")});var VI,ict,Y,eg,mx,rg,rw,sct,px,gu,ng,ew,pe=x(()=>{"use strict";hu();zt();$n();Fe();Gn();KC();Sn();VI=P,ict=$m,Y=Re,eg=cx,mx=Wl,rg=a(e=>er(e,Y()),"sanitizeText"),rw=ql,sct=a(()=>tg,"getCommonDb"),px={},gu=a((e,t,r)=>{px[e]&&VI.warn(`Diagram with id ${e} already registered. Overwriting.`),px[e]=t,r&&TC(e,r),$I(e,t.styles),t.injectUtils?.(VI,ict,Y,rg,rw,sct(),()=>{})},"registerDiagram"),ng=a(e=>{if(e in px)return px[e];throw new ew(e)},"getDiagram"),ew=class extends Error{static{a(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});var ka,Hl,Ri,ba,ro,ig,nw,iw,gx,yx,zI,act,oct,lct,cct,uct,hct,fct,dct,pct,mct,gct,yct,xct,bct,kct,Tct,Sct,WI,_ct,Cct,UI,wct,Ect,vct,Act,Yl,Lct,Rct,Dct,Ict,Nct,sg,sw=x(()=>{"use strict";pe();Fe();Sn();ka=[],Hl=[""],Ri="global",ba="",ro=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ig=[],nw="",iw=!1,gx=4,yx=2,act=a(function(){return zI},"getC4Type"),oct=a(function(e){zI=er(e,Y())},"setC4Type"),lct=a(function(e,t,r,n,i,s,o,l,u){if(e==null||t===void 0||t===null||r===void 0||r===null||n===void 0||n===null)return;let h={},f=ig.find(d=>d.from===t&&d.to===r);if(f?h=f:ig.push(h),h.type=e,h.from=t,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(s==null)h.descr={text:""};else if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]={text:p}}else h.descr={text:s};if(typeof o=="object"){let[d,p]=Object.entries(o)[0];h[d]=p}else h.sprite=o;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.tags=l;if(typeof u=="object"){let[d,p]=Object.entries(u)[0];h[d]=p}else h.link=u;h.wrap=Yl()},"addRel"),cct=a(function(e,t,r,n,i,s,o){if(t===null||r===null)return;let l={},u=ka.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,ka.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.typeC4Shape={text:e},l.parentBoundary=Ri,l.wrap=Yl()},"addPersonOrSystem"),uct=a(function(e,t,r,n,i,s,o,l){if(t===null||r===null)return;let u={},h=ka.find(f=>f.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,ka.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=Yl(),u.typeC4Shape={text:e},u.parentBoundary=Ri},"addContainer"),hct=a(function(e,t,r,n,i,s,o,l){if(t===null||r===null)return;let u={},h=ka.find(f=>f.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,ka.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=Yl(),u.typeC4Shape={text:e},u.parentBoundary=Ri},"addComponent"),fct=a(function(e,t,r,n,i){if(e===null||t===null)return;let s={},o=ro.find(l=>l.alias===e);if(o&&e===o.alias?s=o:(s.alias=e,ro.push(s)),t==null?s.label={text:""}:s.label={text:t},r==null)s.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];s[l]={text:u}}else s.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];s[l]=u}else s.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];s[l]=u}else s.link=i;s.parentBoundary=Ri,s.wrap=Yl(),ba=Ri,Ri=e,Hl.push(ba)},"addPersonOrSystemBoundary"),dct=a(function(e,t,r,n,i){if(e===null||t===null)return;let s={},o=ro.find(l=>l.alias===e);if(o&&e===o.alias?s=o:(s.alias=e,ro.push(s)),t==null?s.label={text:""}:s.label={text:t},r==null)s.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];s[l]={text:u}}else s.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];s[l]=u}else s.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];s[l]=u}else s.link=i;s.parentBoundary=Ri,s.wrap=Yl(),ba=Ri,Ri=e,Hl.push(ba)},"addContainerBoundary"),pct=a(function(e,t,r,n,i,s,o,l){if(t===null||r===null)return;let u={},h=ro.find(f=>f.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,ro.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.nodeType=e,u.parentBoundary=Ri,u.wrap=Yl(),ba=Ri,Ri=t,Hl.push(ba)},"addDeploymentNode"),mct=a(function(){Ri=ba,Hl.pop(),ba=Hl.pop(),Hl.push(ba)},"popBoundaryParseStack"),gct=a(function(e,t,r,n,i,s,o,l,u,h,f){let d=ka.find(p=>p.alias===t);if(!(d===void 0&&(d=ro.find(p=>p.alias===t),d===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];d[p]=m}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];d[p]=m}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];d[p]=m}else d.borderColor=i;if(s!=null)if(typeof s=="object"){let[p,m]=Object.entries(s)[0];d[p]=m}else d.shadowing=s;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];d[p]=m}else d.shape=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];d[p]=m}else d.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];d[p]=m}else d.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];d[p]=m}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];d[p]=m}else d.legendSprite=f}},"updateElStyle"),yct=a(function(e,t,r,n,i,s,o){let l=ig.find(u=>u.from===t&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(s);if(o!=null)if(typeof o=="object"){let[u,h]=Object.entries(o)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(o)}},"updateRelStyle"),xct=a(function(e,t,r){let n=gx,i=yx;if(typeof t=="object"){let s=Object.values(t)[0];n=parseInt(s)}else n=parseInt(t);if(typeof r=="object"){let s=Object.values(r)[0];i=parseInt(s)}else i=parseInt(r);n>=1&&(gx=n),i>=1&&(yx=i)},"updateLayoutConfig"),bct=a(function(){return gx},"getC4ShapeInRow"),kct=a(function(){return yx},"getC4BoundaryInRow"),Tct=a(function(){return Ri},"getCurrentBoundaryParse"),Sct=a(function(){return ba},"getParentBoundaryParse"),WI=a(function(e){return e==null?ka:ka.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),_ct=a(function(e){return ka.find(t=>t.alias===e)},"getC4Shape"),Cct=a(function(e){return Object.keys(WI(e))},"getC4ShapeKeys"),UI=a(function(e){return e==null?ro:ro.filter(t=>t.parentBoundary===e)},"getBoundaries"),wct=UI,Ect=a(function(){return ig},"getRels"),vct=a(function(){return nw},"getTitle"),Act=a(function(e){iw=e},"setWrap"),Yl=a(function(){return iw},"autoWrap"),Lct=a(function(){ka=[],ro=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ba="",Ri="global",Hl=[""],ig=[],Hl=[""],nw="",iw=!1,gx=4,yx=2},"clear"),Rct={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},Dct={FILLED:0,OPEN:1},Ict={LEFTOF:0,RIGHTOF:1,OVER:2},Nct=a(function(e){nw=er(e,Y())},"setTitle"),sg={addPersonOrSystem:cct,addPersonOrSystemBoundary:fct,addContainer:uct,addContainerBoundary:dct,addComponent:hct,addDeploymentNode:pct,popBoundaryParseStack:mct,addRel:lct,updateElStyle:gct,updateRelStyle:yct,updateLayoutConfig:xct,autoWrap:Yl,setWrap:Act,getC4ShapeArray:WI,getC4Shape:_ct,getC4ShapeKeys:Cct,getBoundaries:UI,getBoundarys:wct,getCurrentBoundaryParse:Tct,getParentBoundaryParse:Sct,getRels:Ect,getTitle:vct,getC4Type:act,getC4ShapeInRow:bct,getC4BoundaryInRow:kct,setAccTitle:rr,getAccTitle:ir,getAccDescription:ar,setAccDescription:sr,getConfig:a(()=>Y().c4,"getConfig"),clear:Lct,LINETYPE:Rct,ARROWTYPE:Dct,PLACEMENT:Ict,setTitle:Nct,setC4Type:oct}});function yu(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var aw=x(()=>{"use strict";a(yu,"ascending")});function ow(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var jI=x(()=>{"use strict";a(ow,"descending")});function xu(e){let t,r,n;e.length!==2?(t=yu,r=a((l,u)=>yu(e(l),u),"compare2"),n=a((l,u)=>e(l)-u,"delta")):(t=e===yu||e===ow?e:Mct,r=e,n=e);function i(l,u,h=0,f=l.length){if(h>>1;r(l[d],u)<0?h=d+1:f=d}while(h>>1;r(l[d],u)<=0?h=d+1:f=d}while(hh&&n(l[d-1],u)>-n(l[d],u)?d-1:d}return a(o,"center"),{left:i,center:o,right:s}}function Mct(){return 0}var lw=x(()=>{"use strict";aw();jI();a(xu,"bisector");a(Mct,"zero")});function cw(e){return e===null?NaN:+e}var qI=x(()=>{"use strict";a(cw,"number")});var HI,YI,Oct,Pct,uw,XI=x(()=>{"use strict";aw();lw();qI();HI=xu(yu),YI=HI.right,Oct=HI.left,Pct=xu(cw).center,uw=YI});function KI({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function Bct({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Fct({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function $ct(e){return e!==null&&typeof e=="object"?e.valueOf():e}var of,QI=x(()=>{"use strict";of=class extends Map{static{a(this,"InternMap")}constructor(t,r=$ct){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(KI(this,t))}has(t){return super.has(KI(this,t))}set(t,r){return super.set(Bct(this,t),r)}delete(t){return super.delete(Fct(this,t))}};a(KI,"intern_get");a(Bct,"intern_set");a(Fct,"intern_delete");a($ct,"keyof")});function xx(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),s=n/Math.pow(10,i),o=s>=Gct?10:s>=Vct?5:s>=zct?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/o,l=Math.round(e*h),u=Math.round(t*h),l/ht&&--u,h=-h):(h=Math.pow(10,i)*o,l=Math.round(e/h),u=Math.round(t/h),l*ht&&--u),u0))return[];if(e===t)return[e];let n=t=i))return[];let l=s-i+1,u=new Array(l);if(n)if(o<0)for(let h=0;h{"use strict";Gct=Math.sqrt(50),Vct=Math.sqrt(10),zct=Math.sqrt(2);a(xx,"tickSpec");a(bx,"ticks");a(ag,"tickIncrement");a(lf,"tickStep")});function kx(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var JI=x(()=>{"use strict";a(kx,"max")});function Tx(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var tN=x(()=>{"use strict";a(Tx,"min")});function Sx(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(i);++n{"use strict";a(Sx,"range")});var Xl=x(()=>{"use strict";XI();lw();JI();tN();eN();ZI();QI()});function hw(e){return e}var rN=x(()=>{"use strict";a(hw,"default")});function Wct(e){return"translate("+e+",0)"}function Uct(e){return"translate(0,"+e+")"}function jct(e){return t=>+e(t)}function qct(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function Hct(){return!this.__axis}function iN(e,t){var r=[],n=null,i=null,s=6,o=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===Cx||e===_x?-1:1,f=e===_x||e===fw?"x":"y",d=e===Cx||e===dw?Wct:Uct;function p(m){var g=n??(t.ticks?t.ticks.apply(t,r):t.domain()),y=i??(t.tickFormat?t.tickFormat.apply(t,r):hw),b=Math.max(s,0)+l,k=t.range(),T=+k[0]+u,_=+k[k.length-1]+u,L=(t.bandwidth?qct:jct)(t.copy(),u),C=m.selection?m.selection():m,D=C.selectAll(".domain").data([null]),$=C.selectAll(".tick").data(g,t).order(),w=$.exit(),A=$.enter().append("g").attr("class","tick"),F=$.select("line"),S=$.select("text");D=D.merge(D.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),$=$.merge(A),F=F.merge(A.append("line").attr("stroke","currentColor").attr(f+"2",h*s)),S=S.merge(A.append("text").attr("fill","currentColor").attr(f,h*b).attr("dy",e===Cx?"0em":e===dw?"0.71em":"0.32em")),m!==C&&(D=D.transition(m),$=$.transition(m),F=F.transition(m),S=S.transition(m),w=w.transition(m).attr("opacity",nN).attr("transform",function(v){return isFinite(v=L(v))?d(v+u):this.getAttribute("transform")}),A.attr("opacity",nN).attr("transform",function(v){var R=this.parentNode.__axis;return d((R&&isFinite(R=R(v))?R:L(v))+u)})),w.remove(),D.attr("d",e===_x||e===fw?o?"M"+h*o+","+T+"H"+u+"V"+_+"H"+h*o:"M"+u+","+T+"V"+_:o?"M"+T+","+h*o+"V"+u+"H"+_+"V"+h*o:"M"+T+","+u+"H"+_),$.attr("opacity",1).attr("transform",function(v){return d(L(v)+u)}),F.attr(f+"2",h*s),S.attr(f,h*b).text(y),C.filter(Hct).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===fw?"start":e===_x?"end":"middle"),C.each(function(){this.__axis=L})}return a(p,"axis"),p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(s=o=+m,p):s},p.tickSizeInner=function(m){return arguments.length?(s=+m,p):s},p.tickSizeOuter=function(m){return arguments.length?(o=+m,p):o},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function pw(e){return iN(Cx,e)}function mw(e){return iN(dw,e)}var Cx,fw,dw,_x,nN,sN=x(()=>{"use strict";rN();Cx=1,fw=2,dw=3,_x=4,nN=1e-6;a(Wct,"translateX");a(Uct,"translateY");a(jct,"number");a(qct,"center");a(Hct,"entering");a(iN,"axis");a(pw,"axisTop");a(mw,"axisBottom")});var aN=x(()=>{"use strict";sN()});function lN(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function Kct(e,t){for(var r=0,n=e.length,i;r{"use strict";Yct={value:a(()=>{},"value")};a(lN,"dispatch");a(wx,"Dispatch");a(Xct,"parseTypenames");wx.prototype=lN.prototype={constructor:wx,on:a(function(e,t){var r=this._,n=Xct(e+"",r),i,s=-1,o=n.length;if(arguments.length<2){for(;++s0)for(var r=new Array(i),n=0,i,s;n{"use strict";cN()});var Ex,xw,bw=x(()=>{"use strict";Ex="http://www.w3.org/1999/xhtml",xw={svg:"http://www.w3.org/2000/svg",xhtml:Ex,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function no(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),xw.hasOwnProperty(t)?{space:xw[t],local:e}:e}var vx=x(()=>{"use strict";bw();a(no,"default")});function Qct(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ex&&t.documentElement.namespaceURI===Ex?t.createElement(e):t.createElementNS(r,e)}}function Zct(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function og(e){var t=no(e);return(t.local?Zct:Qct)(t)}var kw=x(()=>{"use strict";vx();bw();a(Qct,"creatorInherit");a(Zct,"creatorFixed");a(og,"default")});function Jct(){}function Kl(e){return e==null?Jct:function(){return this.querySelector(e)}}var Ax=x(()=>{"use strict";a(Jct,"none");a(Kl,"default")});function Tw(e){typeof e!="function"&&(e=Kl(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";Ta();Ax();a(Tw,"default")});function Sw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var hN=x(()=>{"use strict";a(Sw,"array")});function tut(){return[]}function cf(e){return e==null?tut:function(){return this.querySelectorAll(e)}}var _w=x(()=>{"use strict";a(tut,"empty");a(cf,"default")});function eut(e){return function(){return Sw(e.apply(this,arguments))}}function Cw(e){typeof e=="function"?e=eut(e):e=cf(e);for(var t=this._groups,r=t.length,n=[],i=[],s=0;s{"use strict";Ta();hN();_w();a(eut,"arrayAll");a(Cw,"default")});function uf(e){return function(){return this.matches(e)}}function Lx(e){return function(t){return t.matches(e)}}var lg=x(()=>{"use strict";a(uf,"default");a(Lx,"childMatcher")});function nut(e){return function(){return rut.call(this.children,e)}}function iut(){return this.firstElementChild}function ww(e){return this.select(e==null?iut:nut(typeof e=="function"?e:Lx(e)))}var rut,dN=x(()=>{"use strict";lg();rut=Array.prototype.find;a(nut,"childFind");a(iut,"childFirst");a(ww,"default")});function aut(){return Array.from(this.children)}function out(e){return function(){return sut.call(this.children,e)}}function Ew(e){return this.selectAll(e==null?aut:out(typeof e=="function"?e:Lx(e)))}var sut,pN=x(()=>{"use strict";lg();sut=Array.prototype.filter;a(aut,"children");a(out,"childrenFilter");a(Ew,"default")});function vw(e){typeof e!="function"&&(e=uf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";Ta();lg();a(vw,"default")});function cg(e){return new Array(e.length)}var Aw=x(()=>{"use strict";a(cg,"default")});function Lw(){return new on(this._enter||this._groups.map(cg),this._parents)}function ug(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Rw=x(()=>{"use strict";Aw();Ta();a(Lw,"default");a(ug,"EnterNode");ug.prototype={constructor:ug,appendChild:a(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:a(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:a(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:a(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function Dw(e){return function(){return e}}var gN=x(()=>{"use strict";a(Dw,"default")});function lut(e,t,r,n,i,s){for(var o=0,l,u=t.length,h=s.length;o=_&&(_=T+1);!(C=b[_])&&++_{"use strict";Ta();Rw();gN();a(lut,"bindIndex");a(cut,"bindKey");a(uut,"datum");a(Iw,"default");a(hut,"arraylike")});function Nw(){return new on(this._exit||this._groups.map(cg),this._parents)}var xN=x(()=>{"use strict";Aw();Ta();a(Nw,"default")});function Mw(e,t,r){var n=this.enter(),i=this,s=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?s.remove():r(s),n&&i?n.merge(i).order():i}var bN=x(()=>{"use strict";a(Mw,"default")});function Ow(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,s=n.length,o=Math.min(i,s),l=new Array(i),u=0;u{"use strict";Ta();a(Ow,"default")});function Pw(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(o=n[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}var TN=x(()=>{"use strict";a(Pw,"default")});function Bw(e){e||(e=fut);function t(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}a(t,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),s=0;st?1:e>=t?0:NaN}var SN=x(()=>{"use strict";Ta();a(Bw,"default");a(fut,"ascending")});function Fw(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var _N=x(()=>{"use strict";a(Fw,"default")});function $w(){return Array.from(this)}var CN=x(()=>{"use strict";a($w,"default")});function Gw(){for(var e=this._groups,t=0,r=e.length;t{"use strict";a(Gw,"default")});function Vw(){let e=0;for(let t of this)++e;return e}var EN=x(()=>{"use strict";a(Vw,"default")});function zw(){return!this.node()}var vN=x(()=>{"use strict";a(zw,"default")});function Ww(e){for(var t=this._groups,r=0,n=t.length;r{"use strict";a(Ww,"default")});function dut(e){return function(){this.removeAttribute(e)}}function put(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mut(e,t){return function(){this.setAttribute(e,t)}}function gut(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yut(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function xut(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Uw(e,t){var r=no(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?put:dut:typeof t=="function"?r.local?xut:yut:r.local?gut:mut)(r,t))}var LN=x(()=>{"use strict";vx();a(dut,"attrRemove");a(put,"attrRemoveNS");a(mut,"attrConstant");a(gut,"attrConstantNS");a(yut,"attrFunction");a(xut,"attrFunctionNS");a(Uw,"default")});function hg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var jw=x(()=>{"use strict";a(hg,"default")});function but(e){return function(){this.style.removeProperty(e)}}function kut(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Tut(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function qw(e,t,r){return arguments.length>1?this.each((t==null?but:typeof t=="function"?Tut:kut)(e,t,r??"")):Ql(this.node(),e)}function Ql(e,t){return e.style.getPropertyValue(t)||hg(e).getComputedStyle(e,null).getPropertyValue(t)}var Hw=x(()=>{"use strict";jw();a(but,"styleRemove");a(kut,"styleConstant");a(Tut,"styleFunction");a(qw,"default");a(Ql,"styleValue")});function Sut(e){return function(){delete this[e]}}function _ut(e,t){return function(){this[e]=t}}function Cut(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Yw(e,t){return arguments.length>1?this.each((t==null?Sut:typeof t=="function"?Cut:_ut)(e,t)):this.node()[e]}var RN=x(()=>{"use strict";a(Sut,"propertyRemove");a(_ut,"propertyConstant");a(Cut,"propertyFunction");a(Yw,"default")});function DN(e){return e.trim().split(/^|\s+/)}function Xw(e){return e.classList||new IN(e)}function IN(e){this._node=e,this._names=DN(e.getAttribute("class")||"")}function NN(e,t){for(var r=Xw(e),n=-1,i=t.length;++n{"use strict";a(DN,"classArray");a(Xw,"classList");a(IN,"ClassList");IN.prototype={add:a(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:a(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:a(function(e){return this._names.indexOf(e)>=0},"contains")};a(NN,"classedAdd");a(MN,"classedRemove");a(wut,"classedTrue");a(Eut,"classedFalse");a(vut,"classedFunction");a(Kw,"default")});function Aut(){this.textContent=""}function Lut(e){return function(){this.textContent=e}}function Rut(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Qw(e){return arguments.length?this.each(e==null?Aut:(typeof e=="function"?Rut:Lut)(e)):this.node().textContent}var PN=x(()=>{"use strict";a(Aut,"textRemove");a(Lut,"textConstant");a(Rut,"textFunction");a(Qw,"default")});function Dut(){this.innerHTML=""}function Iut(e){return function(){this.innerHTML=e}}function Nut(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Zw(e){return arguments.length?this.each(e==null?Dut:(typeof e=="function"?Nut:Iut)(e)):this.node().innerHTML}var BN=x(()=>{"use strict";a(Dut,"htmlRemove");a(Iut,"htmlConstant");a(Nut,"htmlFunction");a(Zw,"default")});function Mut(){this.nextSibling&&this.parentNode.appendChild(this)}function Jw(){return this.each(Mut)}var FN=x(()=>{"use strict";a(Mut,"raise");a(Jw,"default")});function Out(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tE(){return this.each(Out)}var $N=x(()=>{"use strict";a(Out,"lower");a(tE,"default")});function eE(e){var t=typeof e=="function"?e:og(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var GN=x(()=>{"use strict";kw();a(eE,"default")});function Put(){return null}function rE(e,t){var r=typeof e=="function"?e:og(e),n=t==null?Put:typeof t=="function"?t:Kl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var VN=x(()=>{"use strict";kw();Ax();a(Put,"constantNull");a(rE,"default")});function But(){var e=this.parentNode;e&&e.removeChild(this)}function nE(){return this.each(But)}var zN=x(()=>{"use strict";a(But,"remove");a(nE,"default")});function Fut(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $ut(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iE(e){return this.select(e?$ut:Fut)}var WN=x(()=>{"use strict";a(Fut,"selection_cloneShallow");a($ut,"selection_cloneDeep");a(iE,"default")});function sE(e){return arguments.length?this.property("__data__",e):this.node().__data__}var UN=x(()=>{"use strict";a(sE,"default")});function Gut(e){return function(t){e.call(this,t,this.__data__)}}function Vut(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function zut(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,s;r{"use strict";a(Gut,"contextListener");a(Vut,"parseTypenames");a(zut,"onRemove");a(Wut,"onAdd");a(aE,"default")});function qN(e,t,r){var n=hg(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Uut(e,t){return function(){return qN(this,e,t)}}function jut(e,t){return function(){return qN(this,e,t.apply(this,arguments))}}function oE(e,t){return this.each((typeof t=="function"?jut:Uut)(e,t))}var HN=x(()=>{"use strict";jw();a(qN,"dispatchEvent");a(Uut,"dispatchConstant");a(jut,"dispatchFunction");a(oE,"default")});function*lE(){for(var e=this._groups,t=0,r=e.length;t{"use strict";a(lE,"default")});function on(e,t){this._groups=e,this._parents=t}function XN(){return new on([[document.documentElement]],cE)}function qut(){return this}var cE,Qo,Ta=x(()=>{"use strict";uN();fN();dN();pN();mN();yN();Rw();xN();bN();kN();TN();SN();_N();CN();wN();EN();vN();AN();LN();Hw();RN();ON();PN();BN();FN();$N();GN();VN();zN();WN();UN();jN();HN();YN();cE=[null];a(on,"Selection");a(XN,"selection");a(qut,"selection_selection");on.prototype=XN.prototype={constructor:on,select:Tw,selectAll:Cw,selectChild:ww,selectChildren:Ew,filter:vw,data:Iw,enter:Lw,exit:Nw,join:Mw,merge:Ow,selection:qut,order:Pw,sort:Bw,call:Fw,nodes:$w,node:Gw,size:Vw,empty:zw,each:Ww,attr:Uw,style:qw,property:Yw,classed:Kw,text:Qw,html:Zw,raise:Jw,lower:tE,append:eE,insert:rE,remove:nE,clone:iE,datum:sE,on:aE,dispatch:oE,[Symbol.iterator]:lE};Qo=XN});function xt(e){return typeof e=="string"?new on([[document.querySelector(e)]],[document.documentElement]):new on([[e]],cE)}var KN=x(()=>{"use strict";Ta();a(xt,"default")});var Sa=x(()=>{"use strict";lg();vx();KN();Ta();Ax();_w();Hw()});var QN=x(()=>{"use strict"});function Zl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function hf(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var uE=x(()=>{"use strict";a(Zl,"default");a(hf,"extend")});function Jl(){}function JN(){return this.rgb().formatHex()}function tht(){return this.rgb().formatHex8()}function eht(){return aM(this).formatHsl()}function tM(){return this.rgb().formatRgb()}function Ca(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Hut.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?eM(t):r===3?new Zn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Rx(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Rx(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Yut.exec(e))?new Zn(t[1],t[2],t[3],1):(t=Xut.exec(e))?new Zn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Kut.exec(e))?Rx(t[1],t[2],t[3],t[4]):(t=Qut.exec(e))?Rx(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zut.exec(e))?iM(t[1],t[2]/100,t[3]/100,1):(t=Jut.exec(e))?iM(t[1],t[2]/100,t[3]/100,t[4]):ZN.hasOwnProperty(e)?eM(ZN[e]):e==="transparent"?new Zn(NaN,NaN,NaN,0):null}function eM(e){return new Zn(e>>16&255,e>>8&255,e&255,1)}function Rx(e,t,r,n){return n<=0&&(e=t=r=NaN),new Zn(e,t,r,n)}function fE(e){return e instanceof Jl||(e=Ca(e)),e?(e=e.rgb(),new Zn(e.r,e.g,e.b,e.opacity)):new Zn}function df(e,t,r,n){return arguments.length===1?fE(e):new Zn(e,t,r,n??1)}function Zn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function rM(){return`#${bu(this.r)}${bu(this.g)}${bu(this.b)}`}function rht(){return`#${bu(this.r)}${bu(this.g)}${bu(this.b)}${bu((isNaN(this.opacity)?1:this.opacity)*255)}`}function nM(){let e=Nx(this.opacity);return`${e===1?"rgb(":"rgba("}${ku(this.r)}, ${ku(this.g)}, ${ku(this.b)}${e===1?")":`, ${e})`}`}function Nx(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ku(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function bu(e){return e=ku(e),(e<16?"0":"")+e.toString(16)}function iM(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _a(e,t,r,n)}function aM(e){if(e instanceof _a)return new _a(e.h,e.s,e.l,e.opacity);if(e instanceof Jl||(e=Ca(e)),!e)return new _a;if(e instanceof _a)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,l=s-i,u=(s+i)/2;return l?(t===s?o=(r-n)/l+(r0&&u<1?0:o,new _a(o,l,u,e.opacity)}function oM(e,t,r,n){return arguments.length===1?aM(e):new _a(e,t,r,n??1)}function _a(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function sM(e){return e=(e||0)%360,e<0?e+360:e}function Dx(e){return Math.max(0,Math.min(1,e||0))}function hE(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var fg,Ix,ff,dg,io,Hut,Yut,Xut,Kut,Qut,Zut,Jut,ZN,dE=x(()=>{"use strict";uE();a(Jl,"Color");fg=.7,Ix=1/fg,ff="\\s*([+-]?\\d+)\\s*",dg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",io="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Hut=/^#([0-9a-f]{3,8})$/,Yut=new RegExp(`^rgb\\(${ff},${ff},${ff}\\)$`),Xut=new RegExp(`^rgb\\(${io},${io},${io}\\)$`),Kut=new RegExp(`^rgba\\(${ff},${ff},${ff},${dg}\\)$`),Qut=new RegExp(`^rgba\\(${io},${io},${io},${dg}\\)$`),Zut=new RegExp(`^hsl\\(${dg},${io},${io}\\)$`),Jut=new RegExp(`^hsla\\(${dg},${io},${io},${dg}\\)$`),ZN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zl(Jl,Ca,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:JN,formatHex:JN,formatHex8:tht,formatHsl:eht,formatRgb:tM,toString:tM});a(JN,"color_formatHex");a(tht,"color_formatHex8");a(eht,"color_formatHsl");a(tM,"color_formatRgb");a(Ca,"color");a(eM,"rgbn");a(Rx,"rgba");a(fE,"rgbConvert");a(df,"rgb");a(Zn,"Rgb");Zl(Zn,df,hf(Jl,{brighter(e){return e=e==null?Ix:Math.pow(Ix,e),new Zn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fg:Math.pow(fg,e),new Zn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zn(ku(this.r),ku(this.g),ku(this.b),Nx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rM,formatHex:rM,formatHex8:rht,formatRgb:nM,toString:nM}));a(rM,"rgb_formatHex");a(rht,"rgb_formatHex8");a(nM,"rgb_formatRgb");a(Nx,"clampa");a(ku,"clampi");a(bu,"hex");a(iM,"hsla");a(aM,"hslConvert");a(oM,"hsl");a(_a,"Hsl");Zl(_a,oM,hf(Jl,{brighter(e){return e=e==null?Ix:Math.pow(Ix,e),new _a(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fg:Math.pow(fg,e),new _a(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Zn(hE(e>=240?e-240:e+120,i,n),hE(e,i,n),hE(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new _a(sM(this.h),Dx(this.s),Dx(this.l),Nx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Nx(this.opacity);return`${e===1?"hsl(":"hsla("}${sM(this.h)}, ${Dx(this.s)*100}%, ${Dx(this.l)*100}%${e===1?")":`, ${e})`}`}}));a(sM,"clamph");a(Dx,"clampt");a(hE,"hsl2rgb")});var lM,cM,uM=x(()=>{"use strict";lM=Math.PI/180,cM=180/Math.PI});function gM(e){if(e instanceof so)return new so(e.l,e.a,e.b,e.opacity);if(e instanceof Zo)return yM(e);e instanceof Zn||(e=fE(e));var t=yE(e.r),r=yE(e.g),n=yE(e.b),i=pE((.2225045*t+.7168786*r+.0606169*n)/fM),s,o;return t===r&&r===n?s=o=i:(s=pE((.4360747*t+.3850649*r+.1430804*n)/hM),o=pE((.0139322*t+.0971045*r+.7141733*n)/dM)),new so(116*i-16,500*(s-i),200*(i-o),e.opacity)}function xE(e,t,r,n){return arguments.length===1?gM(e):new so(e,t,r,n??1)}function so(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function pE(e){return e>nht?Math.pow(e,1/3):e/mM+pM}function mE(e){return e>pf?e*e*e:mM*(e-pM)}function gE(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yE(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function iht(e){if(e instanceof Zo)return new Zo(e.h,e.c,e.l,e.opacity);if(e instanceof so||(e=gM(e)),e.a===0&&e.b===0)return new Zo(NaN,0{"use strict";uE();dE();uM();Mx=18,hM=.96422,fM=1,dM=.82521,pM=4/29,pf=6/29,mM=3*pf*pf,nht=pf*pf*pf;a(gM,"labConvert");a(xE,"lab");a(so,"Lab");Zl(so,xE,hf(Jl,{brighter(e){return new so(this.l+Mx*(e??1),this.a,this.b,this.opacity)},darker(e){return new so(this.l-Mx*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=hM*mE(t),e=fM*mE(e),r=dM*mE(r),new Zn(gE(3.1338561*t-1.6168667*e-.4906146*r),gE(-.9787684*t+1.9161415*e+.033454*r),gE(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));a(pE,"xyz2lab");a(mE,"lab2xyz");a(gE,"lrgb2rgb");a(yE,"rgb2lrgb");a(iht,"hclConvert");a(pg,"hcl");a(Zo,"Hcl");a(yM,"hcl2lab");Zl(Zo,pg,hf(Jl,{brighter(e){return new Zo(this.h,this.c,this.l+Mx*(e??1),this.opacity)},darker(e){return new Zo(this.h,this.c,this.l-Mx*(e??1),this.opacity)},rgb(){return yM(this).rgb()}}))});var mf=x(()=>{"use strict";dE();xM()});function bE(e,t,r,n,i){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*r+(1+3*e+3*s-3*o)*n+o*i)/6}function kE(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],s=e[n+1],o=n>0?e[n-1]:2*i-s,l=n{"use strict";a(bE,"basis");a(kE,"default")});function SE(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],s=e[n%t],o=e[(n+1)%t],l=e[(n+2)%t];return bE((r-n/t)*t,i,s,o,l)}}var bM=x(()=>{"use strict";TE();a(SE,"default")});var gf,_E=x(()=>{"use strict";gf=a(e=>()=>e,"default")});function kM(e,t){return function(r){return e+r*t}}function sht(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function TM(e,t){var r=t-e;return r?kM(e,r>180||r<-180?r-360*Math.round(r/360):r):gf(isNaN(e)?t:e)}function SM(e){return(e=+e)==1?Jo:function(t,r){return r-t?sht(t,r,e):gf(isNaN(t)?r:t)}}function Jo(e,t){var r=t-e;return r?kM(e,r):gf(isNaN(e)?t:e)}var CE=x(()=>{"use strict";_E();a(kM,"linear");a(sht,"exponential");a(TM,"hue");a(SM,"gamma");a(Jo,"nogamma")});function _M(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),s=new Array(r),o,l;for(o=0;o{"use strict";mf();TE();bM();CE();Tu=a(function e(t){var r=SM(t);function n(i,s){var o=r((i=df(i)).r,(s=df(s)).r),l=r(i.g,s.g),u=r(i.b,s.b),h=Jo(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=h(f),i+""}}return a(n,"rgb"),n.gamma=e,n},"rgbGamma")(1);a(_M,"rgbSpline");aht=_M(kE),oht=_M(SE)});function EE(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(s){for(i=0;i{"use strict";a(EE,"default");a(CM,"isNumberArray")});function EM(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),s=new Array(r),o;for(o=0;o{"use strict";Ox();a(EM,"genericArray")});function vE(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var AM=x(()=>{"use strict";a(vE,"default")});function Vn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var mg=x(()=>{"use strict";a(Vn,"default")});function AE(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=tc(e[i],t[i]):n[i]=t[i];return function(s){for(i in r)n[i]=r[i](s);return n}}var LM=x(()=>{"use strict";Ox();a(AE,"default")});function lht(e){return function(){return e}}function cht(e){return function(t){return e(t)+""}}function yf(e,t){var r=RE.lastIndex=LE.lastIndex=0,n,i,s,o=-1,l=[],u=[];for(e=e+"",t=t+"";(n=RE.exec(e))&&(i=LE.exec(t));)(s=i.index)>r&&(s=t.slice(r,s),l[o]?l[o]+=s:l[++o]=s),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:Vn(n,i)})),r=LE.lastIndex;return r{"use strict";mg();RE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,LE=new RegExp(RE.source,"g");a(lht,"zero");a(cht,"one");a(yf,"default")});function tc(e,t){var r=typeof t,n;return t==null||r==="boolean"?gf(t):(r==="number"?Vn:r==="string"?(n=Ca(t))?(t=n,Tu):yf:t instanceof Ca?Tu:t instanceof Date?vE:CM(t)?EE:Array.isArray(t)?EM:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?AE:Vn)(e,t)}var Ox=x(()=>{"use strict";mf();wE();vM();AM();mg();LM();DE();_E();wM();a(tc,"default")});function Px(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var RM=x(()=>{"use strict";a(Px,"default")});function Fx(e,t,r,n,i,s){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),e*n{"use strict";DM=180/Math.PI,Bx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};a(Fx,"default")});function NM(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Bx:Fx(t.a,t.b,t.c,t.d,t.e,t.f)}function MM(e){return e==null?Bx:($x||($x=document.createElementNS("http://www.w3.org/2000/svg","g")),$x.setAttribute("transform",e),(e=$x.transform.baseVal.consolidate())?(e=e.matrix,Fx(e.a,e.b,e.c,e.d,e.e,e.f)):Bx)}var $x,OM=x(()=>{"use strict";IM();a(NM,"parseCss");a(MM,"parseSvg")});function PM(e,t,r,n){function i(h){return h.length?h.pop()+" ":""}a(i,"pop");function s(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push("translate(",null,t,null,r);g.push({i:y-4,x:Vn(h,d)},{i:y-2,x:Vn(f,p)})}else(d||p)&&m.push("translate("+d+t+p+r)}a(s,"translate");function o(h,f,d,p){h!==f?(h-f>180?f+=360:f-h>180&&(h+=360),p.push({i:d.push(i(d)+"rotate(",null,n)-2,x:Vn(h,f)})):f&&d.push(i(d)+"rotate("+f+n)}a(o,"rotate");function l(h,f,d,p){h!==f?p.push({i:d.push(i(d)+"skewX(",null,n)-2,x:Vn(h,f)}):f&&d.push(i(d)+"skewX("+f+n)}a(l,"skewX");function u(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:Vn(h,d)},{i:y-2,x:Vn(f,p)})}else(d!==1||p!==1)&&m.push(i(m)+"scale("+d+","+p+")")}return a(u,"scale"),function(h,f){var d=[],p=[];return h=e(h),f=e(f),s(h.translateX,h.translateY,f.translateX,f.translateY,d,p),o(h.rotate,f.rotate,d,p),l(h.skewX,f.skewX,d,p),u(h.scaleX,h.scaleY,f.scaleX,f.scaleY,d,p),h=f=null,function(m){for(var g=-1,y=p.length,b;++g{"use strict";mg();OM();a(PM,"interpolateTransform");IE=PM(NM,"px, ","px)","deg)"),NE=PM(MM,", ",")",")")});function FM(e){return function(t,r){var n=e((t=pg(t)).h,(r=pg(r)).h),i=Jo(t.c,r.c),s=Jo(t.l,r.l),o=Jo(t.opacity,r.opacity);return function(l){return t.h=n(l),t.c=i(l),t.l=s(l),t.opacity=o(l),t+""}}}var ME,uht,$M=x(()=>{"use strict";mf();CE();a(FM,"hcl");ME=FM(TM),uht=FM(Jo)});var xf=x(()=>{"use strict";Ox();mg();RM();DE();BM();wE();$M()});function Tg(){return Su||(zM(hht),Su=bg.now()+zx)}function hht(){Su=0}function kg(){this._call=this._time=this._next=null}function Wx(e,t,r){var n=new kg;return n.restart(e,t,r),n}function WM(){Tg(),++bf;for(var e=Gx,t;e;)(t=Su-e._time)>=0&&e._call.call(void 0,t),e=e._next;--bf}function GM(){Su=(Vx=bg.now())+zx,bf=yg=0;try{WM()}finally{bf=0,dht(),Su=0}}function fht(){var e=bg.now(),t=e-Vx;t>VM&&(zx-=t,Vx=e)}function dht(){for(var e,t=Gx,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Gx=r);xg=e,OE(n)}function OE(e){if(!bf){yg&&(yg=clearTimeout(yg));var t=e-Su;t>24?(e<1/0&&(yg=setTimeout(GM,e-bg.now()-zx)),gg&&(gg=clearInterval(gg))):(gg||(Vx=bg.now(),gg=setInterval(fht,VM)),bf=1,zM(GM))}}var bf,yg,gg,VM,Gx,xg,Vx,Su,zx,bg,zM,PE=x(()=>{"use strict";bf=0,yg=0,gg=0,VM=1e3,Vx=0,Su=0,zx=0,bg=typeof performance=="object"&&performance.now?performance:Date,zM=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};a(Tg,"now");a(hht,"clearNow");a(kg,"Timer");kg.prototype=Wx.prototype={constructor:kg,restart:a(function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Tg():+r)+(t==null?0:+t),!this._next&&xg!==this&&(xg?xg._next=this:Gx=this,xg=this),this._call=e,this._time=r,OE()},"restart"),stop:a(function(){this._call&&(this._call=null,this._time=1/0,OE())},"stop")};a(Wx,"timer");a(WM,"timerFlush");a(GM,"wake");a(fht,"poke");a(dht,"nap");a(OE,"sleep")});function Sg(e,t,r){var n=new kg;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var UM=x(()=>{"use strict";PE();a(Sg,"default")});var Ux=x(()=>{"use strict";PE();UM()});function tl(e,t,r,n,i,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;ght(e,r,{name:t,index:n,group:i,on:pht,tween:mht,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:HM})}function Cg(e,t){var r=In(e,t);if(r.state>HM)throw new Error("too late; already scheduled");return r}function Jn(e,t){var r=In(e,t);if(r.state>jx)throw new Error("too late; already running");return r}function In(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function ght(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Wx(s,0,r.time);function s(h){r.state=jM,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}a(s,"schedule");function o(h){var f,d,p,m;if(r.state!==jM)return u();for(f in n)if(m=n[f],m.name===r.name){if(m.state===jx)return Sg(o);m.state===qM?(m.state=_g,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete n[f]):+f{"use strict";yw();Ux();pht=gw("start","end","cancel","interrupt"),mht=[],HM=0,jM=1,qx=2,jx=3,qM=4,Hx=5,_g=6;a(tl,"default");a(Cg,"init");a(Jn,"set");a(In,"get");a(ght,"create")});function wg(e,t){var r=e.__transition,n,i,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((n=r[o]).name!==t){s=!1;continue}i=n.state>qx&&n.state{"use strict";Zi();a(wg,"default")});function BE(e){return this.each(function(){wg(this,e)})}var XM=x(()=>{"use strict";YM();a(BE,"default")});function yht(e,t){var r,n;return function(){var i=Jn(this,e),s=i.tween;if(s!==r){n=r=s;for(var o=0,l=n.length;o{"use strict";Zi();a(yht,"tweenRemove");a(xht,"tweenFunction");a(FE,"default");a(kf,"tweenValue")});function vg(e,t){var r;return(typeof t=="number"?Vn:t instanceof Ca?Tu:(r=Ca(t))?(t=r,Tu):yf)(e,t)}var $E=x(()=>{"use strict";mf();xf();a(vg,"default")});function bht(e){return function(){this.removeAttribute(e)}}function kht(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Tht(e,t,r){var n,i=r+"",s;return function(){var o=this.getAttribute(e);return o===i?null:o===n?s:s=t(n=o,r)}}function Sht(e,t,r){var n,i=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===n?s:s=t(n=o,r)}}function _ht(e,t,r){var n,i,s;return function(){var o,l=r(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===n&&u===i?s:(i=u,s=t(n=o,l)))}}function Cht(e,t,r){var n,i,s;return function(){var o,l=r(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===n&&u===i?s:(i=u,s=t(n=o,l)))}}function GE(e,t){var r=no(e),n=r==="transform"?NE:vg;return this.attrTween(e,typeof t=="function"?(r.local?Cht:_ht)(r,n,kf(this,"attr."+e,t)):t==null?(r.local?kht:bht)(r):(r.local?Sht:Tht)(r,n,t))}var KM=x(()=>{"use strict";xf();Sa();Eg();$E();a(bht,"attrRemove");a(kht,"attrRemoveNS");a(Tht,"attrConstant");a(Sht,"attrConstantNS");a(_ht,"attrFunction");a(Cht,"attrFunctionNS");a(GE,"default")});function wht(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Eht(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function vht(e,t){var r,n;function i(){var s=t.apply(this,arguments);return s!==n&&(r=(n=s)&&Eht(e,s)),r}return a(i,"tween"),i._value=t,i}function Aht(e,t){var r,n;function i(){var s=t.apply(this,arguments);return s!==n&&(r=(n=s)&&wht(e,s)),r}return a(i,"tween"),i._value=t,i}function VE(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=no(e);return this.tween(r,(n.local?vht:Aht)(n,t))}var QM=x(()=>{"use strict";Sa();a(wht,"attrInterpolate");a(Eht,"attrInterpolateNS");a(vht,"attrTweenNS");a(Aht,"attrTween");a(VE,"default")});function Lht(e,t){return function(){Cg(this,e).delay=+t.apply(this,arguments)}}function Rht(e,t){return t=+t,function(){Cg(this,e).delay=t}}function zE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Lht:Rht)(t,e)):In(this.node(),t).delay}var ZM=x(()=>{"use strict";Zi();a(Lht,"delayFunction");a(Rht,"delayConstant");a(zE,"default")});function Dht(e,t){return function(){Jn(this,e).duration=+t.apply(this,arguments)}}function Iht(e,t){return t=+t,function(){Jn(this,e).duration=t}}function WE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Dht:Iht)(t,e)):In(this.node(),t).duration}var JM=x(()=>{"use strict";Zi();a(Dht,"durationFunction");a(Iht,"durationConstant");a(WE,"default")});function Nht(e,t){if(typeof t!="function")throw new Error;return function(){Jn(this,e).ease=t}}function UE(e){var t=this._id;return arguments.length?this.each(Nht(t,e)):In(this.node(),t).ease}var tO=x(()=>{"use strict";Zi();a(Nht,"easeConstant");a(UE,"default")});function Mht(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Jn(this,e).ease=r}}function jE(e){if(typeof e!="function")throw new Error;return this.each(Mht(this._id,e))}var eO=x(()=>{"use strict";Zi();a(Mht,"easeVarying");a(jE,"default")});function qE(e){typeof e!="function"&&(e=uf(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";Sa();_u();a(qE,"default")});function HE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,s=Math.min(n,i),o=new Array(n),l=0;l{"use strict";_u();a(HE,"default")});function Oht(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Pht(e,t,r){var n,i,s=Oht(t)?Cg:Jn;return function(){var o=s(this,e),l=o.on;l!==n&&(i=(n=l).copy()).on(t,r),o.on=i}}function YE(e,t){var r=this._id;return arguments.length<2?In(this.node(),r).on.on(e):this.each(Pht(r,e,t))}var iO=x(()=>{"use strict";Zi();a(Oht,"start");a(Pht,"onFunction");a(YE,"default")});function Bht(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function XE(){return this.on("end.remove",Bht(this._id))}var sO=x(()=>{"use strict";a(Bht,"removeFunction");a(XE,"default")});function KE(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Kl(e));for(var n=this._groups,i=n.length,s=new Array(i),o=0;o{"use strict";Sa();_u();Zi();a(KE,"default")});function QE(e){var t=this._name,r=this._id;typeof e!="function"&&(e=cf(e));for(var n=this._groups,i=n.length,s=[],o=[],l=0;l{"use strict";Sa();_u();Zi();a(QE,"default")});function ZE(){return new Fht(this._groups,this._parents)}var Fht,lO=x(()=>{"use strict";Sa();Fht=Qo.prototype.constructor;a(ZE,"default")});function $ht(e,t){var r,n,i;return function(){var s=Ql(this,e),o=(this.style.removeProperty(e),Ql(this,e));return s===o?null:s===r&&o===n?i:i=t(r=s,n=o)}}function cO(e){return function(){this.style.removeProperty(e)}}function Ght(e,t,r){var n,i=r+"",s;return function(){var o=Ql(this,e);return o===i?null:o===n?s:s=t(n=o,r)}}function Vht(e,t,r){var n,i,s;return function(){var o=Ql(this,e),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Ql(this,e))),o===u?null:o===n&&u===i?s:(i=u,s=t(n=o,l))}}function zht(e,t){var r,n,i,s="style."+t,o="end."+s,l;return function(){var u=Jn(this,e),h=u.on,f=u.value[s]==null?l||(l=cO(t)):void 0;(h!==r||i!==f)&&(n=(r=h).copy()).on(o,i=f),u.on=n}}function JE(e,t,r){var n=(e+="")=="transform"?IE:vg;return t==null?this.styleTween(e,$ht(e,n)).on("end.style."+e,cO(e)):typeof t=="function"?this.styleTween(e,Vht(e,n,kf(this,"style."+e,t))).each(zht(this._id,e)):this.styleTween(e,Ght(e,n,t),r).on("end.style."+e,null)}var uO=x(()=>{"use strict";xf();Sa();Zi();Eg();$E();a($ht,"styleNull");a(cO,"styleRemove");a(Ght,"styleConstant");a(Vht,"styleFunction");a(zht,"styleMaybeRemove");a(JE,"default")});function Wht(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function Uht(e,t,r){var n,i;function s(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&Wht(e,o,r)),n}return a(s,"tween"),s._value=t,s}function t3(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,Uht(e,t,r??""))}var hO=x(()=>{"use strict";a(Wht,"styleInterpolate");a(Uht,"styleTween");a(t3,"default")});function jht(e){return function(){this.textContent=e}}function qht(e){return function(){var t=e(this);this.textContent=t??""}}function e3(e){return this.tween("text",typeof e=="function"?qht(kf(this,"text",e)):jht(e==null?"":e+""))}var fO=x(()=>{"use strict";Eg();a(jht,"textConstant");a(qht,"textFunction");a(e3,"default")});function Hht(e){return function(t){this.textContent=e.call(this,t)}}function Yht(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&Hht(i)),t}return a(n,"tween"),n._value=e,n}function r3(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Yht(e))}var dO=x(()=>{"use strict";a(Hht,"textInterpolate");a(Yht,"textTween");a(r3,"default")});function n3(){for(var e=this._name,t=this._id,r=Yx(),n=this._groups,i=n.length,s=0;s{"use strict";_u();Zi();a(n3,"default")});function i3(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(s,o){var l={value:o},u={value:a(function(){--i===0&&s()},"value")};r.each(function(){var h=Jn(this,n),f=h.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),h.on=t}),i===0&&s()})}var mO=x(()=>{"use strict";Zi();a(i3,"default")});function Di(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function gO(e){return Qo().transition(e)}function Yx(){return++Xht}var Xht,el,_u=x(()=>{"use strict";Sa();KM();QM();ZM();JM();tO();eO();rO();nO();iO();sO();aO();oO();lO();uO();hO();fO();dO();pO();Eg();mO();Xht=0;a(Di,"Transition");a(gO,"transition");a(Yx,"newId");el=Qo.prototype;Di.prototype=gO.prototype={constructor:Di,select:KE,selectAll:QE,selectChild:el.selectChild,selectChildren:el.selectChildren,filter:qE,merge:HE,selection:ZE,transition:n3,call:el.call,nodes:el.nodes,node:el.node,size:el.size,empty:el.empty,each:el.each,on:YE,attr:GE,attrTween:VE,style:JE,styleTween:t3,text:e3,textTween:r3,remove:XE,tween:FE,delay:zE,duration:WE,ease:UE,easeVarying:jE,end:i3,[Symbol.iterator]:el[Symbol.iterator]}});function Xx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var yO=x(()=>{"use strict";a(Xx,"cubicInOut")});var s3=x(()=>{"use strict";yO()});function Qht(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function a3(e){var t,r;e instanceof Di?(t=e._id,e=e._name):(t=Yx(),(r=Kht).time=Tg(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,s=0;s{"use strict";_u();Zi();s3();Ux();Kht={time:null,delay:0,duration:250,ease:Xx};a(Qht,"inherit");a(a3,"default")});var bO=x(()=>{"use strict";Sa();XM();xO();Qo.prototype.interrupt=BE;Qo.prototype.transition=a3});var Kx=x(()=>{"use strict";bO()});var kO=x(()=>{"use strict"});var TO=x(()=>{"use strict"});var SO=x(()=>{"use strict"});function _O(e){return[+e[0],+e[1]]}function Zht(e){return[_O(e[0]),_O(e[1])]}function o3(e){return{type:e}}var LUt,RUt,DUt,IUt,NUt,MUt,CO=x(()=>{"use strict";Kx();kO();TO();SO();({abs:LUt,max:RUt,min:DUt}=Math);a(_O,"number1");a(Zht,"number2");IUt={name:"x",handles:["w","e"].map(o3),input:a(function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),output:a(function(e){return e&&[e[0][0],e[1][0]]},"output")},NUt={name:"y",handles:["n","s"].map(o3),input:a(function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),output:a(function(e){return e&&[e[0][1],e[1][1]]},"output")},MUt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(o3),input:a(function(e){return e==null?null:Zht(e)},"input"),output:a(function(e){return e},"output")};a(o3,"type")});var wO=x(()=>{"use strict";CO()});function EO(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return EO;let r=10**t;return function(n){this._+=n[0];for(let i=1,s=n.length;i{"use strict";l3=Math.PI,c3=2*l3,Cu=1e-6,Jht=c3-Cu;a(EO,"append");a(tft,"appendRound");wu=class{static{a(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?EO:tft(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,s,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,n,i,s){if(t=+t,r=+r,n=+n,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,u=n-t,h=i-r,f=o-t,d=l-r,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>Cu)if(!(Math.abs(d*u-h*f)>Cu)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-o,g=i-l,y=u*u+h*h,b=m*m+g*g,k=Math.sqrt(y),T=Math.sqrt(p),_=s*Math.tan((l3-Math.acos((y+p-b)/(2*k*T)))/2),L=_/T,C=_/k;Math.abs(L-1)>Cu&&this._append`L${t+L*f},${r+L*d}`,this._append`A${s},${s},0,0,${+(d*m>f*g)},${this._x1=t+C*u},${this._y1=r+C*h}`}}arc(t,r,n,i,s,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=t+l,f=r+u,d=1^o,p=o?i-s:s-i;this._x1===null?this._append`M${h},${f}`:(Math.abs(this._x1-h)>Cu||Math.abs(this._y1-f)>Cu)&&this._append`L${h},${f}`,n&&(p<0&&(p=p%c3+c3),p>Jht?this._append`A${n},${n},0,1,${d},${t-l},${r-u}A${n},${n},0,1,${d},${this._x1=h},${this._y1=f}`:p>Cu&&this._append`A${n},${n},0,${+(p>=l3)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};a(vO,"path");vO.prototype=wu.prototype});var u3=x(()=>{"use strict";AO()});var LO=x(()=>{"use strict"});var RO=x(()=>{"use strict"});var DO=x(()=>{"use strict"});var IO=x(()=>{"use strict"});var NO=x(()=>{"use strict"});var MO=x(()=>{"use strict"});var OO=x(()=>{"use strict"});function h3(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Eu(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var Ag=x(()=>{"use strict";a(h3,"default");a(Eu,"formatDecimalParts")});function wa(e){return e=Eu(Math.abs(e)),e?e[1]:NaN}var Lg=x(()=>{"use strict";Ag();a(wa,"default")});function f3(e,t){return function(r,n){for(var i=r.length,s=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),s.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return s.reverse().join(t)}}var PO=x(()=>{"use strict";a(f3,"default")});function d3(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var BO=x(()=>{"use strict";a(d3,"default")});function ec(e){if(!(t=eft.exec(e)))throw new Error("invalid format: "+e);var t;return new Qx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Qx(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var eft,p3=x(()=>{"use strict";eft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;a(ec,"formatSpecifier");ec.prototype=Qx.prototype;a(Qx,"FormatSpecifier");Qx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function m3(e){t:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var FO=x(()=>{"use strict";a(m3,"default")});function y3(e,t){var r=Eu(e,t);if(!r)return e+"";var n=r[0],i=r[1],s=i-(g3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return s===o?n:s>o?n+new Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+Eu(e,Math.max(0,t+s-1))[0]}var g3,x3=x(()=>{"use strict";Ag();a(y3,"default")});function Zx(e,t){var r=Eu(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var $O=x(()=>{"use strict";Ag();a(Zx,"default")});var b3,GO=x(()=>{"use strict";Ag();x3();$O();b3={"%":a((e,t)=>(e*100).toFixed(t),"%"),b:a(e=>Math.round(e).toString(2),"b"),c:a(e=>e+"","c"),d:h3,e:a((e,t)=>e.toExponential(t),"e"),f:a((e,t)=>e.toFixed(t),"f"),g:a((e,t)=>e.toPrecision(t),"g"),o:a(e=>Math.round(e).toString(8),"o"),p:a((e,t)=>Zx(e*100,t),"p"),r:Zx,s:y3,X:a(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:a(e=>Math.round(e).toString(16),"x")}});function Jx(e){return e}var VO=x(()=>{"use strict";a(Jx,"default")});function k3(e){var t=e.grouping===void 0||e.thousands===void 0?Jx:f3(zO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Jx:d3(zO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"\u2212":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function h(d){d=ec(d);var p=d.fill,m=d.align,g=d.sign,y=d.symbol,b=d.zero,k=d.width,T=d.comma,_=d.precision,L=d.trim,C=d.type;C==="n"?(T=!0,C="g"):b3[C]||(_===void 0&&(_=12),L=!0,C="g"),(b||p==="0"&&m==="=")&&(b=!0,p="0",m="=");var D=y==="$"?r:y==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",$=y==="$"?n:/[%p]/.test(C)?o:"",w=b3[C],A=/[defgprs%]/.test(C);_=_===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function F(S){var v=D,R=$,B,I,M;if(C==="c")R=w(S)+R,S="";else{S=+S;var O=S<0||1/S<0;if(S=isNaN(S)?u:w(Math.abs(S),_),L&&(S=m3(S)),O&&+S==0&&g!=="+"&&(O=!1),v=(O?g==="("?g:l:g==="-"||g==="("?"":g)+v,R=(C==="s"?WO[8+g3/3]:"")+R+(O&&g==="("?")":""),A){for(B=-1,I=S.length;++BM||M>57){R=(M===46?i+S.slice(B+1):S.slice(B))+R,S=S.slice(0,B);break}}}T&&!b&&(S=t(S,1/0));var N=v.length+S.length+R.length,E=N>1)+v+S+R+E.slice(N);break;default:S=E+v+S+R;break}return s(S)}return a(F,"format"),F.toString=function(){return d+""},F}a(h,"newFormat");function f(d,p){var m=h((d=ec(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(wa(p)/3)))*3,y=Math.pow(10,-g),b=WO[8+g/3];return function(k){return m(y*k)+b}}return a(f,"formatPrefix"),{format:h,formatPrefix:f}}var zO,WO,UO=x(()=>{"use strict";Lg();PO();BO();p3();FO();GO();x3();VO();zO=Array.prototype.map,WO=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];a(k3,"default")});function T3(e){return t2=k3(e),e2=t2.format,r2=t2.formatPrefix,t2}var t2,e2,r2,jO=x(()=>{"use strict";UO();T3({thousands:",",grouping:[3],currency:["$",""]});a(T3,"defaultLocale")});function n2(e){return Math.max(0,-wa(Math.abs(e)))}var qO=x(()=>{"use strict";Lg();a(n2,"default")});function i2(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(wa(t)/3)))*3-wa(Math.abs(e)))}var HO=x(()=>{"use strict";Lg();a(i2,"default")});function s2(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,wa(t)-wa(e))+1}var YO=x(()=>{"use strict";Lg();a(s2,"default")});var S3=x(()=>{"use strict";jO();p3();qO();HO();YO()});var XO=x(()=>{"use strict"});var KO=x(()=>{"use strict"});var QO=x(()=>{"use strict"});var ZO=x(()=>{"use strict"});function rc(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var Rg=x(()=>{"use strict";a(rc,"initRange")});function rl(){var e=new of,t=[],r=[],n=_3;function i(s){let o=e.get(s);if(o===void 0){if(n!==_3)return n;e.set(s,o=t.push(s)-1)}return r[o%r.length]}return a(i,"scale"),i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new of;for(let o of s)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return rl(t,r).unknown(n)},rc.apply(i,arguments),i}var _3,C3=x(()=>{"use strict";Xl();Rg();_3=Symbol("implicit");a(rl,"ordinal")});function Tf(){var e=rl().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,s,o,l=!1,u=0,h=0,f=.5;delete e.unknown;function d(){var p=t().length,m=i{"use strict";Xl();Rg();C3();a(Tf,"band")});function w3(e){return function(){return e}}var tP=x(()=>{"use strict";a(w3,"constants")});function E3(e){return+e}var eP=x(()=>{"use strict";a(E3,"number")});function Sf(e){return e}function v3(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:w3(isNaN(t)?NaN:.5)}function rft(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function nft(e,t,r){var n=e[0],i=e[1],s=t[0],o=t[1];return i2?ift:nft,u=h=null,d}a(f,"rescale");function d(p){return p==null||isNaN(p=+p)?s:(u||(u=l(e.map(n),t,r)))(n(o(p)))}return a(d,"scale"),d.invert=function(p){return o(i((h||(h=l(t,e.map(n),Vn)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,E3),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),r=Px,f()},d.clamp=function(p){return arguments.length?(o=p?!0:Sf,f()):o!==Sf},d.interpolate=function(p){return arguments.length?(r=p,f()):r},d.unknown=function(p){return arguments.length?(s=p,d):s},function(p,m){return n=p,i=m,f()}}function Dg(){return sft()(Sf,Sf)}var rP,A3=x(()=>{"use strict";Xl();xf();tP();eP();rP=[0,1];a(Sf,"identity");a(v3,"normalize");a(rft,"clamper");a(nft,"bimap");a(ift,"polymap");a(a2,"copy");a(sft,"transformer");a(Dg,"continuous")});function L3(e,t,r,n){var i=lf(e,t,r),s;switch(n=ec(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=i2(i,o))&&(n.precision=s),r2(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=s2(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=n2(i))&&(n.precision=s-(n.type==="%")*2);break}}return e2(n)}var nP=x(()=>{"use strict";Xl();S3();a(L3,"tickFormat")});function aft(e){var t=e.domain;return e.ticks=function(r){var n=t();return bx(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return L3(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,s=n.length-1,o=n[i],l=n[s],u,h,f=10;for(l0;){if(h=ag(o,l,r),h===u)return n[i]=o,n[s]=l,t(n);if(h>0)o=Math.floor(o/h)*h,l=Math.ceil(l/h)*h;else if(h<0)o=Math.ceil(o*h)/h,l=Math.floor(l*h)/h;else break;u=h}return e},e}function Ea(){var e=Dg();return e.copy=function(){return a2(e,Ea())},rc.apply(e,arguments),aft(e)}var iP=x(()=>{"use strict";Xl();A3();Rg();nP();a(aft,"linearish");a(Ea,"linear")});function R3(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],s=e[n],o;return s{"use strict";a(R3,"nice")});function Dr(e,t,r,n){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a(i,"interval"),i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{let o=i(s),l=i.ceil(s);return s-o(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{let u=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s0))return u;let h;do u.push(h=new Date(+s)),t(s,l),e(s);while(hDr(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!s(o););else for(;--l>=0;)for(;t(o,1),!s(o););}),r&&(i.count=(s,o)=>(D3.setTime(+s),I3.setTime(+o),e(D3),e(I3),Math.floor(r(D3,I3))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?o=>n(o)%s===0:o=>i.count(0,o)%s===0):i)),i}var D3,I3,nl=x(()=>{"use strict";D3=new Date,I3=new Date;a(Dr,"timeInterval")});var ao,aP,N3=x(()=>{"use strict";nl();ao=Dr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ao.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Dr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ao);aP=ao.range});var Ts,oP,M3=x(()=>{"use strict";nl();Ts=Dr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),oP=Ts.range});var il,oft,o2,lft,O3=x(()=>{"use strict";nl();il=Dr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),oft=il.range,o2=Dr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),lft=o2.range});var sl,cft,l2,uft,P3=x(()=>{"use strict";nl();sl=Dr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),cft=sl.range,l2=Dr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),uft=l2.range});var Us,hft,Ng,fft,c2,dft,B3=x(()=>{"use strict";nl();Us=Dr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),hft=Us.range,Ng=Dr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),fft=Ng.range,c2=Dr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),dft=c2.range});function Lu(e){return Dr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}function Ru(e){return Dr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var va,nc,u2,h2,lo,f2,d2,cP,pft,mft,gft,yft,xft,bft,Du,_f,uP,hP,ic,fP,dP,pP,kft,Tft,Sft,_ft,Cft,wft,F3=x(()=>{"use strict";nl();a(Lu,"timeWeekday");va=Lu(0),nc=Lu(1),u2=Lu(2),h2=Lu(3),lo=Lu(4),f2=Lu(5),d2=Lu(6),cP=va.range,pft=nc.range,mft=u2.range,gft=h2.range,yft=lo.range,xft=f2.range,bft=d2.range;a(Ru,"utcWeekday");Du=Ru(0),_f=Ru(1),uP=Ru(2),hP=Ru(3),ic=Ru(4),fP=Ru(5),dP=Ru(6),pP=Du.range,kft=_f.range,Tft=uP.range,Sft=hP.range,_ft=ic.range,Cft=fP.range,wft=dP.range});var al,Eft,p2,vft,$3=x(()=>{"use strict";nl();al=Dr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),Eft=al.range,p2=Dr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),vft=p2.range});var Ss,Aft,Aa,Lft,G3=x(()=>{"use strict";nl();Ss=Dr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Aft=Ss.range,Aa=Dr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Aa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Lft=Aa.range});function gP(e,t,r,n,i,s){let o=[[Ts,1,1e3],[Ts,5,5*1e3],[Ts,15,15*1e3],[Ts,30,30*1e3],[s,1,6e4],[s,5,5*6e4],[s,15,15*6e4],[s,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function l(h,f,d){let p=fb).right(o,p);if(m===o.length)return e.every(lf(h/31536e6,f/31536e6,d));if(m===0)return ao.every(Math.max(lf(h,f,d),1));let[g,y]=o[p/o[m-1][2]{"use strict";Xl();N3();M3();O3();P3();B3();F3();$3();G3();a(gP,"ticker");[Dft,Ift]=gP(Aa,p2,Du,c2,l2,o2),[V3,z3]=gP(Ss,al,va,Us,sl,il)});var m2=x(()=>{"use strict";N3();M3();O3();P3();B3();F3();$3();G3();yP()});function W3(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function U3(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Mg(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function j3(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,s=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,h=Og(i),f=Pg(i),d=Og(s),p=Pg(s),m=Og(o),g=Pg(o),y=Og(l),b=Pg(l),k=Og(u),T=Pg(u),_={a:O,A:N,b:E,B:V,c:null,d:_P,e:_P,f:edt,g:hdt,G:ddt,H:Zft,I:Jft,j:tdt,L:AP,m:rdt,M:ndt,p:G,q:J,Q:EP,s:vP,S:idt,u:sdt,U:adt,V:odt,w:ldt,W:cdt,x:null,X:null,y:udt,Y:fdt,Z:pdt,"%":wP},L={a:rt,A:nt,b:ct,B:pt,c:null,d:CP,e:CP,f:xdt,g:Adt,G:Rdt,H:mdt,I:gdt,j:ydt,L:RP,m:bdt,M:kdt,p:Lt,q:bt,Q:EP,s:vP,S:Tdt,u:Sdt,U:_dt,V:Cdt,w:wdt,W:Edt,x:null,X:null,y:vdt,Y:Ldt,Z:Ddt,"%":wP},C={a:F,A:S,b:v,B:R,c:B,d:TP,e:TP,f:Yft,g:kP,G:bP,H:SP,I:SP,j:Uft,L:Hft,m:Wft,M:jft,p:A,q:zft,Q:Kft,s:Qft,S:qft,u:Bft,U:Fft,V:$ft,w:Pft,W:Gft,x:I,X:M,y:kP,Y:bP,Z:Vft,"%":Xft};_.x=D(r,_),_.X=D(n,_),_.c=D(t,_),L.x=D(r,L),L.X=D(n,L),L.c=D(t,L);function D(ut,it){return function(st){var X=[],H=-1,at=0,W=ut.length,mt,q,Z;for(st instanceof Date||(st=new Date(+st));++H53)return null;"w"in X||(X.w=1),"Z"in X?(at=U3(Mg(X.y,0,1)),W=at.getUTCDay(),at=W>4||W===0?_f.ceil(at):_f(at),at=Ng.offset(at,(X.V-1)*7),X.y=at.getUTCFullYear(),X.m=at.getUTCMonth(),X.d=at.getUTCDate()+(X.w+6)%7):(at=W3(Mg(X.y,0,1)),W=at.getDay(),at=W>4||W===0?nc.ceil(at):nc(at),at=Us.offset(at,(X.V-1)*7),X.y=at.getFullYear(),X.m=at.getMonth(),X.d=at.getDate()+(X.w+6)%7)}else("W"in X||"U"in X)&&("w"in X||(X.w="u"in X?X.u%7:"W"in X?1:0),W="Z"in X?U3(Mg(X.y,0,1)).getUTCDay():W3(Mg(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(W+5)%7:X.w+X.U*7-(W+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,U3(X)):W3(X)}}a($,"newParse");function w(ut,it,st,X){for(var H=0,at=it.length,W=st.length,mt,q;H=W)return-1;if(mt=it.charCodeAt(H++),mt===37){if(mt=it.charAt(H++),q=C[mt in xP?it.charAt(H++):mt],!q||(X=q(ut,st,X))<0)return-1}else if(mt!=st.charCodeAt(X++))return-1}return X}a(w,"parseSpecifier");function A(ut,it,st){var X=h.exec(it.slice(st));return X?(ut.p=f.get(X[0].toLowerCase()),st+X[0].length):-1}a(A,"parsePeriod");function F(ut,it,st){var X=m.exec(it.slice(st));return X?(ut.w=g.get(X[0].toLowerCase()),st+X[0].length):-1}a(F,"parseShortWeekday");function S(ut,it,st){var X=d.exec(it.slice(st));return X?(ut.w=p.get(X[0].toLowerCase()),st+X[0].length):-1}a(S,"parseWeekday");function v(ut,it,st){var X=k.exec(it.slice(st));return X?(ut.m=T.get(X[0].toLowerCase()),st+X[0].length):-1}a(v,"parseShortMonth");function R(ut,it,st){var X=y.exec(it.slice(st));return X?(ut.m=b.get(X[0].toLowerCase()),st+X[0].length):-1}a(R,"parseMonth");function B(ut,it,st){return w(ut,t,it,st)}a(B,"parseLocaleDateTime");function I(ut,it,st){return w(ut,r,it,st)}a(I,"parseLocaleDate");function M(ut,it,st){return w(ut,n,it,st)}a(M,"parseLocaleTime");function O(ut){return o[ut.getDay()]}a(O,"formatShortWeekday");function N(ut){return s[ut.getDay()]}a(N,"formatWeekday");function E(ut){return u[ut.getMonth()]}a(E,"formatShortMonth");function V(ut){return l[ut.getMonth()]}a(V,"formatMonth");function G(ut){return i[+(ut.getHours()>=12)]}a(G,"formatPeriod");function J(ut){return 1+~~(ut.getMonth()/3)}a(J,"formatQuarter");function rt(ut){return o[ut.getUTCDay()]}a(rt,"formatUTCShortWeekday");function nt(ut){return s[ut.getUTCDay()]}a(nt,"formatUTCWeekday");function ct(ut){return u[ut.getUTCMonth()]}a(ct,"formatUTCShortMonth");function pt(ut){return l[ut.getUTCMonth()]}a(pt,"formatUTCMonth");function Lt(ut){return i[+(ut.getUTCHours()>=12)]}a(Lt,"formatUTCPeriod");function bt(ut){return 1+~~(ut.getUTCMonth()/3)}return a(bt,"formatUTCQuarter"),{format:a(function(ut){var it=D(ut+="",_);return it.toString=function(){return ut},it},"format"),parse:a(function(ut){var it=$(ut+="",!1);return it.toString=function(){return ut},it},"parse"),utcFormat:a(function(ut){var it=D(ut+="",L);return it.toString=function(){return ut},it},"utcFormat"),utcParse:a(function(ut){var it=$(ut+="",!0);return it.toString=function(){return ut},it},"utcParse")}}function hr(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",s=i.length;return n+(s[t.toLowerCase(),r]))}function Pft(e,t,r){var n=zn.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Bft(e,t,r){var n=zn.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Fft(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function $ft(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Gft(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function bP(e,t,r){var n=zn.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function kP(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Vft(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function zft(e,t,r){var n=zn.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Wft(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function TP(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Uft(e,t,r){var n=zn.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function SP(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function jft(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qft(e,t,r){var n=zn.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Hft(e,t,r){var n=zn.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Yft(e,t,r){var n=zn.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Xft(e,t,r){var n=Nft.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Kft(e,t,r){var n=zn.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Qft(e,t,r){var n=zn.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function _P(e,t){return hr(e.getDate(),t,2)}function Zft(e,t){return hr(e.getHours(),t,2)}function Jft(e,t){return hr(e.getHours()%12||12,t,2)}function tdt(e,t){return hr(1+Us.count(Ss(e),e),t,3)}function AP(e,t){return hr(e.getMilliseconds(),t,3)}function edt(e,t){return AP(e,t)+"000"}function rdt(e,t){return hr(e.getMonth()+1,t,2)}function ndt(e,t){return hr(e.getMinutes(),t,2)}function idt(e,t){return hr(e.getSeconds(),t,2)}function sdt(e){var t=e.getDay();return t===0?7:t}function adt(e,t){return hr(va.count(Ss(e)-1,e),t,2)}function LP(e){var t=e.getDay();return t>=4||t===0?lo(e):lo.ceil(e)}function odt(e,t){return e=LP(e),hr(lo.count(Ss(e),e)+(Ss(e).getDay()===4),t,2)}function ldt(e){return e.getDay()}function cdt(e,t){return hr(nc.count(Ss(e)-1,e),t,2)}function udt(e,t){return hr(e.getFullYear()%100,t,2)}function hdt(e,t){return e=LP(e),hr(e.getFullYear()%100,t,2)}function fdt(e,t){return hr(e.getFullYear()%1e4,t,4)}function ddt(e,t){var r=e.getDay();return e=r>=4||r===0?lo(e):lo.ceil(e),hr(e.getFullYear()%1e4,t,4)}function pdt(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+hr(t/60|0,"0",2)+hr(t%60,"0",2)}function CP(e,t){return hr(e.getUTCDate(),t,2)}function mdt(e,t){return hr(e.getUTCHours(),t,2)}function gdt(e,t){return hr(e.getUTCHours()%12||12,t,2)}function ydt(e,t){return hr(1+Ng.count(Aa(e),e),t,3)}function RP(e,t){return hr(e.getUTCMilliseconds(),t,3)}function xdt(e,t){return RP(e,t)+"000"}function bdt(e,t){return hr(e.getUTCMonth()+1,t,2)}function kdt(e,t){return hr(e.getUTCMinutes(),t,2)}function Tdt(e,t){return hr(e.getUTCSeconds(),t,2)}function Sdt(e){var t=e.getUTCDay();return t===0?7:t}function _dt(e,t){return hr(Du.count(Aa(e)-1,e),t,2)}function DP(e){var t=e.getUTCDay();return t>=4||t===0?ic(e):ic.ceil(e)}function Cdt(e,t){return e=DP(e),hr(ic.count(Aa(e),e)+(Aa(e).getUTCDay()===4),t,2)}function wdt(e){return e.getUTCDay()}function Edt(e,t){return hr(_f.count(Aa(e)-1,e),t,2)}function vdt(e,t){return hr(e.getUTCFullYear()%100,t,2)}function Adt(e,t){return e=DP(e),hr(e.getUTCFullYear()%100,t,2)}function Ldt(e,t){return hr(e.getUTCFullYear()%1e4,t,4)}function Rdt(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ic(e):ic.ceil(e),hr(e.getUTCFullYear()%1e4,t,4)}function Ddt(){return"+0000"}function wP(){return"%"}function EP(e){return+e}function vP(e){return Math.floor(+e/1e3)}var xP,zn,Nft,Mft,IP=x(()=>{"use strict";m2();a(W3,"localDate");a(U3,"utcDate");a(Mg,"newDate");a(j3,"formatLocale");xP={"-":"",_:" ",0:"0"},zn=/^\s*\d+/,Nft=/^%/,Mft=/[\\^$*+?|[\]().{}]/g;a(hr,"pad");a(Oft,"requote");a(Og,"formatRe");a(Pg,"formatLookup");a(Pft,"parseWeekdayNumberSunday");a(Bft,"parseWeekdayNumberMonday");a(Fft,"parseWeekNumberSunday");a($ft,"parseWeekNumberISO");a(Gft,"parseWeekNumberMonday");a(bP,"parseFullYear");a(kP,"parseYear");a(Vft,"parseZone");a(zft,"parseQuarter");a(Wft,"parseMonthNumber");a(TP,"parseDayOfMonth");a(Uft,"parseDayOfYear");a(SP,"parseHour24");a(jft,"parseMinutes");a(qft,"parseSeconds");a(Hft,"parseMilliseconds");a(Yft,"parseMicroseconds");a(Xft,"parseLiteralPercent");a(Kft,"parseUnixTimestamp");a(Qft,"parseUnixTimestampSeconds");a(_P,"formatDayOfMonth");a(Zft,"formatHour24");a(Jft,"formatHour12");a(tdt,"formatDayOfYear");a(AP,"formatMilliseconds");a(edt,"formatMicroseconds");a(rdt,"formatMonthNumber");a(ndt,"formatMinutes");a(idt,"formatSeconds");a(sdt,"formatWeekdayNumberMonday");a(adt,"formatWeekNumberSunday");a(LP,"dISO");a(odt,"formatWeekNumberISO");a(ldt,"formatWeekdayNumberSunday");a(cdt,"formatWeekNumberMonday");a(udt,"formatYear");a(hdt,"formatYearISO");a(fdt,"formatFullYear");a(ddt,"formatFullYearISO");a(pdt,"formatZone");a(CP,"formatUTCDayOfMonth");a(mdt,"formatUTCHour24");a(gdt,"formatUTCHour12");a(ydt,"formatUTCDayOfYear");a(RP,"formatUTCMilliseconds");a(xdt,"formatUTCMicroseconds");a(bdt,"formatUTCMonthNumber");a(kdt,"formatUTCMinutes");a(Tdt,"formatUTCSeconds");a(Sdt,"formatUTCWeekdayNumberMonday");a(_dt,"formatUTCWeekNumberSunday");a(DP,"UTCdISO");a(Cdt,"formatUTCWeekNumberISO");a(wdt,"formatUTCWeekdayNumberSunday");a(Edt,"formatUTCWeekNumberMonday");a(vdt,"formatUTCYear");a(Adt,"formatUTCYearISO");a(Ldt,"formatUTCFullYear");a(Rdt,"formatUTCFullYearISO");a(Ddt,"formatUTCZone");a(wP,"formatLiteralPercent");a(EP,"formatUnixTimestamp");a(vP,"formatUnixTimestampSeconds")});function q3(e){return Cf=j3(e),Iu=Cf.format,NP=Cf.parse,MP=Cf.utcFormat,OP=Cf.utcParse,Cf}var Cf,Iu,NP,MP,OP,PP=x(()=>{"use strict";IP();q3({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});a(q3,"defaultLocale")});var H3=x(()=>{"use strict";PP()});function Idt(e){return new Date(e)}function Ndt(e){return e instanceof Date?+e:+new Date(+e)}function BP(e,t,r,n,i,s,o,l,u,h){var f=Dg(),d=f.invert,p=f.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),b=h("%I %p"),k=h("%a %d"),T=h("%b %d"),_=h("%B"),L=h("%Y");function C(D){return(u(D){"use strict";m2();H3();A3();Rg();sP();a(Idt,"date");a(Ndt,"number");a(BP,"calendar");a(g2,"time")});var $P=x(()=>{"use strict";JO();iP();C3();FP()});function Y3(e){for(var t=e.length/6|0,r=new Array(t),n=0;n{"use strict";a(Y3,"default")});var X3,VP=x(()=>{"use strict";GP();X3=Y3("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var zP=x(()=>{"use strict";VP()});function Ur(e){return a(function(){return e},"constant")}var y2=x(()=>{"use strict";a(Ur,"default")});function UP(e){return e>1?0:e<-1?wf:Math.acos(e)}function Q3(e){return e>=1?Bg:e<=-1?-Bg:Math.asin(e)}var K3,ti,sc,WP,x2,La,Nu,Wn,wf,Bg,Ef,b2=x(()=>{"use strict";K3=Math.abs,ti=Math.atan2,sc=Math.cos,WP=Math.max,x2=Math.min,La=Math.sin,Nu=Math.sqrt,Wn=1e-12,wf=Math.PI,Bg=wf/2,Ef=2*wf;a(UP,"acos");a(Q3,"asin")});function k2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new wu(t)}var Z3=x(()=>{"use strict";u3();a(k2,"withPath")});function Mdt(e){return e.innerRadius}function Odt(e){return e.outerRadius}function Pdt(e){return e.startAngle}function Bdt(e){return e.endAngle}function Fdt(e){return e&&e.padAngle}function $dt(e,t,r,n,i,s,o,l){var u=r-e,h=n-t,f=o-i,d=l-s,p=d*u-f*h;if(!(p*pB*B+I*I&&(w=F,A=S),{cx:w,cy:A,x01:-f,y01:-d,x11:w*(i/C-1),y11:A*(i/C-1)}}function Ra(){var e=Mdt,t=Odt,r=Ur(0),n=null,i=Pdt,s=Bdt,o=Fdt,l=null,u=k2(h);function h(){var f,d,p=+e.apply(this,arguments),m=+t.apply(this,arguments),g=i.apply(this,arguments)-Bg,y=s.apply(this,arguments)-Bg,b=K3(y-g),k=y>g;if(l||(l=f=u()),mWn))l.moveTo(0,0);else if(b>Ef-Wn)l.moveTo(m*sc(g),m*La(g)),l.arc(0,0,m,g,y,!k),p>Wn&&(l.moveTo(p*sc(y),p*La(y)),l.arc(0,0,p,y,g,k));else{var T=g,_=y,L=g,C=y,D=b,$=b,w=o.apply(this,arguments)/2,A=w>Wn&&(n?+n.apply(this,arguments):Nu(p*p+m*m)),F=x2(K3(m-p)/2,+r.apply(this,arguments)),S=F,v=F,R,B;if(A>Wn){var I=Q3(A/p*La(w)),M=Q3(A/m*La(w));(D-=I*2)>Wn?(I*=k?1:-1,L+=I,C-=I):(D=0,L=C=(g+y)/2),($-=M*2)>Wn?(M*=k?1:-1,T+=M,_-=M):($=0,T=_=(g+y)/2)}var O=m*sc(T),N=m*La(T),E=p*sc(C),V=p*La(C);if(F>Wn){var G=m*sc(_),J=m*La(_),rt=p*sc(L),nt=p*La(L),ct;if(bWn?v>Wn?(R=T2(rt,nt,O,N,m,v,k),B=T2(G,J,E,V,m,v,k),l.moveTo(R.cx+R.x01,R.cy+R.y01),vWn)||!(D>Wn)?l.lineTo(E,V):S>Wn?(R=T2(E,V,G,J,p,-S,k),B=T2(O,N,rt,nt,p,-S,k),l.lineTo(R.cx+R.x01,R.cy+R.y01),S{"use strict";y2();b2();Z3();a(Mdt,"arcInnerRadius");a(Odt,"arcOuterRadius");a(Pdt,"arcStartAngle");a(Bdt,"arcEndAngle");a(Fdt,"arcPadAngle");a($dt,"intersect");a(T2,"cornerTangents");a(Ra,"default")});function Fg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var cYt,J3=x(()=>{"use strict";cYt=Array.prototype.slice;a(Fg,"default")});function qP(e){this._context=e}function ol(e){return new qP(e)}var tv=x(()=>{"use strict";a(qP,"Linear");qP.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}},"point")};a(ol,"default")});function HP(e){return e[0]}function YP(e){return e[1]}var XP=x(()=>{"use strict";a(HP,"x");a(YP,"y")});function Da(e,t){var r=Ur(!0),n=null,i=ol,s=null,o=k2(l);e=typeof e=="function"?e:e===void 0?HP:Ur(e),t=typeof t=="function"?t:t===void 0?YP:Ur(t);function l(u){var h,f=(u=Fg(u)).length,d,p=!1,m;for(n==null&&(s=i(m=o())),h=0;h<=f;++h)!(h{"use strict";J3();y2();tv();Z3();XP();a(Da,"default")});function ev(e,t){return te?1:t>=e?0:NaN}var QP=x(()=>{"use strict";a(ev,"default")});function rv(e){return e}var ZP=x(()=>{"use strict";a(rv,"default")});function S2(){var e=rv,t=ev,r=null,n=Ur(0),i=Ur(Ef),s=Ur(0);function o(l){var u,h=(l=Fg(l)).length,f,d,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),b=Math.min(Ef,Math.max(-Ef,i.apply(this,arguments)-y)),k,T=Math.min(Math.abs(b)/h,s.apply(this,arguments)),_=T*(b<0?-1:1),L;for(u=0;u0&&(p+=L);for(t!=null?m.sort(function(C,D){return t(g[C],g[D])}):r!=null&&m.sort(function(C,D){return r(l[C],l[D])}),u=0,d=p?(b-h*_)/p:0;u0?L*d:0)+_,g[f]={data:l[f],index:u,value:L,startAngle:y,endAngle:k,padAngle:T};return g}return a(o,"pie"),o.value=function(l){return arguments.length?(e=typeof l=="function"?l:Ur(+l),o):e},o.sortValues=function(l){return arguments.length?(t=l,r=null,o):t},o.sort=function(l){return arguments.length?(r=l,t=null,o):r},o.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Ur(+l),o):n},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Ur(+l),o):i},o.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Ur(+l),o):s},o}var JP=x(()=>{"use strict";J3();y2();QP();ZP();b2();a(S2,"default")});function $g(e){return new _2(e,!0)}function Gg(e){return new _2(e,!1)}var _2,t9=x(()=>{"use strict";_2=class{static{a(this,"Bump")}constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}};a($g,"bumpX");a(Gg,"bumpY")});function _s(){}var Vg=x(()=>{"use strict";a(_s,"default")});function vf(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function zg(e){this._context=e}function js(e){return new zg(e)}var Wg=x(()=>{"use strict";a(vf,"point");a(zg,"Basis");zg.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 3:vf(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};a(js,"default")});function e9(e){this._context=e}function C2(e){return new e9(e)}var r9=x(()=>{"use strict";Vg();Wg();a(e9,"BasisClosed");e9.prototype={areaStart:_s,areaEnd:_s,lineStart:a(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};a(C2,"default")});function n9(e){this._context=e}function w2(e){return new n9(e)}var i9=x(()=>{"use strict";Wg();a(n9,"BasisOpen");n9.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:vf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};a(w2,"default")});function s9(e,t){this._basis=new zg(e),this._beta=t}var nv,a9=x(()=>{"use strict";Wg();a(s9,"Bundle");s9.prototype={lineStart:a(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:a(function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],s=e[r]-n,o=t[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(n+u*s),this._beta*t[l]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:a(function(e,t){this._x.push(+e),this._y.push(+t)},"point")};nv=a(function e(t){function r(n){return t===1?new zg(n):new s9(n,t)}return a(r,"bundle"),r.beta=function(n){return e(+n)},r},"custom")(.85)});function Af(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function E2(e,t){this._context=e,this._k=(1-t)/6}var Ug,jg=x(()=>{"use strict";a(Af,"point");a(E2,"Cardinal");E2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Af(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Af(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};Ug=a(function e(t){function r(n){return new E2(n,t)}return a(r,"cardinal"),r.tension=function(n){return e(+n)},r},"custom")(0)});function v2(e,t){this._context=e,this._k=(1-t)/6}var iv,sv=x(()=>{"use strict";Vg();jg();a(v2,"CardinalClosed");v2.prototype={areaStart:_s,areaEnd:_s,lineStart:a(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Af(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};iv=a(function e(t){function r(n){return new v2(n,t)}return a(r,"cardinal"),r.tension=function(n){return e(+n)},r},"custom")(0)});function A2(e,t){this._context=e,this._k=(1-t)/6}var av,ov=x(()=>{"use strict";jg();a(A2,"CardinalOpen");A2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Af(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};av=a(function e(t){function r(n){return new A2(n,t)}return a(r,"cardinal"),r.tension=function(n){return e(+n)},r},"custom")(0)});function qg(e,t,r){var n=e._x1,i=e._y1,s=e._x2,o=e._y2;if(e._l01_a>Wn){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Wn){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*h+e._x1*e._l23_2a-t*e._l12_2a)/f,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/f}e._context.bezierCurveTo(n,i,s,o,e._x2,e._y2)}function o9(e,t){this._context=e,this._alpha=t}var Hg,L2=x(()=>{"use strict";b2();jg();a(qg,"point");a(o9,"CatmullRom");o9.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:qg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};Hg=a(function e(t){function r(n){return t?new o9(n,t):new E2(n,0)}return a(r,"catmullRom"),r.alpha=function(n){return e(+n)},r},"custom")(.5)});function l9(e,t){this._context=e,this._alpha=t}var lv,c9=x(()=>{"use strict";sv();Vg();L2();a(l9,"CatmullRomClosed");l9.prototype={areaStart:_s,areaEnd:_s,lineStart:a(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:a(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:qg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};lv=a(function e(t){function r(n){return t?new l9(n,t):new v2(n,0)}return a(r,"catmullRom"),r.alpha=function(n){return e(+n)},r},"custom")(.5)});function u9(e,t){this._context=e,this._alpha=t}var cv,h9=x(()=>{"use strict";ov();L2();a(u9,"CatmullRomOpen");u9.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};cv=a(function e(t){function r(n){return t?new u9(n,t):new A2(n,0)}return a(r,"catmullRom"),r.alpha=function(n){return e(+n)},r},"custom")(.5)});function f9(e){this._context=e}function R2(e){return new f9(e)}var d9=x(()=>{"use strict";Vg();a(f9,"LinearClosed");f9.prototype={areaStart:_s,areaEnd:_s,lineStart:a(function(){this._point=0},"lineStart"),lineEnd:a(function(){this._point&&this._context.closePath()},"lineEnd"),point:a(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")};a(R2,"default")});function p9(e){return e<0?-1:1}function m9(e,t,r){var n=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(s*i+o*n)/(n+i);return(p9(s)+p9(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function g9(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function uv(e,t,r){var n=e._x0,i=e._y0,s=e._x1,o=e._y1,l=(s-n)/3;e._context.bezierCurveTo(n+l,i+l*t,s-l,o-l*r,s,o)}function D2(e){this._context=e}function y9(e){this._context=new x9(e)}function x9(e){this._context=e}function Yg(e){return new D2(e)}function Xg(e){return new y9(e)}var b9=x(()=>{"use strict";a(p9,"sign");a(m9,"slope3");a(g9,"slope2");a(uv,"point");a(D2,"MonotoneX");D2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:uv(this,this._t0,g9(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,uv(this,g9(this,r=m9(this,e,t)),r);break;default:uv(this,this._t0,r=m9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")};a(y9,"MonotoneY");(y9.prototype=Object.create(D2.prototype)).point=function(e,t){D2.prototype.point.call(this,t,e)};a(x9,"ReflectContext");x9.prototype={moveTo:a(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:a(function(){this._context.closePath()},"closePath"),lineTo:a(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:a(function(e,t,r,n,i,s){this._context.bezierCurveTo(t,e,n,r,s,i)},"bezierCurveTo")};a(Yg,"monotoneX");a(Xg,"monotoneY")});function T9(e){this._context=e}function k9(e){var t,r=e.length-1,n,i=new Array(r),s=new Array(r),o=new Array(r);for(i[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/s[t];for(s[r-1]=(e[r]+i[r-1])/2,t=0;t{"use strict";a(T9,"Natural");T9.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:a(function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=k9(e),i=k9(t),s=0,o=1;o{"use strict";a(I2,"Step");I2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:a(function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t},"point")};a(Rf,"default");a(Kg,"stepBefore");a(Qg,"stepAfter")});var C9=x(()=>{"use strict";jP();KP();JP();r9();i9();Wg();t9();a9();sv();ov();jg();c9();h9();L2();d9();tv();b9();S9();_9()});var w9=x(()=>{"use strict"});var E9=x(()=>{"use strict"});function ac(e,t,r){this.k=e,this.x=t,this.y=r}function fv(e){for(;!e.__zoom;)if(!(e=e.parentNode))return hv;return e.__zoom}var hv,dv=x(()=>{"use strict";a(ac,"Transform");ac.prototype={constructor:ac,scale:a(function(e){return e===1?this:new ac(this.k*e,this.x,this.y)},"scale"),translate:a(function(e,t){return e===0&t===0?this:new ac(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:a(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:a(function(e){return e*this.k+this.x},"applyX"),applyY:a(function(e){return e*this.k+this.y},"applyY"),invert:a(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:a(function(e){return(e-this.x)/this.k},"invertX"),invertY:a(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:a(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:a(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:a(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};hv=new ac(1,0,0);fv.prototype=ac.prototype;a(fv,"transform")});var v9=x(()=>{"use strict"});var A9=x(()=>{"use strict";Kx();w9();E9();dv();v9()});var L9=x(()=>{"use strict";A9();dv()});var $e=x(()=>{"use strict";Xl();aN();wO();LO();mf();RO();DO();yw();QN();IO();s3();NO();OO();S3();XO();KO();xf();u3();QO();MO();ZO();$P();zP();Sa();C9();m2();H3();Ux();Kx();L9()});var R9=bs(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.BLANK_URL=Un.relativeFirstCharacters=Un.whitespaceEscapeCharsRegex=Un.urlSchemeRegex=Un.ctrlCharactersRegex=Un.htmlCtrlEntityRegex=Un.htmlEntitiesRegex=Un.invalidProtocolRegex=void 0;Un.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Un.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Un.htmlCtrlEntityRegex=/&(newline|tab);/gi;Un.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Un.urlSchemeRegex=/^.+(:|:)/gim;Un.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Un.relativeFirstCharacters=[".","/"];Un.BLANK_URL="about:blank"});var Df=bs(N2=>{"use strict";Object.defineProperty(N2,"__esModule",{value:!0});N2.sanitizeUrl=void 0;var ui=R9();function Gdt(e){return ui.relativeFirstCharacters.indexOf(e[0])>-1}a(Gdt,"isRelativeUrlWithoutProtocol");function Vdt(e){var t=e.replace(ui.ctrlCharactersRegex,"");return t.replace(ui.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}a(Vdt,"decodeHtmlCharacters");function zdt(e){return URL.canParse(e)}a(zdt,"isValidUrl");function D9(e){try{return decodeURIComponent(e)}catch{return e}}a(D9,"decodeURI");function Wdt(e){if(!e)return ui.BLANK_URL;var t,r=D9(e.trim());do r=Vdt(r).replace(ui.htmlCtrlEntityRegex,"").replace(ui.ctrlCharactersRegex,"").replace(ui.whitespaceEscapeCharsRegex,"").trim(),r=D9(r),t=r.match(ui.ctrlCharactersRegex)||r.match(ui.htmlEntitiesRegex)||r.match(ui.htmlCtrlEntityRegex)||r.match(ui.whitespaceEscapeCharsRegex);while(t&&t.length>0);var n=r;if(!n)return ui.BLANK_URL;if(Gdt(n))return n;var i=n.trimStart(),s=i.match(ui.urlSchemeRegex);if(!s)return n;var o=s[0].toLowerCase().trim();if(ui.invalidProtocolRegex.test(o))return ui.BLANK_URL;var l=i.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return l;if(o==="http:"||o==="https:"){if(!zdt(l))return ui.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}a(Wdt,"sanitizeUrl");N2.sanitizeUrl=Wdt});var pv,Mu,M2,I9,N9,M9,Ia,Zg,Jg=x(()=>{"use strict";pv=Ki(Df(),1);Fe();Mu=a((e,t)=>{let r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),t.attrs!==void 0)for(let n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),M2=a((e,t)=>{let r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};Mu(e,r).lower()},"drawBackgroundRect"),I9=a((e,t)=>{let r=t.text.replace(af," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),N9=a((e,t,r,n)=>{let i=e.append("image");i.attr("x",t),i.attr("y",r);let s=(0,pv.sanitizeUrl)(n);i.attr("xlink:href",s)},"drawImage"),M9=a((e,t,r,n)=>{let i=e.append("use");i.attr("x",t),i.attr("y",r);let s=(0,pv.sanitizeUrl)(n);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),Ia=a(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Zg=a(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var O9,mv,P9,Udt,jdt,qdt,Hdt,Ydt,Xdt,Kdt,Qdt,Zdt,Jdt,tpt,ept,ll,Na,B9=x(()=>{"use strict";Fe();Jg();O9=Ki(Df(),1),mv=a(function(e,t){return Mu(e,t)},"drawRect"),P9=a(function(e,t,r,n,i,s){let o=e.append("image");o.attr("width",t),o.attr("height",r),o.attr("x",n),o.attr("y",i);let l=s.startsWith("data:image/png;base64")?s:(0,O9.sanitizeUrl)(s);o.attr("xlink:href",l)},"drawImage"),Udt=a((e,t,r)=>{let n=e.append("g"),i=0;for(let s of t){let o=s.textColor?s.textColor:"#444444",l=s.lineColor?s.lineColor:"#444444",u=s.offsetX?parseInt(s.offsetX):0,h=s.offsetY?parseInt(s.offsetY):0,f="";if(i===0){let p=n.append("line");p.attr("x1",s.startPoint.x),p.attr("y1",s.startPoint.y),p.attr("x2",s.endPoint.x),p.attr("y2",s.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",l),p.style("fill","none"),s.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)"),i=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)")}let d=r.messageFont();ll(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+h,s.label.width,s.label.height,{fill:o},d),s.techn&&s.techn.text!==""&&(d=r.messageFont(),ll(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+h,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:o,"font-style":"italic"},d))}},"drawRels"),jdt=a(function(e,t,r){let n=e.append("g"),i=t.bgColor?t.bgColor:"none",s=t.borderColor?t.borderColor:"#444444",o=t.fontColor?t.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(l={"stroke-width":1});let u={x:t.x,y:t.y,fill:i,stroke:s,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:l};mv(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=o,ll(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},h),t.type&&t.type.text!==""&&(h=r.boundaryFont(),h.fontColor=o,ll(r)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},h)),t.descr&&t.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=o,ll(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},h))},"drawBoundary"),qdt=a(function(e,t,r){let n=t.bgColor?t.bgColor:r[t.typeC4Shape.text+"_bg_color"],i=t.borderColor?t.borderColor:r[t.typeC4Shape.text+"_border_color"],s=t.fontColor?t.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let l=e.append("g");l.attr("class","person-man");let u=Ia();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=t.x,u.y=t.y,u.fill=n,u.width=t.width,u.height=t.height,u.stroke=i,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},mv(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let h=ept(r,t.typeC4Shape.text);switch(l.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":P9(l,48,48,t.x+t.width/2-24,t.y+t.image.Y,o);break}let f=r[t.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=s,ll(r)(t.label.text,l,t.x,t.y+t.label.Y,t.width,t.height,{fill:s},f),f=r[t.typeC4Shape.text+"Font"](),f.fontColor=s,t.techn&&t.techn?.text!==""?ll(r)(t.techn.text,l,t.x,t.y+t.techn.Y,t.width,t.height,{fill:s,"font-style":"italic"},f):t.type&&t.type.text!==""&&ll(r)(t.type.text,l,t.x,t.y+t.type.Y,t.width,t.height,{fill:s,"font-style":"italic"},f),t.descr&&t.descr.text!==""&&(f=r.personFont(),f.fontColor=s,ll(r)(t.descr.text,l,t.x,t.y+t.descr.Y,t.width,t.height,{fill:s},f)),t.height},"drawC4Shape"),Hdt=a(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Ydt=a(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Xdt=a(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Kdt=a(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Qdt=a(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Zdt=a(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Jdt=a(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),tpt=a(function(e){let r=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),ept=a((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),ll=function(){function e(i,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(d,f)}a(e,"byText");function t(i,s,o,l,u,h,f,d){let{fontSize:p,fontFamily:m,fontWeight:g}=d,y=i.split(Rt.lineBreakRegex);for(let b=0;b{"use strict";rpt=typeof global=="object"&&global&&global.Object===Object&&global,P2=rpt});var npt,ipt,ln,qs=x(()=>{"use strict";gv();npt=typeof self=="object"&&self&&self.Object===Object&&self,ipt=P2||npt||Function("return this")(),ln=ipt});var spt,jn,Ou=x(()=>{"use strict";qs();spt=ln.Symbol,jn=spt});function lpt(e){var t=apt.call(e,t0),r=e[t0];try{e[t0]=void 0;var n=!0}catch{}var i=opt.call(e);return n&&(t?e[t0]=r:delete e[t0]),i}var F9,apt,opt,t0,$9,G9=x(()=>{"use strict";Ou();F9=Object.prototype,apt=F9.hasOwnProperty,opt=F9.toString,t0=jn?jn.toStringTag:void 0;a(lpt,"getRawTag");$9=lpt});function hpt(e){return upt.call(e)}var cpt,upt,V9,z9=x(()=>{"use strict";cpt=Object.prototype,upt=cpt.toString;a(hpt,"objectToString");V9=hpt});function ppt(e){return e==null?e===void 0?dpt:fpt:W9&&W9 in Object(e)?$9(e):V9(e)}var fpt,dpt,W9,ei,cl=x(()=>{"use strict";Ou();G9();z9();fpt="[object Null]",dpt="[object Undefined]",W9=jn?jn.toStringTag:void 0;a(ppt,"baseGetTag");ei=ppt});function mpt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ir,Cs=x(()=>{"use strict";a(mpt,"isObject");Ir=mpt});function kpt(e){if(!Ir(e))return!1;var t=ei(e);return t==ypt||t==xpt||t==gpt||t==bpt}var gpt,ypt,xpt,bpt,_n,e0=x(()=>{"use strict";cl();Cs();gpt="[object AsyncFunction]",ypt="[object Function]",xpt="[object GeneratorFunction]",bpt="[object Proxy]";a(kpt,"isFunction");_n=kpt});var Tpt,B2,U9=x(()=>{"use strict";qs();Tpt=ln["__core-js_shared__"],B2=Tpt});function Spt(e){return!!j9&&j9 in e}var j9,q9,H9=x(()=>{"use strict";U9();j9=function(){var e=/[^.]+$/.exec(B2&&B2.keys&&B2.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();a(Spt,"isMasked");q9=Spt});function wpt(e){if(e!=null){try{return Cpt.call(e)}catch{}try{return e+""}catch{}}return""}var _pt,Cpt,ul,yv=x(()=>{"use strict";_pt=Function.prototype,Cpt=_pt.toString;a(wpt,"toSource");ul=wpt});function Npt(e){if(!Ir(e)||q9(e))return!1;var t=_n(e)?Ipt:vpt;return t.test(ul(e))}var Ept,vpt,Apt,Lpt,Rpt,Dpt,Ipt,Y9,X9=x(()=>{"use strict";e0();H9();Cs();yv();Ept=/[\\^$.*+?()[\]{}|]/g,vpt=/^\[object .+?Constructor\]$/,Apt=Function.prototype,Lpt=Object.prototype,Rpt=Apt.toString,Dpt=Lpt.hasOwnProperty,Ipt=RegExp("^"+Rpt.call(Dpt).replace(Ept,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");a(Npt,"baseIsNative");Y9=Npt});function Mpt(e,t){return e?.[t]}var K9,Q9=x(()=>{"use strict";a(Mpt,"getValue");K9=Mpt});function Opt(e,t){var r=K9(e,t);return Y9(r)?r:void 0}var Ji,oc=x(()=>{"use strict";X9();Q9();a(Opt,"getNative");Ji=Opt});var Ppt,hl,r0=x(()=>{"use strict";oc();Ppt=Ji(Object,"create"),hl=Ppt});function Bpt(){this.__data__=hl?hl(null):{},this.size=0}var Z9,J9=x(()=>{"use strict";r0();a(Bpt,"hashClear");Z9=Bpt});function Fpt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tB,eB=x(()=>{"use strict";a(Fpt,"hashDelete");tB=Fpt});function zpt(e){var t=this.__data__;if(hl){var r=t[e];return r===$pt?void 0:r}return Vpt.call(t,e)?t[e]:void 0}var $pt,Gpt,Vpt,rB,nB=x(()=>{"use strict";r0();$pt="__lodash_hash_undefined__",Gpt=Object.prototype,Vpt=Gpt.hasOwnProperty;a(zpt,"hashGet");rB=zpt});function jpt(e){var t=this.__data__;return hl?t[e]!==void 0:Upt.call(t,e)}var Wpt,Upt,iB,sB=x(()=>{"use strict";r0();Wpt=Object.prototype,Upt=Wpt.hasOwnProperty;a(jpt,"hashHas");iB=jpt});function Hpt(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=hl&&t===void 0?qpt:t,this}var qpt,aB,oB=x(()=>{"use strict";r0();qpt="__lodash_hash_undefined__";a(Hpt,"hashSet");aB=Hpt});function If(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";J9();eB();nB();sB();oB();a(If,"Hash");If.prototype.clear=Z9;If.prototype.delete=tB;If.prototype.get=rB;If.prototype.has=iB;If.prototype.set=aB;xv=If});function Ypt(){this.__data__=[],this.size=0}var cB,uB=x(()=>{"use strict";a(Ypt,"listCacheClear");cB=Ypt});function Xpt(e,t){return e===t||e!==e&&t!==t}var Hs,Pu=x(()=>{"use strict";a(Xpt,"eq");Hs=Xpt});function Kpt(e,t){for(var r=e.length;r--;)if(Hs(e[r][0],t))return r;return-1}var lc,n0=x(()=>{"use strict";Pu();a(Kpt,"assocIndexOf");lc=Kpt});function Jpt(e){var t=this.__data__,r=lc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Zpt.call(t,r,1),--this.size,!0}var Qpt,Zpt,hB,fB=x(()=>{"use strict";n0();Qpt=Array.prototype,Zpt=Qpt.splice;a(Jpt,"listCacheDelete");hB=Jpt});function tmt(e){var t=this.__data__,r=lc(t,e);return r<0?void 0:t[r][1]}var dB,pB=x(()=>{"use strict";n0();a(tmt,"listCacheGet");dB=tmt});function emt(e){return lc(this.__data__,e)>-1}var mB,gB=x(()=>{"use strict";n0();a(emt,"listCacheHas");mB=emt});function rmt(e,t){var r=this.__data__,n=lc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var yB,xB=x(()=>{"use strict";n0();a(rmt,"listCacheSet");yB=rmt});function Nf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";uB();fB();pB();gB();xB();a(Nf,"ListCache");Nf.prototype.clear=cB;Nf.prototype.delete=hB;Nf.prototype.get=dB;Nf.prototype.has=mB;Nf.prototype.set=yB;cc=Nf});var nmt,uc,F2=x(()=>{"use strict";oc();qs();nmt=Ji(ln,"Map"),uc=nmt});function imt(){this.size=0,this.__data__={hash:new xv,map:new(uc||cc),string:new xv}}var bB,kB=x(()=>{"use strict";lB();i0();F2();a(imt,"mapCacheClear");bB=imt});function smt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var TB,SB=x(()=>{"use strict";a(smt,"isKeyable");TB=smt});function amt(e,t){var r=e.__data__;return TB(t)?r[typeof t=="string"?"string":"hash"]:r.map}var hc,s0=x(()=>{"use strict";SB();a(amt,"getMapData");hc=amt});function omt(e){var t=hc(this,e).delete(e);return this.size-=t?1:0,t}var _B,CB=x(()=>{"use strict";s0();a(omt,"mapCacheDelete");_B=omt});function lmt(e){return hc(this,e).get(e)}var wB,EB=x(()=>{"use strict";s0();a(lmt,"mapCacheGet");wB=lmt});function cmt(e){return hc(this,e).has(e)}var vB,AB=x(()=>{"use strict";s0();a(cmt,"mapCacheHas");vB=cmt});function umt(e,t){var r=hc(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var LB,RB=x(()=>{"use strict";s0();a(umt,"mapCacheSet");LB=umt});function Mf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";kB();CB();EB();AB();RB();a(Mf,"MapCache");Mf.prototype.clear=bB;Mf.prototype.delete=_B;Mf.prototype.get=wB;Mf.prototype.has=vB;Mf.prototype.set=LB;Bu=Mf});function bv(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hmt);var r=a(function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o},"memoized");return r.cache=new(bv.Cache||Bu),r}var hmt,Of,kv=x(()=>{"use strict";$2();hmt="Expected a function";a(bv,"memoize");bv.Cache=Bu;Of=bv});function fmt(){this.__data__=new cc,this.size=0}var DB,IB=x(()=>{"use strict";i0();a(fmt,"stackClear");DB=fmt});function dmt(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var NB,MB=x(()=>{"use strict";a(dmt,"stackDelete");NB=dmt});function pmt(e){return this.__data__.get(e)}var OB,PB=x(()=>{"use strict";a(pmt,"stackGet");OB=pmt});function mmt(e){return this.__data__.has(e)}var BB,FB=x(()=>{"use strict";a(mmt,"stackHas");BB=mmt});function ymt(e,t){var r=this.__data__;if(r instanceof cc){var n=r.__data__;if(!uc||n.length{"use strict";i0();F2();$2();gmt=200;a(ymt,"stackSet");$B=ymt});function Pf(e){var t=this.__data__=new cc(e);this.size=t.size}var co,a0=x(()=>{"use strict";i0();IB();MB();PB();FB();GB();a(Pf,"Stack");Pf.prototype.clear=DB;Pf.prototype.delete=NB;Pf.prototype.get=OB;Pf.prototype.has=BB;Pf.prototype.set=$B;co=Pf});var xmt,Bf,Tv=x(()=>{"use strict";oc();xmt=function(){try{var e=Ji(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Bf=xmt});function bmt(e,t,r){t=="__proto__"&&Bf?Bf(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var uo,Ff=x(()=>{"use strict";Tv();a(bmt,"baseAssignValue");uo=bmt});function kmt(e,t,r){(r!==void 0&&!Hs(e[t],r)||r===void 0&&!(t in e))&&uo(e,t,r)}var o0,Sv=x(()=>{"use strict";Ff();Pu();a(kmt,"assignMergeValue");o0=kmt});function Tmt(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(s[u],u,s)===!1)break}return t}}var VB,zB=x(()=>{"use strict";a(Tmt,"createBaseFor");VB=Tmt});var Smt,$f,G2=x(()=>{"use strict";zB();Smt=VB(),$f=Smt});function Cmt(e,t){if(t)return e.slice();var r=e.length,n=jB?jB(r):new e.constructor(r);return e.copy(n),n}var qB,WB,_mt,UB,jB,V2,_v=x(()=>{"use strict";qs();qB=typeof exports=="object"&&exports&&!exports.nodeType&&exports,WB=qB&&typeof module=="object"&&module&&!module.nodeType&&module,_mt=WB&&WB.exports===qB,UB=_mt?ln.Buffer:void 0,jB=UB?UB.allocUnsafe:void 0;a(Cmt,"cloneBuffer");V2=Cmt});var wmt,Gf,Cv=x(()=>{"use strict";qs();wmt=ln.Uint8Array,Gf=wmt});function Emt(e){var t=new e.constructor(e.byteLength);return new Gf(t).set(new Gf(e)),t}var Vf,z2=x(()=>{"use strict";Cv();a(Emt,"cloneArrayBuffer");Vf=Emt});function vmt(e,t){var r=t?Vf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var W2,wv=x(()=>{"use strict";z2();a(vmt,"cloneTypedArray");W2=vmt});function Amt(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{"use strict";a(Amt,"copyArray");U2=Amt});var HB,Lmt,YB,XB=x(()=>{"use strict";Cs();HB=Object.create,Lmt=function(){function e(){}return a(e,"object"),function(t){if(!Ir(t))return{};if(HB)return HB(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),YB=Lmt});function Rmt(e,t){return function(r){return e(t(r))}}var j2,vv=x(()=>{"use strict";a(Rmt,"overArg");j2=Rmt});var Dmt,zf,q2=x(()=>{"use strict";vv();Dmt=j2(Object.getPrototypeOf,Object),zf=Dmt});function Nmt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Imt;return e===r}var Imt,ho,Wf=x(()=>{"use strict";Imt=Object.prototype;a(Nmt,"isPrototype");ho=Nmt});function Mmt(e){return typeof e.constructor=="function"&&!ho(e)?YB(zf(e)):{}}var H2,Av=x(()=>{"use strict";XB();q2();Wf();a(Mmt,"initCloneObject");H2=Mmt});function Omt(e){return e!=null&&typeof e=="object"}var nn,Ys=x(()=>{"use strict";a(Omt,"isObjectLike");nn=Omt});function Bmt(e){return nn(e)&&ei(e)==Pmt}var Pmt,Lv,KB=x(()=>{"use strict";cl();Ys();Pmt="[object Arguments]";a(Bmt,"baseIsArguments");Lv=Bmt});var QB,Fmt,$mt,Gmt,Ma,Uf=x(()=>{"use strict";KB();Ys();QB=Object.prototype,Fmt=QB.hasOwnProperty,$mt=QB.propertyIsEnumerable,Gmt=Lv(function(){return arguments}())?Lv:function(e){return nn(e)&&Fmt.call(e,"callee")&&!$mt.call(e,"callee")},Ma=Gmt});var Vmt,Qt,Yr=x(()=>{"use strict";Vmt=Array.isArray,Qt=Vmt});function Wmt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zmt}var zmt,jf,Y2=x(()=>{"use strict";zmt=9007199254740991;a(Wmt,"isLength");jf=Wmt});function Umt(e){return e!=null&&jf(e.length)&&!_n(e)}var cn,Xs=x(()=>{"use strict";e0();Y2();a(Umt,"isArrayLike");cn=Umt});function jmt(e){return nn(e)&&cn(e)}var Fu,X2=x(()=>{"use strict";Xs();Ys();a(jmt,"isArrayLikeObject");Fu=jmt});function qmt(){return!1}var ZB,JB=x(()=>{"use strict";a(qmt,"stubFalse");ZB=qmt});var rF,tF,Hmt,eF,Ymt,Xmt,Oa,qf=x(()=>{"use strict";qs();JB();rF=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tF=rF&&typeof module=="object"&&module&&!module.nodeType&&module,Hmt=tF&&tF.exports===rF,eF=Hmt?ln.Buffer:void 0,Ymt=eF?eF.isBuffer:void 0,Xmt=Ymt||ZB,Oa=Xmt});function egt(e){if(!nn(e)||ei(e)!=Kmt)return!1;var t=zf(e);if(t===null)return!0;var r=Jmt.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&nF.call(r)==tgt}var Kmt,Qmt,Zmt,nF,Jmt,tgt,iF,sF=x(()=>{"use strict";cl();q2();Ys();Kmt="[object Object]",Qmt=Function.prototype,Zmt=Object.prototype,nF=Qmt.toString,Jmt=Zmt.hasOwnProperty,tgt=nF.call(Object);a(egt,"isPlainObject");iF=egt});function Egt(e){return nn(e)&&jf(e.length)&&!!jr[ei(e)]}var rgt,ngt,igt,sgt,agt,ogt,lgt,cgt,ugt,hgt,fgt,dgt,pgt,mgt,ggt,ygt,xgt,bgt,kgt,Tgt,Sgt,_gt,Cgt,wgt,jr,aF,oF=x(()=>{"use strict";cl();Y2();Ys();rgt="[object Arguments]",ngt="[object Array]",igt="[object Boolean]",sgt="[object Date]",agt="[object Error]",ogt="[object Function]",lgt="[object Map]",cgt="[object Number]",ugt="[object Object]",hgt="[object RegExp]",fgt="[object Set]",dgt="[object String]",pgt="[object WeakMap]",mgt="[object ArrayBuffer]",ggt="[object DataView]",ygt="[object Float32Array]",xgt="[object Float64Array]",bgt="[object Int8Array]",kgt="[object Int16Array]",Tgt="[object Int32Array]",Sgt="[object Uint8Array]",_gt="[object Uint8ClampedArray]",Cgt="[object Uint16Array]",wgt="[object Uint32Array]",jr={};jr[ygt]=jr[xgt]=jr[bgt]=jr[kgt]=jr[Tgt]=jr[Sgt]=jr[_gt]=jr[Cgt]=jr[wgt]=!0;jr[rgt]=jr[ngt]=jr[mgt]=jr[igt]=jr[ggt]=jr[sgt]=jr[agt]=jr[ogt]=jr[lgt]=jr[cgt]=jr[ugt]=jr[hgt]=jr[fgt]=jr[dgt]=jr[pgt]=!1;a(Egt,"baseIsTypedArray");aF=Egt});function vgt(e){return function(t){return e(t)}}var Ks,$u=x(()=>{"use strict";a(vgt,"baseUnary");Ks=vgt});var lF,l0,Agt,Rv,Lgt,Qs,c0=x(()=>{"use strict";gv();lF=typeof exports=="object"&&exports&&!exports.nodeType&&exports,l0=lF&&typeof module=="object"&&module&&!module.nodeType&&module,Agt=l0&&l0.exports===lF,Rv=Agt&&P2.process,Lgt=function(){try{var e=l0&&l0.require&&l0.require("util").types;return e||Rv&&Rv.binding&&Rv.binding("util")}catch{}}(),Qs=Lgt});var cF,Rgt,fc,u0=x(()=>{"use strict";oF();$u();c0();cF=Qs&&Qs.isTypedArray,Rgt=cF?Ks(cF):aF,fc=Rgt});function Dgt(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var h0,Dv=x(()=>{"use strict";a(Dgt,"safeGet");h0=Dgt});function Mgt(e,t,r){var n=e[t];(!(Ngt.call(e,t)&&Hs(n,r))||r===void 0&&!(t in e))&&uo(e,t,r)}var Igt,Ngt,fo,Hf=x(()=>{"use strict";Ff();Pu();Igt=Object.prototype,Ngt=Igt.hasOwnProperty;a(Mgt,"assignValue");fo=Mgt});function Ogt(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s{"use strict";Hf();Ff();a(Ogt,"copyObject");Zs=Ogt});function Pgt(e,t){for(var r=-1,n=Array(e);++r{"use strict";a(Pgt,"baseTimes");uF=Pgt});function $gt(e,t){var r=typeof e;return t=t??Bgt,!!t&&(r=="number"||r!="symbol"&&Fgt.test(e))&&e>-1&&e%1==0&&e{"use strict";Bgt=9007199254740991,Fgt=/^(?:0|[1-9]\d*)$/;a($gt,"isIndex");dc=$gt});function zgt(e,t){var r=Qt(e),n=!r&&Ma(e),i=!r&&!n&&Oa(e),s=!r&&!n&&!i&&fc(e),o=r||n||i||s,l=o?uF(e.length,String):[],u=l.length;for(var h in e)(t||Vgt.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||dc(h,u)))&&l.push(h);return l}var Ggt,Vgt,K2,Iv=x(()=>{"use strict";hF();Uf();Yr();qf();f0();u0();Ggt=Object.prototype,Vgt=Ggt.hasOwnProperty;a(zgt,"arrayLikeKeys");K2=zgt});function Wgt(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var fF,dF=x(()=>{"use strict";a(Wgt,"nativeKeysIn");fF=Wgt});function qgt(e){if(!Ir(e))return fF(e);var t=ho(e),r=[];for(var n in e)n=="constructor"&&(t||!jgt.call(e,n))||r.push(n);return r}var Ugt,jgt,pF,mF=x(()=>{"use strict";Cs();Wf();dF();Ugt=Object.prototype,jgt=Ugt.hasOwnProperty;a(qgt,"baseKeysIn");pF=qgt});function Hgt(e){return cn(e)?K2(e,!0):pF(e)}var ts,pc=x(()=>{"use strict";Iv();mF();Xs();a(Hgt,"keysIn");ts=Hgt});function Ygt(e){return Zs(e,ts(e))}var gF,yF=x(()=>{"use strict";Gu();pc();a(Ygt,"toPlainObject");gF=Ygt});function Xgt(e,t,r,n,i,s,o){var l=h0(e,r),u=h0(t,r),h=o.get(u);if(h){o0(e,r,h);return}var f=s?s(l,u,r+"",e,t,o):void 0,d=f===void 0;if(d){var p=Qt(u),m=!p&&Oa(u),g=!p&&!m&&fc(u);f=u,p||m||g?Qt(l)?f=l:Fu(l)?f=U2(l):m?(d=!1,f=V2(u,!0)):g?(d=!1,f=W2(u,!0)):f=[]:iF(u)||Ma(u)?(f=l,Ma(l)?f=gF(l):(!Ir(l)||_n(l))&&(f=H2(u))):d=!1}d&&(o.set(u,f),i(f,u,n,s,o),o.delete(u)),o0(e,r,f)}var xF,bF=x(()=>{"use strict";Sv();_v();wv();Ev();Av();Uf();Yr();X2();qf();e0();Cs();sF();u0();Dv();yF();a(Xgt,"baseMergeDeep");xF=Xgt});function kF(e,t,r,n,i){e!==t&&$f(t,function(s,o){if(i||(i=new co),Ir(s))xF(e,t,o,r,kF,n,i);else{var l=n?n(h0(e,o),s,o+"",e,t,i):void 0;l===void 0&&(l=s),o0(e,o,l)}},ts)}var TF,SF=x(()=>{"use strict";a0();Sv();G2();bF();Cs();pc();Dv();a(kF,"baseMerge");TF=kF});function Kgt(e){return e}var qn,fl=x(()=>{"use strict";a(Kgt,"identity");qn=Kgt});function Qgt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var _F,CF=x(()=>{"use strict";a(Qgt,"apply");_F=Qgt});function Zgt(e,t,r){return t=wF(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=wF(n.length-t,0),o=Array(s);++i{"use strict";CF();wF=Math.max;a(Zgt,"overRest");Q2=Zgt});function Jgt(e){return function(){return e}}var es,Mv=x(()=>{"use strict";a(Jgt,"constant");es=Jgt});var t0t,EF,vF=x(()=>{"use strict";Mv();Tv();fl();t0t=Bf?function(e,t){return Bf(e,"toString",{configurable:!0,enumerable:!1,value:es(t),writable:!0})}:qn,EF=t0t});function i0t(e){var t=0,r=0;return function(){var n=n0t(),i=r0t-(n-r);if(r=n,i>0){if(++t>=e0t)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var e0t,r0t,n0t,AF,LF=x(()=>{"use strict";e0t=800,r0t=16,n0t=Date.now;a(i0t,"shortOut");AF=i0t});var s0t,Z2,Ov=x(()=>{"use strict";vF();LF();s0t=AF(EF),Z2=s0t});function a0t(e,t){return Z2(Q2(e,t,qn),e+"")}var po,Yf=x(()=>{"use strict";fl();Nv();Ov();a(a0t,"baseRest");po=a0t});function o0t(e,t,r){if(!Ir(r))return!1;var n=typeof t;return(n=="number"?cn(r)&&dc(t,r.length):n=="string"&&t in r)?Hs(r[t],e):!1}var ws,Vu=x(()=>{"use strict";Pu();Xs();f0();Cs();a(o0t,"isIterateeCall");ws=o0t});function l0t(e){return po(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&ws(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n{"use strict";Yf();Vu();a(l0t,"createAssigner");J2=l0t});var c0t,mc,Bv=x(()=>{"use strict";SF();Pv();c0t=J2(function(e,t,r){TF(e,t,r)}),mc=c0t});function Gv(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return u0t[r]??t}function p0t(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,IF.sanitizeUrl)(r):r}function OF(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function g0t(e){let t,r=0;e.forEach(i=>{r+=OF(i,t),t=i});let n=r/2;return Vv(e,n)}function y0t(e){return e.length===1?e[0]:g0t(e)}function b0t(e,t,r){let n=structuredClone(r);P.info("our points",n),t!=="start_left"&&t!=="start_right"&&n.reverse();let i=25+e,s=Vv(n,i),o=10+e*.5,l=Math.atan2(n[0].y-s.y,n[0].x-s.x),u={x:0,y:0};return t==="start_left"?(u.x=Math.sin(l+Math.PI)*o+(n[0].x+s.x)/2,u.y=-Math.cos(l+Math.PI)*o+(n[0].y+s.y)/2):t==="end_right"?(u.x=Math.sin(l-Math.PI)*o+(n[0].x+s.x)/2-5,u.y=-Math.cos(l-Math.PI)*o+(n[0].y+s.y)/2-5):t==="end_left"?(u.x=Math.sin(l)*o+(n[0].x+s.x)/2-5,u.y=-Math.cos(l)*o+(n[0].y+s.y)/2-5):(u.x=Math.sin(l)*o+(n[0].x+s.x)/2,u.y=-Math.cos(l)*o+(n[0].y+s.y)/2),u}function zv(e){let t="",r="";for(let n of e)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function k0t(e){let t="",r="0123456789abcdef",n=r.length;for(let i=0;i{"use strict";IF=Ki(Df(),1);$e();Fe();BC();zt();hu();tf();kv();Bv();tx();$v="\u200B",u0t={curveBasis:js,curveBasisClosed:C2,curveBasisOpen:w2,curveBumpX:$g,curveBumpY:Gg,curveBundle:nv,curveCardinalClosed:iv,curveCardinalOpen:av,curveCardinal:Ug,curveCatmullRomClosed:lv,curveCatmullRomOpen:cv,curveCatmullRom:Hg,curveLinear:ol,curveLinearClosed:R2,curveMonotoneX:Yg,curveMonotoneY:Xg,curveNatural:Lf,curveStep:Rf,curveStepAfter:Qg,curveStepBefore:Kg},h0t=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f0t=a(function(e,t){let r=NF(e,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let o=r.map(l=>l.args);rf(o),n=Hr(n,[...o])}else n=r.args;if(!n)return;let i=Jh(e,t),s="config";return n[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[s],delete n[s]),n},"detectInit"),NF=a(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${h0t.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n,i=[];for(;(n=cu.exec(e))!==null;)if(n.index===cu.lastIndex&&cu.lastIndex++,n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t)){let s=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:s,args:o})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(r){return P.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),MF=a(function(e){return e.replace(cu,"")},"removeDirectives"),d0t=a(function(e,t){for(let[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");a(Gv,"interpolateToCurve");a(p0t,"formatUrl");m0t=a((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],s=window;for(let o=0;o{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Vv=a((e,t)=>{let r,n=t;for(let i of e){if(r){let s=OF(i,r);if(s===0)return r;if(s=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:RF((1-o)*r.x+o*i.x,5),y:RF((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),x0t=a((e,t,r)=>{P.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=Vv(t,25),s=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(o)*s+(t[0].x+i.x)/2,l.y=-Math.cos(o)*s+(t[0].y+i.y)/2,l},"calcCardinalityPosition");a(b0t,"calcTerminalLabelPosition");a(zv,"getStylesFromArray");DF=0,Wv=a(()=>(DF++,"id-"+Math.random().toString(36).substr(2,12)+"-"+DF),"generateId");a(k0t,"makeRandomHex");Uv=a(e=>k0t(e.length),"random"),T0t=a(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),S0t=a(function(e,t){let r=t.text.replace(Rt.lineBreakRegex," "),[,n]=mo(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);let s=i.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),i},"drawSimpleText"),jv=Of((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Rt.lineBreakRegex.test(e)))return e;let n=e.split(" ").filter(Boolean),i=[],s="";return n.forEach((o,l)=>{let u=Hn(`${o} `,r),h=Hn(s,r);if(u>t){let{hyphenatedStrings:p,remainingWord:m}=_0t(o,t,"-",r);i.push(s,...p),s=m}else h+u>=t?(i.push(s),s=o):s=[s,o].filter(Boolean).join(" ");l+1===n.length&&i.push(s)}),i.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),_0t=Of((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...e],s=[],o="";return i.forEach((l,u)=>{let h=`${o}${l}`;if(Hn(h,n)>=t){let d=u+1,p=i.length===d,m=`${h}${r}`;s.push(p?h:m),o=""}else o=h}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);a(eb,"calculateTextHeight");a(Hn,"calculateTextWidth");qv=Of((e,t)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,s]=mo(r),o=["sans-serif",n],l=e.split(Rt.lineBreakRegex),u=[],h=xt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of o){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let b=T0t();b.text=y||$v;let k=S0t(f,b).style("font-size",s).style("font-weight",i).style("font-family",p),T=(k._groups||k)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,T.width)),m=Math.round(T.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Fv=class{constructor(t=!1,r){this.count=0;this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{a(this,"InitIDGenerator")}},C0t=a(function(e){return tb=tb||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),tb.innerHTML=e,unescape(tb.textContent)},"entityDecode");a(Hv,"isDetailedError");w0t=a((e,t,r,n)=>{if(!n)return;let i=e.node()?.getBBox();i&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),mo=a(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");a(Nn,"cleanAndMerge");se={assignWithDepth:Hr,wrapLabel:jv,calculateTextHeight:eb,calculateTextWidth:Hn,calculateTextDimensions:qv,cleanAndMerge:Nn,detectInit:f0t,detectDirective:NF,isSubstringInArray:d0t,interpolateToCurve:Gv,calcLabelPosition:y0t,calcCardinalityPosition:x0t,calcTerminalLabelPosition:b0t,formatUrl:p0t,getStylesFromArray:zv,generateId:Wv,random:Uv,runFunc:m0t,entityDecode:C0t,insertTitle:w0t,parseFontSize:mo,InitIDGenerator:Fv},PF=a(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),t},"encodeEntities"),Yn=a(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),gc=a((e,t,{counter:r=0,prefix:n,suffix:i},s)=>s||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");a(qr,"handleUndefinedAttr")});function Pa(e,t,r,n,i){if(!t[e].width)if(r)t[e].text=jv(t[e].text,i,n),t[e].textLines=t[e].text.split(Rt.lineBreakRegex).length,t[e].width=i,t[e].height=eb(t[e].text,n);else{let s=t[e].text.split(Rt.lineBreakRegex);t[e].textLines=s.length;let o=0;t[e].height=0,t[e].width=0;for(let l of s)t[e].width=Math.max(Hn(l,n),t[e].width),o=eb(l,n),t[e].height=t[e].height+o}}function VF(e,t,r,n,i){let s=new sb(i);s.data.widthLimit=r.data.widthLimit/Math.min(Yv,n.length);for(let[o,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&ae.wrap,f=rb(ae);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Pa("label",l,h,f,s.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=rb(ae);Pa("type",l,h,g,s.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=rb(ae);g.fontSize=g.fontSize-2,Pa("descr",l,h,g,s.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(o==0||o%Yv===0){let g=r.data.startx+ae.diagramMarginX,y=r.data.stopy+ae.diagramMarginY+u;s.setData(g,g,y,y)}else{let g=s.data.stopx!==s.data.startx?s.data.stopx+ae.diagramMarginX:s.data.startx,y=s.data.starty;s.setData(g,g,y,y)}s.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&GF(s,e,d,p),t=l.alias;let m=i.db.getBoundaries(t);m.length>0&&VF(e,t,s,m,i),l.alias!=="global"&&$F(e,l,s),r.data.stopy=Math.max(s.data.stopy+ae.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+ae.c4ShapeMargin,r.data.stopx),nb=Math.max(nb,r.data.stopx),ib=Math.max(ib,r.data.stopy)}}var nb,ib,FF,Yv,ae,sb,Xv,d0,rb,E0t,$F,GF,rs,BF,v0t,A0t,L0t,Kv,zF=x(()=>{"use strict";$e();B9();zt();SC();Fe();sw();pe();tf();Ee();Gn();nb=0,ib=0,FF=4,Yv=2;Gm.yy=sg;ae={},sb=class{static{a(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Xv(t.db.getConfig())}setData(t,r,n,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(t,r,n,i){t[r]===void 0?t[r]=n:t[r]=i(n,t[r])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+t.margin*2,n=r+t.width,i=this.nextData.starty+t.margin*2,s=i+t.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>FF)&&(r=this.nextData.startx+t.margin+ae.nextLinePaddingX,i=this.nextData.stopy+t.margin*2,this.nextData.stopx=n=r+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=i+t.height,this.nextData.cnt=1),t.x=r,t.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",s,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Xv(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},Xv=a(function(e){Hr(ae,e),e.fontFamily&&(ae.personFontFamily=ae.systemFontFamily=ae.messageFontFamily=e.fontFamily),e.fontSize&&(ae.personFontSize=ae.systemFontSize=ae.messageFontSize=e.fontSize),e.fontWeight&&(ae.personFontWeight=ae.systemFontWeight=ae.messageFontWeight=e.fontWeight)},"setConf"),d0=a((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),rb=a(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),E0t=a(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");a(Pa,"calcC4ShapeTextWH");$F=a(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=ae.c4ShapeMargin-35;let n=t.wrap&&ae.wrap,i=rb(ae);i.fontSize=i.fontSize+2,i.fontWeight="bold";let s=Hn(t.label.text,i);Pa("label",t,n,i,s),Na.drawBoundary(e,t,ae)},"drawBoundary"),GF=a(function(e,t,r,n){let i=0;for(let s of n){i=0;let o=r[s],l=d0(ae,o.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,o.typeC4Shape.width=Hn("\xAB"+o.typeC4Shape.text+"\xBB",l),o.typeC4Shape.height=l.fontSize+2,o.typeC4Shape.Y=ae.c4ShapePadding,i=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height;break}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let u=o.wrap&&ae.wrap,h=ae.width-ae.c4ShapePadding*2,f=d0(ae,o.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Pa("label",o,u,f,h),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=d0(ae,o.typeC4Shape.text);Pa("type",o,u,m,h),o.type.Y=i+5,i=o.type.Y+o.type.height}else if(o.techn&&o.techn.text!==""){o.techn.text="["+o.techn.text+"]";let m=d0(ae,o.techn.text);Pa("techn",o,u,m,h),o.techn.Y=i+5,i=o.techn.Y+o.techn.height}let d=i,p=o.label.width;if(o.descr&&o.descr.text!==""){let m=d0(ae,o.typeC4Shape.text);Pa("descr",o,u,m,h),o.descr.Y=i+20,i=o.descr.Y+o.descr.height,p=Math.max(o.label.width,o.descr.width),d=i-o.descr.textLines*5}p=p+ae.c4ShapePadding,o.width=Math.max(o.width||ae.width,p,ae.width),o.height=Math.max(o.height||ae.height,d,ae.height),o.margin=o.margin||ae.c4ShapeMargin,e.insert(o),Na.drawC4Shape(t,o,ae)}e.bumpLastMargin(ae.c4ShapeMargin)},"drawC4ShapeArray"),rs=class{static{a(this,"Point")}constructor(t,r){this.x=t,this.y=r}},BF=a(function(e,t){let r=e.x,n=e.y,i=t.x,s=t.y,o=r+e.width/2,l=n+e.height/2,u=Math.abs(r-i),h=Math.abs(n-s),f=h/u,d=e.height/e.width,p=null;return n==s&&ri?p=new rs(r,l):r==i&&ns&&(p=new rs(o,n)),r>i&&n=f?p=new rs(r,l+f*e.width/2):p=new rs(o-u/h*e.height/2,n+e.height):r=f?p=new rs(r+e.width,l+f*e.width/2):p=new rs(o+u/h*e.height/2,n+e.height):rs?d>=f?p=new rs(r+e.width,l-f*e.width/2):p=new rs(o+e.height/2*u/h,n):r>i&&n>s&&(d>=f?p=new rs(r,l-e.width/2*f):p=new rs(o-e.height/2*u/h,n)),p},"getIntersectPoint"),v0t=a(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=BF(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=BF(t,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),A0t=a(function(e,t,r,n){let i=0;for(let s of t){i=i+1;let o=s.wrap&&ae.wrap,l=E0t(ae);n.db.getC4Type()==="C4Dynamic"&&(s.label.text=i+": "+s.label.text);let h=Hn(s.label.text,l);Pa("label",s,o,l,h),s.techn&&s.techn.text!==""&&(h=Hn(s.techn.text,l),Pa("techn",s,o,l,h)),s.descr&&s.descr.text!==""&&(h=Hn(s.descr.text,l),Pa("descr",s,o,l,h));let f=r(s.from),d=r(s.to),p=v0t(f,d);s.startPoint=p.startPoint,s.endPoint=p.endPoint}Na.drawRels(e,t,ae)},"drawRels");a(VF,"drawInsideBoundary");L0t=a(function(e,t,r,n){ae=Y().c4;let i=Y().securityLevel,s;i==="sandbox"&&(s=xt("#i"+t));let o=i==="sandbox"?xt(s.nodes()[0].contentDocument.body):xt("body"),l=n.db;n.db.setWrap(ae.wrap),FF=l.getC4ShapeInRow(),Yv=l.getC4BoundaryInRow(),P.debug(`C:${JSON.stringify(ae,null,2)}`);let u=i==="sandbox"?o.select(`[id="${t}"]`):xt(`[id="${t}"]`);Na.insertComputerIcon(u),Na.insertDatabaseIcon(u),Na.insertClockIcon(u);let h=new sb(n);h.setData(ae.diagramMarginX,ae.diagramMarginX,ae.diagramMarginY,ae.diagramMarginY),h.data.widthLimit=screen.availWidth,nb=ae.diagramMarginX,ib=ae.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundaries("");VF(u,"",h,d,n),Na.insertArrowHead(u),Na.insertArrowEnd(u),Na.insertArrowCrossHead(u),Na.insertArrowFilledHead(u),A0t(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=nb,h.data.stopy=ib;let p=h.data,g=p.stopy-p.starty+2*ae.diagramMarginY,b=p.stopx-p.startx+2*ae.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*ae.diagramMarginX).attr("y",p.starty+ae.diagramMarginY),Rr(u,g,b,ae.useMaxWidth);let k=f?60:0;u.attr("viewBox",p.startx-ae.diagramMarginX+" -"+(ae.diagramMarginY+k)+" "+b+" "+(g+k)),P.debug("models:",p)},"draw"),Kv={drawPersonOrSystemArray:GF,drawBoundary:$F,setConf:Xv,draw:L0t}});var R0t,WF,UF=x(()=>{"use strict";R0t=a(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),WF=R0t});var jF={};Be(jF,{diagram:()=>D0t});var D0t,qF=x(()=>{"use strict";SC();sw();zF();UF();D0t={parser:A7,db:sg,renderer:Kv,styles:WF,init:a(({c4:e,wrap:t})=>{Kv.setConf(e),sg.setWrap(t)},"init")}});function u$(e){return typeof e>"u"||e===null}function O0t(e){return typeof e=="object"&&e!==null}function P0t(e){return Array.isArray(e)?e:u$(e)?[]:[e]}function B0t(e,t){var r,n,i,s;if(t)for(s=Object.keys(t),r=0,n=s.length;rl&&(s=" ... ",t=n-l+s.length),r-n>l&&(o=" ...",r=n+l-o.length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+o,pos:n-t+s.length}}function Zv(e,t){return Mn.repeat(" ",t-e.length)+e}function q0t(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],s,o=-1;s=r.exec(e.buffer);)i.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var l="",u,h,f=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(o-u<0);u++)h=Qv(e.buffer,n[o-u],i[o-u],e.position-(n[o]-n[o-u]),d),l=Mn.repeat(" ",t.indent)+Zv((e.line-u+1).toString(),f)+" | "+h.str+` +`+l;for(h=Qv(e.buffer,n[o],i[o],e.position,d),l+=Mn.repeat(" ",t.indent)+Zv((e.line+1).toString(),f)+" | "+h.str+` +`,l+=Mn.repeat("-",t.indent+f+3+h.pos)+`^ +`,u=1;u<=t.linesAfter&&!(o+u>=i.length);u++)h=Qv(e.buffer,n[o+u],i[o+u],e.position-(n[o]-n[o+u]),d),l+=Mn.repeat(" ",t.indent)+Zv((e.line+u+1).toString(),f)+" | "+h.str+` +`;return l.replace(/\n$/,"")}function K0t(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function Q0t(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Y0t.indexOf(r)===-1)throw new ns('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=K0t(t.styleAliases||null),X0t.indexOf(this.kind)===-1)throw new ns('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function XF(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=o)}),r[i]=n}),r}function Z0t(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(a(n,"collectType"),t=0,r=arguments.length;t=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function _1t(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Mn.isNegativeZero(e))return"-0.0";return r=e.toString(10),S1t.test(r)?r.replace("e",".e"):r}function C1t(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Mn.isNegativeZero(e))}function v1t(e){return e===null?!1:d$.exec(e)!==null||p$.exec(e)!==null}function A1t(e){var t,r,n,i,s,o,l,u=0,h=null,f,d,p;if(t=d$.exec(e),t===null&&(t=p$.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(s=+t[4],o=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(f=+t[10],d=+(t[11]||0),h=(f*60+d)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,i,s,o,l,u)),h&&p.setTime(p.getTime()-h),p}function L1t(e){return e.toISOString()}function D1t(e){return e==="<<"||e===null}function N1t(e){if(e===null)return!1;var t,r,n=0,i=e.length,s=s4;for(r=0;r64)){if(t<0)return!1;n+=6}return n%8===0}function M1t(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=s4,o=0,l=[];for(t=0;t>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|s.indexOf(n.charAt(t));return r=i%4*6,r===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):r===18?(l.push(o>>10&255),l.push(o>>2&255)):r===12&&l.push(o>>4&255),new Uint8Array(l)}function O1t(e){var t="",r=0,n,i,s=e.length,o=s4;for(n=0;n>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[n];return i=s%3,i===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):i===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):i===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}function P1t(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function G1t(e){if(e===null)return!0;var t=[],r,n,i,s,o,l=e;for(r=0,n=l.length;r>10)+55296,(e-65536&1023)+56320)}function syt(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||m$,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function S$(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=H0t(r),new ns(t,r)}function me(e,t){throw S$(e,t)}function lb(e,t){e.onWarning&&e.onWarning.call(null,S$(e,t))}function yc(e,t,r,n){var i,s,o,l;if(t1&&(e.result+=Mn.repeat(` +`,t-1))}function ayt(e,t,r){var n,i,s,o,l,u,h,f,d=e.kind,p=e.result,m;if(m=e.input.charCodeAt(e.position),is(m)||Kf(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),is(i)||r&&Kf(i)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,l=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),is(i)||r&&Kf(i))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),is(n))break}else{if(e.position===e.lineStart&&hb(e)||r&&Kf(m))break;if(go(m))if(u=e.line,h=e.lineStart,f=e.lineIndent,Cn(e,!1,-1),e.lineIndent>=t){l=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=u,e.lineStart=h,e.lineIndent=f;break}}l&&(yc(e,s,o,!1),o4(e,e.line-u),s=o=e.position,l=!1),Wu(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return yc(e,s,o,!1),e.result?!0:(e.kind=d,e.result=p,!1)}function oyt(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(yc(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else go(r)?(yc(e,n,i,!0),o4(e,Cn(e,!1,t)),n=i=e.position):e.position===e.lineStart&&hb(e)?me(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);me(e,"unexpected end of the stream within a single quoted scalar")}function lyt(e,t){var r,n,i,s,o,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return yc(e,r,e.position,!0),e.position++,!0;if(l===92){if(yc(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),go(l))Cn(e,!1,t);else if(l<256&&k$[l])e.result+=T$[l],e.position++;else if((o=ryt(l))>0){for(i=o,s=0;i>0;i--)l=e.input.charCodeAt(++e.position),(o=eyt(l))>=0?s=(s<<4)+o:me(e,"expected hexadecimal character");e.result+=iyt(s),e.position++}else me(e,"unknown escape sequence");r=n=e.position}else go(l)?(yc(e,r,n,!0),o4(e,Cn(e,!1,t)),r=n=e.position):e.position===e.lineStart&&hb(e)?me(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}me(e,"unexpected end of the stream within a double quoted scalar")}function cyt(e,t){var r=!0,n,i,s,o=e.tag,l,u=e.anchor,h,f,d,p,m,g=Object.create(null),y,b,k,T;if(T=e.input.charCodeAt(e.position),T===91)f=93,m=!1,l=[];else if(T===123)f=125,m=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),T=e.input.charCodeAt(++e.position);T!==0;){if(Cn(e,!0,t),T=e.input.charCodeAt(e.position),T===f)return e.position++,e.tag=o,e.anchor=u,e.kind=m?"mapping":"sequence",e.result=l,!0;r?T===44&&me(e,"expected the node content, but found ','"):me(e,"missed comma between flow collection entries"),b=y=k=null,d=p=!1,T===63&&(h=e.input.charCodeAt(e.position+1),is(h)&&(d=p=!0,e.position++,Cn(e,!0,t))),n=e.line,i=e.lineStart,s=e.position,Zf(e,t,ab,!1,!0),b=e.tag,y=e.result,Cn(e,!0,t),T=e.input.charCodeAt(e.position),(p||e.line===n)&&T===58&&(d=!0,T=e.input.charCodeAt(++e.position),Cn(e,!0,t),Zf(e,t,ab,!1,!0),k=e.result),m?Qf(e,l,g,b,y,k,n,i,s):d?l.push(Qf(e,null,g,b,y,k,n,i,s)):l.push(y),Cn(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(r=!0,T=e.input.charCodeAt(++e.position)):r=!1}me(e,"unexpected end of the stream within a flow collection")}function uyt(e,t){var r,n,i=Jv,s=!1,o=!1,l=t,u=0,h=!1,f,d;if(d=e.input.charCodeAt(e.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Jv===i?i=d===43?KF:Q1t:me(e,"repeat of a chomping mode identifier");else if((f=nyt(d))>=0)f===0?me(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?me(e,"repeat of an indentation width identifier"):(l=t+f-1,o=!0);else break;if(Wu(d)){do d=e.input.charCodeAt(++e.position);while(Wu(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!go(d)&&d!==0)}for(;d!==0;){for(a4(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndentl&&(l=e.lineIndent),go(d)){u++;continue}if(e.lineIndentt)&&u!==0)me(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(b&&(o=e.line,l=e.lineStart,u=e.position),Zf(e,t,ob,!0,i)&&(b?g=e.result:y=e.result),b||(Qf(e,d,p,m,g,y,o,l,u),m=g=y=null),Cn(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&T!==0)me(e,"bad indentation of a mapping entry");else if(e.lineIndentt?u=1:e.lineIndent===t?u=0:e.lineIndentt?u=1:e.lineIndent===t?u=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),d=0,p=e.implicitTypes.length;d"),e.result!==null&&g.kind!==e.kind&&me(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):me(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function myt(e){var t=e.position,r,n,i,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Cn(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!is(o);)o=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&me(e,"directive name must not be less than one character in length");o!==0;){for(;Wu(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!go(o));break}if(go(o))break;for(r=e.position;o!==0&&!is(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}o!==0&&a4(e),xc.call(JF,n)?JF[n](e,n,i):lb(e,'unknown document directive "'+n+'"')}if(Cn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Cn(e,!0,-1)):s&&me(e,"directives end mark is expected"),Zf(e,e.lineIndent-1,ob,!1,!0),Cn(e,!0,-1),e.checkLineBreaks&&J1t.test(e.input.slice(t,e.position))&&lb(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&hb(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Cn(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var n=_$(e,r);if(typeof t!="function")return n;for(var i=0,s=n.length;i=55296&&r<=56319&&t+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function I$(e){var t=/^\n* /;return t.test(e)}function jyt(e,t,r,n,i,s,o,l){var u,h=0,f=null,d=!1,p=!1,m=n!==-1,g=-1,y=Wyt(p0(e,0))&&Uyt(p0(e,e.length-1));if(t||o)for(u=0;u=65536?u+=2:u++){if(h=p0(e,u),!x0(h))return Xf;y=y&&i$(h,f,l),f=h}else{for(u=0;u=65536?u+=2:u++){if(h=p0(e,u),h===g0)d=!0,m&&(p=p||u-g-1>n&&e[g+1]!==" ",g=u);else if(!x0(h))return Xf;y=y&&i$(h,f,l),f=h}p=p||m&&u-g-1>n&&e[g+1]!==" "}return!d&&!p?y&&!o&&!i(e)?N$:s===y0?Xf:n4:r>9&&I$(e)?Xf:o?s===y0?Xf:n4:p?O$:M$}function qyt(e,t,r,n,i){e.dump=function(){if(t.length===0)return e.quotingType===y0?'""':"''";if(!e.noCompatMode&&(Pyt.indexOf(t)!==-1||Byt.test(t)))return e.quotingType===y0?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&r>=e.flowLevel;function u(h){return zyt(e,h)}switch(a(u,"testAmbiguity"),jyt(t,l,e.indent,o,u,e.quotingType,e.forceQuotes&&!n,i)){case N$:return t;case n4:return"'"+t.replace(/'/g,"''")+"'";case M$:return"|"+s$(t,e.indent)+a$(r$(t,s));case O$:return">"+s$(t,e.indent)+a$(r$(Hyt(t,o),s));case Xf:return'"'+Yyt(t)+'"';default:throw new ns("impossible error: invalid scalar style")}}()}function s$(e,t){var r=I$(e)?String(t):"",n=e[e.length-1]===` +`,i=n&&(e[e.length-2]===` +`||e===` +`),s=i?"+":n?"":"-";return r+s+` +`}function a$(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function Hyt(e,t){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=e.indexOf(` +`);return h=h!==-1?h:e.length,r.lastIndex=h,o$(e.slice(0,h),t)}(),i=e[0]===` +`||e[0]===" ",s,o;o=r.exec(e);){var l=o[1],u=o[2];s=u[0]===" ",n+=l+(!i&&!s&&u!==""?` +`:"")+o$(u,t),i=s}return n}function o$(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,s,o=0,l=0,u="";n=r.exec(e);)l=n.index,l-i>t&&(s=o>i?o:l,u+=` +`+e.slice(i,s),i=s+1),o=l;return u+=` +`,e.length-i>t&&o>i?u+=e.slice(i,o)+` +`+e.slice(o+1):u+=e.slice(i),u.slice(1)}function Yyt(e){for(var t="",r=0,n,i=0;i=65536?i+=2:i++)r=p0(e,i),n=fi[r],!n&&x0(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||$yt(r);return t}function Xyt(e,t,r){var n="",i=e.tag,s,o,l;for(s=0,o=r.length;s"u"&&dl(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function l$(e,t,r,n){var i="",s=e.tag,o,l,u;for(o=0,l=r.length;o"u"&&dl(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=r4(e,t)),e.dump&&g0===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Kyt(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,l,u,h,f;for(o=0,l=s.length;o1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),dl(e,t,h,!1,!1)&&(f+=e.dump,n+=f));e.tag=i,e.dump="{"+n+"}"}function Qyt(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),l,u,h,f,d,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new ns("sortKeys must be a boolean or a function");for(l=0,u=o.length;l1024,d&&(e.dump&&g0===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,d&&(p+=r4(e,t)),dl(e,t+1,f,!0,d)&&(e.dump&&g0===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=s,e.dump=i||"{}"}function c$(e,t,r){var n,i,s,o,l,u;for(i=r?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function dl(e,t,r,n,i,s,o){e.tag=null,e.dump=r,c$(e,r,!1)||c$(e,r,!0);var l=w$.call(e.dump),u=n,h;n&&(n=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",d,p;if(f&&(d=e.duplicates.indexOf(r),p=d!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(f&&p&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(Qyt(e,t,e.dump,i),p&&(e.dump="&ref_"+d+e.dump)):(Kyt(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?l$(e,t-1,e.dump,i):l$(e,t,e.dump,i),p&&(e.dump="&ref_"+d+e.dump)):(Xyt(e,t,e.dump),p&&(e.dump="&ref_"+d+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&qyt(e,e.dump,t,s,u);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ns("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}function Zyt(e,t){var r=[],n=[],i,s;for(i4(e,r,n),i=0,s=n.length;i{"use strict";a(u$,"isNothing");a(O0t,"isObject");a(P0t,"toArray");a(B0t,"extend");a(F0t,"repeat");a($0t,"isNegativeZero");G0t=u$,V0t=O0t,z0t=P0t,W0t=F0t,U0t=$0t,j0t=B0t,Mn={isNothing:G0t,isObject:V0t,toArray:z0t,repeat:W0t,isNegativeZero:U0t,extend:j0t};a(h$,"formatError");a(m0,"YAMLException$1");m0.prototype=Object.create(Error.prototype);m0.prototype.constructor=m0;m0.prototype.toString=a(function(t){return this.name+": "+h$(this,t)},"toString");ns=m0;a(Qv,"getLine");a(Zv,"padStart");a(q0t,"makeSnippet");H0t=q0t,Y0t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],X0t=["scalar","sequence","mapping"];a(K0t,"compileStyleAliases");a(Q0t,"Type$1");hi=Q0t;a(XF,"compileList");a(Z0t,"compileMap");a(t4,"Schema$1");t4.prototype.extend=a(function(t){var r=[],n=[];if(t instanceof hi)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new ns("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof hi))throw new ns("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new ns("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ns("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof hi))throw new ns("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(t4.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=XF(i,"implicit"),i.compiledExplicit=XF(i,"explicit"),i.compiledTypeMap=Z0t(i.compiledImplicit,i.compiledExplicit),i},"extend");J0t=t4,t1t=new hi("tag:yaml.org,2002:str",{kind:"scalar",construct:a(function(e){return e!==null?e:""},"construct")}),e1t=new hi("tag:yaml.org,2002:seq",{kind:"sequence",construct:a(function(e){return e!==null?e:[]},"construct")}),r1t=new hi("tag:yaml.org,2002:map",{kind:"mapping",construct:a(function(e){return e!==null?e:{}},"construct")}),n1t=new J0t({explicit:[t1t,e1t,r1t]});a(i1t,"resolveYamlNull");a(s1t,"constructYamlNull");a(a1t,"isNull");o1t=new hi("tag:yaml.org,2002:null",{kind:"scalar",resolve:i1t,construct:s1t,predicate:a1t,represent:{canonical:a(function(){return"~"},"canonical"),lowercase:a(function(){return"null"},"lowercase"),uppercase:a(function(){return"NULL"},"uppercase"),camelcase:a(function(){return"Null"},"camelcase"),empty:a(function(){return""},"empty")},defaultStyle:"lowercase"});a(l1t,"resolveYamlBoolean");a(c1t,"constructYamlBoolean");a(u1t,"isBoolean");h1t=new hi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:l1t,construct:c1t,predicate:u1t,represent:{lowercase:a(function(e){return e?"true":"false"},"lowercase"),uppercase:a(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:a(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});a(f1t,"isHexCode");a(d1t,"isOctCode");a(p1t,"isDecCode");a(m1t,"resolveYamlInteger");a(g1t,"constructYamlInteger");a(y1t,"isInteger");x1t=new hi("tag:yaml.org,2002:int",{kind:"scalar",resolve:m1t,construct:g1t,predicate:y1t,represent:{binary:a(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:a(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:a(function(e){return e.toString(10)},"decimal"),hexadecimal:a(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),b1t=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(k1t,"resolveYamlFloat");a(T1t,"constructYamlFloat");S1t=/^[-+]?[0-9]+e/;a(_1t,"representYamlFloat");a(C1t,"isFloat");w1t=new hi("tag:yaml.org,2002:float",{kind:"scalar",resolve:k1t,construct:T1t,predicate:C1t,represent:_1t,defaultStyle:"lowercase"}),f$=n1t.extend({implicit:[o1t,h1t,x1t,w1t]}),E1t=f$,d$=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),p$=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");a(v1t,"resolveYamlTimestamp");a(A1t,"constructYamlTimestamp");a(L1t,"representYamlTimestamp");R1t=new hi("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:v1t,construct:A1t,instanceOf:Date,represent:L1t});a(D1t,"resolveYamlMerge");I1t=new hi("tag:yaml.org,2002:merge",{kind:"scalar",resolve:D1t}),s4=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;a(N1t,"resolveYamlBinary");a(M1t,"constructYamlBinary");a(O1t,"representYamlBinary");a(P1t,"isBinary");B1t=new hi("tag:yaml.org,2002:binary",{kind:"scalar",resolve:N1t,construct:M1t,predicate:P1t,represent:O1t}),F1t=Object.prototype.hasOwnProperty,$1t=Object.prototype.toString;a(G1t,"resolveYamlOmap");a(V1t,"constructYamlOmap");z1t=new hi("tag:yaml.org,2002:omap",{kind:"sequence",resolve:G1t,construct:V1t}),W1t=Object.prototype.toString;a(U1t,"resolveYamlPairs");a(j1t,"constructYamlPairs");q1t=new hi("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:U1t,construct:j1t}),H1t=Object.prototype.hasOwnProperty;a(Y1t,"resolveYamlSet");a(X1t,"constructYamlSet");K1t=new hi("tag:yaml.org,2002:set",{kind:"mapping",resolve:Y1t,construct:X1t}),m$=E1t.extend({implicit:[R1t,I1t],explicit:[B1t,z1t,q1t,K1t]}),xc=Object.prototype.hasOwnProperty,ab=1,g$=2,y$=3,ob=4,Jv=1,Q1t=2,KF=3,Z1t=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,J1t=/[\x85\u2028\u2029]/,tyt=/[,\[\]\{\}]/,x$=/^(?:!|!!|![a-z\-]+!)$/i,b$=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;a(QF,"_class");a(go,"is_EOL");a(Wu,"is_WHITE_SPACE");a(is,"is_WS_OR_EOL");a(Kf,"is_FLOW_INDICATOR");a(eyt,"fromHexCode");a(ryt,"escapedHexLen");a(nyt,"fromDecimalCode");a(ZF,"simpleEscapeSequence");a(iyt,"charFromCodepoint");k$=new Array(256),T$=new Array(256);for(zu=0;zu<256;zu++)k$[zu]=ZF(zu)?1:0,T$[zu]=ZF(zu);a(syt,"State$1");a(S$,"generateError");a(me,"throwError");a(lb,"throwWarning");JF={YAML:a(function(t,r,n){var i,s,o;t.version!==null&&me(t,"duplication of %YAML directive"),n.length!==1&&me(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&me(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&me(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&lb(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:a(function(t,r,n){var i,s;n.length!==2&&me(t,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],x$.test(i)||me(t,"ill-formed tag handle (first argument) of the TAG directive"),xc.call(t.tagMap,i)&&me(t,'there is a previously declared suffix for "'+i+'" tag handle'),b$.test(s)||me(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{me(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s},"handleTagDirective")};a(yc,"captureSegment");a(t$,"mergeMappings");a(Qf,"storeMappingPair");a(a4,"readLineBreak");a(Cn,"skipSeparationSpace");a(hb,"testDocumentSeparator");a(o4,"writeFoldedLines");a(ayt,"readPlainScalar");a(oyt,"readSingleQuotedScalar");a(lyt,"readDoubleQuotedScalar");a(cyt,"readFlowCollection");a(uyt,"readBlockScalar");a(e$,"readBlockSequence");a(hyt,"readBlockMapping");a(fyt,"readTagProperty");a(dyt,"readAnchorProperty");a(pyt,"readAlias");a(Zf,"composeNode");a(myt,"readDocument");a(_$,"loadDocuments");a(gyt,"loadAll$1");a(yyt,"load$1");xyt=gyt,byt=yyt,C$={loadAll:xyt,load:byt},w$=Object.prototype.toString,E$=Object.prototype.hasOwnProperty,l4=65279,kyt=9,g0=10,Tyt=13,Syt=32,_yt=33,Cyt=34,e4=35,wyt=37,Eyt=38,vyt=39,Ayt=42,v$=44,Lyt=45,cb=58,Ryt=61,Dyt=62,Iyt=63,Nyt=64,A$=91,L$=93,Myt=96,R$=123,Oyt=124,D$=125,fi={};fi[0]="\\0";fi[7]="\\a";fi[8]="\\b";fi[9]="\\t";fi[10]="\\n";fi[11]="\\v";fi[12]="\\f";fi[13]="\\r";fi[27]="\\e";fi[34]='\\"';fi[92]="\\\\";fi[133]="\\N";fi[160]="\\_";fi[8232]="\\L";fi[8233]="\\P";Pyt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Byt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;a(Fyt,"compileStyleMap");a($yt,"encodeHex");Gyt=1,y0=2;a(Vyt,"State");a(r$,"indentString");a(r4,"generateNextLine");a(zyt,"testImplicitResolving");a(ub,"isWhitespace");a(x0,"isPrintable");a(n$,"isNsCharOrWhitespace");a(i$,"isPlainSafe");a(Wyt,"isPlainSafeFirst");a(Uyt,"isPlainSafeLast");a(p0,"codePointAt");a(I$,"needIndentIndicator");N$=1,n4=2,M$=3,O$=4,Xf=5;a(jyt,"chooseScalarStyle");a(qyt,"writeScalar");a(s$,"blockHeader");a(a$,"dropEndingNewline");a(Hyt,"foldString");a(o$,"foldLine");a(Yyt,"escapeString");a(Xyt,"writeFlowSequence");a(l$,"writeBlockSequence");a(Kyt,"writeFlowMapping");a(Qyt,"writeBlockMapping");a(c$,"detectType");a(dl,"writeNode");a(Zyt,"getDuplicateReferences");a(i4,"inspectNode");a(Jyt,"dump$1");txt=Jyt,ext={dump:txt};a(c4,"renamed");Jf=f$,td=C$.load,Fne=C$.loadAll,$ne=ext.dump,Gne=c4("safeLoad","load"),Vne=c4("safeLoadAll","loadAll"),zne=c4("safeDump","dump")});function d4(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function V$(e){ju=e}function Tr(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:a((i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Ii.caret,"$1"),r=r.replace(i,o),n},"replace"),getRegex:a(()=>new RegExp(r,t),"getRegex")};return n}function yo(e,t){if(t){if(Ii.escapeTest.test(e))return e.replace(Ii.escapeReplace,B$)}else if(Ii.escapeTestNoEncode.test(e))return e.replace(Ii.escapeReplaceNoEncode,B$);return e}function F$(e){try{e=encodeURI(e).replace(Ii.percentDecode,"%")}catch{return null}return e}function $$(e,t){let r=e.replace(Ii.findPipe,(s,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(Ii.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[l]=o;return l.length>=i.length?s.slice(i.length):s}).join(` +`)}function br(e,t){return Uu.parse(e,t)}var ju,T0,Ii,rxt,nxt,ixt,_0,sxt,p4,z$,W$,axt,m4,oxt,g4,lxt,cxt,mb,y4,uxt,U$,hxt,x4,P$,fxt,dxt,pxt,mxt,j$,gxt,gb,b4,q$,yxt,H$,xxt,bxt,kxt,Y$,Txt,Sxt,X$,_xt,Cxt,wxt,Ext,vxt,Axt,Lxt,pb,Rxt,K$,Q$,Dxt,k4,Ixt,h4,Nxt,db,b0,Mxt,B$,rd,Ba,nd,S0,Fa,ed,f4,Uu,Une,jne,qne,Hne,Yne,Xne,Kne,Z$=x(()=>{"use strict";a(d4,"_getDefaults");ju=d4();a(V$,"changeDefaults");T0={exec:a(()=>null,"exec")};a(Tr,"edit");Ii={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},rxt=/^(?:[ \t]*(?:\n|$))+/,nxt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ixt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sxt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,p4=/(?:[*+-]|\d{1,9}[.)])/,z$=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,W$=Tr(z$).replace(/bull/g,p4).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),axt=Tr(z$).replace(/bull/g,p4).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),m4=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,oxt=/^[^\n]+/,g4=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lxt=Tr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",g4).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cxt=Tr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,p4).getRegex(),mb="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y4=/|$))/,uxt=Tr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",y4).replace("tag",mb).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),U$=Tr(m4).replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mb).getRegex(),hxt=Tr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",U$).getRegex(),x4={blockquote:hxt,code:nxt,def:lxt,fences:ixt,heading:sxt,hr:_0,html:uxt,lheading:W$,list:cxt,newline:rxt,paragraph:U$,table:T0,text:oxt},P$=Tr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mb).getRegex(),fxt={...x4,lheading:axt,table:P$,paragraph:Tr(m4).replace("hr",_0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",P$).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",mb).getRegex()},dxt={...x4,html:Tr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",y4).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tr(m4).replace("hr",_0).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",W$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pxt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mxt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,j$=/^( {2,}|\\)\n(?!\s*$)/,gxt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Y$=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Txt=Tr(Y$,"u").replace(/punct/g,gb).getRegex(),Sxt=Tr(Y$,"u").replace(/punct/g,H$).getRegex(),X$="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_xt=Tr(X$,"gu").replace(/notPunctSpace/g,q$).replace(/punctSpace/g,b4).replace(/punct/g,gb).getRegex(),Cxt=Tr(X$,"gu").replace(/notPunctSpace/g,bxt).replace(/punctSpace/g,xxt).replace(/punct/g,H$).getRegex(),wxt=Tr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,q$).replace(/punctSpace/g,b4).replace(/punct/g,gb).getRegex(),Ext=Tr(/\\(punct)/,"gu").replace(/punct/g,gb).getRegex(),vxt=Tr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Axt=Tr(y4).replace("(?:-->|$)","-->").getRegex(),Lxt=Tr("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Axt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),pb=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Rxt=Tr(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",pb).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),K$=Tr(/^!?\[(label)\]\[(ref)\]/).replace("label",pb).replace("ref",g4).getRegex(),Q$=Tr(/^!?\[(ref)\](?:\[\])?/).replace("ref",g4).getRegex(),Dxt=Tr("reflink|nolink(?!\\()","g").replace("reflink",K$).replace("nolink",Q$).getRegex(),k4={_backpedal:T0,anyPunctuation:Ext,autolink:vxt,blockSkip:kxt,br:j$,code:mxt,del:T0,emStrongLDelim:Txt,emStrongRDelimAst:_xt,emStrongRDelimUnd:wxt,escape:pxt,link:Rxt,nolink:Q$,punctuation:yxt,reflink:K$,reflinkSearch:Dxt,tag:Lxt,text:gxt,url:T0},Ixt={...k4,link:Tr(/^!?\[(label)\]\((.*?)\)/).replace("label",pb).getRegex(),reflink:Tr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",pb).getRegex()},h4={...k4,emStrongRDelimAst:Cxt,emStrongLDelim:Sxt,url:Tr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},B$=a(e=>Mxt[e],"getEscapeReplacement");a(yo,"escape");a(F$,"cleanUrl");a($$,"splitCells");a(k0,"rtrim");a(Oxt,"findClosingBracket");a(G$,"outputLink");a(Pxt,"indentCodeCompensation");rd=class{static{a(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||ju}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:k0(n,` +`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=Pxt(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=k0(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:k0(r[0],` +`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=k0(r[0],` +`).split(` +`),i="",s="",o=[];for(;n.length>0;){let l=!1,u=[],h;for(h=0;h1,s={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),l=!1;for(;t;){let h=!1,f="",d="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;f=r[0],t=t.substring(f.length);let p=r[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,T=>" ".repeat(3*T.length)),m=t.split(` +`,1)[0],g=!p.trim(),y=0;if(this.options.pedantic?(y=2,d=p.trimStart()):g?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=p.slice(y),y+=r[1].length),g&&this.rules.other.blankLine.test(m)&&(f+=m+` +`,t=t.substring(m.length+1),h=!0),!h){let T=this.rules.other.nextBulletRegex(y),_=this.rules.other.hrRegex(y),L=this.rules.other.fencesBeginRegex(y),C=this.rules.other.headingBeginRegex(y),D=this.rules.other.htmlBeginRegex(y);for(;t;){let $=t.split(` +`,1)[0],w;if(m=$,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),w=m):w=m.replace(this.rules.other.tabCharGlobal," "),L.test(m)||C.test(m)||D.test(m)||T.test(m)||_.test(m))break;if(w.search(this.rules.other.nonSpaceChar)>=y||!m.trim())d+=` +`+w.slice(y);else{if(g||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(p)||C.test(p)||_.test(p))break;d+=` +`+m}!g&&!m.trim()&&(g=!0),f+=$+` +`,t=t.substring($.length+1),p=w.slice(y)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0));let b=null,k;this.options.gfm&&(b=this.rules.other.listIsTask.exec(d),b&&(k=b[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:f,task:!!b,checked:k,loose:!1,text:d,tokens:[]}),s.raw+=f}let u=s.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;hp.type==="space"),d=f.length>0&&f.some(p=>this.rules.other.anyLine.test(p.raw));s.loose=d}if(s.loose)for(let h=0;h({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=k0(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=Oxt(r[2],"()");if(o>-1){let u=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,u).trim(),r[3]=""}}let i=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),G$(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[i.toLowerCase()];if(!s){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return G$(n,s,n[0],this.lexer,this.rules)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let o=[...i[0]].length-1,l,u,h=o,f=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*t.length+o);(i=d.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(u=[...l].length,i[3]||i[4]){h+=u;continue}else if((i[5]||i[6])&&o%3&&!((o+u)%3)){f+=u;continue}if(h-=u,h>0)continue;u=Math.min(u,u+h+f);let p=[...i[0]][0].length,m=t.slice(0,o+i.index+p+u);if(Math.min(o,u)%2){let y=m.slice(1,-1);return{type:"em",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},Ba=class e{static{a(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ju,this.options.tokenizer=this.options.tokenizer||new rd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ii,block:db.normal,inline:b0.normal};this.options.pedantic?(r.block=db.pedantic,r.inline=b0.pedantic):this.options.gfm&&(r.block=db.gfm,this.options.breaks?r.inline=b0.breaks:r.inline=b0.gfm),this.tokenizer.rules=r}static get rules(){return{block:db,inline:b0}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(t){t=t.replace(Ii.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=` +`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` +`+i.raw,o.text+=` +`+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=` +`+i.raw,o.text+=` +`+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=` +`+i.raw,o.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),n=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=` +`+i.raw,o.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let h=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},nd=class{static{a(this,"_Renderer")}options;parser;constructor(t){this.options=t||ju}space(t){return""}code({text:t,lang:r,escaped:n}){let i=(r||"").match(Ii.notSpaceStart)?.[0],s=t.replace(Ii.endingNewline,"")+` +`;return i?'
'+(n?s:yo(s,!0))+`
+`:"
"+(n?s:yo(s,!0))+`
+`}blockquote({tokens:t}){return`
+${this.parser.parse(t)}
+`}html({text:t}){return t}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
+`}list(t){let r=t.ordered,n=t.start,i="";for(let l=0;l +`+i+" +`}listitem(t){let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+yo(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",n="";for(let s=0;s${i}`),` + +`+r+` +`+i+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${yo(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:n}){let i=this.parser.parseInline(n),s=F$(t);if(s===null)return i;t=s;let o='
    ",o}image({href:t,title:r,text:n}){let i=F$(t);if(i===null)return yo(n);t=i;let s=`${n}{let l=s[o].flat(1/0);n=n.concat(this.walkTokens(l,r))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...l){let u=s.renderer.apply(this,l);return u===!1&&(u=o.apply(this,l)),u}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),i.extensions=r),n.renderer){let s=this.defaults.renderer||new nd(this.defaults);for(let o in n.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,u=n.renderer[l],h=s[l];s[l]=(...f)=>{let d=u.apply(s,f);return d===!1&&(d=h.apply(s,f)),d||""}}i.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new rd(this.defaults);for(let o in n.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,u=n.tokenizer[l],h=s[l];s[l]=(...f)=>{let d=u.apply(s,f);return d===!1&&(d=h.apply(s,f)),d}}i.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new ed;for(let o in n.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let l=o,u=n.hooks[l],h=s[l];ed.passThroughHooks.has(o)?s[l]=f=>{if(this.defaults.async)return Promise.resolve(u.call(s,f)).then(p=>h.call(s,p));let d=u.call(s,f);return h.call(s,d)}:s[l]=(...f)=>{let d=u.apply(s,f);return d===!1&&(d=h.apply(s,f)),d}}i.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(l){let u=[];return u.push(o.call(this,l)),s&&(u=u.concat(s.call(this,l))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ba.lex(t,r??this.defaults)}parser(t,r){return Fa.parse(t,r??this.defaults)}parseMarkdown(t){return a((n,i)=>{let s={...i},o={...this.defaults,...s},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let u=o.hooks?o.hooks.provideLexer():t?Ba.lex:Ba.lexInline,h=o.hooks?o.hooks.provideParser():t?Fa.parse:Fa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>h(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let f=u(n,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let d=h(f,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(f){return l(f)}},"parse")}onError(t,r){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let i="

    An error occurred:

    "+yo(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Uu=new f4;a(br,"marked");br.options=br.setOptions=function(e){return Uu.setOptions(e),br.defaults=Uu.defaults,V$(br.defaults),br};br.getDefaults=d4;br.defaults=ju;br.use=function(...e){return Uu.use(...e),br.defaults=Uu.defaults,V$(br.defaults),br};br.walkTokens=function(e,t){return Uu.walkTokens(e,t)};br.parseInline=Uu.parseInline;br.Parser=Fa;br.parser=Fa.parse;br.Renderer=nd;br.TextRenderer=S0;br.Lexer=Ba;br.lexer=Ba.lex;br.Tokenizer=rd;br.Hooks=ed;br.parse=br;Une=br.options,jne=br.setOptions,qne=br.use,Hne=br.walkTokens,Yne=br.parseInline,Xne=Fa.parse,Kne=Ba.lex});function Bxt(e,{markdownAutoWrap:t}){let n=e.replace(//g,` +`).replace(/\n{2,}/g,` +`),i=Zy(n);return t===!1?i.replace(/ /g," "):i}function J$(e,t={}){let r=Bxt(e,t),n=br.lexer(r),i=[[]],s=0;function o(l,u="normal"){l.type==="text"?l.text.split(` +`).forEach((f,d)=>{d!==0&&(s++,i.push([])),f.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&i[s].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&i[s].push({content:l.text,type:"normal"})}return a(o,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"&&i[s].push({content:l.text,type:"normal"})}),i}function tG(e,{markdownAutoWrap:t}={}){let r=br.lexer(e);function n(i){return i.type==="text"?t===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

    ${i.tokens?.map(n).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return a(n,"output"),r.map(n).join("")}var eG=x(()=>{"use strict";Z$();bC();a(Bxt,"preprocessMarkdown");a(J$,"markdownToLines");a(tG,"markdownToHTML")});function Fxt(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function $xt(e,t){let r=Fxt(t.content);return rG(e,[],r,t.type)}function rG(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];let[i,...s]=r,o=[...t,i];return e([{content:o.join(""),type:n}])?rG(e,o,s,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function nG(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return T4(e,t)}function T4(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());let s=e.shift()??{content:" ",type:"normal"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(s),t(o))return T4(e,t,r,o);if(n.length>0)r.push(n),e.unshift(s);else if(s.content){let[l,u]=$xt(t,s);r.push([l]),u.content&&e.unshift(u)}return T4(e,t,r)}var iG=x(()=>{"use strict";a(Fxt,"splitTextToChars");a($xt,"splitWordToFitWidth");a(rG,"splitWordToFitWidthRecursion");a(nG,"splitLineToFitWidth");a(T4,"splitLineToFitWidthRecursion")});function sG(e,t){t&&e.attr("style",t)}async function Gxt(e,t,r,n,i=!1){let s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);let o=s.append("xhtml:div"),l=t.label;t.label&&Tn(t.label)&&(l=await jl(t.label.replace(Rt.lineBreakRegex,` +`),Y()));let u=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),sG(h,t.labelStyle),h.attr("class",`${u} ${n}`),sG(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let f=o.node().getBoundingClientRect();return f.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),f=o.node().getBoundingClientRect()),s.node()}function S4(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function Vxt(e,t,r){let n=e.append("text"),i=S4(n,1,t);_4(i,r);let s=i.node().getComputedTextLength();return n.remove(),s}function aG(e,t,r){let n=e.append("text"),i=S4(n,1,t);_4(i,[{content:r,type:"normal"}]);let s=i.node()?.getBoundingClientRect();return s&&n.remove(),s}function zxt(e,t,r,n=!1){let s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=a(p=>Vxt(s,1.1,p)<=e,"checkWidth"),d=f(h)?[h]:nG(h,f);for(let p of d){let m=S4(l,u,1.1);_4(m,p),u++}}if(n){let h=l.node().getBBox(),f=2;return o.attr("x",h.x-f).attr("y",h.y-f).attr("width",h.width+2*f).attr("height",h.height+2*f),s.node()}else return l.node()}function _4(e,t){e.text(""),t.forEach((r,n)=>{let i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}function C4(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}var Xn,$a=x(()=>{"use strict";pe();Fe();$e();zt();eG();Ee();iG();a(sG,"applyStyle");a(Gxt,"addHtmlSpan");a(S4,"createTspan");a(Vxt,"computeWidthOfText");a(aG,"computeDimensionOfText");a(zxt,"createFormattedText");a(_4,"updateTextContentAndStyles");a(C4,"replaceIconSubstring");Xn=a(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:s=!0,isNode:o=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(P.debug("XYZ createText",t,r,n,i,s,o,"addSvgBackground: ",u),s){let f=tG(t,h),d=C4(Yn(f)),p=t.replace(/\\\\/g,"\\"),m={isNode:o,label:Tn(t)?p:d,labelStyle:r.replace("fill:","color:")};return await Gxt(e,m,l,i,u)}else{let f=t.replace(//g,"
    "),d=J$(f.replace("
    ","
    "),h),p=zxt(l,e,d,t?u:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");xt(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");xt(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");xt(p).select("text").attr("style",g)}return p}},"createText")});function fe(e){let t=e.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Js(e,t,r,n,i,s){let o=[],u=r-e,h=n-t,f=u/s,d=2*Math.PI/f,p=t+h/2;for(let m=0;m<=50;m++){let g=m/50,y=e+g*u,b=p+i*Math.sin(d*(y-e));o.push({x:y,y:b})}return o}function xb(e,t,r,n,i,s){let o=[],l=i*Math.PI/180,f=(s*Math.PI/180-l)/(n-1);for(let d=0;d{"use strict";$a();pe();$e();zs();Fe();Ee();Gt=a(async(e,t,r)=>{let n,i=t.useHtmlLabels||Ne(Y()?.htmlLabels);r?n=r:n="node default";let s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",qr(t.labelStyle)),l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];let u=await Xn(o,er(Yn(l),Y()),{useHtmlLabels:i,width:t.width||Y().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img}),h=u.getBBox(),f=(t?.padding??0)/2;if(i){let d=u.children[0],p=xt(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(b=>{function k(){if(y.style.display="flex",y.style.flexDirection="column",g){let T=Y().fontSize?Y().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[L=We.fontSize]=mo(T),C=L*_+"px";y.style.minWidth=C,y.style.maxWidth=C}else y.style.width="100%";b(y)}a(k,"setupImage"),setTimeout(()=>{y.complete&&k()}),y.addEventListener("error",k),y.addEventListener("load",k)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:f,label:o}},"labelHelper"),yb=a(async(e,t,r)=>{let n=r.useHtmlLabels||Ne(Y()?.flowchart?.htmlLabels),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await Xn(i,er(Yn(t),Y()),{useHtmlLabels:n,width:r.width||Y()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=s.getBBox(),l=r.padding/2;if(Ne(Y()?.flowchart?.htmlLabels)){let u=s.children[0],h=xt(s);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}return n?i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):i.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:l,label:i}},"insertLabel"),Ct=a((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),Ft=a((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");a(fe,"createPathFromPoints");a(Js,"generateFullSineWavePoints");a(xb,"generateCirclePoints")});function Wxt(e,t){return e.intersect(t)}var oG,lG=x(()=>{"use strict";a(Wxt,"intersectNode");oG=Wxt});function Uxt(e,t,r,n){var i=e.x,s=e.y,o=i-n.x,l=s-n.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);n.x{"use strict";a(Uxt,"intersectEllipse");bb=Uxt});function jxt(e,t,r){return bb(e,t,t,r)}var cG,uG=x(()=>{"use strict";w4();a(jxt,"intersectCircle");cG=jxt});function qxt(e,t,r,n){var i,s,o,l,u,h,f,d,p,m,g,y,b,k,T;if(i=t.y-e.y,o=e.x-t.x,u=t.x*e.y-e.x*t.y,p=i*r.x+o*r.y+u,m=i*n.x+o*n.y+u,!(p!==0&&m!==0&&hG(p,m))&&(s=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=s*e.x+l*e.y+h,d=s*t.x+l*t.y+h,!(f!==0&&d!==0&&hG(f,d))&&(g=i*l-s*o,g!==0)))return y=Math.abs(g/2),b=o*h-l*u,k=b<0?(b-y)/g:(b+y)/g,b=s*u-i*h,T=b<0?(b-y)/g:(b+y)/g,{x:k,y:T}}function hG(e,t){return e*t>0}var fG,dG=x(()=>{"use strict";a(qxt,"intersectLine");a(hG,"sameSign");fG=qxt});function Hxt(e,t,r){let n=e.x,i=e.y,s=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(f){o=Math.min(o,f.x),l=Math.min(l,f.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let u=n-e.width/2-o,h=i-e.height/2-l;for(let f=0;f1&&s.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,b=d.y-r.y,k=Math.sqrt(y*y+b*b);return g{"use strict";dG();a(Hxt,"intersectPolygon");pG=Hxt});var Yxt,bc,E4=x(()=>{"use strict";Yxt=a((e,t)=>{var r=e.x,n=e.y,i=t.x-r,s=t.y-n,o=e.width/2,l=e.height/2,u,h;return Math.abs(s)*o>Math.abs(i)*l?(s<0&&(l=-l),u=s===0?0:l*i/s,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*s/i),{x:r+u,y:n+h}},"intersectRect"),bc=Yxt});var St,le=x(()=>{"use strict";lG();uG();w4();mG();E4();St={node:oG,circle:cG,ellipse:bb,polygon:pG,rect:bc}});var gG,xo,Xxt,v4,At,Et,oe=x(()=>{"use strict";pe();gG=a(e=>{let{handDrawnSeed:t}=Y();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),xo=a(e=>{let t=Xxt([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Xxt=a(e=>{let t=new Map;return e.forEach(r=>{let[n,i]=r.split(":");t.set(n.trim(),i?.trim())}),t},"styles2Map"),v4=a(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),At=a(e=>{let{stylesArray:t}=xo(e),r=[],n=[],i=[],s=[];return t.forEach(o=>{let l=o[0];v4(l)?r.push(o.join(":")+" !important"):(n.push(o.join(":")+" !important"),l.includes("stroke")&&i.push(o.join(":")+" !important"),l==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:s}},"styles2String"),Et=a((e,t)=>{let{themeVariables:r,handDrawnSeed:n}=Y(),{nodeBorder:i,mainBkg:s}=r,{stylesMap:o}=xo(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||i,seed:n,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides")});function A4(e,t,r){if(e&&e.length){let[n,i]=t,s=Math.PI/180*r,o=Math.cos(s),l=Math.sin(s);for(let u of e){let[h,f]=u;u[0]=(h-n)*o-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*o+i}}}function Kxt(e,t){return e[0]===t[0]&&e[1]===t[1]}function Qxt(e,t,r,n=1){let i=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(i)for(let h of o)A4(h,l,i);let u=function(h,f,d){let p=[];for(let T of h){let _=[...T];Kxt(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&p.push(_)}let m=[];f=Math.max(f,.1);let g=[];for(let T of p)for(let _=0;_T.ymin<_.ymin?-1:T.ymin>_.ymin?1:T.x<_.x?-1:T.x>_.x?1:T.ymax===_.ymax?0:(T.ymax-_.ymax)/Math.abs(T.ymax-_.ymax)),!g.length)return m;let y=[],b=g[0].ymin,k=0;for(;y.length||g.length;){if(g.length){let T=-1;for(let _=0;_b);_++)T=_;g.splice(0,T+1).forEach(_=>{y.push({s:b,edge:_})})}if(y=y.filter(T=>!(T.edge.ymax<=b)),y.sort((T,_)=>T.edge.x===_.edge.x?0:(T.edge.x-_.edge.x)/Math.abs(T.edge.x-_.edge.x)),(d!==1||k%f==0)&&y.length>1)for(let T=0;T=y.length)break;let L=y[T].edge,C=y[_].edge;m.push([[Math.round(L.x),b],[Math.round(C.x),b]])}b+=d,y.forEach(T=>{T.edge.x=T.edge.x+d*T.edge.islope}),k++}return m}(o,s,n);if(i){for(let h of o)A4(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),A4(p,f,d)})(u,l,-i)}return u}function v0(e,t){var r;let n=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=i),Qxt(e,i,n,s||1)}function Ab(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function R4(e,t){return e.type===t}function U4(e){let t=[],r=function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:Zxt,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:L4,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:yG,text:""},l}(e),n="BOD",i=0,s=r[i];for(;!R4(s,yG);){let o=0,l=[];if(n==="BOD"){if(s.text!=="M"&&s.text!=="m")return U4("M0,0"+e);i++,o=kb[s.text],n=s.text}else R4(s,L4)?o=kb[n]:(i++,o=kb[s.text],n=s.text);if(!(i+of%2?h+r:h+t);s.push({key:"C",data:u}),t=u[4],r=u[5];break}case"Q":s.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{let u=l.map((h,f)=>f%2?h+r:h+t);s.push({key:"Q",data:u}),t=u[2],r=u[3];break}case"A":s.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],s.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":s.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{let u=l.map((h,f)=>f%2?h+r:h+t);s.push({key:"S",data:u}),t=u[2],r=u[3];break}case"T":s.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=n,r=i}return s}function EG(e){let t=[],r="",n=0,i=0,s=0,o=0,l=0,u=0;for(let{key:h,data:f}of e){switch(h){case"M":t.push({key:"M",data:[...f]}),[n,i]=f,[s,o]=f;break;case"C":t.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":t.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],t.push({key:"L",data:[n,i]});break;case"V":i=f[0],t.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),t.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,b=i+2*(g-i)/3,k=d+2*(m-d)/3,T=p+2*(g-p)/3;t.push({key:"C",data:[y,b,k,T,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,b=i+2*(p-i)/3,k=m+2*(d-m)/3,T=g+2*(p-g)/3;t.push({key:"C",data:[y,b,k,T,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],b=f[5],k=f[6];d===0||p===0?(t.push({key:"C",data:[n,i,b,k,b,k]}),n=b,i=k):(n!==b||i!==k)&&(vG(n,i,b,k,d,p,m,g,y).forEach(function(T){t.push({key:"C",data:T})}),n=b,i=k);break}case"Z":t.push({key:"Z",data:[]}),n=s,i=o}r=h}return t}function C0(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function vG(e,t,r,n,i,s,o,l,u,h){let f=(d=o,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,b=0;if(h)[m,g,y,b]=h;else{[e,t]=C0(e,t,-f),[r,n]=C0(r,n,-f);let R=(e-r)/2,B=(t-n)/2,I=R*R/(i*i)+B*B/(s*s);I>1&&(I=Math.sqrt(I),i*=I,s*=I);let M=i*i,O=s*s,N=M*O-M*B*B-O*R*R,E=M*B*B+O*R*R,V=(l===u?-1:1)*Math.sqrt(Math.abs(N/E));y=V*i*B/s+(e+r)/2,b=V*-s*R/i+(t+n)/2,m=Math.asin(parseFloat(((t-b)/s).toFixed(9))),g=Math.asin(parseFloat(((n-b)/s).toFixed(9))),eg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let k=g-m;if(Math.abs(k)>120*Math.PI/180){let R=g,B=r,I=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=vG(r=y+i*Math.cos(g),n=b+s*Math.sin(g),B,I,i,s,o,0,u,[g,R,y,b])}k=g-m;let T=Math.cos(m),_=Math.sin(m),L=Math.cos(g),C=Math.sin(g),D=Math.tan(k/4),$=4/3*i*D,w=4/3*s*D,A=[e,t],F=[e+$*_,t-w*T],S=[r+$*C,n-w*L],v=[r,n];if(F[0]=2*A[0]-F[0],F[1]=2*A[1]-F[1],h)return[F,S,v].concat(p);{p=[F,S,v].concat(p);let R=[];for(let B=0;B2){let i=[];for(let s=0;s2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,b=Math.min(y/2,(g-m)/2),k=_G(b,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let T=_G(b,h,f,d,p,m,g,1.5,u);k.push(...T)}return o&&(l?k.push(...kc(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...kc(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):k.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:k}}function kG(e,t){let r=EG(wG(U4(e))),n=[],i=[0,0],s=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":s=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...kc(s[0],s[1],l[0],l[1],t)),s=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...e2t(u,h,f,d,p,m,s,t)),s=[p,m];break}case"Z":n.push(...kc(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:n}}function D4(e,t){let r=[];for(let n of e)if(n.length){let i=t.maxRandomnessOffset||0,s=n.length;if(s>2){r.push({op:"move",data:[n[0][0]+_e(i,t),n[0][1]+_e(i,t)]});for(let o=1;o500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*RG(i),m=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;m=_e(m,i,h),g=_e(g,i,h);let y=[],b=a(()=>_e(d,i,h),"M"),k=a(()=>_e(f,i,h),"k"),T=i.preserveVertices;return s&&(o?y.push({op:"move",data:[e+(T?0:b()),t+(T?0:b())]}):y.push({op:"move",data:[e+(T?0:_e(f,i,h)),t+(T?0:_e(f,i,h))]})),o?y.push({op:"bcurveTo",data:[m+e+(r-e)*p+b(),g+t+(n-t)*p+b(),m+e+2*(r-e)*p+b(),g+t+2*(n-t)*p+b(),r+(T?0:b()),n+(T?0:b())]}):y.push({op:"bcurveTo",data:[m+e+(r-e)*p+k(),g+t+(n-t)*p+k(),m+e+2*(r-e)*p+k(),g+t+2*(n-t)*p+k(),r+(T?0:k()),n+(T?0:k())]}),y}function Tb(e,t,r){if(!e.length)return[];let n=[];n.push([e[0][0]+_e(t,r),e[0][1]+_e(t,r)]),n.push([e[0][0]+_e(t,r),e[0][1]+_e(t,r)]);for(let i=1;i3){let s=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+21&&i.push(l)):i.push(l),i.push(e[t+3])}else{let u=e[t+0],h=e[t+1],f=e[t+2],d=e[t+3],p=qu(u,h,.5),m=qu(h,f,.5),g=qu(f,d,.5),y=qu(p,m,.5),b=qu(m,g,.5),k=qu(y,b,.5);V4([u,p,y,k],0,r,i),V4([k,b,g,d],0,r,i)}var s,o;return i}function n2t(e,t){return vb(e,0,e.length,t)}function vb(e,t,r,n,i){let s=i||[],o=e[t],l=e[r-1],u=0,h=1;for(let f=t+1;fu&&(u=d,h=f)}return Math.sqrt(u)>n?(vb(e,t,h+1,n,s),vb(e,h,r,n,s)):(s.length||s.push(o),s.push(l)),s}function I4(e,t=.15,r){let n=[],i=(e.length-1)/3;for(let s=0;s0?vb(n,0,n.length,r):n}var E0,N4,M4,O4,P4,B4,ss,F4,Zxt,L4,yG,kb,Jxt,Es,sd,z4,Sb,W4,_t,ce=x(()=>{"use strict";a(A4,"t");a(Kxt,"e");a(Qxt,"s");a(v0,"n");E0=class{static{a(this,"o")}constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let n=v0(t,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(t,r){let n=[];for(let i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};a(Ab,"a");N4=class extends E0{static{a(this,"h")}fillPolygons(t,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=v0(t,Object.assign({},r,{hachureGap:n})),s=Math.PI/180*r.hachureAngle,o=[],l=.5*n*Math.cos(s),u=.5*n*Math.sin(s);for(let[h,f]of i)Ab([h,f])&&o.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},M4=class extends E0{static{a(this,"r")}fillPolygons(t,r){let n=this._fillPolygons(t,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,i);return n.ops=n.ops.concat(s.ops),n}},O4=class{static{a(this,"i")}constructor(t){this.helper=t}fillPolygons(t,r){let n=v0(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(t,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);let o=i/4;for(let l of t){let u=Ab(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=Ab(o),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=o[0],d=o[1];f[0]>d[0]&&(f=o[1],d=o[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m{let o=Ab(s),l=Math.round(o/(2*r)),u=s[0],h=s[1];u[0]>h[0]&&(u=s[1],h=s[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d2*Math.PI&&($=0,w=2*Math.PI);let A=(w-$)/T.curveStepCount,F=[];for(let S=$;S<=w;S+=A)F.push([_+C*Math.cos(S),L+D*Math.sin(S)]);return F.push([_+C*Math.cos(w),L+D*Math.sin(w)]),F.push([_,L]),id([F],T)}(t,r,n,i,s,o,h));return h.stroke!==Es&&f.push(d),this._d("arc",f,h)}curve(t,r){let n=this._o(r),i=[],s=xG(t,n);if(n.fill&&n.fill!==Es)if(n.fillStyle==="solid"){let o=xG(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=t;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...I4(CG([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):o.push(...I4(CG(h),10,(1+n.roughness)/2))}o.length&&i.push(id([o],n))}return n.stroke!==Es&&i.push(s),this._d("curve",i,n)}polygon(t,r){let n=this._o(r),i=[],s=_b(t,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(D4([t],n)):i.push(id([t],n))),n.stroke!==Es&&i.push(s),this._d("polygon",i,n)}path(t,r){let n=this._o(r),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let s=n.fill&&n.fill!=="transparent"&&n.fill!==Es,o=n.stroke!==Es,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=EG(wG(U4(f))),g=[],y=[],b=[0,0],k=[],T=a(()=>{k.length>=4&&y.push(...I4(k,d)),k=[]},"i"),_=a(()=>{T(),y.length&&(g.push(y),y=[])},"c");for(let{key:C,data:D}of m)switch(C){case"M":_(),b=[D[0],D[1]],y.push(b);break;case"L":T(),y.push([D[0],D[1]]);break;case"C":if(!k.length){let $=y.length?y[y.length-1]:b;k.push([$[0],$[1]])}k.push([D[0],D[1]]),k.push([D[2],D[3]]),k.push([D[4],D[5]]);break;case"Z":T(),y.push([b[0],b[1]])}if(_(),!p)return g;let L=[];for(let C of g){let D=n2t(C,p);D.length&&L.push(D)}return L}(t,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=kG(t,n);if(s)if(n.fillStyle==="solid")if(u.length===1){let f=kG(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else i.push(D4(u,n));else i.push(id(u,n));return o&&(l?u.forEach(f=>{i.push(_b(f,!1,n))}):i.push(h)),this._d("path",i,n)}opsToPath(t,r){let n="";for(let i of t.ops){let s=typeof r=="number"&&r>=0?i.data.map(o=>+o.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":n+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":n+=`L${s[0]} ${s[1]} `}}return n.trim()}toPaths(t){let r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(let s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Es};break;case"fillPath":o={d:this.opsToPath(s),stroke:Es,strokeWidth:0,fill:n.fill||Es};break;case"fillSketch":o=this.fillSketch(s,n)}o&&i.push(o)}return i}fillSketch(t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Es,strokeWidth:n,fill:Es}}_mergedShape(t){return t.filter((r,n)=>n===0||r.op!=="move")}},z4=class{static{a(this,"st")}constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new sd(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,o,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,s,l),i.restore();break}case"fillSketch":this.fillSketch(i,o,n)}}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=i,this._drawToContext(t,r,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,n,i="nonzero"){t.beginPath();for(let s of r.ops){let o=typeof n=="number"&&n>=0?s.data.map(l=>+l.toFixed(n)):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,n,i,s){let o=this.gen.line(t,r,n,i,s);return this.draw(o),o}rectangle(t,r,n,i,s){let o=this.gen.rectangle(t,r,n,i,s);return this.draw(o),o}ellipse(t,r,n,i,s){let o=this.gen.ellipse(t,r,n,i,s);return this.draw(o),o}circle(t,r,n,i){let s=this.gen.circle(t,r,n,i);return this.draw(s),s}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n),n}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n),n}arc(t,r,n,i,s,o,l=!1,u){let h=this.gen.arc(t,r,n,i,s,o,l,u);return this.draw(h),h}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n),n}path(t,r){let n=this.gen.path(t,r);return this.draw(n),n}},Sb="http://www.w3.org/2000/svg",W4=class{static{a(this,"ot")}constructor(t,r){this.svg=t,this.gen=new sd(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(Sb,"g"),o=t.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(Sb,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(Sb,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&s.appendChild(u)}return s}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let s=t.createElementNS(Sb,"path");return s.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),s.setAttribute("stroke",n.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),n.fillLineDash&&s.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,n,i,s){let o=this.gen.line(t,r,n,i,s);return this.draw(o)}rectangle(t,r,n,i,s){let o=this.gen.rectangle(t,r,n,i,s);return this.draw(o)}ellipse(t,r,n,i,s){let o=this.gen.ellipse(t,r,n,i,s);return this.draw(o)}circle(t,r,n,i){let s=this.gen.circle(t,r,n,i);return this.draw(s)}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n)}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n)}arc(t,r,n,i,s,o,l=!1,u){let h=this.gen.arc(t,r,n,i,s,o,l,u);return this.draw(h)}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n)}path(t,r){let n=this.gen.path(t,r);return this.draw(n)}},_t={canvas:a((e,t)=>new z4(e,t),"canvas"),svg:a((e,t)=>new W4(e,t),"svg"),generator:a(e=>new sd(e),"generator"),newSeed:a(()=>sd.newSeed(),"newSeed")}});function DG(e,t){let{labelStyles:r}=At(t);t.labelStyle=r;let n=Ft(t),i=n;n||(i="anchor");let s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=1,{cssStyles:l}=t,u=_t.svg(s),h=Et(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let f=u.circle(0,0,o*2,h),d=s.insert(()=>f,":first-child");return d.attr("class","anchor").attr("style",qr(l)),Ct(t,d),t.intersect=function(p){return P.info("Circle intersect",t,o,p),St.circle(t,o,p)},s}var IG=x(()=>{"use strict";zt();re();le();oe();ce();Ee();a(DG,"anchor")});function NG(e,t,r,n,i,s,o){let u=(e+r)/2,h=(t+n)/2,f=Math.atan2(n-t,r-e),d=(r-e)/2,p=(n-t)/2,m=d/i,g=p/s,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let b=Math.sqrt(1-y**2),k=u+b*s*Math.sin(f)*(o?-1:1),T=h-b*i*Math.cos(f)*(o?-1:1),_=Math.atan2((t-T)/s,(e-k)/i),C=Math.atan2((n-T)/s,(r-k)/i)-_;o&&C<0&&(C+=2*Math.PI),!o&&C>0&&(C-=2*Math.PI);let D=[];for(let $=0;$<20;$++){let w=$/19,A=_+w*C,F=k+i*Math.cos(A),S=T+s*Math.sin(A);D.push({x:F,y:S})}return D}async function MG(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=s.width+t.padding+20,l=s.height+t.padding,u=l/2,h=u/(2.5+l/50),{cssStyles:f}=t,d=[{x:o/2,y:-l/2},{x:-o/2,y:-l/2},...NG(-o/2,-l/2,-o/2,l/2,h,u,!1),{x:o/2,y:l/2},...NG(o/2,l/2,o/2,-l/2,h,u,!0)],p=_t.svg(i),m=Et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=fe(d),y=p.path(g,m),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${h/2}, 0)`),Ct(t,b),t.intersect=function(k){return St.polygon(t,d,k)},i}var OG=x(()=>{"use strict";re();le();oe();ce();a(NG,"generateArcPoints");a(MG,"bowTieRect")});function di(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var pl=x(()=>{"use strict";a(di,"insertPolygonShape")});async function PG(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=s.height+t.padding,l=12,u=s.width+t.padding+l,h=0,f=u,d=-o,p=0,m=[{x:h+l,y:d},{x:f,y:d},{x:f,y:p},{x:h,y:p},{x:h,y:d+l},{x:h+l,y:d}],g,{cssStyles:y}=t;if(t.look==="handDrawn"){let b=_t.svg(i),k=Et(t,{}),T=fe(m),_=b.path(T,k);g=i.insert(()=>_,":first-child").attr("transform",`translate(${-u/2}, ${o/2})`),y&&g.attr("style",y)}else g=di(i,u,o,m);return n&&g.attr("style",n),Ct(t,g),t.intersect=function(b){return St.polygon(t,m,b)},i}var BG=x(()=>{"use strict";re();le();oe();ce();pl();re();a(PG,"card")});function FG(e,t){let{nodeStyles:r}=At(t);t.label="";let n=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=_t.svg(n),u=Et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=fe(o),f=l.path(h,u),d=n.insert(()=>f,":first-child");return i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return St.polygon(t,o,p)},n}var $G=x(()=>{"use strict";le();ce();oe();re();a(FG,"choice")});async function GG(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,halfPadding:o}=await Gt(e,t,Ft(t)),l=s.width/2+o,u,{cssStyles:h}=t;if(t.look==="handDrawn"){let f=_t.svg(i),d=Et(t,{}),p=f.circle(0,0,l*2,d);u=i.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",qr(h))}else u=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0);return Ct(t,u),t.intersect=function(f){return P.info("Circle intersect",t,l,f),St.circle(t,l,f)},i}var VG=x(()=>{"use strict";zt();re();le();oe();ce();Ee();a(GG,"circle")});function i2t(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=e*2,i={x:n/2*t,y:n/2*r},s={x:-(n/2)*t,y:n/2*r},o={x:-(n/2)*t,y:-(n/2)*r},l={x:n/2*t,y:-(n/2)*r};return`M ${s.x},${s.y} L ${l.x},${l.y} + M ${i.x},${i.y} L ${o.x},${o.y}`}function zG(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,l=_t.svg(i),u=Et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,s*2,u),f=i2t(s),d=l.path(f,u),p=i.insert(()=>h,":first-child");return p.insert(()=>d),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Ct(t,p),t.intersect=function(m){return P.info("crossedCircle intersect",t,{radius:s,point:m}),St.circle(t,s,m)},i}var WG=x(()=>{"use strict";zt();re();oe();ce();le();a(i2t,"createLine");a(zG,"crossedCircle")});function Tc(e,t,r,n=100,i=0,s=180){let o=[],l=i*Math.PI/180,f=(s*Math.PI/180-l)/(n-1);for(let d=0;d_,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${h}, 0)`),o.attr("transform",`translate(${-l/2+h-(s.x-(s.left??0))},${-u/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Ct(t,L),t.intersect=function(C){return St.polygon(t,p,C)},i}var jG=x(()=>{"use strict";re();le();oe();ce();a(Tc,"generateCirclePoints");a(UG,"curlyBraceLeft")});function Sc(e,t,r,n=100,i=0,s=180){let o=[],l=i*Math.PI/180,f=(s*Math.PI/180-l)/(n-1);for(let d=0;d_,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(${-h}, 0)`),o.attr("transform",`translate(${-l/2+(t.padding??0)/2-(s.x-(s.left??0))},${-u/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Ct(t,L),t.intersect=function(C){return St.polygon(t,p,C)},i}var HG=x(()=>{"use strict";re();le();oe();ce();a(Sc,"generateCirclePoints");a(qG,"curlyBraceRight")});function pi(e,t,r,n=100,i=0,s=180){let o=[],l=i*Math.PI/180,f=(s*Math.PI/180-l)/(n-1);for(let d=0;d$,":first-child").attr("stroke-opacity",0),w.insert(()=>T,":first-child"),w.insert(()=>C,":first-child"),w.attr("class","text"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(${h-h/4}, 0)`),o.attr("transform",`translate(${-l/2+(t.padding??0)/2-(s.x-(s.left??0))},${-u/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Ct(t,w),t.intersect=function(A){return St.polygon(t,m,A)},i}var XG=x(()=>{"use strict";re();le();oe();ce();a(pi,"generateCirclePoints");a(YG,"curlyBraces")});async function KG(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=80,l=20,u=Math.max(o,(s.width+(t.padding??0)*2)*1.25,t?.width??0),h=Math.max(l,s.height+(t.padding??0)*2,t?.height??0),f=h/2,{cssStyles:d}=t,p=_t.svg(i),m=Et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=u,y=h,b=g-f,k=y/4,T=[{x:b,y:0},{x:k,y:0},{x:0,y:y/2},{x:k,y},{x:b,y},...xb(-b,-y/2,f,50,270,90)],_=fe(T),L=p.path(_,m),C=i.insert(()=>L,":first-child");return C.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",n),C.attr("transform",`translate(${-u/2}, ${-h/2})`),Ct(t,C),t.intersect=function(D){return St.polygon(t,T,D)},i}var QG=x(()=>{"use strict";re();le();oe();ce();a(KG,"curvedTrapezoid")});async function ZG(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+t.padding,t.width??0),u=l/2,h=u/(2.5+l/50),f=Math.max(s.height+h+t.padding,t.height??0),d,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=_t.svg(i),g=a2t(0,0,l,f,u,h),y=o2t(0,h,l,f,u,h),b=m.path(g,Et(t,{})),k=m.path(y,Et(t,{fill:"none"}));d=i.insert(()=>k,":first-child"),d=i.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=s2t(0,0,l,f,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",qr(p)).attr("style",n)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Ct(t,d),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(m){let g=St.rect(t,m),y=g.x-(t.x??0);if(u!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-h)){let b=h*h*(1-y*y/(u*u));b>0&&(b=Math.sqrt(b)),b=h-b,m.y-(t.y??0)>0&&(b=-b),g.y+=b}return g},i}var s2t,a2t,o2t,JG=x(()=>{"use strict";re();le();oe();ce();Ee();s2t=a((e,t,r,n,i,s)=>[`M${e},${t+s}`,`a${i},${s} 0,0,0 ${r},0`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),a2t=a((e,t,r,n,i,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),o2t=a((e,t,r,n,i,s)=>[`M${e-r/2},${-n/2}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");a(ZG,"cylinder")});async function tV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=s.width+t.padding,u=s.height+t.padding,h=u*.2,f=-l/2,d=-u/2-h/2,{cssStyles:p}=t,m=_t.svg(i),g=Et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d+h},{x:-f,y:d+h},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+h}],b=m.polygon(y.map(T=>[T.x,T.y]),g),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),o.attr("transform",`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${d+h+(t.padding??0)/2-(s.y-(s.top??0))})`),Ct(t,k),t.intersect=function(T){return St.rect(t,T)},i}var eV=x(()=>{"use strict";re();le();oe();ce();a(tV,"dividedRectangle")});async function rV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,halfPadding:o}=await Gt(e,t,Ft(t)),u=s.width/2+o+5,h=s.width/2+o,f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=_t.svg(i),m=Et(t,{roughness:.2,strokeWidth:2.5}),g=Et(t,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),b=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",qr(t.cssClasses)).attr("style",qr(d)),f.node()?.appendChild(y),f.node()?.appendChild(b)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return Ct(t,f),t.intersect=function(p){return P.info("DoubleCircle intersect",t,u,p),St.circle(t,u,p)},i}var nV=x(()=>{"use strict";zt();re();le();oe();ce();Ee();a(rV,"doublecircle")});function iV(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=At(t);t.label="",t.labelStyle=n;let s=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),o=7,{cssStyles:l}=t,u=_t.svg(s),{nodeBorder:h}=r,f=Et(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(f.roughness=0);let d=u.circle(0,0,o*2,f),p=s.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Ct(t,p),t.intersect=function(m){return P.info("filledCircle intersect",t,{radius:o,point:m}),St.circle(t,o,m)},s}var sV=x(()=>{"use strict";ce();zt();le();oe();re();a(iV,"filledCircle")});async function aV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=s.width+(t.padding??0),u=l+s.height,h=l+s.height,f=[{x:0,y:-u},{x:h,y:-u},{x:h/2,y:0}],{cssStyles:d}=t,p=_t.svg(i),m=Et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=fe(f),y=p.path(g,m),b=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),t.width=l,t.height=u,Ct(t,b),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-u/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(k){return P.info("Triangle intersect",t,f,k),St.polygon(t,f,k)},i}var oV=x(()=>{"use strict";zt();re();le();oe();ce();re();a(aV,"flippedTriangle")});function lV(e,t,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:s}=At(t);t.label="";let o=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,u=Math.max(70,t?.width??0),h=Math.max(10,t?.height??0);r==="LR"&&(u=Math.max(10,t?.width??0),h=Math.max(70,t?.height??0));let f=-1*u/2,d=-1*h/2,p=_t.svg(o),m=Et(t,{stroke:i.lineColor,fill:i.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(f,d,u,h,m),y=o.insert(()=>g,":first-child");l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),Ct(t,y);let b=n?.padding??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(k){return St.rect(t,k)},o}var cV=x(()=>{"use strict";ce();le();oe();re();a(lV,"forkJoin")});async function uV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let i=80,s=50,{shapeSvg:o,bbox:l}=await Gt(e,t,Ft(t)),u=Math.max(i,l.width+(t.padding??0)*2,t?.width??0),h=Math.max(s,l.height+(t.padding??0)*2,t?.height??0),f=h/2,{cssStyles:d}=t,p=_t.svg(o),m=Et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-u/2,y:-h/2},{x:u/2-f,y:-h/2},...xb(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],y=fe(g),b=p.path(y,m),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),Ct(t,k),t.intersect=function(T){return P.info("Pill intersect",t,{radius:f,point:T}),St.polygon(t,g,T)},o}var hV=x(()=>{"use strict";zt();re();le();oe();ce();a(uV,"halfRoundedRectangle")});async function fV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=4,l=s.height+t.padding,u=l/o,h=s.width+2*u+t.padding,f=[{x:u,y:0},{x:h-u,y:0},{x:h,y:-l/2},{x:h-u,y:-l},{x:u,y:-l},{x:0,y:-l/2}],d,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=_t.svg(i),g=Et(t,{}),y=l2t(0,0,h,l,u),b=m.path(y,g);d=i.insert(()=>b,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),p&&d.attr("style",p)}else d=di(i,h,l,f);return n&&d.attr("style",n),t.width=h,t.height=l,Ct(t,d),t.intersect=function(m){return St.polygon(t,f,m)},i}var l2t,dV=x(()=>{"use strict";re();le();oe();ce();pl();l2t=a((e,t,r,n,i)=>[`M${e+i},${t}`,`L${e+r-i},${t}`,`L${e+r},${t-n/2}`,`L${e+r-i},${t-n}`,`L${e+i},${t-n}`,`L${e},${t-n/2}`,"Z"].join(" "),"createHexagonPathD");a(fV,"hexagon")});async function pV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.label="",t.labelStyle=r;let{shapeSvg:i}=await Gt(e,t,Ft(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:l}=t,u=_t.svg(i),h=Et(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let f=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],d=fe(f),p=u.path(d,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-s/2}, ${-o/2})`),Ct(t,m),t.intersect=function(g){return P.info("Pill intersect",t,{points:f}),St.polygon(t,f,g)},i}var mV=x(()=>{"use strict";zt();re();le();oe();ce();a(pV,"hourglass")});async function gV(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=At(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,label:d}=await Gt(e,t,"icon-shape default"),p=t.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:b}=xo(t),k=-g/2,T=-m/2,_=t.label?8:0,L=_t.svg(h),C=Et(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let D=L.rectangle(k,T,g,m,C),$=Math.max(g,f.width),w=m+f.height+_,A=L.rectangle(-$/2,-w/2,$,w,{...C,fill:"transparent",stroke:"none"}),F=h.insert(()=>D,":first-child"),S=h.insert(()=>A);if(t.icon){let v=h.append("g");v.html(`${await Fl(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let R=v.node().getBBox(),B=R.width,I=R.height,M=R.x,O=R.y;v.attr("transform",`translate(${-B/2-M},${p?f.height/2+_/2-I/2-O:-f.height/2-_/2-I/2-O})`),v.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-w/2:w/2-f.height})`),F.attr("transform",`translate(0,${p?f.height/2+_/2:-f.height/2-_/2})`),Ct(t,S),t.intersect=function(v){if(P.info("iconSquare intersect",t,v),!t.label)return St.rect(t,v);let R=t.x??0,B=t.y??0,I=t.height??0,M=[];return p?M=[{x:R-f.width/2,y:B-I/2},{x:R+f.width/2,y:B-I/2},{x:R+f.width/2,y:B-I/2+f.height+_},{x:R+g/2,y:B-I/2+f.height+_},{x:R+g/2,y:B+I/2},{x:R-g/2,y:B+I/2},{x:R-g/2,y:B-I/2+f.height+_},{x:R-f.width/2,y:B-I/2+f.height+_}]:M=[{x:R-g/2,y:B-I/2},{x:R+g/2,y:B-I/2},{x:R+g/2,y:B-I/2+m},{x:R+f.width/2,y:B-I/2+m},{x:R+f.width/2/2,y:B+I/2},{x:R-f.width/2,y:B+I/2},{x:R-f.width/2,y:B-I/2+m},{x:R-g/2,y:B-I/2+m}],St.polygon(t,M,v)},h}var yV=x(()=>{"use strict";ce();zt();Qh();le();oe();re();a(gV,"icon")});async function xV(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=At(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,label:d}=await Gt(e,t,"icon-shape default"),p=20,m=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:b}=r,{stylesMap:k}=xo(t),T=_t.svg(h),_=Et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let L=k.get("fill");_.stroke=L??b;let C=h.append("g");t.icon&&C.html(`${await Fl(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let D=C.node().getBBox(),$=D.width,w=D.height,A=D.x,F=D.y,S=Math.max($,w)*Math.SQRT2+p*2,v=T.circle(0,0,S,_),R=Math.max(S,f.width),B=S+f.height+m,I=T.rectangle(-R/2,-B/2,R,B,{..._,fill:"transparent",stroke:"none"}),M=h.insert(()=>v,":first-child"),O=h.insert(()=>I);return C.attr("transform",`translate(${-$/2-A},${g?f.height/2+m/2-w/2-F:-f.height/2-m/2-w/2-F})`),C.attr("style",`color: ${k.get("stroke")??y};`),d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-B/2:B/2-f.height})`),M.attr("transform",`translate(0,${g?f.height/2+m/2:-f.height/2-m/2})`),Ct(t,O),t.intersect=function(N){return P.info("iconSquare intersect",t,N),St.rect(t,N)},h}var bV=x(()=>{"use strict";ce();zt();Qh();le();oe();re();a(xV,"iconCircle")});var mi,_c=x(()=>{"use strict";mi=a((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD")});async function kV(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=At(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await Gt(e,t,"icon-shape default"),m=t.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:b,mainBkg:k}=r,{stylesMap:T}=xo(t),_=-y/2,L=-g/2,C=t.label?8:0,D=_t.svg(h),$=Et(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let w=T.get("fill");$.stroke=w??k;let A=D.path(mi(_,L,y,g,5),$),F=Math.max(y,f.width),S=g+f.height+C,v=D.rectangle(-F/2,-S/2,F,S,{...$,fill:"transparent",stroke:"none"}),R=h.insert(()=>A,":first-child").attr("class","icon-shape2"),B=h.insert(()=>v);if(t.icon){let I=h.append("g");I.html(`${await Fl(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let M=I.node().getBBox(),O=M.width,N=M.height,E=M.x,V=M.y;I.attr("transform",`translate(${-O/2-E},${m?f.height/2+C/2-N/2-V:-f.height/2-C/2-N/2-V})`),I.attr("style",`color: ${T.get("stroke")??b};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-S/2:S/2-f.height})`),R.attr("transform",`translate(0,${m?f.height/2+C/2:-f.height/2-C/2})`),Ct(t,B),t.intersect=function(I){if(P.info("iconSquare intersect",t,I),!t.label)return St.rect(t,I);let M=t.x??0,O=t.y??0,N=t.height??0,E=[];return m?E=[{x:M-f.width/2,y:O-N/2},{x:M+f.width/2,y:O-N/2},{x:M+f.width/2,y:O-N/2+f.height+C},{x:M+y/2,y:O-N/2+f.height+C},{x:M+y/2,y:O+N/2},{x:M-y/2,y:O+N/2},{x:M-y/2,y:O-N/2+f.height+C},{x:M-f.width/2,y:O-N/2+f.height+C}]:E=[{x:M-y/2,y:O-N/2},{x:M+y/2,y:O-N/2},{x:M+y/2,y:O-N/2+g},{x:M+f.width/2,y:O-N/2+g},{x:M+f.width/2/2,y:O+N/2},{x:M-f.width/2,y:O+N/2},{x:M-f.width/2,y:O-N/2+g},{x:M-y/2,y:O-N/2+g}],St.polygon(t,E,I)},h}var TV=x(()=>{"use strict";ce();zt();Qh();le();oe();_c();re();a(kV,"iconRounded")});async function SV(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=At(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await Gt(e,t,"icon-shape default"),m=t.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:b,mainBkg:k}=r,{stylesMap:T}=xo(t),_=-y/2,L=-g/2,C=t.label?8:0,D=_t.svg(h),$=Et(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let w=T.get("fill");$.stroke=w??k;let A=D.path(mi(_,L,y,g,.1),$),F=Math.max(y,f.width),S=g+f.height+C,v=D.rectangle(-F/2,-S/2,F,S,{...$,fill:"transparent",stroke:"none"}),R=h.insert(()=>A,":first-child"),B=h.insert(()=>v);if(t.icon){let I=h.append("g");I.html(`${await Fl(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let M=I.node().getBBox(),O=M.width,N=M.height,E=M.x,V=M.y;I.attr("transform",`translate(${-O/2-E},${m?f.height/2+C/2-N/2-V:-f.height/2-C/2-N/2-V})`),I.attr("style",`color: ${T.get("stroke")??b};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-S/2:S/2-f.height})`),R.attr("transform",`translate(0,${m?f.height/2+C/2:-f.height/2-C/2})`),Ct(t,B),t.intersect=function(I){if(P.info("iconSquare intersect",t,I),!t.label)return St.rect(t,I);let M=t.x??0,O=t.y??0,N=t.height??0,E=[];return m?E=[{x:M-f.width/2,y:O-N/2},{x:M+f.width/2,y:O-N/2},{x:M+f.width/2,y:O-N/2+f.height+C},{x:M+y/2,y:O-N/2+f.height+C},{x:M+y/2,y:O+N/2},{x:M-y/2,y:O+N/2},{x:M-y/2,y:O-N/2+f.height+C},{x:M-f.width/2,y:O-N/2+f.height+C}]:E=[{x:M-y/2,y:O-N/2},{x:M+y/2,y:O-N/2},{x:M+y/2,y:O-N/2+g},{x:M+f.width/2,y:O-N/2+g},{x:M+f.width/2/2,y:O+N/2},{x:M-f.width/2,y:O+N/2},{x:M-f.width/2,y:O-N/2+g},{x:M-y/2,y:O-N/2+g}],St.polygon(t,E,I)},h}var _V=x(()=>{"use strict";ce();zt();Qh();le();_c();oe();re();a(SV,"iconSquare")});async function CV(e,t,{config:{flowchart:r}}){let n=new Image;n.src=t?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),s=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/s;let{labelStyles:o}=At(t);t.labelStyle=o;let l=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let u=Math.max(t.label?l??0:0,t?.assetWidth??i),h=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:u,f=t.constraint==="on"?h/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(h,l??0);let{shapeSvg:d,bbox:p,label:m}=await Gt(e,t,"image-shape default"),g=t.pos==="t",y=-h/2,b=-f/2,k=t.label?8:0,T=_t.svg(d),_=Et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let L=T.rectangle(y,b,h,f,_),C=Math.max(h,p.width),D=f+p.height+k,$=T.rectangle(-C/2,-D/2,C,D,{..._,fill:"none",stroke:"none"}),w=d.insert(()=>L,":first-child"),A=d.insert(()=>$);if(t.img){let F=d.append("image");F.attr("href",t.img),F.attr("width",h),F.attr("height",f),F.attr("preserveAspectRatio","none"),F.attr("transform",`translate(${-h/2},${g?D/2-f:-D/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-f/2-p.height/2-k/2:f/2-p.height/2+k/2})`),w.attr("transform",`translate(0,${g?p.height/2+k/2:-p.height/2-k/2})`),Ct(t,A),t.intersect=function(F){if(P.info("iconSquare intersect",t,F),!t.label)return St.rect(t,F);let S=t.x??0,v=t.y??0,R=t.height??0,B=[];return g?B=[{x:S-p.width/2,y:v-R/2},{x:S+p.width/2,y:v-R/2},{x:S+p.width/2,y:v-R/2+p.height+k},{x:S+h/2,y:v-R/2+p.height+k},{x:S+h/2,y:v+R/2},{x:S-h/2,y:v+R/2},{x:S-h/2,y:v-R/2+p.height+k},{x:S-p.width/2,y:v-R/2+p.height+k}]:B=[{x:S-h/2,y:v-R/2},{x:S+h/2,y:v-R/2},{x:S+h/2,y:v-R/2+f},{x:S+p.width/2,y:v-R/2+f},{x:S+p.width/2/2,y:v+R/2},{x:S-p.width/2,y:v+R/2},{x:S-p.width/2,y:v-R/2+f},{x:S-h/2,y:v-R/2+f}],St.polygon(t,B,F)},d}var wV=x(()=>{"use strict";ce();zt();le();oe();re();a(CV,"imageSquare")});async function EV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=[{x:0,y:0},{x:o,y:0},{x:o+3*l/6,y:-l},{x:-3*l/6,y:-l}],h,{cssStyles:f}=t;if(t.look==="handDrawn"){let d=_t.svg(i),p=Et(t,{}),m=fe(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=di(i,o,l,u);return n&&h.attr("style",n),t.width=o,t.height=l,Ct(t,h),t.intersect=function(d){return St.polygon(t,u,d)},i}var vV=x(()=>{"use strict";re();le();oe();ce();pl();a(EV,"inv_trapezoid")});async function ml(e,t,r){let{labelStyles:n,nodeStyles:i}=At(t);t.labelStyle=n;let{shapeSvg:s,bbox:o}=await Gt(e,t,Ft(t)),l=Math.max(o.width+r.labelPaddingX*2,t?.width||0),u=Math.max(o.height+r.labelPaddingY*2,t?.height||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),t.look==="handDrawn"){let y=_t.svg(s),b=Et(t,{}),k=p||m?y.path(mi(h,f,l,u,p||0),b):y.rectangle(h,f,l,u,b);d=s.insert(()=>k,":first-child"),d.attr("class","basic label-container").attr("style",qr(g))}else d=s.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",qr(p)).attr("ry",qr(m)).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return Ct(t,d),t.intersect=function(y){return St.rect(t,y)},s}var ad=x(()=>{"use strict";re();le();_c();oe();ce();Ee();a(ml,"drawRect")});async function AV(e,t){let{shapeSvg:r,bbox:n,label:i}=await Gt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,s),t.intersect=function(u){return St.rect(t,u)},r}var LV=x(()=>{"use strict";ad();re();le();a(AV,"labelRect")});async function RV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),u=[{x:0,y:0},{x:o+3*l/6,y:0},{x:o,y:-l},{x:-(3*l)/6,y:-l}],h,{cssStyles:f}=t;if(t.look==="handDrawn"){let d=_t.svg(i),p=Et(t,{}),m=fe(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=di(i,o,l,u);return n&&h.attr("style",n),t.width=o,t.height=l,Ct(t,h),t.intersect=function(d){return St.polygon(t,u,d)},i}var DV=x(()=>{"use strict";re();le();oe();ce();pl();a(RV,"lean_left")});async function IV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),u=[{x:-3*l/6,y:0},{x:o,y:0},{x:o+3*l/6,y:-l},{x:0,y:-l}],h,{cssStyles:f}=t;if(t.look==="handDrawn"){let d=_t.svg(i),p=Et(t,{}),m=fe(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=di(i,o,l,u);return n&&h.attr("style",n),t.width=o,t.height=l,Ct(t,h),t.intersect=function(d){return St.polygon(t,u,d)},i}var NV=x(()=>{"use strict";re();le();oe();ce();pl();a(IV,"lean_right")});function MV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",Ft(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),u=7,h=[{x:o,y:0},{x:0,y:l+u/2},{x:o-2*u,y:l+u/2},{x:0,y:2*l},{x:o,y:l-u/2},{x:2*u,y:l-u/2}],f=_t.svg(i),d=Et(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=fe(h),m=f.path(p,d),g=i.insert(()=>m,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${o/2},${-l})`),Ct(t,g),t.intersect=function(y){return P.info("lightningBolt intersect",t,y),St.polygon(t,h,y)},i}var OV=x(()=>{"use strict";zt();re();oe();ce();le();re();a(MV,"lightningBolt")});async function PV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0),t.width??0),u=l/2,h=u/(2.5+l/50),f=Math.max(s.height+h+(t.padding??0),t.height??0),d=f*.1,p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=_t.svg(i),y=u2t(0,0,l,f,u,h,d),b=h2t(0,h,l,f,u,h),k=Et(t,{}),T=g.path(y,k),_=g.path(b,k);i.insert(()=>_,":first-child").attr("class","line"),p=i.insert(()=>T,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{let g=c2t(0,0,l,f,u,h,d);p=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",qr(m)).attr("style",n)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Ct(t,p),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+h-(s.y-(s.top??0))})`),t.intersect=function(g){let y=St.rect(t,g),b=y.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(y.y-(t.y??0))>(t.height??0)/2-h)){let k=h*h*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=h-k,g.y-(t.y??0)>0&&(k=-k),y.y+=k}return y},i}var c2t,u2t,h2t,BV=x(()=>{"use strict";re();le();oe();ce();Ee();c2t=a((e,t,r,n,i,s,o)=>[`M${e},${t+s}`,`a${i},${s} 0,0,0 ${r},0`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+s+o}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),u2t=a((e,t,r,n,i,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+s+o}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),h2t=a((e,t,r,n,i,s)=>[`M${e-r/2},${-n/2}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");a(PV,"linedCylinder")});async function FV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=u/4,f=u+h,{cssStyles:d}=t,p=_t.svg(i),m=Et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...Js(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,h,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],y=p.polygon(g.map(k=>[k.x,k.y]),m),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(s.x-(s.left??0))},${-u/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),Ct(t,b),t.intersect=function(k){return St.polygon(t,g,k)},i}var $V=x(()=>{"use strict";re();le();ce();oe();a(FV,"linedWaveEdgedRect")});async function GV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=t,m=_t.svg(i),g=Et(t,{}),y=[{x:f-h,y:d+h},{x:f-h,y:d+u+h},{x:f+l-h,y:d+u+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d+u-h},{x:f+l+h,y:d+u-h},{x:f+l+h,y:d-h},{x:f+h,y:d-h},{x:f+h,y:d},{x:f,y:d},{x:f,y:d+h}],b=[{x:f,y:d+h},{x:f+l-h,y:d+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d},{x:f,y:d}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let k=fe(y),T=m.path(k,g),_=fe(b),L=m.path(_,{...g,fill:"none"}),C=i.insert(()=>L,":first-child");return C.insert(()=>T,":first-child"),C.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),o.attr("transform",`translate(${-(s.width/2)-h-(s.x-(s.left??0))}, ${-(s.height/2)+h-(s.y-(s.top??0))})`),Ct(t,C),t.intersect=function(D){return St.polygon(t,y,D)},i}var VV=x(()=>{"use strict";re();oe();ce();le();a(GV,"multiRect")});async function zV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=u/4,f=u+h,d=-l/2,p=-f/2,m=5,{cssStyles:g}=t,y=Js(d-m,p+f+m,d+l-m,p+f+m,h,.8),b=y?.[y.length-1],k=[{x:d-m,y:p+m},{x:d-m,y:p+f+m},...y,{x:d+l-m,y:b.y-m},{x:d+l,y:b.y-m},{x:d+l,y:b.y-2*m},{x:d+l+m,y:b.y-2*m},{x:d+l+m,y:p-m},{x:d+m,y:p-m},{x:d+m,y:p},{x:d,y:p},{x:d,y:p+m}],T=[{x:d,y:p+m},{x:d+l-m,y:p+m},{x:d+l-m,y:b.y-m},{x:d+l,y:b.y-m},{x:d+l,y:p},{x:d,y:p}],_=_t.svg(i),L=Et(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let C=fe(k),D=_.path(C,L),$=fe(T),w=_.path($,L),A=i.insert(()=>D,":first-child");return A.insert(()=>w),A.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-(s.width/2)-m-(s.x-(s.left??0))}, ${-(s.height/2)+m-h/2-(s.y-(s.top??0))})`),Ct(t,A),t.intersect=function(F){return St.polygon(t,k,F)},i}var WV=x(()=>{"use strict";re();le();ce();oe();a(zV,"multiWaveEdgedRectangle")});async function UV(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=At(t);t.labelStyle=n,t.useHtmlLabels||Re().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);let{shapeSvg:o,bbox:l}=await Gt(e,t,Ft(t)),u=Math.max(l.width+(t.padding??0)*2,t?.width??0),h=Math.max(l.height+(t.padding??0)*2,t?.height??0),f=-u/2,d=-h/2,{cssStyles:p}=t,m=_t.svg(o),g=Et(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=m.rectangle(f,d,u,h,g),b=o.insert(()=>y,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),Ct(t,b),t.intersect=function(k){return St.rect(t,k)},o}var jV=x(()=>{"use strict";ce();le();oe();re();$n();a(UV,"note")});async function qV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=s.width+t.padding,l=s.height+t.padding,u=o+l,h=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:d}=t;if(t.look==="handDrawn"){let p=_t.svg(i),m=Et(t,{}),g=f2t(0,0,u),y=p.path(g,m);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`),d&&f.attr("style",d)}else f=di(i,u,u,h);return n&&f.attr("style",n),Ct(t,f),t.intersect=function(p){return P.debug(`APA12 Intersect called SPLIT +point:`,p,` +node: +`,t,` +res:`,St.polygon(t,h,p)),St.polygon(t,h,p)},i}var f2t,HV=x(()=>{"use strict";zt();re();le();oe();ce();pl();f2t=a((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");a(qV,"question")});async function YV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0),t?.width??0),u=Math.max(s.height+(t.padding??0),t?.height??0),h=-l/2,f=-u/2,d=f/2,p=[{x:h+d,y:f},{x:h,y:0},{x:h+d,y:-f},{x:-h,y:-f},{x:-h,y:f}],{cssStyles:m}=t,g=_t.svg(i),y=Et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=fe(p),k=g.path(b,y),T=i.insert(()=>k,":first-child");return T.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(${-d/2},0)`),o.attr("transform",`translate(${-d/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Ct(t,T),t.intersect=function(_){return St.polygon(t,p,_)},i}var XV=x(()=>{"use strict";re();le();oe();ce();a(YV,"rect_left_inv_arrow")});function d2t(e,t){t&&e.attr("style",t)}async function p2t(e){let t=xt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label;e.label&&Tn(e.label)&&(n=await jl(e.label.replace(Rt.lineBreakRegex,` +`),Y()));let i=e.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),d2t(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var m2t,bo,Lb=x(()=>{"use strict";$e();zt();pe();Fe();Ee();a(d2t,"applyStyle");a(p2t,"addHtmlLabel");m2t=a(async(e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Ne(Y().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),P.info("vertexText"+i);let s={isNode:n,label:Yn(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>``),labelStyle:t&&t.replace("fill:","color:")};return await p2t(s)}else{let s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(let l of o){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),s.appendChild(u)}return s}},"createLabel"),bo=m2t});async function KV(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let i;t.cssClasses?i="node "+t.cssClasses:i="node default";let s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g"),l=s.insert("g").attr("class","label").attr("style",n),u=t.description,h=t.label,f=l.node().appendChild(await bo(h,t.labelStyle,!0,!0)),d={width:0,height:0};if(Ne(Y()?.flowchart?.htmlLabels)){let w=f.children[0],A=xt(f);d=w.getBoundingClientRect(),A.attr("width",d.width),A.attr("height",d.height)}P.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await bo(p.join?p.join("
    "):p,t.labelStyle,!0,!0)),y=g.children[0],b=xt(g);d=y.getBoundingClientRect(),b.attr("width",d.width),b.attr("height",d.height);let k=(t.padding||0)/2;xt(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+k+5)+")"),xt(f).attr("transform","translate( "+(d.width(P.debug("Rough node insert CXC",F),S),":first-child"),D=s.insert(()=>(P.debug("Rough node insert CXC",F),F),":first-child")}else D=o.insert("rect",":first-child"),$=o.insert("line"),D.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-k).attr("y",-d.height/2-k).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),$.attr("class","divider").attr("x1",-d.width/2-k).attr("x2",d.width/2+k).attr("y1",-d.height/2-k+m.height+k).attr("y2",-d.height/2-k+m.height+k);return Ct(t,D),t.intersect=function(w){return St.rect(t,w)},s}var QV=x(()=>{"use strict";$e();Fe();re();Lb();le();oe();ce();pe();_c();zt();a(KV,"rectWithTitle")});async function ZV(e,t){let r={rx:5,ry:5,classes:"",labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return ml(e,t,r)}var JV=x(()=>{"use strict";ad();a(ZV,"roundedRect")});async function tz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=t?.padding??0,u=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),f=-s.width/2-l,d=-s.height/2-l,{cssStyles:p}=t,m=_t.svg(i),g=Et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d},{x:f+u+8,y:d},{x:f+u+8,y:d+h},{x:f-8,y:d+h},{x:f-8,y:d},{x:f,y:d},{x:f,y:d+h}],b=m.polygon(y.map(T=>[T.x,T.y]),g),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container").attr("style",qr(p)),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),o.attr("transform",`translate(${-u/2+4+(t.padding??0)-(s.x-(s.left??0))},${-h/2+(t.padding??0)-(s.y-(s.top??0))})`),Ct(t,k),t.intersect=function(T){return St.rect(t,T)},i}var ez=x(()=>{"use strict";re();le();oe();ce();Ee();a(tz,"shadedProcess")});async function rz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=t,p=_t.svg(i),m=Et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f},{x:h,y:f+u},{x:h+l,y:f+u},{x:h+l,y:f-u/2}],y=fe(g),b=p.path(y,m),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),n&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),k.attr("transform",`translate(0, ${u/4})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(s.x-(s.left??0))}, ${-u/4+(t.padding??0)-(s.y-(s.top??0))})`),Ct(t,k),t.intersect=function(T){return St.polygon(t,g,T)},i}var nz=x(()=>{"use strict";re();le();oe();ce();a(rz,"slopedRect")});async function iz(e,t){let r={rx:0,ry:0,classes:"",labelPaddingX:(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return ml(e,t,r)}var sz=x(()=>{"use strict";ad();a(iz,"squareRect")});async function az(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=s.height+t.padding,l=s.width+o/4+t.padding,u,{cssStyles:h}=t;if(t.look==="handDrawn"){let f=_t.svg(i),d=Et(t,{}),p=mi(-l/2,-o/2,l,o,o/2),m=f.path(p,d);u=i.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",qr(h))}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",o/2).attr("ry",o/2).attr("x",-l/2).attr("y",-o/2).attr("width",l).attr("height",o);return Ct(t,u),t.intersect=function(f){return St.rect(t,f)},i}var oz=x(()=>{"use strict";re();le();oe();ce();_c();Ee();a(az,"stadium")});async function lz(e,t){return ml(e,t,{rx:5,ry:5,classes:"flowchart-node"})}var cz=x(()=>{"use strict";ad();a(lz,"state")});function uz(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=At(t);t.labelStyle=n;let{cssStyles:s}=t,{lineColor:o,stateBorder:l,nodeBorder:u}=r,h=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),f=_t.svg(h),d=Et(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,14,{...d,stroke:o,strokeWidth:2}),m=l??u,g=f.circle(0,0,5,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),s&&y.selectAll("path").attr("style",s),i&&y.selectAll("path").attr("style",i),Ct(t,y),t.intersect=function(b){return St.circle(t,7,b)},h}var hz=x(()=>{"use strict";ce();le();oe();re();a(uz,"stateEnd")});function fz(e,t,{config:{themeVariables:r}}){let{lineColor:n}=r,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s;if(t.look==="handDrawn"){let l=_t.svg(i).circle(0,0,14,gG(n));s=i.insert(()=>l),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=i.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ct(t,s),t.intersect=function(o){return St.circle(t,7,o)},i}var dz=x(()=>{"use strict";ce();le();oe();re();a(fz,"stateStart")});async function pz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=(t?.padding||0)/2,l=s.width+t.padding,u=s.height+t.padding,h=-s.width/2-o,f=-s.height/2-o,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look==="handDrawn"){let p=_t.svg(i),m=Et(t,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),b=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>b,":first-child");let k=i.insert(()=>g,":first-child"),{cssStyles:T}=t;k.attr("class","basic label-container").attr("style",qr(T)),Ct(t,k)}else{let p=di(i,l,u,d);n&&p.attr("style",n),Ct(t,p)}return t.intersect=function(p){return St.polygon(t,d,p)},i}var mz=x(()=>{"use strict";re();le();oe();ce();pl();Ee();a(pz,"subroutine")});async function gz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),u=-o/2,h=-l/2,f=.2*l,d=.2*l,{cssStyles:p}=t,m=_t.svg(i),g=Et(t,{}),y=[{x:u-f/2,y:h},{x:u+o+f/2,y:h},{x:u+o+f/2,y:h+l},{x:u-f/2,y:h+l}],b=[{x:u+o-f/2,y:h+l},{x:u+o+f/2,y:h+l},{x:u+o+f/2,y:h+l-d}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let k=fe(y),T=m.path(k,g),_=fe(b),L=m.path(_,{...g,fillStyle:"solid"}),C=i.insert(()=>L,":first-child");return C.insert(()=>T,":first-child"),C.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),Ct(t,C),t.intersect=function(D){return St.polygon(t,y,D)},i}var yz=x(()=>{"use strict";re();oe();ce();le();a(gz,"taggedRect")});async function xz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=u/4,f=.2*l,d=.2*u,p=u+h,{cssStyles:m}=t,g=_t.svg(i),y=Et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:-l/2-l/2*.1,y:p/2},...Js(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],k=-l/2+l/2*.1,T=-p/2-d*.4,_=[{x:k+l-f,y:(T+u)*1.4},{x:k+l,y:T+u-d},{x:k+l,y:(T+u)*.9},...Js(k+l,(T+u)*1.3,k+l-f,(T+u)*1.5,-u*.03,.5)],L=fe(b),C=g.path(L,y),D=fe(_),$=g.path(D,{...y,fillStyle:"solid"}),w=i.insert(()=>$,":first-child");return w.insert(()=>C,":first-child"),w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",n),w.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(s.x-(s.left??0))},${-u/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),Ct(t,w),t.intersect=function(A){return St.polygon(t,b,A)},i}var bz=x(()=>{"use strict";re();le();ce();oe();a(xz,"taggedWaveEdgedRectangle")});async function kz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=Math.max(s.width+t.padding,t?.width||0),l=Math.max(s.height+t.padding,t?.height||0),u=-o/2,h=-l/2,f=i.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",o).attr("height",l),Ct(t,f),t.intersect=function(d){return St.rect(t,d)},i}var Tz=x(()=>{"use strict";re();le();oe();a(kz,"text")});async function Sz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o,halfPadding:l}=await Gt(e,t,Ft(t)),u=t.look==="neo"?l*2:l,h=s.height+u,f=h/2,d=f/(2.5+h/50),p=s.width+d+u,{cssStyles:m}=t,g;if(t.look==="handDrawn"){let y=_t.svg(i),b=y2t(0,0,p,h,d,f),k=x2t(0,0,p,h,d,f),T=y.path(b,Et(t,{})),_=y.path(k,Et(t,{fill:"none"}));g=i.insert(()=>_,":first-child"),g=i.insert(()=>T,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=g2t(0,0,p,h,d,f);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",qr(m)).attr("style",n),g.attr("class","basic label-container"),m&&g.selectAll("path").attr("style",m),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),o.attr("transform",`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Ct(t,g),t.intersect=function(y){let b=St.rect(t,y),k=b.y-(t.y??0);if(f!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-d)){let T=d*d*(1-k*k/(f*f));T!=0&&(T=Math.sqrt(Math.abs(T))),T=d-T,y.x-(t.x??0)>0&&(T=-T),b.x+=T}return b},i}var g2t,y2t,x2t,_z=x(()=>{"use strict";re();oe();ce();le();Ee();g2t=a((e,t,r,n,i,s)=>`M${e},${t} + a${i},${s} 0,0,1 0,${-n} + l${r},0 + a${i},${s} 0,0,1 0,${n} + M${r},${-n} + a${i},${s} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),y2t=a((e,t,r,n,i,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${s} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${s} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),x2t=a((e,t,r,n,i,s)=>[`M${e+r/2},${-n/2}`,`a${i},${s} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");a(Sz,"tiltedCylinder")});async function Cz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=s.width+t.padding,l=s.height+t.padding,u=[{x:-3*l/6,y:0},{x:o+3*l/6,y:0},{x:o,y:-l},{x:0,y:-l}],h,{cssStyles:f}=t;if(t.look==="handDrawn"){let d=_t.svg(i),p=Et(t,{}),m=fe(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=di(i,o,l,u);return n&&h.attr("style",n),t.width=o,t.height=l,Ct(t,h),t.intersect=function(d){return St.polygon(t,u,d)},i}var wz=x(()=>{"use strict";re();le();oe();ce();pl();a(Cz,"trapezoid")});async function Ez(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=60,l=20,u=Math.max(o,s.width+(t.padding??0)*2,t?.width??0),h=Math.max(l,s.height+(t.padding??0)*2,t?.height??0),{cssStyles:f}=t,d=_t.svg(i),p=Et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-u/2*.8,y:-h/2},{x:u/2*.8,y:-h/2},{x:u/2,y:-h/2*.6},{x:u/2,y:h/2},{x:-u/2,y:h/2},{x:-u/2,y:-h/2*.6}],g=fe(m),y=d.path(g,p),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Ct(t,b),t.intersect=function(k){return St.polygon(t,m,k)},i}var vz=x(()=>{"use strict";re();le();oe();ce();a(Ez,"trapezoidalPentagon")});async function Az(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Ne(Y().flowchart?.htmlLabels),u=s.width+(t.padding??0),h=u+s.height,f=u+s.height,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-h}],{cssStyles:p}=t,m=_t.svg(i),g=Et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=fe(d),b=m.path(y,g),k=i.insert(()=>b,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),n&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),t.width=u,t.height=h,Ct(t,k),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${h/2-(s.height+(t.padding??0)/(l?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(T){return P.info("Triangle intersect",t,d,T),St.polygon(t,d,T)},i}var Lz=x(()=>{"use strict";zt();re();le();oe();ce();re();Fe();pe();a(Az,"triangle")});async function Rz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=u/8,f=u+h,{cssStyles:d}=t,m=70-l,g=m>0?m/2:0,y=_t.svg(i),b=Et(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-l/2-g,y:f/2},...Js(-l/2-g,f/2,l/2+g,f/2,h,.8),{x:l/2+g,y:-f/2},{x:-l/2-g,y:-f/2}],T=fe(k),_=y.path(T,b),L=i.insert(()=>_,":first-child");return L.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(s.x-(s.left??0))},${-u/2+(t.padding??0)-h-(s.y-(s.top??0))})`),Ct(t,L),t.intersect=function(C){return St.polygon(t,k,C)},i}var Dz=x(()=>{"use strict";re();le();ce();oe();a(Rz,"waveEdgedRectangle")});async function Iz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await Gt(e,t,Ft(t)),o=100,l=50,u=Math.max(s.width+(t.padding??0)*2,t?.width??0),h=Math.max(s.height+(t.padding??0)*2,t?.height??0),f=u/h,d=u,p=h;d>p*f?p=d/f:d=p*f,d=Math.max(d,o),p=Math.max(p,l);let m=Math.min(p*.2,p/4),g=p+m*2,{cssStyles:y}=t,b=_t.svg(i),k=Et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let T=[{x:-d/2,y:g/2},...Js(-d/2,g/2,d/2,g/2,m,1),{x:d/2,y:-g/2},...Js(d/2,-g/2,-d/2,-g/2,m,-1)],_=fe(T),L=b.path(_,k),C=i.insert(()=>L,":first-child");return C.attr("class","basic label-container"),y&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",y),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),Ct(t,C),t.intersect=function(D){return St.polygon(t,T,D)},i}var Nz=x(()=>{"use strict";re();le();oe();ce();a(Iz,"waveRectangle")});async function Mz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await Gt(e,t,Ft(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=t,m=_t.svg(i),g=Et(t,{}),y=[{x:f-h,y:d-h},{x:f-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d-h}],b=`M${f-h},${d-h} L${f+l},${d-h} L${f+l},${d+u} L${f-h},${d+u} L${f-h},${d-h} + M${f-h},${d} L${f+l},${d} + M${f},${d-h} L${f},${d+u}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let k=m.path(b,g),T=i.insert(()=>k,":first-child");return T.attr("transform",`translate(${h/2}, ${h/2})`),T.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),o.attr("transform",`translate(${-(s.width/2)+h/2-(s.x-(s.left??0))}, ${-(s.height/2)+h/2-(s.y-(s.top??0))})`),Ct(t,T),t.intersect=function(_){return St.polygon(t,y,_)},i}var Oz=x(()=>{"use strict";re();oe();ce();le();a(Mz,"windowPane")});async function j4(e,t){let r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){let{themeVariables:E}=Re(),{background:V}=E,G={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await j4(e,G)}let n=Re();t.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,s=n.er?.entityPadding??6,{cssStyles:o}=t,{labelStyles:l}=At(t);if(r.attributes.length===0&&t.label){let E={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};Hn(t.label,n)+E.labelPaddingX*20){let E=f.width+i*2-(m+g+y+b);m+=E/_,g+=E/_,y>0&&(y+=E/_),b>0&&(b+=E/_)}let C=m+g+y+b,D=_t.svg(h),$=Et(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let w=Math.max(L.width+i*2,t?.width||0,C),A=Math.max(L.height+(p[0]||d)+s,t?.height||0),F=-w/2,S=-A/2;h.selectAll("g:not(:first-child)").each((E,V,G)=>{let J=xt(G[V]),rt=J.attr("transform"),nt=0,ct=0;if(rt){let Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(rt);Lt&&(nt=parseFloat(Lt[1]),ct=parseFloat(Lt[2]),J.attr("class").includes("attribute-name")?nt+=m:J.attr("class").includes("attribute-keys")?nt+=m+g:J.attr("class").includes("attribute-comment")&&(nt+=m+g+y))}J.attr("transform",`translate(${F+i/2+nt}, ${ct+S+f.height+s/2})`)}),h.select(".name").attr("transform","translate("+-f.width/2+", "+(S+s/2)+")");let v=D.rectangle(F,S,w,A,$),R=h.insert(()=>v,":first-child").attr("style",o.join("")),{themeVariables:B}=Re(),{rowEven:I,rowOdd:M,nodeBorder:O}=B;p.push(0);for(let[E,V]of p.entries()){if(E===0&&p.length>1)continue;let G=E%2===0&&V!==0,J=D.rectangle(F,f.height+S+V,w,f.height,{...$,fill:G?I:M,stroke:O});h.insert(()=>J,"g.label").attr("style",o.join("")).attr("class",`row-rect-${E%2===0?"even":"odd"}`)}let N=D.line(F,f.height+S,w+F,f.height+S,$);h.insert(()=>N).attr("class","divider"),N=D.line(m+F,f.height+S,m+F,A+S,$),h.insert(()=>N).attr("class","divider"),k&&(N=D.line(m+g+F,f.height+S,m+g+F,A+S,$),h.insert(()=>N).attr("class","divider")),T&&(N=D.line(m+g+y+F,f.height+S,m+g+y+F,A+S,$),h.insert(()=>N).attr("class","divider"));for(let E of p)N=D.line(F,f.height+S+E,w+F,f.height+S+E,$),h.insert(()=>N).attr("class","divider");return Ct(t,R),t.intersect=function(E){return St.rect(t,E)},h}async function A0(e,t,r,n=0,i=0,s=[],o=""){let l=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",o);t!==eo(t)&&(t=eo(t),t=t.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await Xn(l,t,{width:Hn(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(Ne(r.htmlLabels)){let f=u.children[0];f.style.textAlign="start";let d=xt(u);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}var Pz=x(()=>{"use strict";re();le();oe();ce();ad();$n();$a();Fe();$e();Ee();a(j4,"erBox");a(A0,"addText")});async function Bz(e,t,r,n,i=r.class.padding??12){let s=n?0:3,o=e.insert("g").attr("class",Ft(t)).attr("id",t.domId||t.id),l=null,u=null,h=null,f=null,d=0,p=0,m=0;if(l=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let T=t.annotations[0];await Rb(l,{text:`\xAB${T}\xBB`},0),d=l.node().getBBox().height}u=o.insert("g").attr("class","label-group text"),await Rb(u,t,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(let T of t.members){let _=await Rb(h,T,y,[T.parseClassifier()]);y+=_+s}m=h.node().getBBox().height,m<=0&&(m=i/2),f=o.insert("g").attr("class","methods-group text");let b=0;for(let T of t.methods){let _=await Rb(f,T,b,[T.parseClassifier()]);b+=_+s}let k=o.node().getBBox();if(l!==null){let T=l.node().getBBox();l.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${d})`),k=o.node().getBBox(),h.attr("transform",`translate(0, ${d+p+i*2})`),k=o.node().getBBox(),f.attr("transform",`translate(0, ${d+p+(m?m+i*4:i*2)})`),k=o.node().getBBox(),{shapeSvg:o,bbox:k}}async function Rb(e,t,r,n=[]){let i=e.insert("g").attr("class","label").attr("style",n.join("; ")),s=Re(),o="useHtmlLabels"in t?t.useHtmlLabels:Ne(s.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!o&&l.startsWith("\\")&&(l=l.substring(1)),Tn(l)&&(o=!0);let u=await Xn(i,rg(Yn(l)),{width:Hn(l,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s),h,f=1;if(o){let d=u.children[0],p=xt(u);f=d.innerHTML.split("
    ").length,d.innerHTML.includes("")&&(f+=d.innerHTML.split("").length-1);let m=d.getElementsByTagName("img");if(m){let g=l.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(b=>{function k(){if(y.style.display="flex",y.style.flexDirection="column",g){let T=s.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,L=parseInt(T,10)*5+"px";y.style.minWidth=L,y.style.maxWidth=L}else y.style.width="100%";b(y)}a(k,"setupImage"),setTimeout(()=>{y.complete&&k()}),y.addEventListener("error",k),y.addEventListener("load",k)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&xt(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;let d=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(d.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*f)+r)+")"),h.height}var Fz=x(()=>{"use strict";$e();$n();re();Ee();pe();$a();Fe();a(Bz,"textHelper");a(Rb,"addText")});async function $z(e,t){let r=Y(),n=r.class.padding??12,i=n,s=t.useHtmlLabels??Ne(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];let{shapeSvg:l,bbox:u}=await Bz(e,t,r,s,i),{labelStyles:h,nodeStyles:f}=At(t);t.labelStyle=h,t.cssStyles=o.styles||"";let d=o.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));let p=o.members.length===0&&o.methods.length===0&&!r.class?.hideEmptyMembersBox,m=_t.svg(l),g=Et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,b=u.height;o.members.length===0&&o.methods.length===0?b+=i:o.members.length>0&&o.methods.length===0&&(b+=i*2);let k=-y/2,T=-b/2,_=m.rectangle(k-n,T-n-(p?n:o.members.length===0&&o.methods.length===0?-n/2:0),y+2*n,b+2*n+(p?n*2:o.members.length===0&&o.methods.length===0?-n:0),g),L=l.insert(()=>_,":first-child");L.attr("class","basic label-container");let C=L.node().getBBox();l.selectAll(".text").each((A,F,S)=>{let v=xt(S[F]),R=v.attr("transform"),B=0;if(R){let N=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);N&&(B=parseFloat(N[2]))}let I=B+T+n-(p?n:o.members.length===0&&o.methods.length===0?-n/2:0);s||(I-=4);let M=k;(v.attr("class").includes("label-group")||v.attr("class").includes("annotation-group"))&&(M=-v.node()?.getBBox().width/2||0,l.selectAll("text").each(function(O,N,E){window.getComputedStyle(E[N]).textAnchor==="middle"&&(M=0)})),v.attr("transform",`translate(${M}, ${I})`)});let D=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,$=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,w=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(o.members.length>0||o.methods.length>0||p){let A=m.line(C.x,D+$+T+n,C.x+C.width,D+$+T+n,g);l.insert(()=>A).attr("class","divider").attr("style",d)}if(p||o.members.length>0||o.methods.length>0){let A=m.line(C.x,D+$+w+T+i*2+n,C.x+C.width,D+$+w+T+n+i*2,g);l.insert(()=>A).attr("class","divider").attr("style",d)}if(o.look!=="handDrawn"&&l.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),l.selectAll(".divider").select("path").attr("style",d),t.labelStyle?l.selectAll("span").attr("style",t.labelStyle):l.selectAll("span").attr("style",d),!s){let A=RegExp(/color\s*:\s*([^;]*)/),F=A.exec(d);if(F){let S=F[0].replace("color","fill");l.selectAll("tspan").attr("style",S)}else if(h){let S=A.exec(h);if(S){let v=S[0].replace("color","fill");l.selectAll("tspan").attr("style",v)}}}return Ct(t,L),t.intersect=function(A){return St.rect(t,A)},l}var Gz=x(()=>{"use strict";re();pe();$e();ce();oe();le();Fz();Fe();a($z,"classBox")});async function Vz(e,t){let{labelStyles:r,nodeStyles:n}=At(t);t.labelStyle=r;let i=t,s=t,o=20,l=20,u="verifyMethod"in t,h=Ft(t),f=e.insert("g").attr("class",h).attr("id",t.domId??t.id),d;u?d=await gl(f,`<<${i.type}>>`,0,t.labelStyle):d=await gl(f,"<<Element>>",0,t.labelStyle);let p=d,m=await gl(f,i.name,p,t.labelStyle+"; font-weight: bold;");if(p+=m+l,u){let D=await gl(f,`${i.requirementId?`id: ${i.requirementId}`:""}`,p,t.labelStyle);p+=D;let $=await gl(f,`${i.text?`Text: ${i.text}`:""}`,p,t.labelStyle);p+=$;let w=await gl(f,`${i.risk?`Risk: ${i.risk}`:""}`,p,t.labelStyle);p+=w,await gl(f,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,p,t.labelStyle)}else{let D=await gl(f,`${s.type?`Type: ${s.type}`:""}`,p,t.labelStyle);p+=D,await gl(f,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,p,t.labelStyle)}let g=(f.node()?.getBBox().width??200)+o,y=(f.node()?.getBBox().height??200)+o,b=-g/2,k=-y/2,T=_t.svg(f),_=Et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let L=T.rectangle(b,k,g,y,_),C=f.insert(()=>L,":first-child");if(C.attr("class","basic label-container").attr("style",n),f.selectAll(".label").each((D,$,w)=>{let A=xt(w[$]),F=A.attr("transform"),S=0,v=0;if(F){let M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(F);M&&(S=parseFloat(M[1]),v=parseFloat(M[2]))}let R=v-y/2,B=b+o/2;($===0||$===1)&&(B=S),A.attr("transform",`translate(${B}, ${R+o})`)}),p>d+m+l){let D=T.line(b,k+d+m+l,b+g,k+d+m+l,_);f.insert(()=>D).attr("style",n)}return Ct(t,C),t.intersect=function(D){return St.rect(t,D)},f}async function gl(e,t,r,n=""){if(t==="")return 0;let i=e.insert("g").attr("class","label").attr("style",n),s=Y(),o=s.htmlLabels??!0,l=await Xn(i,rg(Yn(t)),{width:Hn(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:n},s),u;if(o){let h=l.children[0],f=xt(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{let h=l.children[0];for(let f of h.children)f.textContent=f.textContent.replaceAll(">",">").replaceAll("<","<"),n&&f.setAttribute("style",n);u=l.getBBox(),u.height+=6}return i.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}var zz=x(()=>{"use strict";re();le();oe();ce();Ee();pe();$a();$e();a(Vz,"requirementBox");a(gl,"addText")});async function Wz(e,t,{config:r}){let{labelStyles:n,nodeStyles:i}=At(t);t.labelStyle=n||"";let s=10,o=t.width;t.width=(t.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await Gt(e,t,Ft(t)),f=t.padding||10,d="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await yb(p,"ticket"in t&&t.ticket||"",m):{label:g,bbox:y}=await yb(l,"ticket"in t&&t.ticket||"",m);let{label:b,bbox:k}=await yb(l,"assigned"in t&&t.assigned||"",m);t.width=o;let T=10,_=t?.width||0,L=Math.max(y.height,k.height)/2,C=Math.max(u.height+T*2,t?.height||0)+L,D=-_/2,$=-C/2;h.attr("transform","translate("+(f-_/2)+", "+(-L-u.height/2)+")"),g.attr("transform","translate("+(f-_/2)+", "+(-L+u.height/2)+")"),b.attr("transform","translate("+(f+_/2-k.width-2*s)+", "+(-L+u.height/2)+")");let w,{rx:A,ry:F}=t,{cssStyles:S}=t;if(t.look==="handDrawn"){let v=_t.svg(l),R=Et(t,{}),B=A||F?v.path(mi(D,$,_,C,A||0),R):v.rectangle(D,$,_,C,R);w=l.insert(()=>B,":first-child"),w.attr("class","basic label-container").attr("style",S||null)}else{w=l.insert("rect",":first-child"),w.attr("class","basic label-container __APA__").attr("style",i).attr("rx",A??5).attr("ry",F??5).attr("x",D).attr("y",$).attr("width",_).attr("height",C);let v="priority"in t&&t.priority;if(v){let R=l.append("line"),B=D+2,I=$+Math.floor((A??0)/2),M=$+C-Math.floor((A??0)/2);R.attr("x1",B).attr("y1",I).attr("x2",B).attr("y2",M).attr("stroke-width","4").attr("stroke",b2t(v))}}return Ct(t,w),t.height=C,t.intersect=function(v){return St.rect(t,v)},l}var b2t,Uz=x(()=>{"use strict";re();le();_c();oe();ce();b2t=a(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");a(Wz,"kanbanItem")});function jz(e){return e in q4}var k2t,T2t,q4,H4=x(()=>{"use strict";IG();OG();BG();$G();VG();WG();jG();HG();XG();QG();JG();eV();nV();sV();oV();cV();hV();dV();mV();yV();bV();TV();_V();wV();vV();LV();DV();NV();OV();BV();$V();VV();WV();jV();HV();XV();QV();JV();ez();nz();sz();oz();cz();hz();dz();mz();yz();bz();Tz();_z();wz();vz();Lz();Dz();Nz();Oz();Pz();Gz();zz();Uz();k2t=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:iz},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ZV},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:az},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:pz},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ZG},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:GG},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:qV},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fV},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:IV},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:RV},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Cz},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:EV},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:rV},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:kz},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:PG},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tz},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:fz},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:uz},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:lV},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pV},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:UG},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:qG},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:YG},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:MV},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Rz},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:uV},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Sz},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:PV},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:KG},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tV},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Az},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Mz},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:iV},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ez},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:aV},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:rz},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:zV},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:GV},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:MG},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:zG},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:xz},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:gz},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Iz},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:YV},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:FV}],T2t=a(()=>{let t=[...Object.entries({state:lz,choice:FG,note:UV,rectWithTitle:KV,labelRect:AV,iconSquare:SV,iconCircle:xV,icon:gV,iconRounded:kV,imageSquare:CV,anchor:DG,kanbanItem:Wz,classBox:$z,erBox:j4,requirementBox:Vz}),...k2t.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),q4=T2t();a(jz,"isValidShape")});var S2t,Db,qz=x(()=>{"use strict";$e();fb();pe();zt();H4();Ee();Fe();Sn();S2t="flowchart-",Db=class{constructor(){this.vertexCounter=0;this.config=Y();this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=rr;this.setAccDescription=sr;this.setDiagramTitle=xr;this.getAccTitle=ir;this.getAccDescription=ar;this.getDiagramTitle=or;this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{a(this,"FlowDB")}sanitizeText(t){return Rt.sanitizeText(t,this.config)}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return r.domId;return t}addVertex(t,r,n,i,s,o,l={},u){if(!t||t.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(` +`)?m=u+` +`:m=`{ +`+u+` +}`,h=td(m,{schema:Jf})}let f=this.edges.find(m=>m.id===t);if(f){let m=h;m?.animate!==void 0&&(f.animate=m.animate),m?.animation!==void 0&&(f.animation=m.animation);return}let d,p=this.vertices.get(t);if(p===void 0&&(p={id:t,labelType:"text",domId:S2t+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,p)),this.vertexCounter++,r!==void 0?(this.config=Y(),d=this.sanitizeText(r.text.trim()),p.labelType=r.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),p.text=d):p.text===void 0&&(p.text=t),n!==void 0&&(p.type=n),i?.forEach(m=>{p.styles.push(m)}),s?.forEach(m=>{p.classes.push(m)}),o!==void 0&&(p.dir=o),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!jz(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===t&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===t&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(t,r,n,i){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};P.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=u.type),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(f=>f.start===l.start&&f.end===l.end);h.length===0?l.id=gc(l.start,l.end,{counter:0,prefix:"L"}):l.id=gc(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))P.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;P.info("addLink",t,r,i);for(let s of t)for(let o of r){let l=s===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(s,o,n,i):this.addSingleLink(s,o,n,void 0)}}updateLinkInterpolate(t,r){t.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(t,r){t.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(t,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(i=>{let s=this.classes.get(i);s===void 0&&(s={id:i,styles:[],textStyles:[]},this.classes.set(i,s)),n?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");s.textStyles.push(l)}s.styles.push(o)})})}setDirection(t){this.direction=t,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,r){for(let n of t.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let s=this.edges.find(l=>l.id===n);s&&s.classes.push(r);let o=this.subGraphLookup.get(n);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(t,r,n){let i=this.lookUpDomId(t);if(Y().securityLevel!=="loose"||r===void 0)return;let s=[];if(typeof n=="string"){s=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=document.querySelector(`[id="${i}"]`);l!==null&&l.addEventListener("click",()=>{se.runFunc(r,...s)},!1)}))}setLink(t,r,n){t.split(",").forEach(i=>{let s=this.vertices.get(i);s!==void 0&&(s.link=se.formatUrl(r,this.config),s.linkTarget=n)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=xt(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=xt("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),xt(t).select("svg").selectAll("g.node").on("mouseover",s=>{let o=xt(s.currentTarget);if(o.attr("title")===null)return;let u=s.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
    ")),o.classed("hover",!0)}).on("mouseout",s=>{r.transition().duration(500).style("opacity",0),xt(s.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=Y(),Ye()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,n){let i=t.text.trim(),s=n.text;t===n&&/\s/.exec(n.text)&&(i=void 0);let o=a(f=>{let d={boolean:{},number:{},string:{}},p=[],m;return{nodeList:f.filter(function(y){let b=typeof y;return y.stmt&&y.stmt==="dir"?(m=y.value,!1):y.trim()===""?!1:b in d?d[b].hasOwnProperty(y)?!1:d[b][y]=!0:p.includes(y)?!1:p.push(y)}),dir:m}},"uniq"),{nodeList:l,dir:u}=o(r.flat());if(this.version==="gen-1")for(let f=0;f2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let i=0,s=1;for(;i=0){let l=this.indexNodes2(t,o);if(l.result)return{result:!0,count:s+l.count};s=s+l.count}i=i+1}return{result:!1,count:s}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(t){let r=t.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(t,r){let n=r.length,i=0;for(let s=0;s":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let s="normal",o=n.length-1;n.startsWith("=")&&(s="thick"),n.startsWith("~")&&(s="invisible");let l=this.countChar(".",n);return l&&(s="dotted",o=l),{type:i,stroke:s,length:o}}destructLink(t,r){let n=this.destructEndLink(t),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n}exists(t,r){for(let n of t)if(n.nodes.includes(r))return!0;return!1}makeUniq(t,r){let n=[];return t.nodes.forEach((i,s)=>{this.exists(r,i)||n.push(t.nodes[s])}),{nodes:n}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,r){return t.find(n=>n.id===r)}destructEdgeType(t){let r="none",n="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":n=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(t,r,n,i,s,o){let l=n.get(t.id),u=i.get(t.id)??!1,h=this.findNode(r,t.id);if(h)h.cssStyles=t.styles,h.cssCompiledStyles=this.getCompiledStyles(t.classes),h.cssClasses=t.classes.join(" ");else{let f={id:t.id,label:t.text,labelStyle:"",parentId:l,padding:s.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:o,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?r.push({...f,isGroup:!0,shape:"rect"}):r.push({...f,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(s=>s.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(s=>s.trim()))}return r}getData(){let t=Y(),r=[],n=[],i=this.getSubGraphs(),s=new Map,o=new Map;for(let h=i.length-1;h>=0;h--){let f=i[h];f.nodes.length>0&&o.set(f.id,!0);for(let d of f.nodes)s.set(d,f.id)}for(let h=i.length-1;h>=0;h--){let f=i[h];r.push({id:f.id,label:f.title,labelStyle:"",parentId:s.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,s,o,t,t.look||"classic")});let u=this.getEdges();return u.forEach((h,f)=>{let{arrowTypeStart:d,arrowTypeEnd:p}=this.destructEdgeType(h.type),m=[...u.defaultStyle??[]];h.style&&m.push(...h.style);let g={id:gc(h.start,h.end,{counter:f,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:h.type??"normal",label:h.text,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:h?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":d,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:m,style:m,pattern:h.stroke,look:t.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};n.push(g)}),{nodes:r,edges:n,other:{},config:t}}defaultConfig(){return mx.flowchart}}});var ko,od=x(()=>{"use strict";$e();ko=a((e,t)=>{let r;return t==="sandbox"&&(r=xt("#i"+e)),(t==="sandbox"?xt(r.nodes()[0].contentDocument.body):xt("body")).select(`[id="${e}"]`)},"getDiagramElement")});var yl,L0=x(()=>{"use strict";yl=a(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,n=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var Hz,_2t,C2t,w2t,E2t,v2t,A2t,Yz,ld,Xz,Ib=x(()=>{"use strict";pe();Fe();zt();L0();$e();ce();$a();E4();Lb();_c();oe();Hz=a(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);let r=Y(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:s,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=At(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=Ne(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Xn(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(Ne(r.flowchart.htmlLabels)){let $=g.children[0],w=xt(g);y=$.getBoundingClientRect(),w.attr("width",y.width),w.attr("height",y.height)}let b=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let k=t.height,T=t.x-b/2,_=t.y-k/2;P.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){let $=_t.svg(d),w=Et(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:i}),A=$.path(mi(T,_,b,k,0),w);L=d.insert(()=>(P.debug("Rough node insert CXC",A),A),":first-child"),L.select("path:nth-child(2)").attr("style",h.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",_).attr("width",b).attr("height",k);let{subGraphTitleTopMargin:C}=yl(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+C})`),l){let $=m.select("span");$&&$.attr("style",l)}let D=L.node().getBBox();return t.offsetX=0,t.width=D.width,t.height=D.height,t.offsetY=y.height-t.padding/2,t.intersect=function($){return bc(t,$)},{cluster:d,labelBBox:y}},"rect"),_2t=a((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.id),n=r.insert("rect",":first-child"),i=0*t.padding,s=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");let o=n.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(l){return bc(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),C2t=a(async(e,t)=>{let r=Y(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=n,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await bo(t.label,t.labelStyle,void 0,!0)),g=m.getBBox();if(Ne(r.flowchart.htmlLabels)){let A=m.children[0],F=xt(m);g=A.getBoundingClientRect(),F.attr("width",g.width),F.attr("height",g.height)}let y=0*t.padding,b=y/2,k=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+y;t.width<=g.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let T=t.height+y,_=t.height+y-g.height-6,L=t.x-k/2,C=t.y-T/2;t.width=k;let D=t.y-t.height/2-b+g.height+2,$;if(t.look==="handDrawn"){let A=t.cssClasses.includes("statediagram-cluster-alt"),F=_t.svg(h),S=t.rx||t.ry?F.path(mi(L,C,k,T,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):F.rectangle(L,C,k,T,{seed:i});$=h.insert(()=>S,":first-child");let v=F.rectangle(L,D,k,_,{fill:A?s:o,fillStyle:A?"hachure":"solid",stroke:u,seed:i});$=h.insert(()=>S,":first-child"),p=h.insert(()=>v)}else $=f.insert("rect",":first-child"),$.attr("class","outer").attr("x",L).attr("y",C).attr("width",k).attr("height",T).attr("data-look",t.look),p.attr("class","inner").attr("x",L).attr("y",D).attr("width",k).attr("height",_);d.attr("transform",`translate(${t.x-g.width/2}, ${C+1-(Ne(r.flowchart.htmlLabels)?0:3)})`);let w=$.node().getBBox();return t.height=w.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(A){return bc(t,A)},{cluster:h,labelBBox:g}},"roundedWithTitle"),w2t=a(async(e,t)=>{P.info("Creating subgraph rect for ",t.id,t);let r=Y(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:s,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=At(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),p=Ne(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Xn(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),y=g.getBBox();if(Ne(r.flowchart.htmlLabels)){let $=g.children[0],w=xt(g);y=$.getBoundingClientRect(),w.attr("width",y.width),w.attr("height",y.height)}let b=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let k=t.height,T=t.x-b/2,_=t.y-k/2;P.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){let $=_t.svg(d),w=Et(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:i}),A=$.path(mi(T,_,b,k,t.rx),w);L=d.insert(()=>(P.debug("Rough node insert CXC",A),A),":first-child"),L.select("path:nth-child(2)").attr("style",h.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=d.insert("rect",":first-child"),L.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",_).attr("width",b).attr("height",k);let{subGraphTitleTopMargin:C}=yl(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+C})`),l){let $=m.select("span");$&&$.attr("style",l)}let D=L.node().getBBox();return t.offsetX=0,t.width=D.width,t.height=D.height,t.offsetY=y.height-t.padding/2,t.intersect=function($){return bc(t,$)},{cluster:d,labelBBox:y}},"kanbanSection"),E2t=a((e,t)=>{let r=Y(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:s}=n,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),l=o.insert("g",":first-child"),u=0*t.padding,h=t.width+u;t.diff=-t.padding;let f=t.height+u,d=t.x-h/2,p=t.y-f/2;t.width=h;let m;if(t.look==="handDrawn"){let b=_t.svg(o).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:i});m=o.insert(()=>b,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",t.look);let g=m.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return bc(t,y)},{cluster:o,labelBBox:{}}},"divider"),v2t=Hz,A2t={rect:Hz,squareRect:v2t,roundedWithTitle:C2t,noteGroup:_2t,divider:E2t,kanbanSection:w2t},Yz=new Map,ld=a(async(e,t)=>{let r=t.shape||"rect",n=await A2t[r](e,t);return Yz.set(t.id,n),n},"insertCluster"),Xz=a(()=>{Yz=new Map},"clear")});function Nb(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Xr(e),t=Xr(t);let[r,n]=[e.x,e.y],[i,s]=[t.x,t.y],o=i-r,l=s-n;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var ta,Xr,Mb,Y4=x(()=>{"use strict";ta={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};a(Nb,"calculateDeltaAndAngle");Xr=a(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Mb=a(e=>({x:a(function(t,r,n){let i=0,s=Xr(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(ta,e.arrowTypeEnd)){let{angle:m,deltaX:g}=Nb(n[n.length-1],n[n.length-2]);i=ta[e.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let o=Math.abs(Xr(t).x-Xr(n[n.length-1]).x),l=Math.abs(Xr(t).y-Xr(n[n.length-1]).y),u=Math.abs(Xr(t).x-Xr(n[0]).x),h=Math.abs(Xr(t).y-Xr(n[0]).y),f=ta[e.arrowTypeStart],d=ta[e.arrowTypeEnd],p=1;if(o0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(ta,e.arrowTypeEnd)){let{angle:m,deltaY:g}=Nb(n[n.length-1],n[n.length-2]);i=ta[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let o=Math.abs(Xr(t).y-Xr(n[n.length-1]).y),l=Math.abs(Xr(t).x-Xr(n[n.length-1]).x),u=Math.abs(Xr(t).y-Xr(n[0]).y),h=Math.abs(Xr(t).x-Xr(n[0]).x),f=ta[e.arrowTypeStart],d=ta[e.arrowTypeEnd],p=1;if(o0&&l0&&h{"use strict";zt();Qz=a((e,t,r,n,i,s)=>{t.arrowTypeStart&&Kz(e,"start",t.arrowTypeStart,r,n,i,s),t.arrowTypeEnd&&Kz(e,"end",t.arrowTypeEnd,r,n,i,s)},"addEdgeMarkers"),L2t={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Kz=a((e,t,r,n,i,s,o)=>{let l=L2t[r];if(!l){P.warn(`Unknown arrow type: ${r}`);return}let u=l.type,f=`${i}_${s}-${u}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){let d=o.replace(/[^\dA-Za-z]/g,"_"),p=`${f}_${d}`;if(!document.getElementById(p)){let m=document.getElementById(f);if(m){let g=m.cloneNode(!0);g.id=p,g.querySelectorAll("path, circle, line").forEach(b=>{b.setAttribute("stroke",o),l.fill&&b.setAttribute("fill",o)}),m.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${n}#${p})`)}else e.attr(`marker-${t}`,`url(${n}#${f})`)},"addEdgeMarker")});function Ob(e,t){Y().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function I2t(e){let t=[],r=[];for(let n=1;n5&&Math.abs(s.y-i.y)>5||i.y===s.y&&s.x===o.x&&Math.abs(s.x-i.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}var Pb,ri,eW,R0,Bb,Fb,R2t,D2t,Jz,tW,N2t,$b,X4=x(()=>{"use strict";pe();Fe();zt();$a();Ee();Y4();L0();$e();ce();Lb();Zz();oe();Pb=new Map,ri=new Map,eW=a(()=>{Pb.clear(),ri.clear()},"clear"),R0=a(e=>e?e.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),Bb=a(async(e,t)=>{let r=Ne(Y().flowchart.htmlLabels),n=await Xn(e,t.label,{style:R0(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});P.info("abc82",t,t.labelType);let i=e.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();if(r){let u=n.children[0],h=xt(n);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Pb.set(t.id,i),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){let u=await bo(t.startLabelLeft,R0(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ri.get(t.id)||ri.set(t.id,{}),ri.get(t.id).startLeft=h,Ob(l,t.startLabelLeft)}if(t.startLabelRight){let u=await bo(t.startLabelRight,R0(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ri.get(t.id)||ri.set(t.id,{}),ri.get(t.id).startRight=h,Ob(l,t.startLabelRight)}if(t.endLabelLeft){let u=await bo(t.endLabelLeft,R0(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ri.get(t.id)||ri.set(t.id,{}),ri.get(t.id).endLeft=h,Ob(l,t.endLabelLeft)}if(t.endLabelRight){let u=await bo(t.endLabelRight,R0(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ri.get(t.id)||ri.set(t.id,{}),ri.get(t.id).endRight=h,Ob(l,t.endLabelRight)}return n},"insertEdgeLabel");a(Ob,"setTerminalWidth");Fb=a((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,Pb.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,n=Y(),{subGraphTitleTotalMargin:i}=yl(n);if(e.label){let s=Pb.get(e.id),o=e.x,l=e.y;if(r){let u=se.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(o=u.x,l=u.y)}s.attr("transform",`translate(${o}, ${l+i/2})`)}if(e.startLabelLeft){let s=ri.get(e.id).startLeft,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let s=ri.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let s=ri.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let s=ri.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),R2t=a((e,t)=>{let r=e.x,n=e.y,i=Math.abs(t.x-r),s=Math.abs(t.y-n),o=e.width/2,l=e.height/2;return i>=o||s>=l},"outsideNode"),D2t=a((e,t,r)=>{P.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,i=e.y,s=Math.abs(n-r.x),o=e.width/2,l=r.xMath.abs(n-t.x)*u){let d=r.y{P.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(s=>{if(P.info("abc88 checking point",s,t),!R2t(t,s)&&!i){let o=D2t(t,n,s);P.debug("abc88 inside",s,n,o),P.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?P.warn("abc88 no intersect",o,r):r.push(o),i=!0}else P.warn("abc88 outside",s,n),n=s,i||r.push(s)}),P.debug("returning points",r),r},"cutPathAtIntersect");a(I2t,"extractCornerPoints");tW=a(function(e,t,r){let n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i),o=r/s;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),N2t=a(function(e){let{cornerPointPositions:t}=I2t(e),r=[];for(let n=0;n10&&Math.abs(s.y-i.y)>=10){P.debug("Corner point fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d}}else P.debug("Corner point skipping fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));r.push(p,u)}else r.push(e[n]);return r},"fixCorners"),$b=a(function(e,t,r,n,i,s,o){let{handDrawnSeed:l}=Y(),u=t.points,h=!1,f=i;var d=s;let p=[];for(let A in t.cssCompiledStyles)v4(A)||p.push(t.cssCompiledStyles[A]);d.intersect&&f.intersect&&(u=u.slice(1,t.points.length-1),u.unshift(f.intersect(u[0])),P.debug("Last point APA12",t.start,"-->",t.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1]))),t.toCluster&&(P.info("to cluster abc88",r.get(t.toCluster)),u=Jz(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(P.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=Jz(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=u.filter(A=>!Number.isNaN(A.y));m=N2t(m);let g=js;switch(g=ol,t.curve){case"linear":g=ol;break;case"basis":g=js;break;case"cardinal":g=Ug;break;case"bumpX":g=$g;break;case"bumpY":g=Gg;break;case"catmullRom":g=Hg;break;case"monotoneX":g=Yg;break;case"monotoneY":g=Xg;break;case"natural":g=Lf;break;case"step":g=Rf;break;case"stepAfter":g=Qg;break;case"stepBefore":g=Kg;break;default:g=js}let{x:y,y:b}=Mb(t),k=Da().x(y).y(b).curve(g),T;switch(t.thickness){case"normal":T="edge-thickness-normal";break;case"thick":T="edge-thickness-thick";break;case"invisible":T="edge-thickness-invisible";break;default:T="edge-thickness-normal"}switch(t.pattern){case"solid":T+=" edge-pattern-solid";break;case"dotted":T+=" edge-pattern-dotted";break;case"dashed":T+=" edge-pattern-dashed";break;default:T+=" edge-pattern-solid"}let _,L=k(m),C=Array.isArray(t.style)?t.style:t.style?[t.style]:[],D=C.find(A=>A?.startsWith("stroke:"));if(t.look==="handDrawn"){let A=_t.svg(e);Object.assign([],m);let F=A.path(L,{roughness:.3,seed:l});T+=" transition",_=xt(F).select("path").attr("id",t.id).attr("class"," "+T+(t.classes?" "+t.classes:"")).attr("style",C?C.reduce((v,R)=>v+";"+R,""):"");let S=_.attr("d");_.attr("d",S),e.node().appendChild(_.node())}else{let A=p.join(";"),F=C?C.reduce((R,B)=>R+B+";",""):"",S="";t.animate&&(S=" edge-animation-fast"),t.animation&&(S=" edge-animation-"+t.animation);let v=A?A+";"+F+";":F;_=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+T+(t.classes?" "+t.classes:"")+(S??"")).attr("style",v),D=v.match(/stroke:([^;]+)/)?.[1]}let $="";(Y().flowchart.arrowMarkerAbsolute||Y().state.arrowMarkerAbsolute)&&($=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,$=$.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),P.info("arrowTypeStart",t.arrowTypeStart),P.info("arrowTypeEnd",t.arrowTypeEnd),Qz(_,t,$,o,n,D);let w={};return h&&(w.updatedPath=u),w.originalPath=t.points,w},"insertEdge")});var M2t,O2t,P2t,B2t,F2t,$2t,G2t,V2t,z2t,W2t,U2t,j2t,q2t,H2t,Y2t,X2t,K2t,Gb,K4=x(()=>{"use strict";zt();M2t=a((e,t,r,n)=>{t.forEach(i=>{K2t[i](e,r,n)})},"insertMarkers"),O2t=a((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),P2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),B2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),F2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),G2t=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),V2t=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),z2t=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),W2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),U2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),j2t=a((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),q2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),H2t=a((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Y2t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`)},"requirement_arrow"),X2t=a((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),K2t={extension:O2t,composition:P2t,aggregation:B2t,dependency:F2t,lollipop:$2t,point:G2t,circle:V2t,cross:z2t,barb:W2t,only_one:U2t,zero_or_one:j2t,one_or_more:q2t,zero_or_more:H2t,requirement_arrow:Y2t,requirement_contains:X2t},Gb=M2t});async function cd(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let s=t.shape?q4[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await s(n,t,r)}else i=await s(e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),Vb.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var Vb,rW,nW,D0,zb=x(()=>{"use strict";zt();H4();Vb=new Map;a(cd,"insertNode");rW=a((e,t)=>{Vb.set(t.id,e)},"setNodeElem"),nW=a(()=>{Vb.clear()},"clear"),D0=a(e=>{let t=Vb.get(e.id);P.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var iW,sW=x(()=>{"use strict";$n();Fe();zt();Ib();X4();K4();zb();re();Ee();iW={common:Rt,getConfig:Re,insertCluster:ld,insertEdge:$b,insertEdgeLabel:Bb,insertMarkers:Gb,insertNode:cd,interpolateToCurve:Gv,labelHelper:Gt,log:P,positionEdgeLabel:Fb}});function Z2t(e){return typeof e=="symbol"||nn(e)&&ei(e)==Q2t}var Q2t,vs,Hu=x(()=>{"use strict";cl();Ys();Q2t="[object Symbol]";a(Z2t,"isSymbol");vs=Z2t});function J2t(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{"use strict";a(J2t,"arrayMap");as=J2t});function lW(e){if(typeof e=="string")return e;if(Qt(e))return as(e,lW)+"";if(vs(e))return oW?oW.call(e):"";var t=e+"";return t=="0"&&1/e==-tbt?"-0":t}var tbt,aW,oW,cW,uW=x(()=>{"use strict";Ou();Yu();Yr();Hu();tbt=1/0,aW=jn?jn.prototype:void 0,oW=aW?aW.toString:void 0;a(lW,"baseToString");cW=lW});function rbt(e){for(var t=e.length;t--&&ebt.test(e.charAt(t)););return t}var ebt,hW,fW=x(()=>{"use strict";ebt=/\s/;a(rbt,"trimmedEndIndex");hW=rbt});function ibt(e){return e&&e.slice(0,hW(e)+1).replace(nbt,"")}var nbt,dW,pW=x(()=>{"use strict";fW();nbt=/^\s+/;a(ibt,"baseTrim");dW=ibt});function cbt(e){if(typeof e=="number")return e;if(vs(e))return mW;if(Ir(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ir(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dW(e);var r=abt.test(e);return r||obt.test(e)?lbt(e.slice(2),r?2:8):sbt.test(e)?mW:+e}var mW,sbt,abt,obt,lbt,gW,yW=x(()=>{"use strict";pW();Cs();Hu();mW=NaN,sbt=/^[-+]0x[0-9a-f]+$/i,abt=/^0b[01]+$/i,obt=/^0o[0-7]+$/i,lbt=parseInt;a(cbt,"toNumber");gW=cbt});function hbt(e){if(!e)return e===0?e:0;if(e=gW(e),e===xW||e===-xW){var t=e<0?-1:1;return t*ubt}return e===e?e:0}var xW,ubt,ud,Q4=x(()=>{"use strict";yW();xW=1/0,ubt=17976931348623157e292;a(hbt,"toFinite");ud=hbt});function fbt(e){var t=ud(e),r=t%1;return t===t?r?t-r:t:0}var To,hd=x(()=>{"use strict";Q4();a(fbt,"toInteger");To=fbt});var dbt,Wb,bW=x(()=>{"use strict";oc();qs();dbt=Ji(ln,"WeakMap"),Wb=dbt});function pbt(){}var sn,Z4=x(()=>{"use strict";a(pbt,"noop");sn=pbt});function mbt(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";a(mbt,"arrayEach");Ub=mbt});function gbt(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s{"use strict";a(gbt,"baseFindIndex");jb=gbt});function ybt(e){return e!==e}var kW,TW=x(()=>{"use strict";a(ybt,"baseIsNaN");kW=ybt});function xbt(e,t,r){for(var n=r-1,i=e.length;++n{"use strict";a(xbt,"strictIndexOf");SW=xbt});function bbt(e,t,r){return t===t?SW(e,t,r):jb(e,kW,r)}var fd,qb=x(()=>{"use strict";tA();TW();_W();a(bbt,"baseIndexOf");fd=bbt});function kbt(e,t){var r=e==null?0:e.length;return!!r&&fd(e,t,0)>-1}var Hb,eA=x(()=>{"use strict";qb();a(kbt,"arrayIncludes");Hb=kbt});var Tbt,CW,wW=x(()=>{"use strict";vv();Tbt=j2(Object.keys,Object),CW=Tbt});function Cbt(e){if(!ho(e))return CW(e);var t=[];for(var r in Object(e))_bt.call(e,r)&&r!="constructor"&&t.push(r);return t}var Sbt,_bt,dd,Yb=x(()=>{"use strict";Wf();wW();Sbt=Object.prototype,_bt=Sbt.hasOwnProperty;a(Cbt,"baseKeys");dd=Cbt});function wbt(e){return cn(e)?K2(e):dd(e)}var lr,So=x(()=>{"use strict";Iv();Yb();Xs();a(wbt,"keys");lr=wbt});var Ebt,vbt,Abt,ni,EW=x(()=>{"use strict";Hf();Gu();Pv();Xs();Wf();So();Ebt=Object.prototype,vbt=Ebt.hasOwnProperty,Abt=J2(function(e,t){if(ho(t)||cn(t)){Zs(t,lr(t),e);return}for(var r in t)vbt.call(t,r)&&fo(e,r,t[r])}),ni=Abt});function Dbt(e,t){if(Qt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||vs(e)?!0:Rbt.test(e)||!Lbt.test(e)||t!=null&&e in Object(t)}var Lbt,Rbt,pd,Xb=x(()=>{"use strict";Yr();Hu();Lbt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rbt=/^\w*$/;a(Dbt,"isKey");pd=Dbt});function Nbt(e){var t=Of(e,function(n){return r.size===Ibt&&r.clear(),n}),r=t.cache;return t}var Ibt,vW,AW=x(()=>{"use strict";kv();Ibt=500;a(Nbt,"memoizeCapped");vW=Nbt});var Mbt,Obt,Pbt,LW,RW=x(()=>{"use strict";AW();Mbt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Obt=/\\(\\)?/g,Pbt=vW(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Mbt,function(r,n,i,s){t.push(i?s.replace(Obt,"$1"):n||r)}),t}),LW=Pbt});function Bbt(e){return e==null?"":cW(e)}var Kb,rA=x(()=>{"use strict";uW();a(Bbt,"toString");Kb=Bbt});function Fbt(e,t){return Qt(e)?e:pd(e,t)?[e]:LW(Kb(e))}var Cc,I0=x(()=>{"use strict";Yr();Xb();RW();rA();a(Fbt,"castPath");Cc=Fbt});function Gbt(e){if(typeof e=="string"||vs(e))return e;var t=e+"";return t=="0"&&1/e==-$bt?"-0":t}var $bt,_o,md=x(()=>{"use strict";Hu();$bt=1/0;a(Gbt,"toKey");_o=Gbt});function Vbt(e,t){t=Cc(t,e);for(var r=0,n=t.length;e!=null&&r{"use strict";I0();md();a(Vbt,"baseGet");wc=Vbt});function zbt(e,t,r){var n=e==null?void 0:wc(e,t);return n===void 0?r:n}var DW,IW=x(()=>{"use strict";N0();a(zbt,"get");DW=zbt});function Wbt(e,t){for(var r=-1,n=t.length,i=e.length;++r{"use strict";a(Wbt,"arrayPush");gd=Wbt});function Ubt(e){return Qt(e)||Ma(e)||!!(NW&&e&&e[NW])}var NW,MW,OW=x(()=>{"use strict";Ou();Uf();Yr();NW=jn?jn.isConcatSpreadable:void 0;a(Ubt,"isFlattenable");MW=Ubt});function PW(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=MW),i||(i=[]);++s0&&r(l)?t>1?PW(l,t-1,r,n,i):gd(i,l):n||(i[i.length]=l)}return i}var Co,yd=x(()=>{"use strict";Qb();OW();a(PW,"baseFlatten");Co=PW});function jbt(e){var t=e==null?0:e.length;return t?Co(e,1):[]}var fr,Zb=x(()=>{"use strict";yd();a(jbt,"flatten");fr=jbt});function qbt(e){return Z2(Q2(e,void 0,fr),e+"")}var BW,FW=x(()=>{"use strict";Zb();Nv();Ov();a(qbt,"flatRest");BW=qbt});function Hbt(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n{"use strict";a(Hbt,"baseSlice");Jb=Hbt});function rkt(e){return ekt.test(e)}var Ybt,Xbt,Kbt,Qbt,Zbt,Jbt,tkt,ekt,$W,GW=x(()=>{"use strict";Ybt="\\ud800-\\udfff",Xbt="\\u0300-\\u036f",Kbt="\\ufe20-\\ufe2f",Qbt="\\u20d0-\\u20ff",Zbt=Xbt+Kbt+Qbt,Jbt="\\ufe0e\\ufe0f",tkt="\\u200d",ekt=RegExp("["+tkt+Ybt+Zbt+Jbt+"]");a(rkt,"hasUnicode");$W=rkt});function nkt(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i{"use strict";a(nkt,"arrayReduce");VW=nkt});function ikt(e,t){return e&&Zs(t,lr(t),e)}var WW,UW=x(()=>{"use strict";Gu();So();a(ikt,"baseAssign");WW=ikt});function skt(e,t){return e&&Zs(t,ts(t),e)}var jW,qW=x(()=>{"use strict";Gu();pc();a(skt,"baseAssignIn");jW=skt});function akt(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r{"use strict";a(akt,"arrayFilter");xd=akt});function okt(){return[]}var ek,iA=x(()=>{"use strict";a(okt,"stubArray");ek=okt});var lkt,ckt,HW,ukt,bd,rk=x(()=>{"use strict";tk();iA();lkt=Object.prototype,ckt=lkt.propertyIsEnumerable,HW=Object.getOwnPropertySymbols,ukt=HW?function(e){return e==null?[]:(e=Object(e),xd(HW(e),function(t){return ckt.call(e,t)}))}:ek,bd=ukt});function hkt(e,t){return Zs(e,bd(e),t)}var YW,XW=x(()=>{"use strict";Gu();rk();a(hkt,"copySymbols");YW=hkt});var fkt,dkt,nk,sA=x(()=>{"use strict";Qb();q2();rk();iA();fkt=Object.getOwnPropertySymbols,dkt=fkt?function(e){for(var t=[];e;)gd(t,bd(e)),e=zf(e);return t}:ek,nk=dkt});function pkt(e,t){return Zs(e,nk(e),t)}var KW,QW=x(()=>{"use strict";Gu();sA();a(pkt,"copySymbolsIn");KW=pkt});function mkt(e,t,r){var n=t(e);return Qt(e)?n:gd(n,r(e))}var ik,aA=x(()=>{"use strict";Qb();Yr();a(mkt,"baseGetAllKeys");ik=mkt});function gkt(e){return ik(e,lr,bd)}var M0,oA=x(()=>{"use strict";aA();rk();So();a(gkt,"getAllKeys");M0=gkt});function ykt(e){return ik(e,ts,nk)}var sk,lA=x(()=>{"use strict";aA();sA();pc();a(ykt,"getAllKeysIn");sk=ykt});var xkt,ak,ZW=x(()=>{"use strict";oc();qs();xkt=Ji(ln,"DataView"),ak=xkt});var bkt,ok,JW=x(()=>{"use strict";oc();qs();bkt=Ji(ln,"Promise"),ok=bkt});var kkt,Ec,cA=x(()=>{"use strict";oc();qs();kkt=Ji(ln,"Set"),Ec=kkt});var tU,Tkt,eU,rU,nU,iU,Skt,_kt,Ckt,wkt,Ekt,Xu,As,Ku=x(()=>{"use strict";ZW();F2();JW();cA();bW();cl();yv();tU="[object Map]",Tkt="[object Object]",eU="[object Promise]",rU="[object Set]",nU="[object WeakMap]",iU="[object DataView]",Skt=ul(ak),_kt=ul(uc),Ckt=ul(ok),wkt=ul(Ec),Ekt=ul(Wb),Xu=ei;(ak&&Xu(new ak(new ArrayBuffer(1)))!=iU||uc&&Xu(new uc)!=tU||ok&&Xu(ok.resolve())!=eU||Ec&&Xu(new Ec)!=rU||Wb&&Xu(new Wb)!=nU)&&(Xu=a(function(e){var t=ei(e),r=t==Tkt?e.constructor:void 0,n=r?ul(r):"";if(n)switch(n){case Skt:return iU;case _kt:return tU;case Ckt:return eU;case wkt:return rU;case Ekt:return nU}return t},"getTag"));As=Xu});function Lkt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Akt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var vkt,Akt,sU,aU=x(()=>{"use strict";vkt=Object.prototype,Akt=vkt.hasOwnProperty;a(Lkt,"initCloneArray");sU=Lkt});function Rkt(e,t){var r=t?Vf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var oU,lU=x(()=>{"use strict";z2();a(Rkt,"cloneDataView");oU=Rkt});function Ikt(e){var t=new e.constructor(e.source,Dkt.exec(e));return t.lastIndex=e.lastIndex,t}var Dkt,cU,uU=x(()=>{"use strict";Dkt=/\w*$/;a(Ikt,"cloneRegExp");cU=Ikt});function Nkt(e){return fU?Object(fU.call(e)):{}}var hU,fU,dU,pU=x(()=>{"use strict";Ou();hU=jn?jn.prototype:void 0,fU=hU?hU.valueOf:void 0;a(Nkt,"cloneSymbol");dU=Nkt});function Jkt(e,t,r){var n=e.constructor;switch(t){case zkt:return Vf(e);case Mkt:case Okt:return new n(+e);case Wkt:return oU(e,r);case Ukt:case jkt:case qkt:case Hkt:case Ykt:case Xkt:case Kkt:case Qkt:case Zkt:return W2(e,r);case Pkt:return new n;case Bkt:case Gkt:return new n(e);case Fkt:return cU(e);case $kt:return new n;case Vkt:return dU(e)}}var Mkt,Okt,Pkt,Bkt,Fkt,$kt,Gkt,Vkt,zkt,Wkt,Ukt,jkt,qkt,Hkt,Ykt,Xkt,Kkt,Qkt,Zkt,mU,gU=x(()=>{"use strict";z2();lU();uU();pU();wv();Mkt="[object Boolean]",Okt="[object Date]",Pkt="[object Map]",Bkt="[object Number]",Fkt="[object RegExp]",$kt="[object Set]",Gkt="[object String]",Vkt="[object Symbol]",zkt="[object ArrayBuffer]",Wkt="[object DataView]",Ukt="[object Float32Array]",jkt="[object Float64Array]",qkt="[object Int8Array]",Hkt="[object Int16Array]",Ykt="[object Int32Array]",Xkt="[object Uint8Array]",Kkt="[object Uint8ClampedArray]",Qkt="[object Uint16Array]",Zkt="[object Uint32Array]";a(Jkt,"initCloneByTag");mU=Jkt});function eTt(e){return nn(e)&&As(e)==tTt}var tTt,yU,xU=x(()=>{"use strict";Ku();Ys();tTt="[object Map]";a(eTt,"baseIsMap");yU=eTt});var bU,rTt,kU,TU=x(()=>{"use strict";xU();$u();c0();bU=Qs&&Qs.isMap,rTt=bU?Ks(bU):yU,kU=rTt});function iTt(e){return nn(e)&&As(e)==nTt}var nTt,SU,_U=x(()=>{"use strict";Ku();Ys();nTt="[object Set]";a(iTt,"baseIsSet");SU=iTt});var CU,sTt,wU,EU=x(()=>{"use strict";_U();$u();c0();CU=Qs&&Qs.isSet,sTt=CU?Ks(CU):SU,wU=sTt});function lk(e,t,r,n,i,s){var o,l=t&aTt,u=t&oTt,h=t&lTt;if(r&&(o=i?r(e,n,i,s):r(e)),o!==void 0)return o;if(!Ir(e))return e;var f=Qt(e);if(f){if(o=sU(e),!l)return U2(e,o)}else{var d=As(e),p=d==AU||d==dTt;if(Oa(e))return V2(e,l);if(d==LU||d==vU||p&&!i){if(o=u||p?{}:H2(e),!l)return u?KW(e,jW(o,e)):YW(e,WW(o,e))}else{if(!Fr[d])return i?e:{};o=mU(e,d,l)}}s||(s=new co);var m=s.get(e);if(m)return m;s.set(e,o),wU(e)?e.forEach(function(b){o.add(lk(b,t,r,b,e,s))}):kU(e)&&e.forEach(function(b,k){o.set(k,lk(b,t,r,k,e,s))});var g=h?u?sk:M0:u?ts:lr,y=f?void 0:g(e);return Ub(y||e,function(b,k){y&&(k=b,b=e[k]),fo(o,k,lk(b,t,r,k,e,s))}),o}var aTt,oTt,lTt,vU,cTt,uTt,hTt,fTt,AU,dTt,pTt,mTt,LU,gTt,yTt,xTt,bTt,kTt,TTt,STt,_Tt,CTt,wTt,ETt,vTt,ATt,LTt,RTt,DTt,Fr,ck,uA=x(()=>{"use strict";a0();J4();Hf();UW();qW();_v();Ev();XW();QW();oA();lA();Ku();aU();gU();Av();Yr();qf();TU();Cs();EU();So();pc();aTt=1,oTt=2,lTt=4,vU="[object Arguments]",cTt="[object Array]",uTt="[object Boolean]",hTt="[object Date]",fTt="[object Error]",AU="[object Function]",dTt="[object GeneratorFunction]",pTt="[object Map]",mTt="[object Number]",LU="[object Object]",gTt="[object RegExp]",yTt="[object Set]",xTt="[object String]",bTt="[object Symbol]",kTt="[object WeakMap]",TTt="[object ArrayBuffer]",STt="[object DataView]",_Tt="[object Float32Array]",CTt="[object Float64Array]",wTt="[object Int8Array]",ETt="[object Int16Array]",vTt="[object Int32Array]",ATt="[object Uint8Array]",LTt="[object Uint8ClampedArray]",RTt="[object Uint16Array]",DTt="[object Uint32Array]",Fr={};Fr[vU]=Fr[cTt]=Fr[TTt]=Fr[STt]=Fr[uTt]=Fr[hTt]=Fr[_Tt]=Fr[CTt]=Fr[wTt]=Fr[ETt]=Fr[vTt]=Fr[pTt]=Fr[mTt]=Fr[LU]=Fr[gTt]=Fr[yTt]=Fr[xTt]=Fr[bTt]=Fr[ATt]=Fr[LTt]=Fr[RTt]=Fr[DTt]=!0;Fr[fTt]=Fr[AU]=Fr[kTt]=!1;a(lk,"baseClone");ck=lk});function NTt(e){return ck(e,ITt)}var ITt,Sr,hA=x(()=>{"use strict";uA();ITt=4;a(NTt,"clone");Sr=NTt});function PTt(e){return ck(e,MTt|OTt)}var MTt,OTt,fA,RU=x(()=>{"use strict";uA();MTt=1,OTt=4;a(PTt,"cloneDeep");fA=PTt});function BTt(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t{"use strict";a(BTt,"compact");wo=BTt});function $Tt(e){return this.__data__.set(e,FTt),this}var FTt,IU,NU=x(()=>{"use strict";FTt="__lodash_hash_undefined__";a($Tt,"setCacheAdd");IU=$Tt});function GTt(e){return this.__data__.has(e)}var MU,OU=x(()=>{"use strict";a(GTt,"setCacheHas");MU=GTt});function uk(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Bu;++t{"use strict";$2();NU();OU();a(uk,"SetCache");uk.prototype.add=uk.prototype.push=IU;uk.prototype.has=MU;kd=uk});function VTt(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";a(VTt,"arraySome");fk=VTt});function zTt(e,t){return e.has(t)}var Td,dk=x(()=>{"use strict";a(zTt,"cacheHas");Td=zTt});function jTt(e,t,r,n,i,s){var o=r&WTt,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=s.get(e),f=s.get(t);if(h&&f)return h==t&&f==e;var d=-1,p=!0,m=r&UTt?new kd:void 0;for(s.set(e,t),s.set(t,e);++d{"use strict";hk();dA();dk();WTt=1,UTt=2;a(jTt,"equalArrays");pk=jTt});function qTt(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var PU,BU=x(()=>{"use strict";a(qTt,"mapToArray");PU=qTt});function HTt(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Sd,mk=x(()=>{"use strict";a(HTt,"setToArray");Sd=HTt});function oSt(e,t,r,n,i,s,o){switch(r){case aSt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sSt:return!(e.byteLength!=t.byteLength||!s(new Gf(e),new Gf(t)));case KTt:case QTt:case tSt:return Hs(+e,+t);case ZTt:return e.name==t.name&&e.message==t.message;case eSt:case nSt:return e==t+"";case JTt:var l=PU;case rSt:var u=n&YTt;if(l||(l=Sd),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;n|=XTt,o.set(e,t);var f=pk(l(e),l(t),n,i,s,o);return o.delete(e),f;case iSt:if(mA)return mA.call(e)==mA.call(t)}return!1}var YTt,XTt,KTt,QTt,ZTt,JTt,tSt,eSt,rSt,nSt,iSt,sSt,aSt,FU,mA,$U,GU=x(()=>{"use strict";Ou();Cv();Pu();pA();BU();mk();YTt=1,XTt=2,KTt="[object Boolean]",QTt="[object Date]",ZTt="[object Error]",JTt="[object Map]",tSt="[object Number]",eSt="[object RegExp]",rSt="[object Set]",nSt="[object String]",iSt="[object Symbol]",sSt="[object ArrayBuffer]",aSt="[object DataView]",FU=jn?jn.prototype:void 0,mA=FU?FU.valueOf:void 0;a(oSt,"equalByTag");$U=oSt});function hSt(e,t,r,n,i,s){var o=r&lSt,l=M0(e),u=l.length,h=M0(t),f=h.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var p=l[d];if(!(o?p in t:uSt.call(t,p)))return!1}var m=s.get(e),g=s.get(t);if(m&&g)return m==t&&g==e;var y=!0;s.set(e,t),s.set(t,e);for(var b=o;++d{"use strict";oA();lSt=1,cSt=Object.prototype,uSt=cSt.hasOwnProperty;a(hSt,"equalObjects");VU=hSt});function pSt(e,t,r,n,i,s){var o=Qt(e),l=Qt(t),u=o?UU:As(e),h=l?UU:As(t);u=u==WU?gk:u,h=h==WU?gk:h;var f=u==gk,d=h==gk,p=u==h;if(p&&Oa(e)){if(!Oa(t))return!1;o=!0,f=!1}if(p&&!f)return s||(s=new co),o||fc(e)?pk(e,t,r,n,i,s):$U(e,t,u,r,n,i,s);if(!(r&fSt)){var m=f&&jU.call(e,"__wrapped__"),g=d&&jU.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,b=g?t.value():t;return s||(s=new co),i(y,b,r,n,s)}}return p?(s||(s=new co),VU(e,t,r,n,i,s)):!1}var fSt,WU,UU,gk,dSt,jU,qU,HU=x(()=>{"use strict";a0();pA();GU();zU();Ku();Yr();qf();u0();fSt=1,WU="[object Arguments]",UU="[object Array]",gk="[object Object]",dSt=Object.prototype,jU=dSt.hasOwnProperty;a(pSt,"baseIsEqualDeep");qU=pSt});function YU(e,t,r,n,i){return e===t?!0:e==null||t==null||!nn(e)&&!nn(t)?e!==e&&t!==t:qU(e,t,r,n,YU,i)}var yk,gA=x(()=>{"use strict";HU();Ys();a(YU,"baseIsEqual");yk=YU});function ySt(e,t,r,n){var i=r.length,s=i,o=!n;if(e==null)return!s;for(e=Object(e);i--;){var l=r[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i{"use strict";a0();gA();mSt=1,gSt=2;a(ySt,"baseIsMatch");XU=ySt});function xSt(e){return e===e&&!Ir(e)}var xk,yA=x(()=>{"use strict";Cs();a(xSt,"isStrictComparable");xk=xSt});function bSt(e){for(var t=lr(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,xk(i)]}return t}var QU,ZU=x(()=>{"use strict";yA();So();a(bSt,"getMatchData");QU=bSt});function kSt(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var bk,xA=x(()=>{"use strict";a(kSt,"matchesStrictComparable");bk=kSt});function TSt(e){var t=QU(e);return t.length==1&&t[0][2]?bk(t[0][0],t[0][1]):function(r){return r===e||XU(r,e,t)}}var JU,tj=x(()=>{"use strict";KU();ZU();xA();a(TSt,"baseMatches");JU=TSt});function SSt(e,t){return e!=null&&t in Object(e)}var ej,rj=x(()=>{"use strict";a(SSt,"baseHasIn");ej=SSt});function _St(e,t,r){t=Cc(t,e);for(var n=-1,i=t.length,s=!1;++n{"use strict";I0();Uf();Yr();f0();Y2();md();a(_St,"hasPath");kk=_St});function CSt(e,t){return e!=null&&kk(e,t,ej)}var Tk,kA=x(()=>{"use strict";rj();bA();a(CSt,"hasIn");Tk=CSt});function vSt(e,t){return pd(e)&&xk(t)?bk(_o(e),t):function(r){var n=DW(r,e);return n===void 0&&n===t?Tk(r,e):yk(t,n,wSt|ESt)}}var wSt,ESt,nj,ij=x(()=>{"use strict";gA();IW();kA();Xb();yA();xA();md();wSt=1,ESt=2;a(vSt,"baseMatchesProperty");nj=vSt});function ASt(e){return function(t){return t?.[e]}}var Sk,TA=x(()=>{"use strict";a(ASt,"baseProperty");Sk=ASt});function LSt(e){return function(t){return wc(t,e)}}var sj,aj=x(()=>{"use strict";N0();a(LSt,"basePropertyDeep");sj=LSt});function RSt(e){return pd(e)?Sk(_o(e)):sj(e)}var oj,lj=x(()=>{"use strict";TA();aj();Xb();md();a(RSt,"property");oj=RSt});function DSt(e){return typeof e=="function"?e:e==null?qn:typeof e=="object"?Qt(e)?nj(e[0],e[1]):JU(e):oj(e)}var Lr,Ni=x(()=>{"use strict";tj();ij();fl();Yr();lj();a(DSt,"baseIteratee");Lr=DSt});function ISt(e,t,r,n){for(var i=-1,s=e==null?0:e.length;++i{"use strict";a(ISt,"arrayAggregator");cj=ISt});function NSt(e,t){return e&&$f(e,t,lr)}var _d,_k=x(()=>{"use strict";G2();So();a(NSt,"baseForOwn");_d=NSt});function MSt(e,t){return function(r,n){if(r==null)return r;if(!cn(r))return e(r,n);for(var i=r.length,s=t?i:-1,o=Object(r);(t?s--:++s{"use strict";Xs();a(MSt,"createBaseEach");hj=MSt});var OSt,os,vc=x(()=>{"use strict";_k();fj();OSt=hj(_d),os=OSt});function PSt(e,t,r,n){return os(e,function(i,s,o){t(n,i,r(i),o)}),n}var dj,pj=x(()=>{"use strict";vc();a(PSt,"baseAggregator");dj=PSt});function BSt(e,t){return function(r,n){var i=Qt(r)?cj:dj,s=t?t():{};return i(r,e,Lr(n,2),s)}}var mj,gj=x(()=>{"use strict";uj();pj();Ni();Yr();a(BSt,"createAggregator");mj=BSt});var FSt,Ck,yj=x(()=>{"use strict";qs();FSt=a(function(){return ln.Date.now()},"now"),Ck=FSt});var xj,$St,GSt,Ac,bj=x(()=>{"use strict";Yf();Pu();Vu();pc();xj=Object.prototype,$St=xj.hasOwnProperty,GSt=po(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&ws(t[0],t[1],i)&&(n=1);++r{"use strict";a(VSt,"arrayIncludesWith");wk=VSt});function WSt(e,t,r,n){var i=-1,s=Hb,o=!0,l=e.length,u=[],h=t.length;if(!l)return u;r&&(t=as(t,Ks(r))),n?(s=wk,o=!1):t.length>=zSt&&(s=Td,o=!1,t=new kd(t));t:for(;++i{"use strict";hk();eA();SA();Yu();$u();dk();zSt=200;a(WSt,"baseDifference");kj=WSt});var USt,Lc,Sj=x(()=>{"use strict";Tj();yd();Yf();X2();USt=po(function(e,t){return Fu(e)?kj(e,Co(t,1,Fu,!0)):[]}),Lc=USt});function jSt(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ii,_j=x(()=>{"use strict";a(jSt,"last");ii=jSt});function qSt(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:To(t),Jb(e,t<0?0:t,n)):[]}var dn,Cj=x(()=>{"use strict";nA();hd();a(qSt,"drop");dn=qSt});function HSt(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:To(t),t=n-t,Jb(e,0,t<0?0:t)):[]}var xl,wj=x(()=>{"use strict";nA();hd();a(HSt,"dropRight");xl=HSt});function YSt(e){return typeof e=="function"?e:qn}var Cd,Ek=x(()=>{"use strict";fl();a(YSt,"castFunction");Cd=YSt});function XSt(e,t){var r=Qt(e)?Ub:os;return r(e,Cd(t))}var tt,vk=x(()=>{"use strict";J4();vc();Ek();Yr();a(XSt,"forEach");tt=XSt});var Ej=x(()=>{"use strict";vk()});function KSt(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";a(KSt,"arrayEvery");vj=KSt});function QSt(e,t){var r=!0;return os(e,function(n,i,s){return r=!!t(n,i,s),r}),r}var Lj,Rj=x(()=>{"use strict";vc();a(QSt,"baseEvery");Lj=QSt});function ZSt(e,t,r){var n=Qt(e)?vj:Lj;return r&&ws(e,t,r)&&(t=void 0),n(e,Lr(t,3))}var gi,Dj=x(()=>{"use strict";Aj();Rj();Ni();Yr();Vu();a(ZSt,"every");gi=ZSt});function JSt(e,t){var r=[];return os(e,function(n,i,s){t(n,i,s)&&r.push(n)}),r}var Ak,_A=x(()=>{"use strict";vc();a(JSt,"baseFilter");Ak=JSt});function t_t(e,t){var r=Qt(e)?xd:Ak;return r(e,Lr(t,3))}var dr,CA=x(()=>{"use strict";tk();_A();Ni();Yr();a(t_t,"filter");dr=t_t});function e_t(e){return function(t,r,n){var i=Object(t);if(!cn(t)){var s=Lr(r,3);t=lr(t),r=a(function(l){return s(i[l],l,i)},"predicate")}var o=e(t,r,n);return o>-1?i[s?t[o]:o]:void 0}}var Ij,Nj=x(()=>{"use strict";Ni();Xs();So();a(e_t,"createFind");Ij=e_t});function n_t(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:To(r);return i<0&&(i=r_t(n+i,0)),jb(e,Lr(t,3),i)}var r_t,Mj,Oj=x(()=>{"use strict";tA();Ni();hd();r_t=Math.max;a(n_t,"findIndex");Mj=n_t});var i_t,Mi,Pj=x(()=>{"use strict";Nj();Oj();i_t=Ij(Mj),Mi=i_t});function s_t(e){return e&&e.length?e[0]:void 0}var Kn,Bj=x(()=>{"use strict";a(s_t,"head");Kn=s_t});var Fj=x(()=>{"use strict";Bj()});function a_t(e,t){var r=-1,n=cn(e)?Array(e.length):[];return os(e,function(i,s,o){n[++r]=t(i,s,o)}),n}var Lk,wA=x(()=>{"use strict";vc();Xs();a(a_t,"baseMap");Lk=a_t});function o_t(e,t){var r=Qt(e)?as:Lk;return r(e,Lr(t,3))}var Dt,wd=x(()=>{"use strict";Yu();Ni();wA();Yr();a(o_t,"map");Dt=o_t});function l_t(e,t){return Co(Dt(e,t),1)}var si,EA=x(()=>{"use strict";yd();wd();a(l_t,"flatMap");si=l_t});function c_t(e,t){return e==null?e:$f(e,Cd(t),ts)}var vA,$j=x(()=>{"use strict";G2();Ek();pc();a(c_t,"forIn");vA=c_t});function u_t(e,t){return e&&_d(e,Cd(t))}var AA,Gj=x(()=>{"use strict";_k();Ek();a(u_t,"forOwn");AA=u_t});var h_t,f_t,d_t,LA,Vj=x(()=>{"use strict";Ff();gj();h_t=Object.prototype,f_t=h_t.hasOwnProperty,d_t=mj(function(e,t,r){f_t.call(e,r)?e[r].push(t):uo(e,r,[t])}),LA=d_t});function p_t(e,t){return e>t}var zj,Wj=x(()=>{"use strict";a(p_t,"baseGt");zj=p_t});function y_t(e,t){return e!=null&&g_t.call(e,t)}var m_t,g_t,Uj,jj=x(()=>{"use strict";m_t=Object.prototype,g_t=m_t.hasOwnProperty;a(y_t,"baseHas");Uj=y_t});function x_t(e,t){return e!=null&&kk(e,t,Uj)}var Zt,qj=x(()=>{"use strict";jj();bA();a(x_t,"has");Zt=x_t});function k_t(e){return typeof e=="string"||!Qt(e)&&nn(e)&&ei(e)==b_t}var b_t,pn,Rk=x(()=>{"use strict";cl();Yr();Ys();b_t="[object String]";a(k_t,"isString");pn=k_t});function T_t(e,t){return as(t,function(r){return e[r]})}var Hj,Yj=x(()=>{"use strict";Yu();a(T_t,"baseValues");Hj=T_t});function S_t(e){return e==null?[]:Hj(e,lr(e))}var Ve,RA=x(()=>{"use strict";Yj();So();a(S_t,"values");Ve=S_t});function C_t(e,t,r,n){e=cn(e)?e:Ve(e),r=r&&!n?To(r):0;var i=e.length;return r<0&&(r=__t(i+r,0)),pn(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&fd(e,t,r)>-1}var __t,Kr,Xj=x(()=>{"use strict";qb();Xs();Rk();hd();RA();__t=Math.max;a(C_t,"includes");Kr=C_t});function E_t(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:To(r);return i<0&&(i=w_t(n+i,0)),fd(e,t,i)}var w_t,Dk,Kj=x(()=>{"use strict";qb();hd();w_t=Math.max;a(E_t,"indexOf");Dk=E_t});function D_t(e){if(e==null)return!0;if(cn(e)&&(Qt(e)||typeof e=="string"||typeof e.splice=="function"||Oa(e)||fc(e)||Ma(e)))return!e.length;var t=As(e);if(t==v_t||t==A_t)return!e.size;if(ho(e))return!dd(e).length;for(var r in e)if(R_t.call(e,r))return!1;return!0}var v_t,A_t,L_t,R_t,De,Ik=x(()=>{"use strict";Yb();Ku();Uf();Yr();Xs();qf();Wf();u0();v_t="[object Map]",A_t="[object Set]",L_t=Object.prototype,R_t=L_t.hasOwnProperty;a(D_t,"isEmpty");De=D_t});function N_t(e){return nn(e)&&ei(e)==I_t}var I_t,Qj,Zj=x(()=>{"use strict";cl();Ys();I_t="[object RegExp]";a(N_t,"baseIsRegExp");Qj=N_t});var Jj,M_t,ea,tq=x(()=>{"use strict";Zj();$u();c0();Jj=Qs&&Qs.isRegExp,M_t=Jj?Ks(Jj):Qj,ea=M_t});function O_t(e){return e===void 0}var Me,eq=x(()=>{"use strict";a(O_t,"isUndefined");Me=O_t});function P_t(e,t){return e{"use strict";a(P_t,"baseLt");Nk=P_t});function B_t(e,t){var r={};return t=Lr(t,3),_d(e,function(n,i,s){uo(r,i,t(n,i,s))}),r}var Qu,rq=x(()=>{"use strict";Ff();_k();Ni();a(B_t,"mapValues");Qu=B_t});function F_t(e,t,r){for(var n=-1,i=e.length;++n{"use strict";Hu();a(F_t,"baseExtremum");Ed=F_t});function $_t(e){return e&&e.length?Ed(e,qn,zj):void 0}var ls,nq=x(()=>{"use strict";Mk();Wj();fl();a($_t,"max");ls=$_t});function G_t(e){return e&&e.length?Ed(e,qn,Nk):void 0}var Ga,IA=x(()=>{"use strict";Mk();DA();fl();a(G_t,"min");Ga=G_t});function V_t(e,t){return e&&e.length?Ed(e,Lr(t,2),Nk):void 0}var Zu,iq=x(()=>{"use strict";Mk();Ni();DA();a(V_t,"minBy");Zu=V_t});function W_t(e){if(typeof e!="function")throw new TypeError(z_t);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var z_t,sq,aq=x(()=>{"use strict";z_t="Expected a function";a(W_t,"negate");sq=W_t});function U_t(e,t,r,n){if(!Ir(e))return e;t=Cc(t,e);for(var i=-1,s=t.length,o=s-1,l=e;l!=null&&++i{"use strict";Hf();I0();f0();Cs();md();a(U_t,"baseSet");oq=U_t});function j_t(e,t,r){for(var n=-1,i=t.length,s={};++n{"use strict";N0();lq();I0();a(j_t,"basePickBy");Ok=j_t});function q_t(e,t){if(e==null)return{};var r=as(sk(e),function(n){return[n]});return t=Lr(t),Ok(e,r,function(n,i){return t(n,i[0])})}var cs,cq=x(()=>{"use strict";Yu();Ni();NA();lA();a(q_t,"pickBy");cs=q_t});function H_t(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var uq,hq=x(()=>{"use strict";a(H_t,"baseSortBy");uq=H_t});function Y_t(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,s=vs(e),o=t!==void 0,l=t===null,u=t===t,h=vs(t);if(!l&&!h&&!s&&e>t||s&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!s&&!h&&e{"use strict";Hu();a(Y_t,"compareAscending");fq=Y_t});function X_t(e,t,r){for(var n=-1,i=e.criteria,s=t.criteria,o=i.length,l=r.length;++n=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return e.index-t.index}var pq,mq=x(()=>{"use strict";dq();a(X_t,"compareMultiple");pq=X_t});function K_t(e,t,r){t.length?t=as(t,function(s){return Qt(s)?function(o){return wc(o,s.length===1?s[0]:s)}:s}):t=[qn];var n=-1;t=as(t,Ks(Lr));var i=Lk(e,function(s,o,l){var u=as(t,function(h){return h(s)});return{criteria:u,index:++n,value:s}});return uq(i,function(s,o){return pq(s,o,r)})}var gq,yq=x(()=>{"use strict";Yu();N0();Ni();wA();hq();$u();mq();fl();Yr();a(K_t,"baseOrderBy");gq=K_t});var Q_t,xq,bq=x(()=>{"use strict";TA();Q_t=Sk("length"),xq=Q_t});function cCt(e){for(var t=kq.lastIndex=0;kq.test(e);)++t;return t}var Tq,Z_t,J_t,tCt,eCt,rCt,nCt,MA,OA,iCt,Sq,_q,Cq,sCt,wq,Eq,aCt,oCt,lCt,kq,vq,Aq=x(()=>{"use strict";Tq="\\ud800-\\udfff",Z_t="\\u0300-\\u036f",J_t="\\ufe20-\\ufe2f",tCt="\\u20d0-\\u20ff",eCt=Z_t+J_t+tCt,rCt="\\ufe0e\\ufe0f",nCt="["+Tq+"]",MA="["+eCt+"]",OA="\\ud83c[\\udffb-\\udfff]",iCt="(?:"+MA+"|"+OA+")",Sq="[^"+Tq+"]",_q="(?:\\ud83c[\\udde6-\\uddff]){2}",Cq="[\\ud800-\\udbff][\\udc00-\\udfff]",sCt="\\u200d",wq=iCt+"?",Eq="["+rCt+"]?",aCt="(?:"+sCt+"(?:"+[Sq,_q,Cq].join("|")+")"+Eq+wq+")*",oCt=Eq+wq+aCt,lCt="(?:"+[Sq+MA+"?",MA,_q,Cq,nCt].join("|")+")",kq=RegExp(OA+"(?="+OA+")|"+lCt+oCt,"g");a(cCt,"unicodeSize");vq=cCt});function uCt(e){return $W(e)?vq(e):xq(e)}var Lq,Rq=x(()=>{"use strict";bq();GW();Aq();a(uCt,"stringSize");Lq=uCt});function hCt(e,t){return Ok(e,t,function(r,n){return Tk(e,n)})}var Dq,Iq=x(()=>{"use strict";NA();kA();a(hCt,"basePick");Dq=hCt});var fCt,Ju,Nq=x(()=>{"use strict";Iq();FW();fCt=BW(function(e,t){return e==null?{}:Dq(e,t)}),Ju=fCt});function mCt(e,t,r,n){for(var i=-1,s=pCt(dCt((t-e)/(r||1)),0),o=Array(s);s--;)o[n?s:++i]=e,e+=r;return o}var dCt,pCt,Mq,Oq=x(()=>{"use strict";dCt=Math.ceil,pCt=Math.max;a(mCt,"baseRange");Mq=mCt});function gCt(e){return function(t,r,n){return n&&typeof n!="number"&&ws(t,r,n)&&(r=n=void 0),t=ud(t),r===void 0?(r=t,t=0):r=ud(r),n=n===void 0?t{"use strict";Oq();Vu();Q4();a(gCt,"createRange");Pq=gCt});var yCt,ra,Fq=x(()=>{"use strict";Bq();yCt=Pq(),ra=yCt});function xCt(e,t,r,n,i){return i(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}var $q,Gq=x(()=>{"use strict";a(xCt,"baseReduce");$q=xCt});function bCt(e,t,r){var n=Qt(e)?VW:$q,i=arguments.length<3;return n(e,Lr(t,4),r,i,os)}var pr,PA=x(()=>{"use strict";zW();vc();Ni();Gq();Yr();a(bCt,"reduce");pr=bCt});function kCt(e,t){var r=Qt(e)?xd:Ak;return r(e,sq(Lr(t,3)))}var Rc,Vq=x(()=>{"use strict";tk();_A();Ni();Yr();aq();a(kCt,"reject");Rc=kCt});function _Ct(e){if(e==null)return 0;if(cn(e))return pn(e)?Lq(e):e.length;var t=As(e);return t==TCt||t==SCt?e.size:dd(e).length}var TCt,SCt,BA,zq=x(()=>{"use strict";Yb();Ku();Xs();Rk();Rq();TCt="[object Map]",SCt="[object Set]";a(_Ct,"size");BA=_Ct});function CCt(e,t){var r;return os(e,function(n,i,s){return r=t(n,i,s),!r}),!!r}var Wq,Uq=x(()=>{"use strict";vc();a(CCt,"baseSome");Wq=CCt});function wCt(e,t,r){var n=Qt(e)?fk:Wq;return r&&ws(e,t,r)&&(t=void 0),n(e,Lr(t,3))}var O0,jq=x(()=>{"use strict";dA();Ni();Uq();Yr();Vu();a(wCt,"some");O0=wCt});var ECt,Eo,qq=x(()=>{"use strict";yd();yq();Yf();Vu();ECt=po(function(e,t){if(e==null)return[];var r=t.length;return r>1&&ws(e,t[0],t[1])?t=[]:r>2&&ws(t[0],t[1],t[2])&&(t=[t[0]]),gq(e,Co(t,1),[])}),Eo=ECt});var vCt,ACt,Hq,Yq=x(()=>{"use strict";cA();Z4();mk();vCt=1/0,ACt=Ec&&1/Sd(new Ec([,-0]))[1]==vCt?function(e){return new Ec(e)}:sn,Hq=ACt});function RCt(e,t,r){var n=-1,i=Hb,s=e.length,o=!0,l=[],u=l;if(r)o=!1,i=wk;else if(s>=LCt){var h=t?null:Hq(e);if(h)return Sd(h);o=!1,i=Td,u=new kd}else u=t?[]:l;t:for(;++n{"use strict";hk();eA();SA();dk();Yq();mk();LCt=200;a(RCt,"baseUniq");vd=RCt});var DCt,FA,Xq=x(()=>{"use strict";yd();Yf();Pk();X2();DCt=po(function(e){return vd(Co(e,1,Fu,!0))}),FA=DCt});function ICt(e){return e&&e.length?vd(e):[]}var Ad,Kq=x(()=>{"use strict";Pk();a(ICt,"uniq");Ad=ICt});function NCt(e,t){return e&&e.length?vd(e,Lr(t,2)):[]}var Qq,Zq=x(()=>{"use strict";Ni();Pk();a(NCt,"uniqBy");Qq=NCt});function OCt(e){var t=++MCt;return Kb(e)+t}var MCt,th,Jq=x(()=>{"use strict";rA();MCt=0;a(OCt,"uniqueId");th=OCt});function PCt(e,t,r){for(var n=-1,i=e.length,s=t.length,o={};++n{"use strict";a(PCt,"baseZipObject");tH=PCt});function BCt(e,t){return tH(e||[],t||[],fo)}var Bk,rH=x(()=>{"use strict";Hf();eH();a(BCt,"zipObject");Bk=BCt});var ue=x(()=>{"use strict";EW();hA();RU();DU();Mv();bj();Sj();Cj();wj();Ej();Dj();CA();Pj();Fj();EA();Zb();vk();$j();Gj();Vj();qj();fl();Xj();Kj();Yr();Ik();e0();Cs();tq();Rk();eq();So();_j();wd();rq();nq();Bv();IA();iq();Z4();yj();Nq();cq();Fq();PA();Vq();zq();jq();qq();Xq();Kq();Jq();RA();rH();});function iH(e,t){e[t]?e[t]++:e[t]=1}function sH(e,t){--e[t]||delete e[t]}function P0(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var o=i;i=s,s=o}return i+nH+s+nH+(Me(n)?FCt:n)}function $Ct(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var o=i;i=s,s=o}var l={v:i,w:s};return n&&(l.name=n),l}function $A(e,t){return P0(e,t.v,t.w,t.name)}var FCt,eh,nH,_r,Fk=x(()=>{"use strict";ue();FCt="\0",eh="\0",nH="",_r=class{static{a(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=es(void 0),this._defaultEdgeLabelFn=es(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[eh]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return _n(t)||(t=es(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return lr(this._nodes)}sources(){var t=this;return dr(this.nodes(),function(r){return De(t._in[r])})}sinks(){var t=this;return dr(this.nodes(),function(r){return De(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return tt(t,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=eh,this._children[t]={},this._children[eh][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=a(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],tt(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),tt(lr(this._in[t]),r),delete this._in[t],delete this._preds[t],tt(lr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Me(r))r=eh;else{r+="";for(var n=r;!Me(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==eh)return r}}children(t){if(Me(t)&&(t=eh),this._isCompound){var r=this._children[t];if(r)return lr(r)}else{if(t===eh)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return lr(r)}successors(t){var r=this._sucs[t];if(r)return lr(r)}neighbors(t){var r=this.predecessors(t);if(r)return FA(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;tt(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),tt(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function s(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:s(l)}return a(s,"findParent"),this._isCompound&&tt(r.nodes(),function(o){r.setParent(o,s(o))}),r}setDefaultEdgeLabel(t){return _n(t)||(t=es(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Ve(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return pr(t,function(s,o){return i.length>1?n.setEdge(s,o,r):n.setEdge(s,o),o}),this}setEdge(){var t,r,n,i,s=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,Me(n)||(n=""+n);var l=P0(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!Me(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=$Ct(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,iH(this._preds[r],t),iH(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?$A(this._isDirected,arguments[0]):P0(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?$A(this._isDirected,arguments[0]):P0(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?$A(this._isDirected,arguments[0]):P0(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],sH(this._preds[r],t),sH(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=Ve(n);return r?dr(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=Ve(n);return r?dr(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};_r.prototype._nodeCount=0;_r.prototype._edgeCount=0;a(iH,"incrementOrInitEntry");a(sH,"decrementOrRemoveEntry");a(P0,"edgeArgsToId");a($Ct,"edgeArgsToObj");a($A,"edgeObjToId")});var na=x(()=>{"use strict";Fk()});function aH(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function GCt(e,t){if(e!=="_next"&&e!=="_prev")return t}var Gk,oH=x(()=>{"use strict";Gk=class{static{a(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return aH(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&aH(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,n=r._prev;n!==r;)t.push(JSON.stringify(n,GCt)),n=n._prev;return"["+t.join(", ")+"]"}};a(aH,"unlink");a(GCt,"filterOutLinks")});function lH(e,t){if(e.nodeCount()<=1)return[];var r=WCt(e,t||VCt),n=zCt(r.graph,r.buckets,r.zeroIdx);return fr(Dt(n,function(i){return e.outEdges(i.v,i.w)}))}function zCt(e,t,r){for(var n=[],i=t[t.length-1],s=t[0],o;e.nodeCount();){for(;o=s.dequeue();)GA(e,t,r,o);for(;o=i.dequeue();)GA(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){n=n.concat(GA(e,t,r,o,!0));break}}}return n}function GA(e,t,r,n,i){var s=i?[]:void 0;return tt(e.inEdges(n.v),function(o){var l=e.edge(o),u=e.node(o.v);i&&s.push({v:o.v,w:o.w}),u.out-=l,VA(t,r,u)}),tt(e.outEdges(n.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,VA(t,r,h)}),e.removeNode(n.v),s}function WCt(e,t){var r=new _r,n=0,i=0;tt(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),tt(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),f=u+h;r.setEdge(l.v,l.w,f),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var s=ra(i+n+3).map(function(){return new Gk}),o=n+1;return tt(r.nodes(),function(l){VA(s,o,r.node(l))}),{graph:r,buckets:s,zeroIdx:o}}function VA(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var VCt,cH=x(()=>{"use strict";ue();na();oH();VCt=es(1);a(lH,"greedyFAS");a(zCt,"doGreedyFAS");a(GA,"removeNode");a(WCt,"buildState");a(VA,"assignBucket")});function uH(e){var t=e.graph().acyclicer==="greedy"?lH(e,r(e)):UCt(e);tt(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,th("rev"))});function r(n){return function(i){return n.edge(i).weight}}a(r,"weightFn")}function UCt(e){var t=[],r={},n={};function i(s){Object.prototype.hasOwnProperty.call(n,s)||(n[s]=!0,r[s]=!0,tt(e.outEdges(s),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):i(o.w)}),delete r[s])}return a(i,"dfs"),tt(e.nodes(),i),t}function hH(e){tt(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var zA=x(()=>{"use strict";ue();cH();a(uH,"run");a(UCt,"dfsFAS");a(hH,"undo")});function vo(e,t,r,n){var i;do i=th(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function dH(e){var t=new _r().setGraph(e.graph());return tt(e.nodes(),function(r){t.setNode(r,e.node(r))}),tt(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function Vk(e){var t=new _r({multigraph:e.isMultigraph()}).setGraph(e.graph());return tt(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),tt(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function WA(e,t){var r=e.x,n=e.y,i=t.x-r,s=t.y-n,o=e.width/2,l=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(s)*o>Math.abs(i)*l?(s<0&&(l=-l),u=l*i/s,h=l):(i<0&&(o=-o),u=o,h=o*s/i),{x:r+u,y:n+h}}function Dc(e){var t=Dt(ra(jA(e)+1),function(){return[]});return tt(e.nodes(),function(r){var n=e.node(r),i=n.rank;Me(i)||(t[i][n.order]=r)}),t}function pH(e){var t=Ga(Dt(e.nodes(),function(r){return e.node(r).rank}));tt(e.nodes(),function(r){var n=e.node(r);Zt(n,"rank")&&(n.rank-=t)})}function mH(e){var t=Ga(Dt(e.nodes(),function(s){return e.node(s).rank})),r=[];tt(e.nodes(),function(s){var o=e.node(s).rank-t;r[o]||(r[o]=[]),r[o].push(s)});var n=0,i=e.graph().nodeRankFactor;tt(r,function(s,o){Me(s)&&o%i!==0?--n:n&&tt(s,function(l){e.node(l).rank+=n})})}function UA(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),vo(e,"border",i,t)}function jA(e){return ls(Dt(e.nodes(),function(t){var r=e.node(t).rank;if(!Me(r))return r}))}function gH(e,t){var r={lhs:[],rhs:[]};return tt(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function yH(e,t){var r=Ck();try{return t()}finally{console.log(e+" time: "+(Ck()-r)+"ms")}}function xH(e,t){return t()}var Ao=x(()=>{"use strict";ue();na();a(vo,"addDummyNode");a(dH,"simplify");a(Vk,"asNonCompoundGraph");a(WA,"intersectRect");a(Dc,"buildLayerMatrix");a(pH,"normalizeRanks");a(mH,"removeEmptyRanks");a(UA,"addBorderNode");a(jA,"maxRank");a(gH,"partition");a(yH,"time");a(xH,"notime")});function kH(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&tt(n,t),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,o=i.maxRank+1;s{"use strict";ue();Ao();a(kH,"addBorderSegments");a(bH,"addBorderNode")});function _H(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&wH(e)}function CH(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&jCt(e),(t==="lr"||t==="rl")&&(qCt(e),wH(e))}function wH(e){tt(e.nodes(),function(t){SH(e.node(t))}),tt(e.edges(),function(t){SH(e.edge(t))})}function SH(e){var t=e.width;e.width=e.height,e.height=t}function jCt(e){tt(e.nodes(),function(t){qA(e.node(t))}),tt(e.edges(),function(t){var r=e.edge(t);tt(r.points,qA),Object.prototype.hasOwnProperty.call(r,"y")&&qA(r)})}function qA(e){e.y=-e.y}function qCt(e){tt(e.nodes(),function(t){HA(e.node(t))}),tt(e.edges(),function(t){var r=e.edge(t);tt(r.points,HA),Object.prototype.hasOwnProperty.call(r,"x")&&HA(r)})}function HA(e){var t=e.x;e.x=e.y,e.y=t}var EH=x(()=>{"use strict";ue();a(_H,"adjust");a(CH,"undo");a(wH,"swapWidthHeight");a(SH,"swapWidthHeightOne");a(jCt,"reverseY");a(qA,"reverseYOne");a(qCt,"swapXY");a(HA,"swapXYOne")});function vH(e){e.graph().dummyChains=[],tt(e.edges(),function(t){YCt(e,t)})}function YCt(e,t){var r=t.v,n=e.node(r).rank,i=t.w,s=e.node(i).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(s!==n+1){e.removeEdge(t);var h=void 0,f,d;for(d=0,++n;n{"use strict";ue();Ao();a(vH,"run");a(YCt,"normalizeEdge");a(AH,"undo")});function B0(e){var t={};function r(n){var i=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return i.rank;t[n]=!0;var s=Ga(Dt(e.outEdges(n),function(o){return r(o.w)-e.edge(o).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),i.rank=s}a(r,"dfs"),tt(e.sources(),r)}function rh(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var zk=x(()=>{"use strict";ue();a(B0,"longestPath");a(rh,"slack")});function Wk(e){var t=new _r({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,s;XCt(t,e){"use strict";ue();na();zk();a(Wk,"feasibleTree");a(XCt,"tightTree");a(KCt,"findMinSlackEdge");a(QCt,"shiftRanks")});var RH=x(()=>{"use strict"});var KA=x(()=>{"use strict"});var GEe,QA=x(()=>{"use strict";ue();KA();GEe=es(1)});var DH=x(()=>{"use strict";QA()});var ZA=x(()=>{"use strict"});var IH=x(()=>{"use strict";ZA()});var QEe,NH=x(()=>{"use strict";ue();QEe=es(1)});function JA(e){var t={},r={},n=[];function i(s){if(Object.prototype.hasOwnProperty.call(r,s))throw new F0;Object.prototype.hasOwnProperty.call(t,s)||(r[s]=!0,t[s]=!0,tt(e.predecessors(s),i),delete r[s],n.push(s))}if(a(i,"visit"),tt(e.sinks(),i),BA(t)!==e.nodeCount())throw new F0;return n}function F0(){}var t5=x(()=>{"use strict";ue();JA.CycleException=F0;a(JA,"topsort");a(F0,"CycleException");F0.prototype=new Error});var MH=x(()=>{"use strict";t5()});function Uk(e,t,r){Qt(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return tt(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);OH(e,o,r==="post",s,n,i)}),i}function OH(e,t,r,n,i,s){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||s.push(t),tt(i(t),function(o){OH(e,o,r,n,i,s)}),r&&s.push(t))}var e5=x(()=>{"use strict";ue();a(Uk,"dfs");a(OH,"doDfs")});function r5(e,t){return Uk(e,t,"post")}var PH=x(()=>{"use strict";e5();a(r5,"postorder")});function n5(e,t){return Uk(e,t,"pre")}var BH=x(()=>{"use strict";e5();a(n5,"preorder")});var FH=x(()=>{"use strict";KA();Fk()});var $H=x(()=>{"use strict";RH();QA();DH();IH();NH();MH();PH();BH();FH();ZA();t5()});function Nc(e){e=dH(e),B0(e);var t=Wk(e);s5(t),i5(t,e);for(var r,n;r=WH(t);)n=UH(t,e,r),jH(t,e,r,n)}function i5(e,t){var r=r5(e,e.nodes());r=r.slice(0,r.length-1),tt(r,function(n){rwt(e,t,n)})}function rwt(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=VH(e,t,r)}function VH(e,t,r){var n=e.node(r),i=n.parent,s=!0,o=t.edge(r,i),l=0;return o||(s=!1,o=t.edge(i,r)),l=o.weight,tt(t.nodeEdges(r),function(u){var h=u.v===r,f=h?u.w:u.v;if(f!==i){var d=h===s,p=t.edge(u).weight;if(l+=d?p:-p,iwt(e,r,f)){var m=e.edge(r,f).cutvalue;l+=d?-m:m}}}),l}function s5(e,t){arguments.length<2&&(t=e.nodes()[0]),zH(e,{},1,t)}function zH(e,t,r,n,i){var s=r,o=e.node(n);return t[n]=!0,tt(e.neighbors(n),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=zH(e,t,r,l,n))}),o.low=s,o.lim=r++,i?o.parent=i:delete o.parent,r}function WH(e){return Mi(e.edges(),function(t){return e.edge(t).cutvalue<0})}function UH(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var s=e.node(n),o=e.node(i),l=s,u=!1;s.lim>o.lim&&(l=o,u=!0);var h=dr(t.edges(),function(f){return u===GH(e,e.node(f.v),l)&&u!==GH(e,e.node(f.w),l)});return Zu(h,function(f){return rh(t,f)})}function jH(e,t,r,n){var i=r.v,s=r.w;e.removeEdge(i,s),e.setEdge(n.v,n.w,{}),s5(e),i5(e,t),nwt(e,t)}function nwt(e,t){var r=Mi(e.nodes(),function(i){return!t.node(i).parent}),n=n5(e,r);n=n.slice(1),tt(n,function(i){var s=e.node(i).parent,o=t.edge(i,s),l=!1;o||(o=t.edge(s,i),l=!0),t.node(i).rank=t.node(s).rank+(l?o.minlen:-o.minlen)})}function iwt(e,t,r){return e.hasEdge(t,r)}function GH(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var qH=x(()=>{"use strict";ue();$H();Ao();XA();zk();Nc.initLowLimValues=s5;Nc.initCutValues=i5;Nc.calcCutValue=VH;Nc.leaveEdge=WH;Nc.enterEdge=UH;Nc.exchangeEdges=jH;a(Nc,"networkSimplex");a(i5,"initCutValues");a(rwt,"assignCutValue");a(VH,"calcCutValue");a(s5,"initLowLimValues");a(zH,"dfsAssignLowLim");a(WH,"leaveEdge");a(UH,"enterEdge");a(jH,"exchangeEdges");a(nwt,"updateRanks");a(iwt,"isTreeEdge");a(GH,"isDescendant")});function a5(e){switch(e.graph().ranker){case"network-simplex":HH(e);break;case"tight-tree":awt(e);break;case"longest-path":swt(e);break;default:HH(e)}}function awt(e){B0(e),Wk(e)}function HH(e){Nc(e)}var swt,o5=x(()=>{"use strict";XA();qH();zk();a(a5,"rank");swt=B0;a(awt,"tightTreeRanker");a(HH,"networkSimplexRanker")});function YH(e){var t=vo(e,"root",{},"_root"),r=owt(e),n=ls(Ve(r))-1,i=2*n+1;e.graph().nestingRoot=t,tt(e.edges(),function(o){e.edge(o).minlen*=i});var s=lwt(e)+1;tt(e.children(),function(o){XH(e,t,i,s,n,r,o)}),e.graph().nodeRankFactor=i}function XH(e,t,r,n,i,s,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=UA(e,"_bt"),h=UA(e,"_bb"),f=e.node(o);e.setParent(u,o),f.borderTop=u,e.setParent(h,o),f.borderBottom=h,tt(l,function(d){XH(e,t,r,n,i,s,d);var p=e.node(d),m=p.borderTop?p.borderTop:d,g=p.borderBottom?p.borderBottom:d,y=p.borderTop?n:2*n,b=m!==g?1:i-s[o]+1;e.setEdge(u,m,{weight:y,minlen:b,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:b,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:i+s[o]})}function owt(e){var t={};function r(n,i){var s=e.children(n);s&&s.length&&tt(s,function(o){r(o,i+1)}),t[n]=i}return a(r,"dfs"),tt(e.children(),function(n){r(n,1)}),t}function lwt(e){return pr(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function KH(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,tt(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var QH=x(()=>{"use strict";ue();Ao();a(YH,"run");a(XH,"dfs");a(owt,"treeDepths");a(lwt,"sumWeights");a(KH,"cleanup")});function ZH(e,t,r){var n={},i;tt(r,function(s){for(var o=e.parent(s),l,u;o;){if(l=e.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var JH=x(()=>{"use strict";ue();a(ZH,"addSubgraphConstraints")});function tY(e,t,r){var n=uwt(e),i=new _r({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return e.node(s)});return tt(e.nodes(),function(s){var o=e.node(s),l=e.parent(s);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(s),i.setParent(s,l||n),tt(e[r](s),function(u){var h=u.v===s?u.w:u.v,f=i.edge(h,s),d=Me(f)?0:f.weight;i.setEdge(h,s,{weight:e.edge(u).weight+d})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(s,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function uwt(e){for(var t;e.hasNode(t=th("_root")););return t}var eY=x(()=>{"use strict";ue();na();a(tY,"buildLayerGraph");a(uwt,"createRootNode")});function rY(e,t){for(var r=0,n=1;n0;)f%2&&(d+=l[f+1]),f=f-1>>1,l[f]+=h.weight;u+=h.weight*d})),u}var nY=x(()=>{"use strict";ue();a(rY,"crossCount");a(hwt,"twoLayerCrossCount")});function iY(e){var t={},r=dr(e.nodes(),function(l){return!e.children(l).length}),n=ls(Dt(r,function(l){return e.node(l).rank})),i=Dt(ra(n+1),function(){return[]});function s(l){if(!Zt(t,l)){t[l]=!0;var u=e.node(l);i[u.rank].push(l),tt(e.successors(l),s)}}a(s,"dfs");var o=Eo(r,function(l){return e.node(l).rank});return tt(o,s),i}var sY=x(()=>{"use strict";ue();a(iY,"initOrder")});function aY(e,t){return Dt(t,function(r){var n=e.inEdges(r);if(n.length){var i=pr(n,function(s,o){var l=e.edge(o),u=e.node(o.v);return{sum:s.sum+l.weight*u.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var oY=x(()=>{"use strict";ue();a(aY,"barycenter")});function lY(e,t){var r={};tt(e,function(i,s){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};Me(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),tt(t.edges(),function(i){var s=r[i.v],o=r[i.w];!Me(s)&&!Me(o)&&(o.indegree++,s.out.push(r[i.w]))});var n=dr(r,function(i){return!i.indegree});return fwt(n)}function fwt(e){var t=[];function r(s){return function(o){o.merged||(Me(o.barycenter)||Me(s.barycenter)||o.barycenter>=s.barycenter)&&dwt(s,o)}}a(r,"handleIn");function n(s){return function(o){o.in.push(s),--o.indegree===0&&e.push(o)}}for(a(n,"handleOut");e.length;){var i=e.pop();t.push(i),tt(i.in.reverse(),r(i)),tt(i.out,n(i))}return Dt(dr(t,function(s){return!s.merged}),function(s){return Ju(s,["vs","i","barycenter","weight"])})}function dwt(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var cY=x(()=>{"use strict";ue();a(lY,"resolveConflicts");a(fwt,"doResolveConflicts");a(dwt,"mergeEntries")});function hY(e,t){var r=gH(e,function(f){return Object.prototype.hasOwnProperty.call(f,"barycenter")}),n=r.lhs,i=Eo(r.rhs,function(f){return-f.i}),s=[],o=0,l=0,u=0;n.sort(pwt(!!t)),u=uY(s,i,u),tt(n,function(f){u+=f.vs.length,s.push(f.vs),o+=f.barycenter*f.weight,l+=f.weight,u=uY(s,i,u)});var h={vs:fr(s)};return l&&(h.barycenter=o/l,h.weight=l),h}function uY(e,t,r){for(var n;t.length&&(n=ii(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function pwt(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var fY=x(()=>{"use strict";ue();Ao();a(hY,"sort");a(uY,"consumeUnsortable");a(pwt,"compareWithBias")});function l5(e,t,r,n){var i=e.children(t),s=e.node(t),o=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,u={};o&&(i=dr(i,function(g){return g!==o&&g!==l}));var h=aY(e,i);tt(h,function(g){if(e.children(g.v).length){var y=l5(e,g.v,r,n);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&gwt(g,y)}});var f=lY(h,r);mwt(f,u);var d=hY(f,n);if(o&&(d.vs=fr([o,d.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+p.order+m.order)/(d.weight+2),d.weight+=2}return d}function mwt(e,t){tt(e,function(r){r.vs=fr(r.vs.map(function(n){return t[n]?t[n].vs:n}))})}function gwt(e,t){Me(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var dY=x(()=>{"use strict";ue();oY();cY();fY();a(l5,"sortSubgraph");a(mwt,"expandSubgraphs");a(gwt,"mergeBarycenters")});function gY(e){var t=jA(e),r=pY(e,ra(1,t+1),"inEdges"),n=pY(e,ra(t-1,-1,-1),"outEdges"),i=iY(e);mY(e,i);for(var s=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){ywt(l%2?r:n,l%4>=2),i=Dc(e);var h=rY(e,i);h{"use strict";ue();na();Ao();JH();eY();nY();sY();dY();a(gY,"order");a(pY,"buildLayerGraphs");a(ywt,"sweepLayerGraphs");a(mY,"assignOrder")});function xY(e){var t=bwt(e);tt(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,s=xwt(e,t,i.v,i.w),o=s.path,l=s.lca,u=0,h=o[u],f=!0;r!==i.w;){if(n=e.node(r),f){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=n;(u=e.parent(u))!==h;)s.push(u);return{path:i.concat(s.reverse()),lca:h}}function bwt(e){var t={},r=0;function n(i){var s=r;tt(e.children(i),n),t[i]={low:s,lim:r++}}return a(n,"dfs"),tt(e.children(),n),t}var bY=x(()=>{"use strict";ue();a(xY,"parentDummyChains");a(xwt,"findPath");a(bwt,"postorder")});function kwt(e,t){var r={};function n(i,s){var o=0,l=0,u=i.length,h=ii(s);return tt(s,function(f,d){var p=Swt(e,f),m=p?e.node(p).order:u;(p||f===h)&&(tt(s.slice(l,d+1),function(g){tt(e.predecessors(g),function(y){var b=e.node(y),k=b.order;(kh)&&kY(r,p,f)})})}a(n,"scan");function i(s,o){var l=-1,u,h=0;return tt(o,function(f,d){if(e.node(f).dummy==="border"){var p=e.predecessors(f);p.length&&(u=e.node(p[0]).order,n(o,h,d,l,u),h=d,l=u)}n(o,h,o.length,u,s.length)}),o}return a(i,"visitLayer"),pr(t,i),r}function Swt(e,t){if(e.node(t).dummy)return Mi(e.predecessors(t),function(r){return e.node(r).dummy})}function kY(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function _wt(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function Cwt(e,t,r,n){var i={},s={},o={};return tt(t,function(l){tt(l,function(u,h){i[u]=u,s[u]=u,o[u]=h})}),tt(t,function(l){var u=-1;tt(l,function(h){var f=n(h);if(f.length){f=Eo(f,function(y){return o[y]});for(var d=(f.length-1)/2,p=Math.floor(d),m=Math.ceil(d);p<=m;++p){var g=f[p];s[h]===h&&u{"use strict";ue();na();Ao();a(kwt,"findType1Conflicts");a(Twt,"findType2Conflicts");a(Swt,"findOtherInnerSegmentNode");a(kY,"addConflict");a(_wt,"hasConflict");a(Cwt,"verticalAlignment");a(wwt,"horizontalCompaction");a(Ewt,"buildBlockGraph");a(vwt,"findSmallestWidthAlignment");a(Awt,"alignCoordinates");a(Lwt,"balance");a(TY,"positionX");a(Rwt,"sep");a(Dwt,"width")});function _Y(e){e=Vk(e),Iwt(e),AA(TY(e),function(t,r){e.node(r).x=t})}function Iwt(e){var t=Dc(e),r=e.graph().ranksep,n=0;tt(t,function(i){var s=ls(Dt(i,function(o){return e.node(o).height}));tt(i,function(o){e.node(o).y=n+s/2}),n+=s+r})}var CY=x(()=>{"use strict";ue();Ao();SY();a(_Y,"position");a(Iwt,"positionY")});function $0(e,t){var r=t&&t.debugTiming?yH:xH;r("layout",()=>{var n=r(" buildLayoutGraph",()=>Wwt(e));r(" runLayout",()=>Nwt(n,r)),r(" updateInputGraph",()=>Mwt(e,n))})}function Nwt(e,t){t(" makeSpaceForEdgeLabels",()=>Uwt(e)),t(" removeSelfEdges",()=>Jwt(e)),t(" acyclic",()=>uH(e)),t(" nestingGraph.run",()=>YH(e)),t(" rank",()=>a5(Vk(e))),t(" injectEdgeLabelProxies",()=>jwt(e)),t(" removeEmptyRanks",()=>mH(e)),t(" nestingGraph.cleanup",()=>KH(e)),t(" normalizeRanks",()=>pH(e)),t(" assignRankMinMax",()=>qwt(e)),t(" removeEdgeLabelProxies",()=>Hwt(e)),t(" normalize.run",()=>vH(e)),t(" parentDummyChains",()=>xY(e)),t(" addBorderSegments",()=>kH(e)),t(" order",()=>gY(e)),t(" insertSelfEdges",()=>tEt(e)),t(" adjustCoordinateSystem",()=>_H(e)),t(" position",()=>_Y(e)),t(" positionSelfEdges",()=>eEt(e)),t(" removeBorderNodes",()=>Zwt(e)),t(" normalize.undo",()=>AH(e)),t(" fixupEdgeLabelCoords",()=>Kwt(e)),t(" undoCoordinateSystem",()=>CH(e)),t(" translateGraph",()=>Ywt(e)),t(" assignNodeIntersects",()=>Xwt(e)),t(" reversePoints",()=>Qwt(e)),t(" acyclic.undo",()=>hH(e))}function Mwt(e,t){tt(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),tt(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function Wwt(e){var t=new _r({multigraph:!0,compound:!0}),r=u5(e.graph());return t.setGraph(mc({},Pwt,c5(r,Owt),Ju(r,Bwt))),tt(e.nodes(),function(n){var i=u5(e.node(n));t.setNode(n,Ac(c5(i,Fwt),$wt)),t.setParent(n,e.parent(n))}),tt(e.edges(),function(n){var i=u5(e.edge(n));t.setEdge(n,mc({},Vwt,c5(i,Gwt),Ju(i,zwt)))}),t}function Uwt(e){var t=e.graph();t.ranksep/=2,tt(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function jwt(e){tt(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),s={rank:(i.rank-n.rank)/2+n.rank,e:t};vo(e,"edge-proxy",s,"_ep")}})}function qwt(e){var t=0;tt(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=ls(t,n.maxRank))}),e.graph().maxRank=t}function Hwt(e){tt(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function Ywt(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,s=e.graph(),o=s.marginx||0,l=s.marginy||0;function u(h){var f=h.x,d=h.y,p=h.width,m=h.height;t=Math.min(t,f-p/2),r=Math.max(r,f+p/2),n=Math.min(n,d-m/2),i=Math.max(i,d+m/2)}a(u,"getExtremes"),tt(e.nodes(),function(h){u(e.node(h))}),tt(e.edges(),function(h){var f=e.edge(h);Object.prototype.hasOwnProperty.call(f,"x")&&u(f)}),t-=o,n-=l,tt(e.nodes(),function(h){var f=e.node(h);f.x-=t,f.y-=n}),tt(e.edges(),function(h){var f=e.edge(h);tt(f.points,function(d){d.x-=t,d.y-=n}),Object.prototype.hasOwnProperty.call(f,"x")&&(f.x-=t),Object.prototype.hasOwnProperty.call(f,"y")&&(f.y-=n)}),s.width=r-t+o,s.height=i-n+l}function Xwt(e){tt(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),s,o;r.points?(s=r.points[0],o=r.points[r.points.length-1]):(r.points=[],s=i,o=n),r.points.unshift(WA(n,s)),r.points.push(WA(i,o))})}function Kwt(e){tt(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Qwt(e){tt(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Zwt(e){tt(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),s=e.node(ii(r.borderLeft)),o=e.node(ii(r.borderRight));r.width=Math.abs(o.x-s.x),r.height=Math.abs(i.y-n.y),r.x=s.x+r.width/2,r.y=n.y+r.height/2}}),tt(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Jwt(e){tt(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function tEt(e){var t=Dc(e);tt(t,function(r){var n=0;tt(r,function(i,s){var o=e.node(i);o.order=s+n,tt(o.selfEdges,function(l){vo(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:s+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function eEt(e){tt(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,s=n.y,o=r.x-i,l=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*o/3,y:s-l},{x:i+5*o/6,y:s-l},{x:i+o,y:s},{x:i+5*o/6,y:s+l},{x:i+2*o/3,y:s+l}],r.label.x=r.x,r.label.y=r.y}})}function c5(e,t){return Qu(Ju(e,t),Number)}function u5(e){var t={};return tt(e,function(r,n){t[n.toLowerCase()]=r}),t}var Owt,Pwt,Bwt,Fwt,$wt,Gwt,Vwt,zwt,wY=x(()=>{"use strict";ue();na();TH();EH();zA();YA();o5();QH();yY();bY();CY();Ao();a($0,"layout");a(Nwt,"runLayout");a(Mwt,"updateInputGraph");Owt=["nodesep","edgesep","ranksep","marginx","marginy"],Pwt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Bwt=["acyclicer","ranker","rankdir","align"],Fwt=["width","height"],$wt={width:0,height:0},Gwt=["minlen","weight","width","height","labeloffset"],Vwt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},zwt=["labelpos"];a(Wwt,"buildLayoutGraph");a(Uwt,"makeSpaceForEdgeLabels");a(jwt,"injectEdgeLabelProxies");a(qwt,"assignRankMinMax");a(Hwt,"removeEdgeLabelProxies");a(Ywt,"translateGraph");a(Xwt,"assignNodeIntersects");a(Kwt,"fixupEdgeLabelCoords");a(Qwt,"reversePointsForReversedEdges");a(Zwt,"removeBorderNodes");a(Jwt,"removeSelfEdges");a(tEt,"insertSelfEdges");a(eEt,"positionSelfEdges");a(c5,"selectNumberAttrs");a(u5,"canonicalize")});var h5=x(()=>{"use strict";zA();wY();YA();o5()});function ia(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:rEt(e),edges:nEt(e)};return Me(e.graph())||(t.value=Sr(e.graph())),t}function rEt(e){return Dt(e.nodes(),function(t){var r=e.node(t),n=e.parent(t),i={v:t};return Me(r)||(i.value=r),Me(n)||(i.parent=n),i})}function nEt(e){return Dt(e.edges(),function(t){var r=e.edge(t),n={v:t.v,w:t.w};return Me(t.name)||(n.name=t.name),Me(r)||(n.value=r),n})}var f5=x(()=>{"use strict";ue();Fk();a(ia,"write");a(rEt,"writeNodes");a(nEt,"writeEdges")});var ze,nh,AY,LY,jk,iEt,RY,DY,sEt,Ld,vY,IY,NY,MY,OY,PY=x(()=>{"use strict";zt();na();f5();ze=new Map,nh=new Map,AY=new Map,LY=a(()=>{nh.clear(),AY.clear(),ze.clear()},"clear"),jk=a((e,t)=>{let r=nh.get(t)||[];return P.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),iEt=a((e,t)=>{let r=nh.get(t)||[];return P.info("Descendants of ",t," is ",r),P.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||jk(e.v,t)||jk(e.w,t)||r.includes(e.w):(P.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),RY=a((e,t,r,n)=>{P.warn("Copying children of ",e,"root",n,"data",t.node(e),n);let i=t.children(e)||[];e!==n&&i.push(e),P.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(s=>{if(t.children(s).length>0)RY(s,t,r,n);else{let o=t.node(s);P.info("cp ",s," to ",n," with parent ",e),r.setNode(s,o),n!==t.parent(s)&&(P.warn("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==n&&s!==e?(P.debug("Setting parent",s,e),r.setParent(s,e)):(P.info("In copy ",e,"root",n,"data",t.node(e),n),P.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==n,"node!==clusterId",s!==e));let l=t.edges(s);P.debug("Copying Edges",l),l.forEach(u=>{P.info("Edge",u);let h=t.edge(u.v,u.w,u.name);P.info("Edge data",h,n);try{iEt(u,n)?(P.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),P.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):P.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",e)}catch(f){P.error(f)}})}P.debug("Removing node",s),t.removeNode(s)})},"copy"),DY=a((e,t)=>{let r=t.children(e),n=[...r];for(let i of r)AY.set(i,e),n=[...n,...DY(i,t)];return n},"extractDescendants"),sEt=a((e,t,r)=>{let n=e.edges().filter(u=>u.v===t||u.w===t),i=e.edges().filter(u=>u.v===r||u.w===r),s=n.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return s.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),Ld=a((e,t,r)=>{let n=t.children(e);if(P.trace("Searching children of id ",e,n),n.length<1)return e;let i;for(let s of n){let o=Ld(s,t,r),l=sEt(t,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),vY=a(e=>!ze.has(e)||!ze.get(e).externalConnections?e:ze.has(e)?ze.get(e).id:e,"getAnchorId"),IY=a((e,t)=>{if(!e||t>10){P.debug("Opting out, no graph ");return}else P.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(P.warn("Cluster identified",r," Replacement id in edges: ",Ld(r,e,r)),nh.set(r,DY(r,e)),ze.set(r,{id:Ld(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let n=e.children(r),i=e.edges();n.length>0?(P.debug("Cluster identified",r,nh),i.forEach(s=>{let o=jk(s.v,r),l=jk(s.w,r);o^l&&(P.warn("Edge: ",s," leaves cluster ",r),P.warn("Descendants of XXX ",r,": ",nh.get(r)),ze.get(r).externalConnections=!0)})):P.debug("Not a cluster ",r,nh)});for(let r of ze.keys()){let n=ze.get(r).id,i=e.parent(n);i!==r&&ze.has(i)&&!ze.get(i).externalConnections&&(ze.get(r).id=i)}e.edges().forEach(function(r){let n=e.edge(r);P.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),P.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,s=r.w;if(P.warn("Fix XXX",ze,"ids:",r.v,r.w,"Translating: ",ze.get(r.v)," --- ",ze.get(r.w)),ze.get(r.v)||ze.get(r.w)){if(P.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=vY(r.v),s=vY(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v){let o=e.parent(i);ze.get(o).externalConnections=!0,n.fromCluster=r.v}if(s!==r.w){let o=e.parent(s);ze.get(o).externalConnections=!0,n.toCluster=r.w}P.warn("Fix Replacing with XXX",i,s,r.name),e.setEdge(i,s,n,r.name)}}),P.warn("Adjusted Graph",ia(e)),NY(e,0),P.trace(ze)},"adjustClustersAndEdges"),NY=a((e,t)=>{if(P.warn("extractor - ",t,ia(e),e.children("D")),t>10){P.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i of r){let s=e.children(i);n=n||s.length>0}if(!n){P.debug("Done, no node has children",e.nodes());return}P.debug("Nodes = ",r,t);for(let i of r)if(P.debug("Extracting node",i,ze,ze.has(i)&&!ze.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!ze.has(i))P.debug("Not a cluster",i,t);else if(!ze.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){P.warn("Cluster without external connections, without a parent and with children",i,t);let o=e.graph().rankdir==="TB"?"LR":"TB";ze.get(i)?.clusterData?.dir&&(o=ze.get(i).clusterData.dir,P.warn("Fixing dir",ze.get(i).clusterData.dir,o));let l=new _r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});P.warn("Old graph before copy",ia(e)),RY(i,e,l,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:ze.get(i).clusterData,label:ze.get(i).label,graph:l}),P.warn("New graph after copy node: (",i,")",ia(l)),P.debug("Old graph after copy",ia(e))}else P.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!ze.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),P.debug(ze);r=e.nodes(),P.warn("New list of nodes",r);for(let i of r){let s=e.node(i);P.warn(" Now next level",i,s),s?.clusterNode&&NY(s.graph,t+1)}},"extractor"),MY=a((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(n=>{let i=e.children(n),s=MY(e,i);r=[...r,...s]}),r},"sorter"),OY=a(e=>MY(e,e.children()),"sortNodesByHierarchy")});var FY={};Be(FY,{render:()=>aEt});var BY,aEt,$Y=x(()=>{"use strict";h5();f5();na();K4();re();PY();zb();Ib();X4();zt();L0();pe();BY=a(async(e,t,r,n,i,s)=>{P.warn("Graph in recursive render:XAX",ia(t),i);let o=t.graph().rankdir;P.trace("Dir in recursive render - dir:",o);let l=e.insert("g").attr("class","root");t.nodes()?P.info("Recursive render XXX",t.nodes()):P.info("No nodes found for",t),t.edges().length>0&&P.info("Recursive edges",t.edge(t.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(y){let b=t.node(y);if(i!==void 0){let k=JSON.parse(JSON.stringify(i.clusterData));P.trace(`Setting data for parent cluster XXX + Node.id = `,y,` + data=`,k.height,` +Parent cluster`,i.height),t.setNode(i.id,k),t.parent(y)||(P.trace("Setting parent",y,i.id),t.setParent(y,i.id,k))}if(P.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),b?.clusterNode){P.info("Cluster identified XBX",y,b.width,t.node(y));let{ranksep:k,nodesep:T}=t.graph();b.graph.setGraph({...b.graph.graph(),ranksep:k+25,nodesep:T});let _=await BY(d,b.graph,r,n,t.node(y),s),L=_.elem;Ct(b,L),b.diff=_.diff||0,P.info("New compound node after recursive render XAX",y,"width",b.width,"height",b.height),rW(L,b)}else t.children(y).length>0?(P.trace("Cluster - the non recursive path XBX",y,b.id,b,b.width,"Graph:",t),P.trace(Ld(b.id,t)),ze.set(b.id,{id:Ld(b.id,t),node:b})):(P.trace("Node - the non recursive path XAX",y,d,t.node(y),o),await cd(d,t.node(y),{config:s,dir:o}))})),await a(async()=>{let y=t.edges().map(async function(b){let k=t.edge(b.v,b.w,b.name);P.info("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(b)),P.info("Edge "+b.v+" -> "+b.w+": ",b," ",JSON.stringify(t.edge(b))),P.info("Fix",ze,"ids:",b.v,b.w,"Translating: ",ze.get(b.v),ze.get(b.w)),await Bb(f,k)});await Promise.all(y)},"processEdges")(),P.info("Graph before layout:",JSON.stringify(ia(t))),P.info("############################################# XXX"),P.info("### Layout ### XXX"),P.info("############################################# XXX"),$0(t),P.info("Graph after layout:",JSON.stringify(ia(t)));let m=0,{subGraphTitleTotalMargin:g}=yl(s);return await Promise.all(OY(t).map(async function(y){let b=t.node(y);if(P.info("Position XBX => "+y+": ("+b.x,","+b.y,") width: ",b.width," height: ",b.height),b?.clusterNode)b.y+=g,P.info("A tainted cluster node XBX1",y,b.id,b.width,b.height,b.x,b.y,t.parent(y)),ze.get(b.id).node=b,D0(b);else if(t.children(y).length>0){P.info("A pure cluster node XBX1",y,b.id,b.x,b.y,b.width,b.height,t.parent(y)),b.height+=g,t.node(b.parentId);let k=b?.padding/2||0,T=b?.labelBBox?.height||0,_=T-k||0;P.debug("OffsetY",_,"labelHeight",T,"halfPadding",k),await ld(u,b),ze.get(b.id).node=b}else{let k=t.node(b.parentId);b.y+=g/2,P.info("A regular node XBX1 - using the padding",b.id,"parent",b.parentId,b.width,b.height,b.x,b.y,"offsetY",b.offsetY,"parent",k,k?.offsetY,b),D0(b)}})),t.edges().forEach(function(y){let b=t.edge(y);P.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(b),b),b.points.forEach(L=>L.y+=g/2);let k=t.node(y.v);var T=t.node(y.w);let _=$b(h,b,ze,r,k,T,n);Fb(b,_)}),t.nodes().forEach(function(y){let b=t.node(y);P.info(y,b.type,b.diff),b.isGroup&&(m=b.diff)}),P.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m}},"recursiveRender"),aEt=a(async(e,t)=>{let r=new _r({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=t.select("g");Gb(n,e.markers,e.type,e.diagramId),nW(),eW(),Xz(),LY(),e.nodes.forEach(s=>{r.setNode(s.id,{...s}),s.parentId&&r.setParent(s.id,s.parentId)}),P.debug("Edges:",e.edges),e.edges.forEach(s=>{if(s.start===s.end){let o=s.start,l=o+"---"+o+"---1",u=o+"---"+o+"---2",h=r.node(o);r.setNode(l,{domId:l,id:l,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(l,h.parentId),r.setNode(u,{domId:u,id:u,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(u,h.parentId);let f=structuredClone(s),d=structuredClone(s),p=structuredClone(s);f.label="",f.arrowTypeEnd="none",f.id=o+"-cyclic-special-1",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=o+"-cyclic-special-mid",p.label="",h.isGroup&&(f.fromCluster=o,p.toCluster=o),p.id=o+"-cyclic-special-2",p.arrowTypeStart="none",r.setEdge(o,l,f,o+"-cyclic-special-0"),r.setEdge(l,u,d,o+"-cyclic-special-1"),r.setEdge(u,o,p,o+"-cyc{"use strict";sW();zt();G0={},d5=a(e=>{for(let t of e)G0[t.name]=t},"registerLayoutLoaders"),oEt=a(()=>{d5([{name:"dagre",loader:a(async()=>await Promise.resolve().then(()=>($Y(),FY)),"loader")}])},"registerDefaultLayoutLoaders");oEt();Lo=a(async(e,t)=>{if(!(e.layoutAlgorithm in G0))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);let r=G0[e.layoutAlgorithm];return(await r.loader()).render(e,t,iW,{algorithm:r.algorithm})},"render"),Mc=a((e="",{fallback:t="dagre"}={})=>{if(e in G0)return e;if(t in G0)return P.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")});var Ro,lEt,cEt,Rd=x(()=>{"use strict";Gn();zt();Ro=a((e,t,r,n)=>{e.attr("class",r);let{width:i,height:s,x:o,y:l}=lEt(e,t);Rr(e,s,i,n);let u=cEt(o,l,i,s,t);e.attr("viewBox",u),P.debug(`viewBox configured: ${u} with padding: ${t}`)},"setupViewPortForSVG"),lEt=a((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),cEt=a((e,t,r,n,i)=>`${e-i} ${t-i} ${r} ${n}`,"createViewBox")});var uEt,hEt,GY,VY=x(()=>{"use strict";$e();pe();zt();od();ih();Rd();Ee();uEt=a(function(e,t){return t.db.getClasses()},"getClasses"),hEt=a(async function(e,t,r,n){P.info("REF0:"),P.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:s,layout:o}=Y(),l;i==="sandbox"&&(l=xt("#i"+t));let u=i==="sandbox"?l.nodes()[0].contentDocument:document;P.debug("Before getData: ");let h=n.db.getData();P.debug("Data: ",h);let f=ko(t,i),d=n.db.getDirection();h.type=n.type,h.layoutAlgorithm=Mc(o),h.layoutAlgorithm==="dagre"&&o==="elk"&&P.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=s?.nodeSpacing||50,h.rankSpacing=s?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=t,P.debug("REF1:",h),await Lo(h,f);let p=h.config.flowchart?.diagramPadding??8;se.insertTitle(f,"flowchartTitleText",s?.titleTopMargin||0,n.db.getDiagramTitle()),Ro(f,p,"flowchart",s?.useMaxWidth||!1);for(let m of h.nodes){let g=xt(`#${t} [id="${m.id}"]`);if(!g||!m.link)continue;let y=u.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",m.cssClasses),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):m.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",m.linkTarget);let b=g.insert(function(){return y},":first-child"),k=g.select(".label-container");k&&b.append(function(){return k.node()});let T=g.select(".label");T&&b.append(function(){return T.node()})}},"draw"),GY={getClasses:uEt,draw:hEt}});var p5,m5,zY=x(()=>{"use strict";p5=function(){var e=a(function(ya,ie,Se,Ie){for(Se=Se||{},Ie=ya.length;Ie--;Se[ya[Ie]]=ie);return Se},"o"),t=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],s=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],f=[1,23],d=[1,25],p=[1,26],m=[1,27],g=[1,49],y=[1,48],b=[1,29],k=[1,30],T=[1,31],_=[1,32],L=[1,33],C=[1,44],D=[1,46],$=[1,42],w=[1,47],A=[1,43],F=[1,50],S=[1,45],v=[1,51],R=[1,52],B=[1,34],I=[1,35],M=[1,36],O=[1,37],N=[1,57],E=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],V=[1,61],G=[1,60],J=[1,62],rt=[8,9,11,75,77,78],nt=[1,78],ct=[1,91],pt=[1,96],Lt=[1,95],bt=[1,92],ut=[1,88],it=[1,94],st=[1,90],X=[1,97],H=[1,93],at=[1,98],W=[1,89],mt=[8,9,10,11,40,75,77,78],q=[8,9,10,11,40,46,75,77,78],Z=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],ye=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ot=[44,60,89,102,105,106,109,111,114,115,116],Jt=[1,121],ve=[1,122],te=[1,124],vt=[1,123],It=[44,60,62,74,89,102,105,106,109,111,114,115,116],yt=[1,133],ht=[1,147],wt=[1,148],Q=[1,149],Nt=[1,150],z=[1,135],$t=[1,137],U=[1,141],Tt=[1,142],gt=[1,143],Yt=[1,144],Mt=[1,145],kt=[1,146],Ge=[1,151],Pt=[1,152],nr=[1,131],Ze=[1,132],yr=[1,139],Je=[1,134],ke=[1,138],He=[1,136],Te=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],ur=[1,154],yn=[1,156],we=[8,9,11],Oe=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Ae=[1,176],xe=[1,172],he=[1,173],ge=[1,177],be=[1,174],jt=[1,175],An=[77,116,119],ne=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Si=[10,106],fn=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Pr=[1,247],vr=[1,245],ci=[1,249],Kt=[1,243],et=[1,244],Bt=[1,246],Xt=[1,248],tr=[1,250],rn=[1,268],xn=[8,9,11,106],Wr=[8,9,10,11,60,84,105,106,109,110,111,112],Xi={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:a(function(ie,Se,Ie,Vt,Br,j,su){var K=j.length-1;switch(Br){case 2:this.$=[];break;case 3:(!Array.isArray(j[K])||j[K].length>0)&&j[K-1].push(j[K]),this.$=j[K-1];break;case 4:case 183:this.$=j[K];break;case 11:Vt.setDirection("TB"),this.$="TB";break;case 12:Vt.setDirection(j[K-1]),this.$=j[K-1];break;case 27:this.$=j[K-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=Vt.addSubGraph(j[K-6],j[K-1],j[K-4]);break;case 34:this.$=Vt.addSubGraph(j[K-3],j[K-1],j[K-3]);break;case 35:this.$=Vt.addSubGraph(void 0,j[K-1],void 0);break;case 37:this.$=j[K].trim(),Vt.setAccTitle(this.$);break;case 38:case 39:this.$=j[K].trim(),Vt.setAccDescription(this.$);break;case 43:this.$=j[K-1]+j[K];break;case 44:this.$=j[K];break;case 45:Vt.addVertex(j[K-1][j[K-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,j[K]),Vt.addLink(j[K-3].stmt,j[K-1],j[K-2]),this.$={stmt:j[K-1],nodes:j[K-1].concat(j[K-3].nodes)};break;case 46:Vt.addLink(j[K-2].stmt,j[K],j[K-1]),this.$={stmt:j[K],nodes:j[K].concat(j[K-2].nodes)};break;case 47:Vt.addLink(j[K-3].stmt,j[K-1],j[K-2]),this.$={stmt:j[K-1],nodes:j[K-1].concat(j[K-3].nodes)};break;case 48:this.$={stmt:j[K-1],nodes:j[K-1]};break;case 49:Vt.addVertex(j[K-1][j[K-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,j[K]),this.$={stmt:j[K-1],nodes:j[K-1],shapeData:j[K]};break;case 50:this.$={stmt:j[K],nodes:j[K]};break;case 51:this.$=[j[K]];break;case 52:Vt.addVertex(j[K-5][j[K-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,j[K-4]),this.$=j[K-5].concat(j[K]);break;case 53:this.$=j[K-4].concat(j[K]);break;case 54:this.$=j[K];break;case 55:this.$=j[K-2],Vt.setClass(j[K-2],j[K]);break;case 56:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"square");break;case 57:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"doublecircle");break;case 58:this.$=j[K-5],Vt.addVertex(j[K-5],j[K-2],"circle");break;case 59:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"ellipse");break;case 60:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"stadium");break;case 61:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"subroutine");break;case 62:this.$=j[K-7],Vt.addVertex(j[K-7],j[K-1],"rect",void 0,void 0,void 0,Object.fromEntries([[j[K-5],j[K-3]]]));break;case 63:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"cylinder");break;case 64:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"round");break;case 65:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"diamond");break;case 66:this.$=j[K-5],Vt.addVertex(j[K-5],j[K-2],"hexagon");break;case 67:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"odd");break;case 68:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"trapezoid");break;case 69:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"inv_trapezoid");break;case 70:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"lean_right");break;case 71:this.$=j[K-3],Vt.addVertex(j[K-3],j[K-1],"lean_left");break;case 72:this.$=j[K],Vt.addVertex(j[K]);break;case 73:j[K-1].text=j[K],this.$=j[K-1];break;case 74:case 75:j[K-2].text=j[K-1],this.$=j[K-2];break;case 76:this.$=j[K];break;case 77:var bn=Vt.destructLink(j[K],j[K-2]);this.$={type:bn.type,stroke:bn.stroke,length:bn.length,text:j[K-1]};break;case 78:var bn=Vt.destructLink(j[K],j[K-2]);this.$={type:bn.type,stroke:bn.stroke,length:bn.length,text:j[K-1],id:j[K-3]};break;case 79:this.$={text:j[K],type:"text"};break;case 80:this.$={text:j[K-1].text+""+j[K],type:j[K-1].type};break;case 81:this.$={text:j[K],type:"string"};break;case 82:this.$={text:j[K],type:"markdown"};break;case 83:var bn=Vt.destructLink(j[K]);this.$={type:bn.type,stroke:bn.stroke,length:bn.length};break;case 84:var bn=Vt.destructLink(j[K]);this.$={type:bn.type,stroke:bn.stroke,length:bn.length,id:j[K-1]};break;case 85:this.$=j[K-1];break;case 86:this.$={text:j[K],type:"text"};break;case 87:this.$={text:j[K-1].text+""+j[K],type:j[K-1].type};break;case 88:this.$={text:j[K],type:"string"};break;case 89:case 104:this.$={text:j[K],type:"markdown"};break;case 101:this.$={text:j[K],type:"text"};break;case 102:this.$={text:j[K-1].text+""+j[K],type:j[K-1].type};break;case 103:this.$={text:j[K],type:"text"};break;case 105:this.$=j[K-4],Vt.addClass(j[K-2],j[K]);break;case 106:this.$=j[K-4],Vt.setClass(j[K-2],j[K]);break;case 107:case 115:this.$=j[K-1],Vt.setClickEvent(j[K-1],j[K]);break;case 108:case 116:this.$=j[K-3],Vt.setClickEvent(j[K-3],j[K-2]),Vt.setTooltip(j[K-3],j[K]);break;case 109:this.$=j[K-2],Vt.setClickEvent(j[K-2],j[K-1],j[K]);break;case 110:this.$=j[K-4],Vt.setClickEvent(j[K-4],j[K-3],j[K-2]),Vt.setTooltip(j[K-4],j[K]);break;case 111:this.$=j[K-2],Vt.setLink(j[K-2],j[K]);break;case 112:this.$=j[K-4],Vt.setLink(j[K-4],j[K-2]),Vt.setTooltip(j[K-4],j[K]);break;case 113:this.$=j[K-4],Vt.setLink(j[K-4],j[K-2],j[K]);break;case 114:this.$=j[K-6],Vt.setLink(j[K-6],j[K-4],j[K]),Vt.setTooltip(j[K-6],j[K-2]);break;case 117:this.$=j[K-1],Vt.setLink(j[K-1],j[K]);break;case 118:this.$=j[K-3],Vt.setLink(j[K-3],j[K-2]),Vt.setTooltip(j[K-3],j[K]);break;case 119:this.$=j[K-3],Vt.setLink(j[K-3],j[K-2],j[K]);break;case 120:this.$=j[K-5],Vt.setLink(j[K-5],j[K-4],j[K]),Vt.setTooltip(j[K-5],j[K-2]);break;case 121:this.$=j[K-4],Vt.addVertex(j[K-2],void 0,void 0,j[K]);break;case 122:this.$=j[K-4],Vt.updateLink([j[K-2]],j[K]);break;case 123:this.$=j[K-4],Vt.updateLink(j[K-2],j[K]);break;case 124:this.$=j[K-8],Vt.updateLinkInterpolate([j[K-6]],j[K-2]),Vt.updateLink([j[K-6]],j[K]);break;case 125:this.$=j[K-8],Vt.updateLinkInterpolate(j[K-6],j[K-2]),Vt.updateLink(j[K-6],j[K]);break;case 126:this.$=j[K-6],Vt.updateLinkInterpolate([j[K-4]],j[K]);break;case 127:this.$=j[K-6],Vt.updateLinkInterpolate(j[K-4],j[K]);break;case 128:case 130:this.$=[j[K]];break;case 129:case 131:j[K-2].push(j[K]),this.$=j[K-2];break;case 133:this.$=j[K-1]+j[K];break;case 181:this.$=j[K];break;case 182:this.$=j[K-1]+""+j[K];break;case 184:this.$=j[K-1]+""+j[K];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:t,10:r,12:n},{1:[3]},e(i,s,{5:6}),{4:7,9:t,10:r,12:n},{4:8,9:t,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:b,85:k,86:T,87:_,88:L,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R,121:B,122:I,123:M,124:O},e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{8:[1,54],9:[1,55],10:N,15:53,18:56},e(E,[2,3]),e(E,[2,4]),e(E,[2,5]),e(E,[2,6]),e(E,[2,7]),e(E,[2,8]),{8:V,9:G,11:J,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:V,9:G,11:J,21:67},{8:V,9:G,11:J,21:68},{8:V,9:G,11:J,21:69},{8:V,9:G,11:J,21:70},{8:V,9:G,11:J,21:71},{8:V,9:G,10:[1,72],11:J,21:73},e(E,[2,36]),{35:[1,74]},{37:[1,75]},e(E,[2,39]),e(rt,[2,50],{18:76,39:77,10:N,40:nt}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:ct,44:pt,60:Lt,80:[1,86],89:bt,95:[1,83],97:[1,84],101:85,105:ut,106:it,109:st,111:X,114:H,115:at,116:W,120:87},e(E,[2,185]),e(E,[2,186]),e(E,[2,187]),e(E,[2,188]),e(mt,[2,51]),e(mt,[2,54],{46:[1,99]}),e(q,[2,72],{113:112,29:[1,100],44:g,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:y,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:C,102:D,105:$,106:w,109:A,111:F,114:S,115:v,116:R}),e(Z,[2,181]),e(Z,[2,142]),e(Z,[2,143]),e(Z,[2,144]),e(Z,[2,145]),e(Z,[2,146]),e(Z,[2,147]),e(Z,[2,148]),e(Z,[2,149]),e(Z,[2,150]),e(Z,[2,151]),e(Z,[2,152]),e(i,[2,12]),e(i,[2,18]),e(i,[2,19]),{9:[1,113]},e(ye,[2,26],{18:114,10:N}),e(E,[2,27]),{42:115,43:38,44:g,45:39,47:40,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},e(E,[2,40]),e(E,[2,41]),e(E,[2,42]),e(ot,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:Jt,81:ve,116:te,119:vt},{75:[1,125],77:[1,126]},e(It,[2,83]),e(E,[2,28]),e(E,[2,29]),e(E,[2,30]),e(E,[2,31]),e(E,[2,32]),{10:yt,12:ht,14:wt,27:Q,28:127,32:Nt,44:z,60:$t,75:U,80:[1,129],81:[1,130],83:140,84:Tt,85:gt,86:Yt,87:Mt,88:kt,89:Ge,90:Pt,91:128,105:nr,109:Ze,111:yr,114:Je,115:ke,116:He},e(Te,s,{5:153}),e(E,[2,37]),e(E,[2,38]),e(rt,[2,48],{44:ur}),e(rt,[2,49],{18:155,10:N,40:yn}),e(mt,[2,44]),{44:g,47:157,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},{102:[1,158],103:159,105:[1,160]},{44:g,47:161,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},{44:g,47:162,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},e(we,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},e(we,[2,115],{120:167,10:[1,166],14:ct,44:pt,60:Lt,89:bt,105:ut,106:it,109:st,111:X,114:H,115:at,116:W}),e(we,[2,117],{10:[1,168]}),e(Oe,[2,183]),e(Oe,[2,170]),e(Oe,[2,171]),e(Oe,[2,172]),e(Oe,[2,173]),e(Oe,[2,174]),e(Oe,[2,175]),e(Oe,[2,176]),e(Oe,[2,177]),e(Oe,[2,178]),e(Oe,[2,179]),e(Oe,[2,180]),{44:g,47:169,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},{30:170,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:178,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:180,50:[1,179],67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:181,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:182,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:183,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{109:[1,184]},{30:185,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:186,65:[1,187],67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:188,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:189,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{30:190,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},e(Z,[2,182]),e(i,[2,20]),e(ye,[2,25]),e(rt,[2,46],{39:191,18:192,10:N,40:nt}),e(ot,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{77:[1,196],79:197,116:te,119:vt},e(An,[2,79]),e(An,[2,81]),e(An,[2,82]),e(An,[2,168]),e(An,[2,169]),{76:198,79:120,80:Jt,81:ve,116:te,119:vt},e(It,[2,84]),{8:V,9:G,10:yt,11:J,12:ht,14:wt,21:200,27:Q,29:[1,199],32:Nt,44:z,60:$t,75:U,83:140,84:Tt,85:gt,86:Yt,87:Mt,88:kt,89:Ge,90:Pt,91:201,105:nr,109:Ze,111:yr,114:Je,115:ke,116:He},e(ne,[2,101]),e(ne,[2,103]),e(ne,[2,104]),e(ne,[2,157]),e(ne,[2,158]),e(ne,[2,159]),e(ne,[2,160]),e(ne,[2,161]),e(ne,[2,162]),e(ne,[2,163]),e(ne,[2,164]),e(ne,[2,165]),e(ne,[2,166]),e(ne,[2,167]),e(ne,[2,90]),e(ne,[2,91]),e(ne,[2,92]),e(ne,[2,93]),e(ne,[2,94]),e(ne,[2,95]),e(ne,[2,96]),e(ne,[2,97]),e(ne,[2,98]),e(ne,[2,99]),e(ne,[2,100]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,202],33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:b,85:k,86:T,87:_,88:L,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R,121:B,122:I,123:M,124:O},{10:N,18:203},{44:[1,204]},e(mt,[2,43]),{10:[1,205],44:g,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:112,114:S,115:v,116:R},{10:[1,206]},{10:[1,207],106:[1,208]},e(Si,[2,128]),{10:[1,209],44:g,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:112,114:S,115:v,116:R},{10:[1,210],44:g,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:112,114:S,115:v,116:R},{80:[1,211]},e(we,[2,109],{10:[1,212]}),e(we,[2,111],{10:[1,213]}),{80:[1,214]},e(Oe,[2,184]),{80:[1,215],98:[1,216]},e(mt,[2,55],{113:112,44:g,60:y,89:C,102:D,105:$,106:w,109:A,111:F,114:S,115:v,116:R}),{31:[1,217],67:Ae,82:218,116:ge,117:be,118:jt},e(fn,[2,86]),e(fn,[2,88]),e(fn,[2,89]),e(fn,[2,153]),e(fn,[2,154]),e(fn,[2,155]),e(fn,[2,156]),{49:[1,219],67:Ae,82:218,116:ge,117:be,118:jt},{30:220,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{51:[1,221],67:Ae,82:218,116:ge,117:be,118:jt},{53:[1,222],67:Ae,82:218,116:ge,117:be,118:jt},{55:[1,223],67:Ae,82:218,116:ge,117:be,118:jt},{57:[1,224],67:Ae,82:218,116:ge,117:be,118:jt},{60:[1,225]},{64:[1,226],67:Ae,82:218,116:ge,117:be,118:jt},{66:[1,227],67:Ae,82:218,116:ge,117:be,118:jt},{30:228,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},{31:[1,229],67:Ae,82:218,116:ge,117:be,118:jt},{67:Ae,69:[1,230],71:[1,231],82:218,116:ge,117:be,118:jt},{67:Ae,69:[1,233],71:[1,232],82:218,116:ge,117:be,118:jt},e(rt,[2,45],{18:155,10:N,40:yn}),e(rt,[2,47],{44:ur}),e(ot,[2,75]),e(ot,[2,74]),{62:[1,234],67:Ae,82:218,116:ge,117:be,118:jt},e(ot,[2,77]),e(An,[2,80]),{77:[1,235],79:197,116:te,119:vt},{30:236,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},e(Te,s,{5:237}),e(ne,[2,102]),e(E,[2,35]),{43:238,44:g,45:39,47:40,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},{10:N,18:239},{10:Pr,60:vr,84:ci,92:240,105:Kt,107:241,108:242,109:et,110:Bt,111:Xt,112:tr},{10:Pr,60:vr,84:ci,92:251,104:[1,252],105:Kt,107:241,108:242,109:et,110:Bt,111:Xt,112:tr},{10:Pr,60:vr,84:ci,92:253,104:[1,254],105:Kt,107:241,108:242,109:et,110:Bt,111:Xt,112:tr},{105:[1,255]},{10:Pr,60:vr,84:ci,92:256,105:Kt,107:241,108:242,109:et,110:Bt,111:Xt,112:tr},{44:g,47:257,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},e(we,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},e(we,[2,116]),e(we,[2,118],{10:[1,261]}),e(we,[2,119]),e(q,[2,56]),e(fn,[2,87]),e(q,[2,57]),{51:[1,262],67:Ae,82:218,116:ge,117:be,118:jt},e(q,[2,64]),e(q,[2,59]),e(q,[2,60]),e(q,[2,61]),{109:[1,263]},e(q,[2,63]),e(q,[2,65]),{66:[1,264],67:Ae,82:218,116:ge,117:be,118:jt},e(q,[2,67]),e(q,[2,68]),e(q,[2,70]),e(q,[2,69]),e(q,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(ot,[2,78]),{31:[1,265],67:Ae,82:218,116:ge,117:be,118:jt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,266],33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:b,85:k,86:T,87:_,88:L,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R,121:B,122:I,123:M,124:O},e(mt,[2,53]),{43:267,44:g,45:39,47:40,60:y,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R},e(we,[2,121],{106:rn}),e(xn,[2,130],{108:269,10:Pr,60:vr,84:ci,105:Kt,109:et,110:Bt,111:Xt,112:tr}),e(Wr,[2,132]),e(Wr,[2,134]),e(Wr,[2,135]),e(Wr,[2,136]),e(Wr,[2,137]),e(Wr,[2,138]),e(Wr,[2,139]),e(Wr,[2,140]),e(Wr,[2,141]),e(we,[2,122],{106:rn}),{10:[1,270]},e(we,[2,123],{106:rn}),{10:[1,271]},e(Si,[2,129]),e(we,[2,105],{106:rn}),e(we,[2,106],{113:112,44:g,60:y,89:C,102:D,105:$,106:w,109:A,111:F,114:S,115:v,116:R}),e(we,[2,110]),e(we,[2,112],{10:[1,272]}),e(we,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:V,9:G,11:J,21:277},e(E,[2,34]),e(mt,[2,52]),{10:Pr,60:vr,84:ci,105:Kt,107:278,108:242,109:et,110:Bt,111:Xt,112:tr},e(Wr,[2,133]),{14:ct,44:pt,60:Lt,89:bt,101:279,105:ut,106:it,109:st,111:X,114:H,115:at,116:W,120:87},{14:ct,44:pt,60:Lt,89:bt,101:280,105:ut,106:it,109:st,111:X,114:H,115:at,116:W,120:87},{98:[1,281]},e(we,[2,120]),e(q,[2,58]),{30:282,67:Ae,80:xe,81:he,82:171,116:ge,117:be,118:jt},e(q,[2,66]),e(Te,s,{5:283}),e(xn,[2,131],{108:269,10:Pr,60:vr,84:ci,105:Kt,109:et,110:Bt,111:Xt,112:tr}),e(we,[2,126],{120:167,10:[1,284],14:ct,44:pt,60:Lt,89:bt,105:ut,106:it,109:st,111:X,114:H,115:at,116:W}),e(we,[2,127],{120:167,10:[1,285],14:ct,44:pt,60:Lt,89:bt,105:ut,106:it,109:st,111:X,114:H,115:at,116:W}),e(we,[2,114]),{31:[1,286],67:Ae,82:218,116:ge,117:be,118:jt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,287],33:24,34:d,36:p,38:m,42:28,43:38,44:g,45:39,47:40,60:y,84:b,85:k,86:T,87:_,88:L,89:C,102:D,105:$,106:w,109:A,111:F,113:41,114:S,115:v,116:R,121:B,122:I,123:M,124:O},{10:Pr,60:vr,84:ci,92:288,105:Kt,107:241,108:242,109:et,110:Bt,111:Xt,112:tr},{10:Pr,60:vr,84:ci,92:289,105:Kt,107:241,108:242,109:et,110:Bt,111:Xt,112:tr},e(q,[2,62]),e(E,[2,33]),e(we,[2,124],{106:rn}),e(we,[2,125],{106:rn})],defaultActions:{},parseError:a(function(ie,Se){if(Se.recoverable)this.trace(ie);else{var Ie=new Error(ie);throw Ie.hash=Se,Ie}},"parseError"),parse:a(function(ie){var Se=this,Ie=[0],Vt=[],Br=[null],j=[],su=this.table,K="",bn=0,K8=0,Q8=0,Tot=2,Z8=1,Sot=j.slice.call(arguments,1),Fn=Object.create(this.lexer),au={yy:{}};for(var nC in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nC)&&(au.yy[nC]=this.yy[nC]);Fn.setInput(ie,au.yy),au.yy.lexer=Fn,au.yy.parser=this,typeof Fn.yylloc>"u"&&(Fn.yylloc={});var iC=Fn.yylloc;j.push(iC);var _ot=Fn.options&&Fn.options.ranges;typeof au.yy.parseError=="function"?this.parseError=au.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function JIt(xs){Ie.length=Ie.length-2*xs,Br.length=Br.length-xs,j.length=j.length-xs}a(JIt,"popStack");function Cot(){var xs;return xs=Vt.pop()||Fn.lex()||Z8,typeof xs!="number"&&(xs instanceof Array&&(Vt=xs,xs=Vt.pop()),xs=Se.symbols_[xs]||xs),xs}a(Cot,"lex");for(var _i,sC,ou,Fs,tNt,aC,qh={},Uy,Ho,J8,jy;;){if(ou=Ie[Ie.length-1],this.defaultActions[ou]?Fs=this.defaultActions[ou]:((_i===null||typeof _i>"u")&&(_i=Cot()),Fs=su[ou]&&su[ou][_i]),typeof Fs>"u"||!Fs.length||!Fs[0]){var oC="";jy=[];for(Uy in su[ou])this.terminals_[Uy]&&Uy>Tot&&jy.push("'"+this.terminals_[Uy]+"'");Fn.showPosition?oC="Parse error on line "+(bn+1)+`: +`+Fn.showPosition()+` +Expecting `+jy.join(", ")+", got '"+(this.terminals_[_i]||_i)+"'":oC="Parse error on line "+(bn+1)+": Unexpected "+(_i==Z8?"end of input":"'"+(this.terminals_[_i]||_i)+"'"),this.parseError(oC,{text:Fn.match,token:this.terminals_[_i]||_i,line:Fn.yylineno,loc:iC,expected:jy})}if(Fs[0]instanceof Array&&Fs.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ou+", token: "+_i);switch(Fs[0]){case 1:Ie.push(_i),Br.push(Fn.yytext),j.push(Fn.yylloc),Ie.push(Fs[1]),_i=null,sC?(_i=sC,sC=null):(K8=Fn.yyleng,K=Fn.yytext,bn=Fn.yylineno,iC=Fn.yylloc,Q8>0&&Q8--);break;case 2:if(Ho=this.productions_[Fs[1]][1],qh.$=Br[Br.length-Ho],qh._$={first_line:j[j.length-(Ho||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(Ho||1)].first_column,last_column:j[j.length-1].last_column},_ot&&(qh._$.range=[j[j.length-(Ho||1)].range[0],j[j.length-1].range[1]]),aC=this.performAction.apply(qh,[K,K8,bn,au.yy,Fs[1],Br,j].concat(Sot)),typeof aC<"u")return aC;Ho&&(Ie=Ie.slice(0,-1*Ho*2),Br=Br.slice(0,-1*Ho),j=j.slice(0,-1*Ho)),Ie.push(this.productions_[Fs[1]][0]),Br.push(qh.$),j.push(qh._$),J8=su[Ie[Ie.length-2]][Ie[Ie.length-1]],Ie.push(J8);break;case 3:return!0}}return!0},"parse")},iu=function(){var ya={EOF:1,parseError:a(function(Se,Ie){if(this.yy.parser)this.yy.parser.parseError(Se,Ie);else throw new Error(Se)},"parseError"),setInput:a(function(ie,Se){return this.yy=Se||this.yy||{},this._input=ie,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:a(function(){var ie=this._input[0];this.yytext+=ie,this.yyleng++,this.offset++,this.match+=ie,this.matched+=ie;var Se=ie.match(/(?:\r\n?|\n).*/g);return Se?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ie},"input"),unput:a(function(ie){var Se=ie.length,Ie=ie.split(/(?:\r\n?|\n)/g);this._input=ie+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Se),this.offset-=Se;var Vt=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),Ie.length-1&&(this.yylineno-=Ie.length-1);var Br=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:Ie?(Ie.length===Vt.length?this.yylloc.first_column:0)+Vt[Vt.length-Ie.length].length-Ie[0].length:this.yylloc.first_column-Se},this.options.ranges&&(this.yylloc.range=[Br[0],Br[0]+this.yyleng-Se]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(ie){this.unput(this.match.slice(ie))},"less"),pastInput:a(function(){var ie=this.matched.substr(0,this.matched.length-this.match.length);return(ie.length>20?"...":"")+ie.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var ie=this.match;return ie.length<20&&(ie+=this._input.substr(0,20-ie.length)),(ie.substr(0,20)+(ie.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var ie=this.pastInput(),Se=new Array(ie.length+1).join("-");return ie+this.upcomingInput()+` +`+Se+"^"},"showPosition"),test_match:a(function(ie,Se){var Ie,Vt,Br;if(this.options.backtrack_lexer&&(Br={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&&(Br.yylloc.range=this.yylloc.range.slice(0))),Vt=ie[0].match(/(?:\r\n?|\n).*/g),Vt&&(this.yylineno+=Vt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Vt?Vt[Vt.length-1].length-Vt[Vt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ie[0].length},this.yytext+=ie[0],this.match+=ie[0],this.matches=ie,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(ie[0].length),this.matched+=ie[0],Ie=this.performAction.call(this,this.yy,this,Se,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ie)return Ie;if(this._backtrack){for(var j in Br)this[j]=Br[j];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ie,Se,Ie,Vt;this._more||(this.yytext="",this.match="");for(var Br=this._currentRules(),j=0;jSe[0].length)){if(Se=Ie,Vt=j,this.options.backtrack_lexer){if(ie=this.test_match(Ie,Br[j]),ie!==!1)return ie;if(this._backtrack){Se=!1;continue}else return!1}else if(!this.options.flex)break}return Se?(ie=this.test_match(Se,Br[Vt]),ie!==!1?ie:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var Se=this.next();return Se||this.lex()},"lex"),begin:a(function(Se){this.conditionStack.push(Se)},"begin"),popState:a(function(){var Se=this.conditionStack.length-1;return Se>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(Se){return Se=this.conditionStack.length-1-Math.abs(Se||0),Se>=0?this.conditionStack[Se]:"INITIAL"},"topState"),pushState:a(function(Se){this.begin(Se)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(Se,Ie,Vt,Br){var j=Br;switch(Vt){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Ie.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let su=/\n\s*/g;return Ie.yytext=Ie.yytext.replace(su,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return Se.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Se.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Se.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;break;case 69:return this.pushState("edgeText"),75;break;case 70:return 119;case 71:return this.popState(),77;break;case 72:return this.pushState("thickEdgeText"),75;break;case 73:return 119;case 74:return this.popState(),77;break;case 75:return this.pushState("dottedEdgeText"),75;break;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;break;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;break;case 81:return this.popState(),55;break;case 82:return this.pushState("text"),54;break;case 83:return this.popState(),57;break;case 84:return this.pushState("text"),56;break;case 85:return 58;case 86:return this.pushState("text"),67;break;case 87:return this.popState(),64;break;case 88:return this.pushState("text"),63;break;case 89:return this.popState(),49;break;case 90:return this.pushState("text"),48;break;case 91:return this.popState(),69;break;case 92:return this.popState(),71;break;case 93:return 117;case 94:return this.pushState("trapText"),68;break;case 95:return this.pushState("trapText"),70;break;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;break;case 108:return this.pushState("text"),62;break;case 109:return this.popState(),51;break;case 110:return this.pushState("text"),50;break;case 111:return this.popState(),31;break;case 112:return this.pushState("text"),29;break;case 113:return this.popState(),66;break;case 114:return this.pushState("text"),65;break;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return ya}();Xi.lexer=iu;function Ln(){this.yy={}}return a(Ln,"Parser"),Ln.prototype=Xi,Xi.Parser=Ln,new Ln}();p5.parser=p5;m5=p5});var WY,UY,jY=x(()=>{"use strict";zY();WY=Object.assign({},m5);WY.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return m5.parse(t)};UY=WY});var fEt,dEt,qY,HY=x(()=>{"use strict";Gs();fEt=a((e,t)=>{let r=du,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Ci(n,i,s,t)},"fade"),dEt=a(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${fEt(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } +`,"getStyles"),qY=dEt});var g5={};Be(g5,{diagram:()=>pEt});var pEt,y5=x(()=>{"use strict";pe();qz();VY();jY();HY();pEt={parser:UY,get db(){return new Db},renderer:GY,styles:qY,init:a(e=>{e.flowchart||(e.flowchart={}),e.layout&&eg({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,eg({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}});var x5,ZY,JY=x(()=>{"use strict";x5=function(){var e=a(function(X,H,at,W){for(at=at||{},W=X.length;W--;at[X[W]]=H);return at},"o"),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],n=[1,11],i=[1,12],s=[1,13],o=[1,20],l=[1,21],u=[1,22],h=[1,23],f=[1,24],d=[1,19],p=[1,25],m=[1,26],g=[1,18],y=[1,33],b=[1,34],k=[1,35],T=[1,36],_=[1,37],L=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],C=[1,42],D=[1,43],$=[1,52],w=[40,50,68,69],A=[1,63],F=[1,61],S=[1,58],v=[1,62],R=[1,64],B=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],I=[63,64,65,66,67],M=[1,81],O=[1,80],N=[1,78],E=[1,79],V=[6,10,42,47],G=[6,10,13,41,42,47,48,49],J=[1,89],rt=[1,88],nt=[1,87],ct=[19,56],pt=[1,98],Lt=[1,97],bt=[19,56,58,60],ut={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes: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:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:a(function(H,at,W,mt,q,Z,ye){var ot=Z.length-1;switch(q){case 1:break;case 2:this.$=[];break;case 3:Z[ot-1].push(Z[ot]),this.$=Z[ot-1];break;case 4:case 5:this.$=Z[ot];break;case 6:case 7:this.$=[];break;case 8:mt.addEntity(Z[ot-4]),mt.addEntity(Z[ot-2]),mt.addRelationship(Z[ot-4],Z[ot],Z[ot-2],Z[ot-3]);break;case 9:mt.addEntity(Z[ot-8]),mt.addEntity(Z[ot-4]),mt.addRelationship(Z[ot-8],Z[ot],Z[ot-4],Z[ot-5]),mt.setClass([Z[ot-8]],Z[ot-6]),mt.setClass([Z[ot-4]],Z[ot-2]);break;case 10:mt.addEntity(Z[ot-6]),mt.addEntity(Z[ot-2]),mt.addRelationship(Z[ot-6],Z[ot],Z[ot-2],Z[ot-3]),mt.setClass([Z[ot-6]],Z[ot-4]);break;case 11:mt.addEntity(Z[ot-6]),mt.addEntity(Z[ot-4]),mt.addRelationship(Z[ot-6],Z[ot],Z[ot-4],Z[ot-5]),mt.setClass([Z[ot-4]],Z[ot-2]);break;case 12:mt.addEntity(Z[ot-3]),mt.addAttributes(Z[ot-3],Z[ot-1]);break;case 13:mt.addEntity(Z[ot-5]),mt.addAttributes(Z[ot-5],Z[ot-1]),mt.setClass([Z[ot-5]],Z[ot-3]);break;case 14:mt.addEntity(Z[ot-2]);break;case 15:mt.addEntity(Z[ot-4]),mt.setClass([Z[ot-4]],Z[ot-2]);break;case 16:mt.addEntity(Z[ot]);break;case 17:mt.addEntity(Z[ot-2]),mt.setClass([Z[ot-2]],Z[ot]);break;case 18:mt.addEntity(Z[ot-6],Z[ot-4]),mt.addAttributes(Z[ot-6],Z[ot-1]);break;case 19:mt.addEntity(Z[ot-8],Z[ot-6]),mt.addAttributes(Z[ot-8],Z[ot-1]),mt.setClass([Z[ot-8]],Z[ot-3]);break;case 20:mt.addEntity(Z[ot-5],Z[ot-3]);break;case 21:mt.addEntity(Z[ot-7],Z[ot-5]),mt.setClass([Z[ot-7]],Z[ot-2]);break;case 22:mt.addEntity(Z[ot-3],Z[ot-1]);break;case 23:mt.addEntity(Z[ot-5],Z[ot-3]),mt.setClass([Z[ot-5]],Z[ot]);break;case 24:case 25:this.$=Z[ot].trim(),mt.setAccTitle(this.$);break;case 26:case 27:this.$=Z[ot].trim(),mt.setAccDescription(this.$);break;case 32:mt.setDirection("TB");break;case 33:mt.setDirection("BT");break;case 34:mt.setDirection("RL");break;case 35:mt.setDirection("LR");break;case 36:this.$=Z[ot-3],mt.addClass(Z[ot-2],Z[ot-1]);break;case 37:case 38:case 56:case 64:this.$=[Z[ot]];break;case 39:case 40:this.$=Z[ot-2].concat([Z[ot]]);break;case 41:this.$=Z[ot-2],mt.setClass(Z[ot-1],Z[ot]);break;case 42:this.$=Z[ot-3],mt.addCssStyles(Z[ot-2],Z[ot-1]);break;case 43:this.$=[Z[ot]];break;case 44:Z[ot-2].push(Z[ot]),this.$=Z[ot-2];break;case 46:this.$=Z[ot-1]+Z[ot];break;case 54:case 76:case 77:this.$=Z[ot].replace(/"/g,"");break;case 55:case 78:this.$=Z[ot];break;case 57:Z[ot].push(Z[ot-1]),this.$=Z[ot];break;case 58:this.$={type:Z[ot-1],name:Z[ot]};break;case 59:this.$={type:Z[ot-2],name:Z[ot-1],keys:Z[ot]};break;case 60:this.$={type:Z[ot-2],name:Z[ot-1],comment:Z[ot]};break;case 61:this.$={type:Z[ot-3],name:Z[ot-2],keys:Z[ot-1],comment:Z[ot]};break;case 62:case 63:case 66:this.$=Z[ot];break;case 65:Z[ot-2].push(Z[ot]),this.$=Z[ot-2];break;case 67:this.$=Z[ot].replace(/"/g,"");break;case 68:this.$={cardA:Z[ot],relType:Z[ot-1],cardB:Z[ot-2]};break;case 69:this.$=mt.Cardinality.ZERO_OR_ONE;break;case 70:this.$=mt.Cardinality.ZERO_OR_MORE;break;case 71:this.$=mt.Cardinality.ONE_OR_MORE;break;case 72:this.$=mt.Cardinality.ONLY_ONE;break;case 73:this.$=mt.Cardinality.MD_PARENT;break;case 74:this.$=mt.Identification.NON_IDENTIFYING;break;case 75:this.$=mt.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:i,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:u,36:h,37:f,40:d,43:p,44:m,50:g},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:27,11:9,22:r,24:n,26:i,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:u,36:h,37:f,40:d,43:p,44:m,50:g},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:y,64:b,65:k,66:T,67:_}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(L,[2,54]),e(L,[2,55]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:41,40:C,41:D},{16:44,40:C,41:D},{16:45,40:C,41:D},e(t,[2,4]),{11:46,40:d,50:g},{16:47,40:C,41:D},{18:48,19:[1,49],51:50,52:51,56:$},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},e(w,[2,69]),e(w,[2,70]),e(w,[2,71]),e(w,[2,72]),e(w,[2,73]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:A,38:57,41:F,42:S,45:59,46:60,48:v,49:R},e(B,[2,37]),e(B,[2,38]),{16:65,40:C,41:D,42:S},{13:A,38:66,41:F,42:S,45:59,46:60,48:v,49:R},{13:[1,67],15:[1,68]},e(t,[2,17],{61:32,12:69,17:[1,70],42:S,63:y,64:b,65:k,66:T,67:_}),{19:[1,71]},e(t,[2,14]),{18:72,19:[2,56],51:50,52:51,56:$},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:y,64:b,65:k,66:T,67:_},e(I,[2,74]),e(I,[2,75]),{6:M,10:O,39:77,42:N,47:E},{40:[1,82],41:[1,83]},e(V,[2,43],{46:84,13:A,41:F,48:v,49:R}),e(G,[2,45]),e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(t,[2,41],{42:S}),{6:M,10:O,39:85,42:N,47:E},{14:86,40:J,50:rt,70:nt},{16:90,40:C,41:D},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:$},e(t,[2,12]),{19:[2,57]},e(ct,[2,58],{54:94,55:95,57:96,59:pt,60:Lt}),e([19,56,59,60],[2,63]),e(t,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(t,[2,36]),{13:A,41:F,45:101,46:60,48:v,49:R},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(B,[2,39]),e(B,[2,40]),e(G,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,76]),e(t,[2,77]),e(t,[2,78]),{13:[1,102],42:S},{13:[1,104],15:[1,103]},{19:[1,105]},e(t,[2,15]),e(ct,[2,59],{55:106,58:[1,107],60:Lt}),e(ct,[2,60]),e(bt,[2,64]),e(ct,[2,67]),e(bt,[2,66]),{18:108,19:[1,109],51:50,52:51,56:$},{16:110,40:C,41:D},e(V,[2,44],{46:84,13:A,41:F,48:v,49:R}),{14:111,40:J,50:rt,70:nt},{16:112,40:C,41:D},{14:113,40:J,50:rt,70:nt},e(t,[2,13]),e(ct,[2,61]),{57:114,59:pt},{19:[1,115]},e(t,[2,20]),e(t,[2,23],{17:[1,116],42:S}),e(t,[2,11]),{13:[1,117],42:S},e(t,[2,10]),e(bt,[2,65]),e(t,[2,18]),{18:118,19:[1,119],51:50,52:51,56:$},{14:120,40:J,50:rt,70:nt},{19:[1,121]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:a(function(H,at){if(at.recoverable)this.trace(H);else{var W=new Error(H);throw W.hash=at,W}},"parseError"),parse:a(function(H){var at=this,W=[0],mt=[],q=[null],Z=[],ye=this.table,ot="",Jt=0,ve=0,te=0,vt=2,It=1,yt=Z.slice.call(arguments,1),ht=Object.create(this.lexer),wt={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(wt.yy[Q]=this.yy[Q]);ht.setInput(H,wt.yy),wt.yy.lexer=ht,wt.yy.parser=this,typeof ht.yylloc>"u"&&(ht.yylloc={});var Nt=ht.yylloc;Z.push(Nt);var z=ht.options&&ht.options.ranges;typeof wt.yy.parseError=="function"?this.parseError=wt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $t(He){W.length=W.length-2*He,q.length=q.length-He,Z.length=Z.length-He}a($t,"popStack");function U(){var He;return He=mt.pop()||ht.lex()||It,typeof He!="number"&&(He instanceof Array&&(mt=He,He=mt.pop()),He=at.symbols_[He]||He),He}a(U,"lex");for(var Tt,gt,Yt,Mt,kt,Ge,Pt={},nr,Ze,yr,Je;;){if(Yt=W[W.length-1],this.defaultActions[Yt]?Mt=this.defaultActions[Yt]:((Tt===null||typeof Tt>"u")&&(Tt=U()),Mt=ye[Yt]&&ye[Yt][Tt]),typeof Mt>"u"||!Mt.length||!Mt[0]){var ke="";Je=[];for(nr in ye[Yt])this.terminals_[nr]&&nr>vt&&Je.push("'"+this.terminals_[nr]+"'");ht.showPosition?ke="Parse error on line "+(Jt+1)+`: +`+ht.showPosition()+` +Expecting `+Je.join(", ")+", got '"+(this.terminals_[Tt]||Tt)+"'":ke="Parse error on line "+(Jt+1)+": Unexpected "+(Tt==It?"end of input":"'"+(this.terminals_[Tt]||Tt)+"'"),this.parseError(ke,{text:ht.match,token:this.terminals_[Tt]||Tt,line:ht.yylineno,loc:Nt,expected:Je})}if(Mt[0]instanceof Array&&Mt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Yt+", token: "+Tt);switch(Mt[0]){case 1:W.push(Tt),q.push(ht.yytext),Z.push(ht.yylloc),W.push(Mt[1]),Tt=null,gt?(Tt=gt,gt=null):(ve=ht.yyleng,ot=ht.yytext,Jt=ht.yylineno,Nt=ht.yylloc,te>0&&te--);break;case 2:if(Ze=this.productions_[Mt[1]][1],Pt.$=q[q.length-Ze],Pt._$={first_line:Z[Z.length-(Ze||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(Ze||1)].first_column,last_column:Z[Z.length-1].last_column},z&&(Pt._$.range=[Z[Z.length-(Ze||1)].range[0],Z[Z.length-1].range[1]]),Ge=this.performAction.apply(Pt,[ot,ve,Jt,wt.yy,Mt[1],q,Z].concat(yt)),typeof Ge<"u")return Ge;Ze&&(W=W.slice(0,-1*Ze*2),q=q.slice(0,-1*Ze),Z=Z.slice(0,-1*Ze)),W.push(this.productions_[Mt[1]][0]),q.push(Pt.$),Z.push(Pt._$),yr=ye[W[W.length-2]][W[W.length-1]],W.push(yr);break;case 3:return!0}}return!0},"parse")},it=function(){var X={EOF:1,parseError:a(function(at,W){if(this.yy.parser)this.yy.parser.parseError(at,W);else throw new Error(at)},"parseError"),setInput:a(function(H,at){return this.yy=at||this.yy||{},this._input=H,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:a(function(){var H=this._input[0];this.yytext+=H,this.yyleng++,this.offset++,this.match+=H,this.matched+=H;var at=H.match(/(?:\r\n?|\n).*/g);return at?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),H},"input"),unput:a(function(H){var at=H.length,W=H.split(/(?:\r\n?|\n)/g);this._input=H+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-at),this.offset-=at;var mt=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),W.length-1&&(this.yylineno-=W.length-1);var q=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:W?(W.length===mt.length?this.yylloc.first_column:0)+mt[mt.length-W.length].length-W[0].length:this.yylloc.first_column-at},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-at]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(H){this.unput(this.match.slice(H))},"less"),pastInput:a(function(){var H=this.matched.substr(0,this.matched.length-this.match.length);return(H.length>20?"...":"")+H.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var H=this.match;return H.length<20&&(H+=this._input.substr(0,20-H.length)),(H.substr(0,20)+(H.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var H=this.pastInput(),at=new Array(H.length+1).join("-");return H+this.upcomingInput()+` +`+at+"^"},"showPosition"),test_match:a(function(H,at){var W,mt,q;if(this.options.backtrack_lexer&&(q={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&&(q.yylloc.range=this.yylloc.range.slice(0))),mt=H[0].match(/(?:\r\n?|\n).*/g),mt&&(this.yylineno+=mt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:mt?mt[mt.length-1].length-mt[mt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+H[0].length},this.yytext+=H[0],this.match+=H[0],this.matches=H,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(H[0].length),this.matched+=H[0],W=this.performAction.call(this,this.yy,this,at,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var Z in q)this[Z]=q[Z];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var H,at,W,mt;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),Z=0;Zat[0].length)){if(at=W,mt=Z,this.options.backtrack_lexer){if(H=this.test_match(W,q[Z]),H!==!1)return H;if(this._backtrack){at=!1;continue}else return!1}else if(!this.options.flex)break}return at?(H=this.test_match(at,q[mt]),H!==!1?H:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var at=this.next();return at||this.lex()},"lex"),begin:a(function(at){this.conditionStack.push(at)},"begin"),popState:a(function(){var at=this.conditionStack.length-1;return at>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(at){return at=this.conditionStack.length-1-Math.abs(at||0),at>=0?this.conditionStack[at]:"INITIAL"},"topState"),pushState:a(function(at){this.begin(at)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(at,W,mt,q){var Z=q;switch(mt){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;break;case 30:return W.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return W.yytext[0];case 74: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,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/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,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/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,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,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,71,72,73,74],inclusive:!0}}};return X}();ut.lexer=it;function st(){this.yy={}}return a(st,"Parser"),st.prototype=ut,ut.Parser=st,new st}();x5.parser=x5;ZY=x5});var qk,tX=x(()=>{"use strict";zt();pe();Sn();Ee();qk=class{constructor(){this.entities=new Map;this.relationships=[];this.classes=new Map;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=rr;this.getAccTitle=ir;this.setAccDescription=sr;this.getAccDescription=ar;this.setDiagramTitle=xr;this.getDiagramTitle=or;this.getConfig=a(()=>Y().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)}static{a(this,"ErDB")}addEntity(t,r=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&r&&(this.entities.get(t).alias=r,P.info(`Add alias '${r}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:r,shape:"erBox",look:Y().look??"default",cssClasses:"default",cssStyles:[]}),P.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,r){let n=this.addEntity(t),i;for(i=r.length-1;i>=0;i--)r[i].keys||(r[i].keys=[]),r[i].comment||(r[i].comment=""),n.attributes.push(r[i]),P.debug("Added attribute ",r[i].name)}addRelationship(t,r,n,i){let s=this.entities.get(t),o=this.entities.get(n);if(!s||!o)return;let l={entityA:s.id,roleA:r,entityB:o.id,relSpec:i};this.relationships.push(l),P.debug("Added new relationship :",l)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(s=>s.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(s=>s.trim()))}return r}addCssStyles(t,r){for(let n of t){let i=this.entities.get(n);if(!r||!i)return;for(let s of r)i.cssStyles.push(s)}}addClass(t,r){t.forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(s){if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)})})}setClass(t,r){for(let n of t){let i=this.entities.get(n);if(i)for(let s of r)i.cssClasses+=" "+s}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Ye()}getData(){let t=[],r=[],n=Y();for(let s of this.entities.keys()){let o=this.entities.get(s);o&&(o.cssCompiledStyles=this.getCompiledStyles(o.cssClasses.split(" ")),t.push(o))}let i=0;for(let s of this.relationships){let o={id:gc(s.entityA,s.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:s.entityA,end:s.entityB,label:s.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:s.relSpec.cardB.toLowerCase(),arrowTypeEnd:s.relSpec.cardA.toLowerCase(),pattern:s.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look};r.push(o)}return{nodes:t,edges:r,other:{},config:n,direction:"TB"}}}});var b5={};Be(b5,{draw:()=>TEt});var TEt,eX=x(()=>{"use strict";pe();zt();od();ih();Rd();Ee();$e();TEt=a(async function(e,t,r,n){P.info("REF0:"),P.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:s,layout:o}=Y(),l=n.db.getData(),u=ko(t,i);l.type=n.type,l.layoutAlgorithm=Mc(o),l.config.flowchart.nodeSpacing=s?.nodeSpacing||140,l.config.flowchart.rankSpacing=s?.rankSpacing||80,l.direction=n.db.getDirection(),l.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=t,await Lo(l,u),l.layoutAlgorithm==="elk"&&u.select(".edges").lower();let h=u.selectAll('[id*="-background"]');Array.from(h).length>0&&h.each(function(){let d=xt(this),m=d.attr("id").replace("-background",""),g=u.select(`#${CSS.escape(m)}`);if(!g.empty()){let y=g.attr("transform");d.attr("transform",y)}});let f=8;se.insertTitle(u,"erDiagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Ro(u,f,"erDiagram",s?.useMaxWidth??!0)},"draw")});var SEt,_Et,rX,nX=x(()=>{"use strict";Gs();SEt=a((e,t)=>{let r=du,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Ci(n,i,s,t)},"fade"),_Et=a(e=>` + .entityBox { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${e.tertiaryColor}; + opacity: 0.7; + background-color: ${e.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${SEt(e.tertiaryColor,.5)}; + } + + .edgeLabel .label { + fill: ${e.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } +`,"getStyles"),rX=_Et});var iX={};Be(iX,{diagram:()=>CEt});var CEt,sX=x(()=>{"use strict";JY();tX();eX();nX();CEt={parser:ZY,get db(){return new qk},renderer:b5,styles:rX}});function an(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function ai(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"}function k5(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function ah(e){return typeof e=="object"&&e!==null&&an(e.container)&&ai(e.reference)&&typeof e.message=="string"}function Va(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function Oc(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function V0(e){return Va(e)&&typeof e.fullText=="string"}var sh,za=x(()=>{"use strict";a(an,"isAstNode");a(ai,"isReference");a(k5,"isAstNodeDescription");a(ah,"isLinkingError");sh=class{static{a(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,r){return an(t)&&this.isSubtype(t.$type,r)}isSubtype(t,r){if(t===r)return!0;let n=this.subtypes[t];n||(n=this.subtypes[t]={});let i=n[r];if(i!==void 0)return i;{let s=this.computeIsSubtype(t,r);return n[r]=s,s}}getAllSubTypes(t){let r=this.allSubtypes[t];if(r)return r;{let n=this.getAllTypes(),i=[];for(let s of n)this.isSubtype(s,t)&&i.push(s);return this.allSubtypes[t]=i,i}}};a(Va,"isCompositeCstNode");a(Oc,"isLeafCstNode");a(V0,"isRootCstNode")});function AEt(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function Hk(e){return!!e&&typeof e[Symbol.iterator]=="function"}function kr(...e){if(e.length===1){let t=e[0];if(t instanceof Ls)return t;if(Hk(t))return new Ls(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new Ls(()=>({index:0}),r=>r.index1?new Ls(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex{"use strict";Ls=class e{static{a(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:a(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),r=0,n=t.next();for(;!n.done;)r++,n=t.next();return r}toArray(){let t=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){let n=this.map(i=>[t?t(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return yi})}join(t=","){let r=this.iterator(),n="",i,s=!1;do i=r.next(),i.done||(s&&(n+=t),n+=AEt(i.value)),s=!0;while(!i.done);return n}indexOf(t,r=0){let n=this.iterator(),i=0,s=n.next();for(;!s.done;){if(i>=r&&s.value===t)return i;s=n.next(),i++}return-1}every(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(!t(n.value))return!1;n=r.next()}return!0}some(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)t(i.value,n),i=r.next(),n++}map(t){return new e(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?yi:{done:!1,value:t(i)}})}filter(t){return new e(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return yi})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let n=this.iterator(),i=r,s=n.next();for(;!s.done;)i===void 0?i=s.value:i=t(i,s.value),s=n.next();return i}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let i=t.next();if(i.done)return n;let s=this.recursiveReduce(t,r,n);return s===void 0?i.value:r(s,i.value)}find(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return n.value;n=r.next()}}findIndex(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(t(i.value))return n;i=r.next(),n++}return-1}includes(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let s=r.iterator.next();if(s.done)r.iterator=void 0;else return s}let{done:n,value:i}=this.nextFn(r.this);if(!n){let s=t(i);if(Hk(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return yi})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new e(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}let{done:i,value:s}=r.nextFn(n.this);if(!i)if(Hk(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return yi})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new e(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?yi:this.nextFn(r.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=t?t(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return yi})}exclude(t,r){let n=new Set;for(let i of t){let s=r?r(i):i;n.add(s)}return this.filter(i=>{let s=r?r(i):i;return!n.has(s)})}};a(AEt,"toString");a(Hk,"isIterable");z0=new Ls(()=>{},()=>yi),yi=Object.freeze({done:!0,value:void 0});a(kr,"stream");Do=class extends Ls{static{a(this,"TreeStreamImpl")}constructor(t,r,n){super(()=>({iterators:n?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let o=i.iterators[i.iterators.length-1].next();if(o.done)i.iterators.pop();else return i.iterators.push(r(o.value)[Symbol.iterator]()),o}return yi})}iterator(){let t={state:this.startFn(),next:a(()=>this.nextFn(t.state),"next"),prune:a(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}};(function(e){function t(s){return s.reduce((o,l)=>o+l,0)}a(t,"sum"),e.sum=t;function r(s){return s.reduce((o,l)=>o*l,0)}a(r,"product"),e.product=r;function n(s){return s.reduce((o,l)=>Math.min(o,l))}a(n,"min"),e.min=n;function i(s){return s.reduce((o,l)=>Math.max(o,l))}a(i,"max"),e.max=i})(Dd||(Dd={}))});var Xk={};Be(Xk,{DefaultNameRegexp:()=>Yk,RangeComparison:()=>Io,compareRange:()=>cX,findCommentNode:()=>C5,findDeclarationNodeAtOffset:()=>REt,findLeafNodeAtOffset:()=>w5,findLeafNodeBeforeOffset:()=>uX,flattenCst:()=>LEt,getInteriorNodes:()=>NEt,getNextNode:()=>DEt,getPreviousNode:()=>fX,getStartlineNode:()=>IEt,inRange:()=>_5,isChildNode:()=>S5,isCommentNode:()=>T5,streamCst:()=>oh,toDocumentSegment:()=>lh,tokenToRange:()=>Id});function oh(e){return new Do(e,t=>Va(t)?t.content:[],{includeRoot:!0})}function LEt(e){return oh(e).filter(Oc)}function S5(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Id(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function lh(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function cX(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Io.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.lineIo.After}function REt(e,t,r=Yk){if(e){if(t>0){let n=t-e.offset,i=e.text.charAt(n);r.test(i)||t--}return w5(e,t)}}function C5(e,t){if(e){let r=fX(e,!0);if(r&&T5(r,t))return r;if(V0(e)){let n=e.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let s=e.content[i];if(T5(s,t))return s}}}}function T5(e,t){return Oc(e)&&t.includes(e.tokenType.name)}function w5(e,t){if(Oc(e))return e;if(Va(e)){let r=hX(e,t,!1);if(r)return w5(r,t)}}function uX(e,t){if(Oc(e))return e;if(Va(e)){let r=hX(e,t,!0);if(r)return uX(r,t)}}function hX(e,t,r){let n=0,i=e.content.length-1,s;for(;n<=i;){let o=Math.floor((n+i)/2),l=e.content[o];if(l.offset<=t&&l.end>t)return l;l.end<=t?(s=r?l:void 0,n=o+1):i=o-1}return s}function fX(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e);for(;n>0;){n--;let i=r.content[n];if(t||!i.hidden)return i}e=r}}function DEt(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e),i=r.content.length-1;for(;n{"use strict";za();us();a(oh,"streamCst");a(LEt,"flattenCst");a(S5,"isChildNode");a(Id,"tokenToRange");a(lh,"toDocumentSegment");(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(Io||(Io={}));a(cX,"compareRange");a(_5,"inRange");Yk=/^[\w\p{L}]$/u;a(REt,"findDeclarationNodeAtOffset");a(C5,"findCommentNode");a(T5,"isCommentNode");a(w5,"findLeafNodeAtOffset");a(uX,"findLeafNodeBeforeOffset");a(hX,"binarySearch");a(fX,"getPreviousNode");a(DEt,"getNextNode");a(IEt,"getStartlineNode");a(NEt,"getInteriorNodes");a(MEt,"getCommonParent");a(lX,"getParentChain")});function No(e){throw new Error("Error! The input value was not handled.")}var ch,Kk=x(()=>{"use strict";ch=class extends Error{static{a(this,"ErrorWithLocation")}constructor(t,r){super(t?`${r} at ${t.range.start.line}:${t.range.start.character}`:r)}};a(No,"assertUnreachable")});var Q0={};Be(Q0,{AbstractElement:()=>Od,AbstractRule:()=>Nd,AbstractType:()=>Md,Action:()=>tp,Alternatives:()=>ep,ArrayLiteral:()=>Pd,ArrayType:()=>Bd,Assignment:()=>rp,BooleanLiteral:()=>Fd,CharacterRange:()=>np,Condition:()=>W0,Conjunction:()=>$d,CrossReference:()=>ip,Disjunction:()=>Gd,EndOfFile:()=>sp,Grammar:()=>Vd,GrammarImport:()=>j0,Group:()=>ap,InferredType:()=>zd,Interface:()=>Wd,Keyword:()=>op,LangiumGrammarAstReflection:()=>yp,LangiumGrammarTerminals:()=>OEt,NamedArgument:()=>q0,NegatedToken:()=>lp,Negation:()=>Ud,NumberLiteral:()=>jd,Parameter:()=>qd,ParameterReference:()=>Hd,ParserRule:()=>Yd,ReferenceType:()=>Xd,RegexToken:()=>cp,ReturnType:()=>H0,RuleCall:()=>up,SimpleType:()=>Kd,StringLiteral:()=>Qd,TerminalAlternatives:()=>hp,TerminalGroup:()=>fp,TerminalRule:()=>uh,TerminalRuleCall:()=>dp,Type:()=>Zd,TypeAttribute:()=>Y0,TypeDefinition:()=>Qk,UnionType:()=>Jd,UnorderedGroup:()=>pp,UntilToken:()=>mp,ValueLiteral:()=>U0,Wildcard:()=>gp,isAbstractElement:()=>X0,isAbstractRule:()=>PEt,isAbstractType:()=>BEt,isAction:()=>bl,isAlternatives:()=>eT,isArrayLiteral:()=>zEt,isArrayType:()=>E5,isAssignment:()=>Ua,isBooleanLiteral:()=>v5,isCharacterRange:()=>O5,isCondition:()=>FEt,isConjunction:()=>A5,isCrossReference:()=>hh,isDisjunction:()=>L5,isEndOfFile:()=>P5,isFeatureName:()=>$Et,isGrammar:()=>WEt,isGrammarImport:()=>UEt,isGroup:()=>Pc,isInferredType:()=>Zk,isInterface:()=>Jk,isKeyword:()=>sa,isNamedArgument:()=>jEt,isNegatedToken:()=>B5,isNegation:()=>R5,isNumberLiteral:()=>qEt,isParameter:()=>HEt,isParameterReference:()=>D5,isParserRule:()=>xi,isPrimitiveType:()=>dX,isReferenceType:()=>I5,isRegexToken:()=>F5,isReturnType:()=>N5,isRuleCall:()=>ja,isSimpleType:()=>tT,isStringLiteral:()=>YEt,isTerminalAlternatives:()=>$5,isTerminalGroup:()=>G5,isTerminalRule:()=>Rs,isTerminalRuleCall:()=>rT,isType:()=>K0,isTypeAttribute:()=>XEt,isTypeDefinition:()=>GEt,isUnionType:()=>M5,isUnorderedGroup:()=>nT,isUntilToken:()=>V5,isValueLiteral:()=>VEt,isWildcard:()=>z5,reflection:()=>Le});function PEt(e){return Le.isInstance(e,Nd)}function BEt(e){return Le.isInstance(e,Md)}function FEt(e){return Le.isInstance(e,W0)}function $Et(e){return dX(e)||e==="current"||e==="entry"||e==="extends"||e==="false"||e==="fragment"||e==="grammar"||e==="hidden"||e==="import"||e==="interface"||e==="returns"||e==="terminal"||e==="true"||e==="type"||e==="infer"||e==="infers"||e==="with"||typeof e=="string"&&/\^?[_a-zA-Z][\w_]*/.test(e)}function dX(e){return e==="string"||e==="number"||e==="boolean"||e==="Date"||e==="bigint"}function GEt(e){return Le.isInstance(e,Qk)}function VEt(e){return Le.isInstance(e,U0)}function X0(e){return Le.isInstance(e,Od)}function zEt(e){return Le.isInstance(e,Pd)}function E5(e){return Le.isInstance(e,Bd)}function v5(e){return Le.isInstance(e,Fd)}function A5(e){return Le.isInstance(e,$d)}function L5(e){return Le.isInstance(e,Gd)}function WEt(e){return Le.isInstance(e,Vd)}function UEt(e){return Le.isInstance(e,j0)}function Zk(e){return Le.isInstance(e,zd)}function Jk(e){return Le.isInstance(e,Wd)}function jEt(e){return Le.isInstance(e,q0)}function R5(e){return Le.isInstance(e,Ud)}function qEt(e){return Le.isInstance(e,jd)}function HEt(e){return Le.isInstance(e,qd)}function D5(e){return Le.isInstance(e,Hd)}function xi(e){return Le.isInstance(e,Yd)}function I5(e){return Le.isInstance(e,Xd)}function N5(e){return Le.isInstance(e,H0)}function tT(e){return Le.isInstance(e,Kd)}function YEt(e){return Le.isInstance(e,Qd)}function Rs(e){return Le.isInstance(e,uh)}function K0(e){return Le.isInstance(e,Zd)}function XEt(e){return Le.isInstance(e,Y0)}function M5(e){return Le.isInstance(e,Jd)}function bl(e){return Le.isInstance(e,tp)}function eT(e){return Le.isInstance(e,ep)}function Ua(e){return Le.isInstance(e,rp)}function O5(e){return Le.isInstance(e,np)}function hh(e){return Le.isInstance(e,ip)}function P5(e){return Le.isInstance(e,sp)}function Pc(e){return Le.isInstance(e,ap)}function sa(e){return Le.isInstance(e,op)}function B5(e){return Le.isInstance(e,lp)}function F5(e){return Le.isInstance(e,cp)}function ja(e){return Le.isInstance(e,up)}function $5(e){return Le.isInstance(e,hp)}function G5(e){return Le.isInstance(e,fp)}function rT(e){return Le.isInstance(e,dp)}function nT(e){return Le.isInstance(e,pp)}function V5(e){return Le.isInstance(e,mp)}function z5(e){return Le.isInstance(e,gp)}var OEt,Nd,Md,W0,Qk,U0,Od,Pd,Bd,Fd,$d,Gd,Vd,j0,zd,Wd,q0,Ud,jd,qd,Hd,Yd,Xd,H0,Kd,Qd,uh,Zd,Y0,Jd,tp,ep,rp,np,ip,sp,ap,op,lp,cp,up,hp,fp,dp,pp,mp,gp,yp,Le,Mo=x(()=>{"use strict";za();OEt={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Nd="AbstractRule";a(PEt,"isAbstractRule");Md="AbstractType";a(BEt,"isAbstractType");W0="Condition";a(FEt,"isCondition");a($Et,"isFeatureName");a(dX,"isPrimitiveType");Qk="TypeDefinition";a(GEt,"isTypeDefinition");U0="ValueLiteral";a(VEt,"isValueLiteral");Od="AbstractElement";a(X0,"isAbstractElement");Pd="ArrayLiteral";a(zEt,"isArrayLiteral");Bd="ArrayType";a(E5,"isArrayType");Fd="BooleanLiteral";a(v5,"isBooleanLiteral");$d="Conjunction";a(A5,"isConjunction");Gd="Disjunction";a(L5,"isDisjunction");Vd="Grammar";a(WEt,"isGrammar");j0="GrammarImport";a(UEt,"isGrammarImport");zd="InferredType";a(Zk,"isInferredType");Wd="Interface";a(Jk,"isInterface");q0="NamedArgument";a(jEt,"isNamedArgument");Ud="Negation";a(R5,"isNegation");jd="NumberLiteral";a(qEt,"isNumberLiteral");qd="Parameter";a(HEt,"isParameter");Hd="ParameterReference";a(D5,"isParameterReference");Yd="ParserRule";a(xi,"isParserRule");Xd="ReferenceType";a(I5,"isReferenceType");H0="ReturnType";a(N5,"isReturnType");Kd="SimpleType";a(tT,"isSimpleType");Qd="StringLiteral";a(YEt,"isStringLiteral");uh="TerminalRule";a(Rs,"isTerminalRule");Zd="Type";a(K0,"isType");Y0="TypeAttribute";a(XEt,"isTypeAttribute");Jd="UnionType";a(M5,"isUnionType");tp="Action";a(bl,"isAction");ep="Alternatives";a(eT,"isAlternatives");rp="Assignment";a(Ua,"isAssignment");np="CharacterRange";a(O5,"isCharacterRange");ip="CrossReference";a(hh,"isCrossReference");sp="EndOfFile";a(P5,"isEndOfFile");ap="Group";a(Pc,"isGroup");op="Keyword";a(sa,"isKeyword");lp="NegatedToken";a(B5,"isNegatedToken");cp="RegexToken";a(F5,"isRegexToken");up="RuleCall";a(ja,"isRuleCall");hp="TerminalAlternatives";a($5,"isTerminalAlternatives");fp="TerminalGroup";a(G5,"isTerminalGroup");dp="TerminalRuleCall";a(rT,"isTerminalRuleCall");pp="UnorderedGroup";a(nT,"isUnorderedGroup");mp="UntilToken";a(V5,"isUntilToken");gp="Wildcard";a(z5,"isWildcard");yp=class extends sh{static{a(this,"LangiumGrammarAstReflection")}getAllTypes(){return[Od,Nd,Md,tp,ep,Pd,Bd,rp,Fd,np,W0,$d,ip,Gd,sp,Vd,j0,ap,zd,Wd,op,q0,lp,Ud,jd,qd,Hd,Yd,Xd,cp,H0,up,Kd,Qd,hp,fp,uh,dp,Zd,Y0,Qk,Jd,pp,mp,U0,gp]}computeIsSubtype(t,r){switch(t){case tp:case ep:case rp:case np:case ip:case sp:case ap:case op:case lp:case cp:case up:case hp:case fp:case dp:case pp:case mp:case gp:return this.isSubtype(Od,r);case Pd:case jd:case Qd:return this.isSubtype(U0,r);case Bd:case Xd:case Kd:case Jd:return this.isSubtype(Qk,r);case Fd:return this.isSubtype(W0,r)||this.isSubtype(U0,r);case $d:case Gd:case Ud:case Hd:return this.isSubtype(W0,r);case zd:case Wd:case Zd:return this.isSubtype(Md,r);case Yd:return this.isSubtype(Nd,r)||this.isSubtype(Md,r);case uh:return this.isSubtype(Nd,r);default:return!1}}getReferenceType(t){let r=`${t.container.$type}:${t.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Md;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Nd;case"Grammar:usedGrammars":return Vd;case"NamedArgument:parameter":case"ParameterReference:parameter":return qd;case"TerminalRuleCall:rule":return uh;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case Od:return{name:Od,properties:[{name:"cardinality"},{name:"lookahead"}]};case Pd:return{name:Pd,properties:[{name:"elements",defaultValue:[]}]};case Bd:return{name:Bd,properties:[{name:"elementType"}]};case Fd:return{name:Fd,properties:[{name:"true",defaultValue:!1}]};case $d:return{name:$d,properties:[{name:"left"},{name:"right"}]};case Gd:return{name:Gd,properties:[{name:"left"},{name:"right"}]};case Vd:return{name:Vd,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case j0:return{name:j0,properties:[{name:"path"}]};case zd:return{name:zd,properties:[{name:"name"}]};case Wd:return{name:Wd,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case q0:return{name:q0,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Ud:return{name:Ud,properties:[{name:"value"}]};case jd:return{name:jd,properties:[{name:"value"}]};case qd:return{name:qd,properties:[{name:"name"}]};case Hd:return{name:Hd,properties:[{name:"parameter"}]};case Yd:return{name:Yd,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Xd:return{name:Xd,properties:[{name:"referenceType"}]};case H0:return{name:H0,properties:[{name:"name"}]};case Kd:return{name:Kd,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case Qd:return{name:Qd,properties:[{name:"value"}]};case uh:return{name:uh,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case Zd:return{name:Zd,properties:[{name:"name"},{name:"type"}]};case Y0:return{name:Y0,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case Jd:return{name:Jd,properties:[{name:"types",defaultValue:[]}]};case tp:return{name:tp,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case ep:return{name:ep,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case rp:return{name:rp,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case np:return{name:np,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case ip:return{name:ip,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case sp:return{name:sp,properties:[{name:"cardinality"},{name:"lookahead"}]};case ap:return{name:ap,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case op:return{name:op,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case lp:return{name:lp,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case cp:return{name:cp,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case up:return{name:up,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case hp:return{name:hp,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case fp:return{name:fp,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case dp:return{name:dp,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case pp:return{name:pp,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case mp:return{name:mp,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case gp:return{name:gp,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},Le=new yp});var sT={};Be(sT,{assignMandatoryProperties:()=>j5,copyAstNode:()=>U5,findLocalReferences:()=>QEt,findRootNode:()=>Z0,getContainerOfType:()=>fh,getDocument:()=>bi,hasContainerOfType:()=>KEt,linkContentToContainer:()=>iT,streamAllContents:()=>Oo,streamAst:()=>aa,streamContents:()=>J0,streamReferences:()=>xp});function iT(e){for(let[t,r]of Object.entries(e))t.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{an(n)&&(n.$container=e,n.$containerProperty=t,n.$containerIndex=i)}):an(r)&&(r.$container=e,r.$containerProperty=t))}function fh(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function KEt(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function bi(e){let r=Z0(e).$document;if(!r)throw new Error("AST node has no document.");return r}function Z0(e){for(;e.$container;)e=e.$container;return e}function J0(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new Ls(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexJ0(r,t))}function aa(e,t){if(e){if(t?.range&&!W5(e,t.range))return new Do(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new Do(e,r=>J0(r,t),{includeRoot:!0})}function W5(e,t){var r;if(!t)return!0;let n=(r=e.$cstNode)===null||r===void 0?void 0:r.range;return n?_5(n,t):!1}function xp(e){return new Ls(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{xp(n).forEach(i=>{i.reference.ref===e&&r.push(i.reference)})}),kr(r)}function j5(e,t){let r=e.getTypeMetaData(t.$type),n=t;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=pX(i.defaultValue))}function pX(e){return Array.isArray(e)?[...e.map(pX)]:e}function U5(e,t){let r={$type:e.$type};for(let[n,i]of Object.entries(e))if(!n.startsWith("$"))if(an(i))r[n]=U5(i,t);else if(ai(i))r[n]=t(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let s=[];for(let o of i)an(o)?s.push(U5(o,t)):ai(o)?s.push(t(r,n,o.$refNode,o.$refText)):s.push(o);r[n]=s}else r[n]=i;return iT(r),r}var Oi=x(()=>{"use strict";za();us();Wa();a(iT,"linkContentToContainer");a(fh,"getContainerOfType");a(KEt,"hasContainerOfType");a(bi,"getDocument");a(Z0,"findRootNode");a(J0,"streamContents");a(Oo,"streamAllContents");a(aa,"streamAst");a(W5,"isAstNodeInRange");a(xp,"streamReferences");a(QEt,"findLocalReferences");a(j5,"assignMandatoryProperties");a(pX,"copyDefaultValue");a(U5,"copyAstNode")});function Ce(e){return e.charCodeAt(0)}function aT(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function bp(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function dh(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function t1(){throw Error("Internal Error - Should never get here!")}function q5(e){return e.type==="Character"}var H5=x(()=>{"use strict";a(Ce,"cc");a(aT,"insertToSet");a(bp,"addFlag");a(dh,"ASSERT_EXISTS");a(t1,"ASSERT_NEVER_REACH_HERE");a(q5,"isCharacter")});var e1,r1,Y5,mX=x(()=>{"use strict";H5();e1=[];for(let e=Ce("0");e<=Ce("9");e++)e1.push(e);r1=[Ce("_")].concat(e1);for(let e=Ce("a");e<=Ce("z");e++)r1.push(e);for(let e=Ce("A");e<=Ce("Z");e++)r1.push(e);Y5=[Ce(" "),Ce("\f"),Ce(` +`),Ce("\r"),Ce(" "),Ce("\v"),Ce(" "),Ce("\xA0"),Ce("\u1680"),Ce("\u2000"),Ce("\u2001"),Ce("\u2002"),Ce("\u2003"),Ce("\u2004"),Ce("\u2005"),Ce("\u2006"),Ce("\u2007"),Ce("\u2008"),Ce("\u2009"),Ce("\u200A"),Ce("\u2028"),Ce("\u2029"),Ce("\u202F"),Ce("\u205F"),Ce("\u3000"),Ce("\uFEFF")]});var ZEt,oT,JEt,ph,gX=x(()=>{"use strict";H5();mX();ZEt=/[0-9a-fA-F]/,oT=/[0-9]/,JEt=/[1-9]/,ph=class{static{a(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":bp(n,"global");break;case"i":bp(n,"ignoreCase");break;case"m":bp(n,"multiLine");break;case"u":bp(n,"unicode");break;case"y":bp(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}dh(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return t1()}quantifier(t=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),r={atLeast:i,atMost:s}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(t===!0&&r===void 0)return;dh(r);break}if(!(t===!0&&r===void 0)&&dh(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),dh(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):t1()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Ce(` +`),Ce("\r"),Ce("\u2028"),Ce("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,r=!1;switch(this.popChar()){case"d":t=e1;break;case"D":t=e1,r=!0;break;case"s":t=Y5;break;case"S":t=Y5,r=!0;break;case"w":t=r1;break;case"W":t=r1,r=!0;break}return dh(t)?{type:"Set",value:t,complement:r}:t1()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=Ce("\f");break;case"n":t=Ce(` +`);break;case"r":t=Ce("\r");break;case"t":t=Ce(" ");break;case"v":t=Ce("\v");break}return dh(t)?{type:"Character",value:t}:t1()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Ce("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:Ce(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:Ce(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(q5(n)&&this.isRangeDash()){this.consumeChar("-");let s=this.classAtom(),o=s.type==="Character";if(q5(s)){if(s.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}});var Po,yX=x(()=>{"use strict";Po=class{static{a(this,"BaseRegExpVisitor")}visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}});var n1=x(()=>{"use strict";gX();yX()});var lT={};Be(lT,{NEWLINE_REGEXP:()=>K5,escapeRegExp:()=>gh,getCaseInsensitivePattern:()=>Z5,getTerminalParts:()=>t3t,isMultilineComment:()=>Q5,isWhitespace:()=>kp,partialMatches:()=>J5,partialRegExp:()=>kX,whitespaceCharacters:()=>bX});function t3t(e){try{typeof e!="string"&&(e=e.source),e=`/${e}/`;let t=xX.pattern(e),r=[];for(let n of t.value.value)mh.reset(e),mh.visit(n),r.push({start:mh.startRegexp,end:mh.endRegex});return r}catch{return[]}}function Q5(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),mh.reset(e),mh.visit(xX.pattern(e)),mh.multiline}catch{return!1}}function kp(e){let t=typeof e=="string"?new RegExp(e):e;return bX.some(r=>t.test(r))}function gh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z5(e){return Array.prototype.map.call(e,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:gh(t)).join("")}function J5(e,t){let r=kX(e),n=t.match(r);return!!n&&n[0].length>0}function kX(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,n=0;function i(){let s="",o;function l(h){s+=r.substr(n,h),n+=h}a(l,"appendRaw");function u(h){s+="(?:"+r.substr(n,h)+"|$)",n+=h}for(a(u,"appendOptional");n",n)-n+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?l(o[0].length):u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":s+="(?:",n+=3,s+=i()+"|$)";break;case"=":s+="(?=",n+=3,s+=i()+")";break;case"!":o=n,n+=3,i(),s+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,i(),s+=r.substr(o,n-o);break;default:l(r.indexOf(">",n)-n+1),s+=i()+"|$)";break}break}else l(1),s+=i()+"|$)";break;case")":return++n,s;default:u(1);break}return s}return a(i,"process"),new RegExp(i(),e.flags)}var K5,xX,X5,mh,bX,Tp=x(()=>{"use strict";n1();K5=/\r?\n/gm,xX=new ph,X5=class extends Po{static{a(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){let r=String.fromCharCode(t.value);if(!this.multiline&&r===` +`&&(this.multiline=!0),t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=gh(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(t){if(!this.multiline){let r=this.regex.substring(t.loc.begin,t.loc.end),n=new RegExp(r);this.multiline=!!` +`.match(n)}if(t.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(t.loc.begin,t.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(t){t.type==="Group"&&t.quantifier||super.visitChildren(t)}},mh=new X5;a(t3t,"getTerminalParts");a(Q5,"isMultilineComment");bX=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");a(kp,"isWhitespace");a(gh,"escapeRegExp");a(Z5,"getCaseInsensitivePattern");a(J5,"partialMatches");a(kX,"partialRegExp")});var uT={};Be(uT,{findAssignment:()=>l6,findNameAssignment:()=>cT,findNodeForKeyword:()=>a6,findNodeForProperty:()=>s1,findNodesForKeyword:()=>e3t,findNodesForKeywordInternal:()=>o6,findNodesForProperty:()=>i6,getActionAtElement:()=>wX,getActionType:()=>vX,getAllReachableRules:()=>i1,getCrossReferenceTerminal:()=>r6,getEntryRule:()=>TX,getExplicitRuleType:()=>Sp,getHiddenRules:()=>SX,getRuleType:()=>c6,getRuleTypeName:()=>a3t,getTypeName:()=>o1,isArrayCardinality:()=>n3t,isArrayOperator:()=>i3t,isCommentTerminal:()=>n6,isDataType:()=>s3t,isDataTypeRule:()=>a1,isOptionalCardinality:()=>r3t,terminalRegex:()=>_p});function TX(e){return e.rules.find(t=>xi(t)&&t.entry)}function SX(e){return e.rules.filter(t=>Rs(t)&&t.hidden)}function i1(e,t){let r=new Set,n=TX(e);if(!n)return new Set(e.rules);let i=[n].concat(SX(e));for(let o of i)_X(o,r,t);let s=new Set;for(let o of e.rules)(r.has(o.name)||Rs(o)&&o.hidden)&&s.add(o);return s}function _X(e,t,r){t.add(e.name),Oo(e).forEach(n=>{if(ja(n)||r&&rT(n)){let i=n.rule.ref;i&&!t.has(i.name)&&_X(i,t,r)}})}function r6(e){if(e.terminal)return e.terminal;if(e.type.ref){let t=cT(e.type.ref);return t?.terminal}}function n6(e){return e.hidden&&!kp(_p(e))}function i6(e,t){return!e||!t?[]:s6(e,t,e.astNode,!0)}function s1(e,t,r){if(!e||!t)return;let n=s6(e,t,e.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function s6(e,t,r,n){if(!n){let i=fh(e.grammarSource,Ua);if(i&&i.feature===t)return[e]}return Va(e)&&e.astNode===r?e.content.flatMap(i=>s6(i,t,r,!1)):[]}function e3t(e,t){return e?o6(e,t,e?.astNode):[]}function a6(e,t,r){if(!e)return;let n=o6(e,t,e?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function o6(e,t,r){if(e.astNode!==r)return[];if(sa(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=oh(e).iterator(),i,s=[];do if(i=n.next(),!i.done){let o=i.value;o.astNode===r?sa(o.grammarSource)&&o.grammarSource.value===t&&s.push(o):n.prune()}while(!i.done);return s}function l6(e){var t;let r=e.astNode;for(;r===((t=e.container)===null||t===void 0?void 0:t.astNode);){let n=fh(e.grammarSource,Ua);if(n)return n;e=e.container}}function cT(e){let t=e;return Zk(t)&&(bl(t.$container)?t=t.$container.$container:xi(t.$container)?t=t.$container:No(t.$container)),CX(e,t,new Map)}function CX(e,t,r){var n;function i(s,o){let l;return fh(s,Ua)||(l=CX(o,o,r)),r.set(e,l),l}if(a(i,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let s of Oo(t)){if(Ua(s)&&s.feature.toLowerCase()==="name")return r.set(e,s),s;if(ja(s)&&xi(s.rule.ref))return i(s,s.rule.ref);if(tT(s)&&(!((n=s.typeRef)===null||n===void 0)&&n.ref))return i(s,s.typeRef.ref)}}function wX(e){let t=e.$container;if(Pc(t)){let r=t.elements,n=r.indexOf(e);for(let i=n-1;i>=0;i--){let s=r[i];if(bl(s))return s;{let o=Oo(r[i]).find(bl);if(o)return o}}}if(X0(t))return wX(t)}function r3t(e,t){return e==="?"||e==="*"||Pc(t)&&!!t.guardCondition}function n3t(e){return e==="*"||e==="+"}function i3t(e){return e==="+="}function a1(e){return EX(e,new Set)}function EX(e,t){if(t.has(e))return!0;t.add(e);for(let r of Oo(e))if(ja(r)){if(!r.rule.ref||xi(r.rule.ref)&&!EX(r.rule.ref,t))return!1}else{if(Ua(r))return!1;if(bl(r))return!1}return!!e.definition}function s3t(e){return e6(e.type,new Set)}function e6(e,t){if(t.has(e))return!0;if(t.add(e),E5(e))return!1;if(I5(e))return!1;if(M5(e))return e.types.every(r=>e6(r,t));if(tT(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return K0(r)?e6(r.type,t):!1}else return!1}else return!1}function Sp(e){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t){if(xi(t))return t.name;if(Jk(t)||K0(t))return t.name}}}function o1(e){var t;if(xi(e))return a1(e)?e.name:(t=Sp(e))!==null&&t!==void 0?t:e.name;if(Jk(e)||K0(e)||N5(e))return e.name;if(bl(e)){let r=vX(e);if(r)return r}else if(Zk(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function vX(e){var t;if(e.inferredType)return e.inferredType.name;if(!((t=e.type)===null||t===void 0)&&t.ref)return o1(e.type.ref)}function a3t(e){var t,r,n;return Rs(e)?(r=(t=e.type)===null||t===void 0?void 0:t.name)!==null&&r!==void 0?r:"string":a1(e)?e.name:(n=Sp(e))!==null&&n!==void 0?n:e.name}function c6(e){var t,r,n;return Rs(e)?(r=(t=e.type)===null||t===void 0?void 0:t.name)!==null&&r!==void 0?r:"string":(n=Sp(e))!==null&&n!==void 0?n:e.name}function _p(e){let t={s:!1,i:!1,u:!1},r=Cp(e.definition,t),n=Object.entries(t).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Cp(e,t){if($5(e))return o3t(e);if(G5(e))return l3t(e);if(O5(e))return h3t(e);if(rT(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return kl(Cp(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}else{if(B5(e))return u3t(e);if(V5(e))return c3t(e);if(F5(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),i=e.regex.substring(r+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),kl(n,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}else{if(z5(e))return kl(u6,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error(`Invalid terminal element: ${e?.$type}`)}}}function o3t(e){return kl(e.elements.map(t=>Cp(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead})}function l3t(e){return kl(e.elements.map(t=>Cp(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead})}function c3t(e){return kl(`${u6}*?${Cp(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead})}function u3t(e){return kl(`(?!${Cp(e.terminal)})${u6}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}function h3t(e){return e.right?kl(`[${t6(e.left)}-${t6(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1}):kl(t6(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}function t6(e){return gh(e.value)}function kl(e,t){var r;return(t.wrap!==!1||t.lookahead)&&(e=`(${(r=t.lookahead)!==null&&r!==void 0?r:""}${e})`),t.cardinality?`${e}${t.cardinality}`:e}var u6,qa=x(()=>{"use strict";Kk();Mo();za();Oi();Wa();Tp();a(TX,"getEntryRule");a(SX,"getHiddenRules");a(i1,"getAllReachableRules");a(_X,"ruleDfs");a(r6,"getCrossReferenceTerminal");a(n6,"isCommentTerminal");a(i6,"findNodesForProperty");a(s1,"findNodeForProperty");a(s6,"findNodesForPropertyInternal");a(e3t,"findNodesForKeyword");a(a6,"findNodeForKeyword");a(o6,"findNodesForKeywordInternal");a(l6,"findAssignment");a(cT,"findNameAssignment");a(CX,"findNameAssignmentInternal");a(wX,"getActionAtElement");a(r3t,"isOptionalCardinality");a(n3t,"isArrayCardinality");a(i3t,"isArrayOperator");a(a1,"isDataTypeRule");a(EX,"isDataTypeRuleInternal");a(s3t,"isDataType");a(e6,"isDataTypeInternal");a(Sp,"getExplicitRuleType");a(o1,"getTypeName");a(vX,"getActionType");a(a3t,"getRuleTypeName");a(c6,"getRuleType");a(_p,"terminalRegex");u6=/[\s\S]/.source;a(Cp,"abstractElementToRegex");a(o3t,"terminalAlternativesToRegex");a(l3t,"terminalGroupToRegex");a(c3t,"untilTokenToRegex");a(u3t,"negateTokenToRegex");a(h3t,"characterRangeToRegex");a(t6,"keywordToRegex");a(kl,"withCardinality")});function h6(e){let t=[],r=e.Grammar;for(let n of r.rules)Rs(n)&&n6(n)&&Q5(_p(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:Yk}}var f6=x(()=>{"use strict";Wa();qa();Tp();Mo();a(h6,"createGrammarConfig")});var d6=x(()=>{"use strict"});function wp(e){console&&console.error&&console.error(`Error: ${e}`)}function l1(e){console&&console.warn&&console.warn(`Warning: ${e}`)}var AX=x(()=>{"use strict";a(wp,"PRINT_ERROR");a(l1,"PRINT_WARNING")});function c1(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}var LX=x(()=>{"use strict";a(c1,"timer")});function u1(e){function t(){}a(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return a(n,"fakeAccess"),n(),n(),e;(0,eval)(e)}var RX=x(()=>{"use strict";a(u1,"toFastProperties")});var Ep=x(()=>{"use strict";AX();LX();RX()});function f3t(e){return d3t(e)?e.LABEL:e.name}function d3t(e){return pn(e.LABEL)&&e.LABEL!==""}function hT(e){return Dt(e,vp)}function vp(e){function t(r){return Dt(r,vp)}if(a(t,"convertDefinition"),e instanceof Cr){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return pn(e.label)&&(r.label=e.label),r}else{if(e instanceof $r)return{type:"Alternative",definition:t(e.definition)};if(e instanceof wr)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Gr)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Vr)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:vp(new Ue({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Nr)return{type:"RepetitionWithSeparator",idx:e.idx,separator:vp(new Ue({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Xe)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Mr)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Ue){let r={type:"Terminal",name:e.terminalType.name,label:f3t(e.terminalType),idx:e.idx};pn(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=ea(n)?n.source:n),r}else{if(e instanceof Pi)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var Ds,Cr,Pi,$r,wr,Gr,Vr,Xe,Nr,Mr,Ue,fT=x(()=>{"use strict";ue();a(f3t,"tokenLabel");a(d3t,"hasTokenLabel");Ds=class{static{a(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),tt(this.definition,r=>{r.accept(t)})}},Cr=class extends Ds{static{a(this,"NonTerminal")}constructor(t){super([]),this.idx=1,ni(this,cs(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Pi=class extends Ds{static{a(this,"Rule")}constructor(t){super(t.definition),this.orgText="",ni(this,cs(t,r=>r!==void 0))}},$r=class extends Ds{static{a(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,ni(this,cs(t,r=>r!==void 0))}},wr=class extends Ds{static{a(this,"Option")}constructor(t){super(t.definition),this.idx=1,ni(this,cs(t,r=>r!==void 0))}},Gr=class extends Ds{static{a(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,ni(this,cs(t,r=>r!==void 0))}},Vr=class extends Ds{static{a(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,ni(this,cs(t,r=>r!==void 0))}},Xe=class extends Ds{static{a(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,ni(this,cs(t,r=>r!==void 0))}},Nr=class extends Ds{static{a(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,ni(this,cs(t,r=>r!==void 0))}},Mr=class extends Ds{static{a(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,ni(this,cs(t,r=>r!==void 0))}},Ue=class{static{a(this,"Terminal")}constructor(t){this.idx=1,ni(this,cs(t,r=>r!==void 0))}accept(t){t.visit(this)}};a(hT,"serializeGrammar");a(vp,"serializeProduction")});var Bi,DX=x(()=>{"use strict";fT();Bi=class{static{a(this,"GAstVisitor")}visit(t){let r=t;switch(r.constructor){case Cr:return this.visitNonTerminal(r);case $r:return this.visitAlternative(r);case wr:return this.visitOption(r);case Gr:return this.visitRepetitionMandatory(r);case Vr:return this.visitRepetitionMandatoryWithSeparator(r);case Nr:return this.visitRepetitionWithSeparator(r);case Xe:return this.visitRepetition(r);case Mr:return this.visitAlternation(r);case Ue:return this.visitTerminal(r);case Pi:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function p6(e){return e instanceof $r||e instanceof wr||e instanceof Xe||e instanceof Gr||e instanceof Vr||e instanceof Nr||e instanceof Ue||e instanceof Pi}function yh(e,t=[]){return e instanceof wr||e instanceof Xe||e instanceof Nr?!0:e instanceof Mr?O0(e.definition,n=>yh(n,t)):e instanceof Cr&&Kr(t,e)?!1:e instanceof Ds?(e instanceof Cr&&t.push(e),gi(e.definition,n=>yh(n,t))):!1}function m6(e){return e instanceof Mr}function hs(e){if(e instanceof Cr)return"SUBRULE";if(e instanceof wr)return"OPTION";if(e instanceof Mr)return"OR";if(e instanceof Gr)return"AT_LEAST_ONE";if(e instanceof Vr)return"AT_LEAST_ONE_SEP";if(e instanceof Nr)return"MANY_SEP";if(e instanceof Xe)return"MANY";if(e instanceof Ue)return"CONSUME";throw Error("non exhaustive match")}var IX=x(()=>{"use strict";ue();fT();a(p6,"isSequenceProd");a(yh,"isOptionalProd");a(m6,"isBranchingProd");a(hs,"getProductionDslName")});var Fi=x(()=>{"use strict";fT();DX();IX()});function NX(e,t,r){return[new wr({definition:[new Ue({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var Tl,dT=x(()=>{"use strict";ue();Fi();Tl=class{static{a(this,"RestWalker")}walk(t,r=[]){tt(t.definition,(n,i)=>{let s=dn(t.definition,i+1);if(n instanceof Cr)this.walkProdRef(n,s,r);else if(n instanceof Ue)this.walkTerminal(n,s,r);else if(n instanceof $r)this.walkFlat(n,s,r);else if(n instanceof wr)this.walkOption(n,s,r);else if(n instanceof Gr)this.walkAtLeastOne(n,s,r);else if(n instanceof Vr)this.walkAtLeastOneSep(n,s,r);else if(n instanceof Nr)this.walkManySep(n,s,r);else if(n instanceof Xe)this.walkMany(n,s,r);else if(n instanceof Mr)this.walkOr(n,s,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let i=r.concat(n);this.walk(t,i)}walkOption(t,r,n){let i=r.concat(n);this.walk(t,i)}walkAtLeastOne(t,r,n){let i=[new wr({definition:t.definition})].concat(r,n);this.walk(t,i)}walkAtLeastOneSep(t,r,n){let i=NX(t,r,n);this.walk(t,i)}walkMany(t,r,n){let i=[new wr({definition:t.definition})].concat(r,n);this.walk(t,i)}walkManySep(t,r,n){let i=NX(t,r,n);this.walk(t,i)}walkOr(t,r,n){let i=r.concat(n);tt(t.definition,s=>{let o=new $r({definition:[s]});this.walk(o,i)})}};a(NX,"restForRepetitionWithSeparator")});function xh(e){if(e instanceof Cr)return xh(e.referencedRule);if(e instanceof Ue)return g3t(e);if(p6(e))return p3t(e);if(m6(e))return m3t(e);throw Error("non exhaustive match")}function p3t(e){let t=[],r=e.definition,n=0,i=r.length>n,s,o=!0;for(;i&&o;)s=r[n],o=yh(s),t=t.concat(xh(s)),n=n+1,i=r.length>n;return Ad(t)}function m3t(e){let t=Dt(e.definition,r=>xh(r));return Ad(fr(t))}function g3t(e){return[e.terminalType]}var g6=x(()=>{"use strict";ue();Fi();a(xh,"first");a(p3t,"firstForSequence");a(m3t,"firstForBranching");a(g3t,"firstForTerminal")});var pT,y6=x(()=>{"use strict";pT="_~IN~_"});function MX(e){let t={};return tt(e,r=>{let n=new x6(r).startWalking();ni(t,n)}),t}function y3t(e,t){return e.name+t+pT}var x6,OX=x(()=>{"use strict";dT();g6();ue();y6();Fi();x6=class extends Tl{static{a(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let i=y3t(t.referencedRule,t.idx)+this.topProd.name,s=r.concat(n),o=new $r({definition:s}),l=xh(o);this.follows[i]=l}};a(MX,"computeAllProdsFollows");a(y3t,"buildBetweenProdsFollowPrefix")});function Ap(e){let t=e.toString();if(mT.hasOwnProperty(t))return mT[t];{let r=x3t.pattern(t);return mT[t]=r,r}}function PX(){mT={}}var mT,x3t,gT=x(()=>{"use strict";n1();mT={},x3t=new ph;a(Ap,"getRegExpAst");a(PX,"clearRegExpParserCache")});function $X(e,t=!1){try{let r=Ap(e);return b6(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===FX)t&&l1(`${h1} Unable to optimize: < ${e.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),wp(`${h1} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function b6(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i{if(typeof u=="number")yT(u,t,r);else{let h=u;if(r===!0)for(let f=h.from;f<=h.to;f++)yT(f,t,r);else{for(let f=h.from;f<=h.to&&f=Lp){let f=h.from>=Lp?h.from:Lp,d=h.to,p=Bo(f),m=Bo(d);for(let g=p;g<=m;g++)t[g]=g}}}});break;case"Group":b6(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&k6(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Ve(t)}function yT(e,t,r){let n=Bo(e);t[n]=n,r===!0&&b3t(e,t)}function b3t(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=Bo(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let s=Bo(i.charCodeAt(0));t[s]=s}}}function BX(e,t){return Mi(e.value,r=>{if(typeof r=="number")return Kr(t,r);{let n=r;return Mi(t,i=>n.from<=i&&i<=n.to)!==void 0}})}function k6(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Qt(e.value)?gi(e.value,k6):k6(e.value):!1}function xT(e,t){if(t instanceof RegExp){let r=Ap(t),n=new T6(e);return n.visit(r),n.found}else return Mi(t,r=>Kr(e,r.charCodeAt(0)))!==void 0}var FX,h1,T6,GX=x(()=>{"use strict";n1();ue();Ep();gT();S6();FX="Complement Sets are not supported for first char optimization",h1=`Unable to use "first char" lexer optimizations: +`;a($X,"getOptimizedStartCodesIndices");a(b6,"firstCharOptimizedIndices");a(yT,"addOptimizedIdxToResult");a(b3t,"handleIgnoreCase");a(BX,"findCode");a(k6,"isWholeOptional");T6=class extends Po{static{a(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}super.visitChildren(t)}}visitCharacter(t){Kr(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?BX(t,this.targetCharCodes)===void 0&&(this.found=!0):BX(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};a(xT,"canMatchCharCode")});function WX(e,t){t=Ac(t,{useSticky:C6,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:a((T,_)=>_(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{B3t()});let n;r("Reject Lexer.NA",()=>{n=Rc(e,T=>T[bh]===Zr.NA)});let i=!1,s;r("Transform Patterns",()=>{i=!1,s=Dt(n,T=>{let _=T[bh];if(ea(_)){let L=_.source;return L.length===1&&L!=="^"&&L!=="$"&&L!=="."&&!_.ignoreCase?L:L.length===2&&L[0]==="\\"&&!Kr(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],L[1])?L[1]:t.useSticky?zX(_):VX(_)}else{if(_n(_))return i=!0,{exec:_};if(typeof _=="object")return i=!0,_;if(typeof _=="string"){if(_.length===1)return _;{let L=_.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(L);return t.useSticky?zX(C):VX(C)}}else throw Error("non exhaustive match")}})});let o,l,u,h,f;r("misc mapping",()=>{o=Dt(n,T=>T.tokenTypeIdx),l=Dt(n,T=>{let _=T.GROUP;if(_!==Zr.SKIPPED){if(pn(_))return _;if(Me(_))return!1;throw Error("non exhaustive match")}}),u=Dt(n,T=>{let _=T.LONGER_ALT;if(_)return Qt(_)?Dt(_,C=>Dk(n,C)):[Dk(n,_)]}),h=Dt(n,T=>T.PUSH_MODE),f=Dt(n,T=>Zt(T,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{let T=QX(t.lineTerminatorCharacters);d=Dt(n,_=>!1),t.positionTracking!=="onlyOffset"&&(d=Dt(n,_=>Zt(_,"LINE_BREAKS")?!!_.LINE_BREAKS:KX(_,T)===!1&&xT(T,_.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=Dt(n,YX),m=Dt(s,O3t),g=pr(n,(T,_)=>{let L=_.GROUP;return pn(L)&&L!==Zr.SKIPPED&&(T[L]=[]),T},{}),y=Dt(s,(T,_)=>({pattern:s[_],longerAlt:u[_],canLineTerminator:d[_],isCustom:p[_],short:m[_],group:l[_],push:h[_],pop:f[_],tokenTypeIdx:o[_],tokenType:n[_]}))});let b=!0,k=[];return t.safeMode||r("First Char Optimization",()=>{k=pr(n,(T,_,L)=>{if(typeof _.PATTERN=="string"){let C=_.PATTERN.charCodeAt(0),D=Bo(C);_6(T,D,y[L])}else if(Qt(_.START_CHARS_HINT)){let C;tt(_.START_CHARS_HINT,D=>{let $=typeof D=="string"?D.charCodeAt(0):D,w=Bo($);C!==w&&(C=w,_6(T,w,y[L]))})}else if(ea(_.PATTERN))if(_.PATTERN.unicode)b=!1,t.ensureOptimizations&&wp(`${h1} Unable to analyze < ${_.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let C=$X(_.PATTERN,t.ensureOptimizations);De(C)&&(b=!1),tt(C,D=>{_6(T,D,y[L])})}else t.ensureOptimizations&&wp(`${h1} TokenType: <${_.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),b=!1;return T},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:k,hasCustom:i,canBeOptimized:b}}function UX(e,t){let r=[],n=T3t(e);r=r.concat(n.errors);let i=S3t(n.valid),s=i.valid;return r=r.concat(i.errors),r=r.concat(k3t(s)),r=r.concat(R3t(s)),r=r.concat(D3t(s,t)),r=r.concat(I3t(s)),r}function k3t(e){let t=[],r=dr(e,n=>ea(n[bh]));return t=t.concat(C3t(r)),t=t.concat(v3t(r)),t=t.concat(A3t(r)),t=t.concat(L3t(r)),t=t.concat(w3t(r)),t}function T3t(e){let t=dr(e,i=>!Zt(i,bh)),r=Dt(t,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Qr.MISSING_PATTERN,tokenTypes:[i]})),n=Lc(e,t);return{errors:r,valid:n}}function S3t(e){let t=dr(e,i=>{let s=i[bh];return!ea(s)&&!_n(s)&&!Zt(s,"exec")&&!pn(s)}),r=Dt(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Qr.INVALID_PATTERN,tokenTypes:[i]})),n=Lc(e,t);return{errors:r,valid:n}}function C3t(e){class t extends Po{static{a(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}let r=dr(e,i=>{let s=i.PATTERN;try{let o=Ap(s),l=new t;return l.visit(o),l.found}catch{return _3t.test(s.source)}});return Dt(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Qr.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function w3t(e){let t=dr(e,n=>n.PATTERN.test(""));return Dt(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Qr.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function v3t(e){class t extends Po{static{a(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}let r=dr(e,i=>{let s=i.PATTERN;try{let o=Ap(s),l=new t;return l.visit(o),l.found}catch{return E3t.test(s.source)}});return Dt(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Qr.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function A3t(e){let t=dr(e,n=>{let i=n[bh];return i instanceof RegExp&&(i.multiline||i.global)});return Dt(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Qr.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function L3t(e){let t=[],r=Dt(e,s=>pr(e,(o,l)=>(s.PATTERN.source===l.PATTERN.source&&!Kr(t,l)&&l.PATTERN!==Zr.NA&&(t.push(l),o.push(l)),o),[]));r=wo(r);let n=dr(r,s=>s.length>1);return Dt(n,s=>{let o=Dt(s,u=>u.name);return{message:`The same RegExp pattern ->${Kn(s).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Qr.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function R3t(e){let t=dr(e,n=>{if(!Zt(n,"GROUP"))return!1;let i=n.GROUP;return i!==Zr.SKIPPED&&i!==Zr.NA&&!pn(i)});return Dt(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Qr.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function D3t(e,t){let r=dr(e,i=>i.PUSH_MODE!==void 0&&!Kr(t,i.PUSH_MODE));return Dt(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Qr.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function I3t(e){let t=[],r=pr(e,(n,i,s)=>{let o=i.PATTERN;return o===Zr.NA||(pn(o)?n.push({str:o,idx:s,tokenType:i}):ea(o)&&M3t(o)&&n.push({str:o.source,idx:s,tokenType:i})),n},[]);return tt(e,(n,i)=>{tt(r,({str:s,idx:o,tokenType:l})=>{if(i${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Qr.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}function N3t(e,t){if(ea(t)){let r=t.exec(e);return r!==null&&r.index===0}else{if(_n(t))return t(e,0,[],{});if(Zt(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function M3t(e){return Mi([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function VX(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function zX(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function jX(e,t,r){let n=[];return Zt(e,Rp)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Rp+`> property in its definition +`,type:Qr.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Zt(e,bT)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+bT+`> property in its definition +`,type:Qr.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Zt(e,bT)&&Zt(e,Rp)&&!Zt(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Rp}: <${e.defaultMode}>which does not exist +`,type:Qr.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Zt(e,bT)&&tt(e.modes,(i,s)=>{tt(i,(o,l)=>{if(Me(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${l}> +`,type:Qr.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Zt(o,"LONGER_ALT")){let u=Qt(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];tt(u,h=>{!Me(h)&&!Kr(i,h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${s}> +`,type:Qr.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function qX(e,t,r){let n=[],i=!1,s=wo(fr(Ve(e.modes))),o=Rc(s,u=>u[bh]===Zr.NA),l=QX(r);return t&&tt(o,u=>{let h=KX(u,l);if(h!==!1){let d={message:P3t(u,h),type:h.issue,tokenType:u};n.push(d)}else Zt(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):xT(l,u.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:Qr.NO_LINE_BREAKS_FLAGS}),n}function HX(e){let t={},r=lr(e);return tt(r,n=>{let i=e[n];if(Qt(i))t[n]=[];else throw Error("non exhaustive match")}),t}function YX(e){let t=e.PATTERN;if(ea(t))return!1;if(_n(t))return!0;if(Zt(t,"exec"))return!0;if(pn(t))return!1;throw Error("non exhaustive match")}function O3t(e){return pn(e)&&e.length===1?e.charCodeAt(0):!1}function KX(e,t){if(Zt(e,"LINE_BREAKS"))return!1;if(ea(e.PATTERN)){try{xT(t,e.PATTERN)}catch(r){return{issue:Qr.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(pn(e.PATTERN))return!1;if(YX(e))return{issue:Qr.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function P3t(e,t){if(t.issue===Qr.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${e.name}> Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Qr.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${e.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function QX(e){return Dt(e,r=>pn(r)?r.charCodeAt(0):r)}function _6(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function Bo(e){return e255?255+~~(e/255):e}}var bh,Rp,bT,C6,_3t,E3t,XX,Lp,kT,S6=x(()=>{"use strict";n1();f1();ue();Ep();GX();gT();bh="PATTERN",Rp="defaultMode",bT="modes",C6=typeof new RegExp("(?:)").sticky=="boolean";a(WX,"analyzeTokenTypes");a(UX,"validatePatterns");a(k3t,"validateRegExpPattern");a(T3t,"findMissingPatterns");a(S3t,"findInvalidPatterns");_3t=/[^\\][$]/;a(C3t,"findEndOfInputAnchor");a(w3t,"findEmptyMatchRegExps");E3t=/[^\\[][\^]|^\^/;a(v3t,"findStartOfInputAnchor");a(A3t,"findUnsupportedFlags");a(L3t,"findDuplicatePatterns");a(R3t,"findInvalidGroupType");a(D3t,"findModesThatDoNotExist");a(I3t,"findUnreachablePatterns");a(N3t,"testTokenType");a(M3t,"noMetaChar");a(VX,"addStartOfInput");a(zX,"addStickyFlag");a(jX,"performRuntimeChecks");a(qX,"performWarningRuntimeChecks");a(HX,"cloneEmptyGroups");a(YX,"isCustomPattern");a(O3t,"isShortPattern");XX={test:a(function(e){let t=e.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function F3t(e){let t=Sr(e),r=e,n=!0;for(;n;){r=wo(fr(Dt(r,s=>s.CATEGORIES)));let i=Lc(r,t);t=t.concat(i),De(i)?n=!1:r=i}return t}function $3t(e){tt(e,t=>{w6(t)||(tK[ZX]=t,t.tokenTypeIdx=ZX++),JX(t)&&!Qt(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),JX(t)||(t.CATEGORIES=[]),z3t(t)||(t.categoryMatches=[]),W3t(t)||(t.categoryMatchesMap={})})}function G3t(e){tt(e,t=>{t.categoryMatches=[],tt(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(tK[n].tokenTypeIdx)})})}function V3t(e){tt(e,t=>{eK([],t)})}function eK(e,t){tt(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),tt(t.CATEGORIES,r=>{let n=e.concat(t);Kr(n,r)||eK(n,r)})}function w6(e){return Zt(e,"tokenTypeIdx")}function JX(e){return Zt(e,"CATEGORIES")}function z3t(e){return Zt(e,"categoryMatches")}function W3t(e){return Zt(e,"categoryMatchesMap")}function rK(e){return Zt(e,"tokenTypeIdx")}var ZX,tK,kh=x(()=>{"use strict";ue();a(Sl,"tokenStructuredMatcher");a(Dp,"tokenStructuredMatcherNoCategories");ZX=1,tK={};a(_l,"augmentTokenTypes");a(F3t,"expandCategories");a($3t,"assignTokenDefaultProps");a(G3t,"assignCategoriesTokensProp");a(V3t,"assignCategoriesMapProp");a(eK,"singleAssignCategoriesToksMap");a(w6,"hasShortKeyProperty");a(JX,"hasCategoriesProperty");a(z3t,"hasExtendingTokensTypesProperty");a(W3t,"hasExtendingTokensTypesMapProperty");a(rK,"isTokenType")});var Ip,E6=x(()=>{"use strict";Ip={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}});var Qr,d1,Zr,f1=x(()=>{"use strict";S6();ue();Ep();kh();E6();gT();(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Qr||(Qr={}));d1={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ip,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(d1);Zr=class{static{a(this,"Lexer")}constructor(t,r=d1){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:l,value:u}=c1(s),h=l>10?console.warn:console.log;return this.traceInitIndent time: ${l}ms`),this.traceInitIndent--,u}else return s()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=ni({},d1,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===d1.lineTerminatorsPattern)this.config.lineTerminatorsPattern=XX;else if(this.config.lineTerminatorCharacters===d1.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Qt(t)?i={modes:{defaultMode:Sr(t)},defaultMode:Rp}:(s=!1,i=Sr(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jX(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(qX(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},tt(i.modes,(l,u)=>{i.modes[u]=Rc(l,h=>Me(h))});let o=lr(i.modes);if(tt(i.modes,(l,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(UX(l,o))}),De(this.lexerDefinitionErrors)){_l(l);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=WX(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=h.charCodeToPatternIdxToConfig,this.emptyGroups=ni({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=h.canBeOptimized}})}),this.defaultMode=i.defaultMode,!De(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=Dt(this.lexerDefinitionErrors,h=>h.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+u)}tt(this.lexerDefinitionWarning,l=>{l1(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(C6?(this.chopInput=qn,this.match=this.matchWithTest):(this.updateLastIndex=sn,this.match=this.matchWithExec),s&&(this.handleModes=sn),this.trackStartLines===!1&&(this.computeNewColumn=qn),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=sn),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let l=pr(this.canModeBeOptimized,(u,h,f)=>(h===!1&&u.push(f),u),[]);if(r.ensureOptimizations&&!De(l))throw Error(`Lexer Modes: < ${l.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{PX()}),this.TRACE_INIT("toFastProperties",()=>{u1(this)})})}tokenize(t,r=this.defaultMode){if(!De(this.lexerDefinitionErrors)){let i=Dt(this.lexerDefinitionErrors,s=>s.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,i,s,o,l,u,h,f,d,p,m,g,y,b,k,T,_=t,L=_.length,C=0,D=0,$=this.hasCustom?0:Math.floor(t.length/10),w=new Array($),A=[],F=this.trackStartLines?1:void 0,S=this.trackStartLines?1:void 0,v=HX(this.emptyGroups),R=this.trackStartLines,B=this.config.lineTerminatorsPattern,I=0,M=[],O=[],N=[],E=[];Object.freeze(E);let V;function G(){return M}a(G,"getPossiblePatternsSlow");function J(Lt){let bt=Bo(Lt),ut=O[bt];return ut===void 0?E:ut}a(J,"getPossiblePatternsOptimized");let rt=a(Lt=>{if(N.length===1&&Lt.tokenType.PUSH_MODE===void 0){let bt=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Lt);A.push({offset:Lt.startOffset,line:Lt.startLine,column:Lt.startColumn,length:Lt.image.length,message:bt})}else{N.pop();let bt=ii(N);M=this.patternIdxToConfig[bt],O=this.charCodeToPatternIdxToConfig[bt],I=M.length;let ut=this.canModeBeOptimized[bt]&&this.config.safeMode===!1;O&&ut?V=J:V=G}},"pop_mode");function nt(Lt){N.push(Lt),O=this.charCodeToPatternIdxToConfig[Lt],M=this.patternIdxToConfig[Lt],I=M.length,I=M.length;let bt=this.canModeBeOptimized[Lt]&&this.config.safeMode===!1;O&&bt?V=J:V=G}a(nt,"push_mode"),nt.call(this,r);let ct,pt=this.config.recoveryEnabled;for(;Cu.length){u=o,h=f,ct=H;break}}}break}}if(u!==null){if(d=u.length,p=ct.group,p!==void 0&&(m=ct.tokenTypeIdx,g=this.createTokenInstance(u,C,m,ct.tokenType,F,S,d),this.handlePayload(g,h),p===!1?D=this.addToken(w,D,g):v[p].push(g)),t=this.chopInput(t,d),C=C+d,S=this.computeNewColumn(S,d),R===!0&&ct.canLineTerminator===!0){let it=0,st,X;B.lastIndex=0;do st=B.test(u),st===!0&&(X=B.lastIndex-1,it++);while(st===!0);it!==0&&(F=F+it,S=d-X,this.updateTokenEndLineColumnLocation(g,p,X,it,F,S,d))}this.handleModes(ct,rt,nt,g)}else{let it=C,st=F,X=S,H=pt===!1;for(;H===!1&&C{"use strict";ue();f1();kh();a(Cl,"tokenLabel");a(v6,"hasTokenLabel");U3t="parent",nK="categories",iK="label",sK="group",aK="push_mode",oK="pop_mode",lK="longer_alt",cK="line_breaks",uK="start_chars_hint";a(Bc,"createToken");a(j3t,"createTokenInternal");Is=Bc({name:"EOF",pattern:Zr.NA});_l([Is]);a(wl,"createTokenInstance");a(p1,"tokenMatcher")});var El,hK,Ha,Np=x(()=>{"use strict";Th();ue();Fi();El={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${v6(e)?`--> ${Cl(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let s="Expecting: ",l=` +but found: '`+Kn(t).image+"'";if(n)return s+n+l;{let u=pr(e,(p,m)=>p.concat(m),[]),h=Dt(u,p=>`[${Dt(p,m=>Cl(m)).join(", ")}]`),d=`one of these possible Token sequences: +${Dt(h,(p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return s+d+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",o=` +but found: '`+Kn(t).image+"'";if(r)return i+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${Dt(e,h=>`[${Dt(h,f=>Cl(f)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(El);hK={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},Ha={buildDuplicateFoundError(e,t){function r(f){return f instanceof Ue?f.terminalType.name:f instanceof Cr?f.nonTerminalName:""}a(r,"getExtraProductionArgument");let n=e.name,i=Kn(t),s=i.idx,o=hs(i),l=r(i),u=s>0,h=`->${o}${u?s:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,` +`),h},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=Dt(e.prefixPath,i=>Cl(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(e){let t=Dt(e.prefixPath,i=>Cl(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(e){let t=hs(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: + inside <${e.topLevelRule.name}> Rule. + has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=Dt(e.leftRecursionPath,s=>s.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${t}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${n} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof Pi?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function fK(e,t){let r=new A6(e,t);return r.resolveRefs(),r.errors}var A6,dK=x(()=>{"use strict";fs();ue();Fi();a(fK,"resolveGrammar");A6=class extends Bi{static{a(this,"GastRefResolverVisitor")}constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){tt(Ve(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:On.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}}});function CT(e,t,r=[]){r=Sr(r);let n=[],i=0;function s(l){return l.concat(dn(e,i+1))}a(s,"remainingPathWith");function o(l){let u=CT(s(l),t,r);return n.concat(u)}for(a(o,"getAlternativesForProd");r.length{De(u.definition)===!1&&(n=o(u.definition))}),n;if(l instanceof Ue)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:dn(e,i)}),n}function wT(e,t,r,n){let i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE",l=!1,u=t.length,h=u-n-1,f=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!De(d);){let p=d.pop();if(p===o){l&&ii(d).idx<=h&&d.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,b=p.occurrenceStack;if(De(m))continue;let k=m[0];if(k===i){let T={idx:g,def:dn(m),ruleStack:xl(y),occurrenceStack:xl(b)};d.push(T)}else if(k instanceof Ue)if(g=0;T--){let _=k.definition[T],L={idx:g,def:_.definition.concat(dn(m)),ruleStack:y,occurrenceStack:b};d.push(L),d.push(o)}else if(k instanceof $r)d.push({idx:g,def:k.definition.concat(dn(m)),ruleStack:y,occurrenceStack:b});else if(k instanceof Pi)d.push(q3t(k,g,y,b));else throw Error("non exhaustive match")}return f}function q3t(e,t,r,n){let i=Sr(r);i.push(e.name);let s=Sr(n);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var L6,TT,Mp,ST,m1,_T,g1,y1=x(()=>{"use strict";ue();g6();dT();Fi();L6=class extends Tl{static{a(this,"AbstractNextPossibleTokensWalker")}constructor(t,r){super(),this.topProd=t,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Sr(this.path.ruleStack).reverse(),this.occurrenceStack=Sr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){De(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},TT=class extends L6{static{a(this,"NextAfterTokenWalker")}constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),s=new $r({definition:i});this.possibleTokTypes=xh(s),this.found=!0}}},Mp=class extends Tl{static{a(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},ST=class extends Mp{static{a(this,"NextTerminalAfterManyWalker")}walkMany(t,r,n){if(t.idx===this.occurrence){let i=Kn(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ue&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(t,r,n)}},m1=class extends Mp{static{a(this,"NextTerminalAfterManySepWalker")}walkManySep(t,r,n){if(t.idx===this.occurrence){let i=Kn(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ue&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(t,r,n)}},_T=class extends Mp{static{a(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let i=Kn(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ue&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(t,r,n)}},g1=class extends Mp{static{a(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let i=Kn(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ue&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(t,r,n)}};a(CT,"possiblePathsFrom");a(wT,"nextPossibleTokensAfter");a(q3t,"expandTopLevelRule")});function x1(e){if(e instanceof wr||e==="Option")return Jr.OPTION;if(e instanceof Xe||e==="Repetition")return Jr.REPETITION;if(e instanceof Gr||e==="RepetitionMandatory")return Jr.REPETITION_MANDATORY;if(e instanceof Vr||e==="RepetitionMandatoryWithSeparator")return Jr.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Nr||e==="RepetitionWithSeparator")return Jr.REPETITION_WITH_SEPARATOR;if(e instanceof Mr||e==="Alternation")return Jr.ALTERNATION;throw Error("non exhaustive match")}function vT(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:i}=e,s=x1(n);return s===Jr.ALTERNATION?Op(t,r,i):Pp(t,r,s,i)}function mK(e,t,r,n,i,s){let o=Op(e,t,r),l=TK(o)?Dp:Sl;return s(o,n,l,i)}function gK(e,t,r,n,i,s){let o=Pp(e,t,i,r),l=TK(o)?Dp:Sl;return s(o[0],l,n)}function yK(e,t,r,n){let i=e.length,s=gi(e,o=>gi(o,l=>l.length===1));if(t)return function(o){let l=Dt(o,u=>u.GATE);for(let u=0;ufr(u)),l=pr(o,(u,h,f)=>(tt(h,d=>{Zt(u,d.tokenTypeIdx)||(u[d.tokenTypeIdx]=f),tt(d.categoryMatches,p=>{Zt(u,p)||(u[p]=f)})}),u),{});return function(){let u=this.LA(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;os.length===1),i=e.length;if(n&&!r){let s=fr(e);if(s.length===1&&De(s[0].categoryMatches)){let l=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{let o=pr(s,(l,u,h)=>(l[u.tokenTypeIdx]=!0,tt(u.categoryMatches,f=>{l[f]=!0}),l),[]);return function(){let l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){t:for(let s=0;sCT([o],1)),n=pK(r.length),i=Dt(r,o=>{let l={};return tt(o,u=>{let h=R6(u.partialPath);tt(h,f=>{l[f]=!0})}),l}),s=r;for(let o=1;o<=t;o++){let l=s;s=pK(l.length);for(let u=0;u{let k=R6(b.partialPath);tt(k,T=>{i[u][T]=!0})})}}}}return n}function Op(e,t,r,n){let i=new ET(e,Jr.ALTERNATION,n);return t.accept(i),bK(i.result,r)}function Pp(e,t,r,n){let i=new ET(e,r);t.accept(i);let s=i.result,l=new D6(t,e,r).startWalking(),u=new $r({definition:s}),h=new $r({definition:l});return bK([u,h],n)}function AT(e,t){t:for(let r=0;r{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function TK(e){return gi(e,t=>gi(t,r=>gi(r,n=>De(n.categoryMatches))))}var Jr,D6,ET,Bp=x(()=>{"use strict";ue();y1();dT();kh();Fi();(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Jr||(Jr={}));a(x1,"getProdType");a(vT,"getLookaheadPaths");a(mK,"buildLookaheadFuncForOr");a(gK,"buildLookaheadFuncForOptionalProd");a(yK,"buildAlternativesLookAheadFunc");a(xK,"buildSingleAlternativeLookaheadFunction");D6=class extends Tl{static{a(this,"RestDefinitionFinderWalker")}constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,Jr.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,Jr.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,Jr.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,Jr.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,Jr.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},ET=class extends Bi{static{a(this,"InsideDefinitionFinderVisitor")}constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Jr.OPTION)}visitRepetition(t){this.checkIsTarget(t,Jr.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Jr.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Jr.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Jr.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Jr.ALTERNATION)}};a(pK,"initializeArrayOfArrays");a(R6,"pathToHashKeys");a(H3t,"isUniquePrefixHash");a(bK,"lookAheadSequenceFromAlternatives");a(Op,"getLookaheadPathsForOr");a(Pp,"getLookaheadPathsForOptionalProd");a(AT,"containsPath");a(kK,"isStrictPrefixOfPath");a(TK,"areTokenCategoriesNotUsed")});function SK(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Dt(t,r=>Object.assign({type:On.CUSTOM_LOOKAHEAD_VALIDATION},r))}function _K(e,t,r,n){let i=si(e,u=>Y3t(u,r)),s=tvt(e,t,r),o=si(e,u=>Q3t(u,r)),l=si(e,u=>K3t(u,e,n,r));return i.concat(s,o,l)}function Y3t(e,t){let r=new I6;e.accept(r);let n=r.allProductions,i=LA(n,X3t),s=cs(i,l=>l.length>1);return Dt(Ve(s),l=>{let u=Kn(l),h=t.buildDuplicateFoundError(e,l),f=hs(u),d={message:h,type:On.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:f,occurrence:u.idx},p=CK(u);return p&&(d.parameter=p),d})}function X3t(e){return`${hs(e)}_#_${e.idx}_#_${CK(e)}`}function CK(e){return e instanceof Ue?e.terminalType.name:e instanceof Cr?e.nonTerminalName:""}function K3t(e,t,r,n){let i=[];if(pr(t,(o,l)=>l.name===e.name?o+1:o,0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:o,type:On.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function wK(e,t,r){let n=[],i;return Kr(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:On.INVALID_RULE_OVERRIDE,ruleName:e})),n}function M6(e,t,r,n=[]){let i=[],s=LT(t.definition);if(De(s))return[];{let o=e.name;Kr(s,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:On.LEFT_RECURSION,ruleName:o});let u=Lc(s,n.concat([e])),h=si(u,f=>{let d=Sr(n);return d.push(f),M6(e,f,r,d)});return i.concat(h)}}function LT(e){let t=[];if(De(e))return t;let r=Kn(e);if(r instanceof Cr)t.push(r.referencedRule);else if(r instanceof $r||r instanceof wr||r instanceof Gr||r instanceof Vr||r instanceof Nr||r instanceof Xe)t=t.concat(LT(r.definition));else if(r instanceof Mr)t=fr(Dt(r.definition,s=>LT(s.definition)));else if(!(r instanceof Ue))throw Error("non exhaustive match");let n=yh(r),i=e.length>1;if(n&&i){let s=dn(e);return t.concat(LT(s))}else return t}function EK(e,t){let r=new b1;e.accept(r);let n=r.alternations;return si(n,s=>{let o=xl(s.definition);return si(o,(l,u)=>{let h=wT([l],[],Sl,1);return De(h)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:u}),type:On.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:u+1}]:[]})})}function vK(e,t,r){let n=new b1;e.accept(n);let i=n.alternations;return i=Rc(i,o=>o.ignoreAmbiguities===!0),si(i,o=>{let l=o.idx,u=o.maxLookahead||t,h=Op(l,e,u,o),f=Z3t(h,o,e,r),d=J3t(h,o,e,r);return f.concat(d)})}function Q3t(e,t){let r=new b1;e.accept(r);let n=r.alternations;return si(n,s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:On.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}function AK(e,t,r){let n=[];return tt(e,i=>{let s=new N6;i.accept(s);let o=s.allProductions;tt(o,l=>{let u=x1(l),h=l.maxLookahead||t,f=l.idx,p=Pp(f,i,u,h)[0];if(De(fr(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:On.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function Z3t(e,t,r,n){let i=[],s=pr(e,(l,u,h)=>(t.definition[h].ignoreAmbiguities===!0||tt(u,f=>{let d=[h];tt(e,(p,m)=>{h!==m&&AT(p,f)&&t.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!AT(i,f)&&(i.push(f),l.push({alts:d,path:f}))}),l),[]);return Dt(s,l=>{let u=Dt(l.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:On.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}function J3t(e,t,r,n){let i=pr(e,(o,l,u)=>{let h=Dt(l,f=>({idx:u,path:f}));return o.concat(h)},[]);return wo(si(i,o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path,f=dr(i,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{let m=[p.idx+1,u+1],g=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:On.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}function tvt(e,t,r){let n=[],i=Dt(t,s=>s.name);return tt(e,s=>{let o=s.name;if(Kr(i,o)){let l=r.buildNamespaceConflictError(s);n.push({message:l,type:On.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}var I6,b1,N6,k1=x(()=>{"use strict";ue();fs();Fi();Bp();y1();kh();a(SK,"validateLookahead");a(_K,"validateGrammar");a(Y3t,"validateDuplicateProductions");a(X3t,"identifyProductionForDuplicates");a(CK,"getExtraProductionArgument");I6=class extends Bi{static{a(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};a(K3t,"validateRuleDoesNotAlreadyExist");a(wK,"validateRuleIsOverridden");a(M6,"validateNoLeftRecursion");a(LT,"getFirstNoneTerminal");b1=class extends Bi{static{a(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};a(EK,"validateEmptyOrAlternative");a(vK,"validateAmbiguousAlternationAlternatives");N6=class extends Bi{static{a(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};a(Q3t,"validateTooManyAlts");a(AK,"validateSomeNonEmptyLookaheadPath");a(Z3t,"checkAlternativesAmbiguities");a(J3t,"checkPrefixAlternativesAmbiguities");a(tvt,"checkTerminalAndNoneTerminalsNameSpace")});function LK(e){let t=Ac(e,{errMsgProvider:hK}),r={};return tt(e.rules,n=>{r[n.name]=n}),fK(r,t.errMsgProvider)}function RK(e){return e=Ac(e,{errMsgProvider:Ha}),_K(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var DK=x(()=>{"use strict";ue();dK();k1();Np();a(LK,"resolveGrammar");a(RK,"validateGrammar")});function Fc(e){return Kr(PK,e.name)}var IK,NK,MK,OK,PK,Fp,Sh,T1,S1,_1,$p=x(()=>{"use strict";ue();IK="MismatchedTokenException",NK="NoViableAltException",MK="EarlyExitException",OK="NotAllInputParsedException",PK=[IK,NK,MK,OK];Object.freeze(PK);a(Fc,"isRecognitionException");Fp=class extends Error{static{a(this,"RecognitionException")}constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Sh=class extends Fp{static{a(this,"MismatchedTokenException")}constructor(t,r,n){super(t,r),this.previousToken=n,this.name=IK}},T1=class extends Fp{static{a(this,"NoViableAltException")}constructor(t,r,n){super(t,r),this.previousToken=n,this.name=NK}},S1=class extends Fp{static{a(this,"NotAllInputParsedException")}constructor(t,r){super(t,r),this.name=OK}},_1=class extends Fp{static{a(this,"EarlyExitException")}constructor(t,r,n){super(t,r),this.previousToken=n,this.name=MK}}});function evt(e,t,r,n,i,s,o){let l=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[l];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new s(m,i).startWalking(),this.firstAfterRepMap[l]=u}let h=u.token,f=u.occurrence,d=u.isEndOfRule;this.RULE_STACK.length===1&&d&&h===void 0&&(h=Is,f=1),!(h===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,f,o)&&this.tryInRepetitionRecovery(e,t,r,h)}var O6,B6,P6,RT,F6=x(()=>{"use strict";Th();ue();$p();y6();fs();O6={},B6="InRuleRecoveryException",P6=class extends Error{static{a(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=B6}},RT=class{static{a(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Zt(t,"recoveryEnabled")?t.recoveryEnabled:$i.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=evt)}getTokenToInsert(t){let r=wl(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,i){let s=this.findReSyncTokenType(),o=this.exportLexerState(),l=[],u=!1,h=this.LA(1),f=this.LA(1),d=a(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new Sh(m,h,this.LA(0));g.resyncedTokens=xl(l),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(f,i)){d();return}else if(n.call(this)){d(),t.apply(this,r);return}else this.tokenMatcher(f,s)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new P6("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||De(r))return!1;let n=this.LA(1);return Mi(r,s=>this.tokenMatcher(n,s))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return Kr(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=Mi(t,s=>p1(r,s));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return O6;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Dt(t,(n,i)=>i===0?O6:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(t[i-1])})}flattenFollowSet(){let t=Dt(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return fr(t)}getFollowSetFromFollowKey(t){if(t===O6)return[Is];let r=t.ruleName+t.idxInCallingRule+pT+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,Is)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return xl(r)}attemptInRepetitionRecovery(t,r,n,i,s,o,l){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),i=Sr(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Dt(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};a(evt,"attemptInRepetitionRecovery")});function DT(e,t,r){return r|t|e}var IT=x(()=>{"use strict";a(DT,"getKeyForAutomaticLookahead")});var vl,$6=x(()=>{"use strict";ue();Np();fs();k1();Bp();vl=class{static{a(this,"LLkLookaheadStrategy")}constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:$i.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(De(r)){let n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),s=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...i,...s]}return r}validateNoLeftRecursion(t){return si(t,r=>M6(r,r,Ha))}validateEmptyOrAlternatives(t){return si(t,r=>EK(r,Ha))}validateAmbiguousAlternationAlternatives(t,r){return si(t,n=>vK(n,r,Ha))}validateSomeNonEmptyLookaheadPath(t,r){return AK(t,r,Ha)}buildLookaheadForAlternation(t){return mK(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,yK)}buildLookaheadForOptional(t){return gK(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,x1(t.prodType),xK)}}});function rvt(e){NT.reset(),e.accept(NT);let t=NT.dslMethods;return NT.reset(),t}var MT,G6,NT,BK=x(()=>{"use strict";ue();fs();IT();Fi();$6();MT=class{static{a(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=Zt(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:$i.dynamicTokensEnabled,this.maxLookahead=Zt(t,"maxLookahead")?t.maxLookahead:$i.maxLookahead,this.lookaheadStrategy=Zt(t,"lookaheadStrategy")?t.lookaheadStrategy:new vl({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){tt(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:s,repetitionMandatory:o,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=rvt(r);tt(n,h=>{let f=h.idx===0?"":h.idx;this.TRACE_INIT(`${hs(h)}${f}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=DT(this.fullRuleNameToShort[r.name],256,h.idx);this.setLaFuncCache(p,d)})}),tt(i,h=>{this.computeLookaheadFunc(r,h.idx,768,"Repetition",h.maxLookahead,hs(h))}),tt(s,h=>{this.computeLookaheadFunc(r,h.idx,512,"Option",h.maxLookahead,hs(h))}),tt(o,h=>{this.computeLookaheadFunc(r,h.idx,1024,"RepetitionMandatory",h.maxLookahead,hs(h))}),tt(l,h=>{this.computeLookaheadFunc(r,h.idx,1536,"RepetitionMandatoryWithSeparator",h.maxLookahead,hs(h))}),tt(u,h=>{this.computeLookaheadFunc(r,h.idx,1280,"RepetitionWithSeparator",h.maxLookahead,hs(h))})})})}computeLookaheadFunc(t,r,n,i,s,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=DT(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(u,l)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return DT(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},G6=class extends Bi{static{a(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},NT=new G6;a(rvt,"collectMethods")});function W6(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset{"use strict";a(W6,"setNodeLocationOnlyOffset");a(U6,"setNodeLocationFull");a(FK,"addTerminalToCst");a($K,"addNoneTerminalToCst")});function j6(e,t){Object.defineProperty(e,nvt,{enumerable:!1,configurable:!0,writable:!1,value:t})}var nvt,VK=x(()=>{"use strict";nvt="name";a(j6,"defineNameProp")});function ivt(e,t){let r=lr(e),n=r.length;for(let i=0;io.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${s.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function WK(e,t,r){let n=a(function(){},"derivedConstructor");j6(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return tt(t,s=>{i[s]=ivt}),n.prototype=i,n.prototype.constructor=n,n}function svt(e,t){return avt(e,t)}function avt(e,t){let r=dr(t,i=>_n(e[i])===!1),n=Dt(r,i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:q6.MISSING_METHOD,methodName:i}));return wo(n)}var q6,UK=x(()=>{"use strict";ue();VK();a(ivt,"defaultVisit");a(zK,"createBaseSemanticVisitorConstructor");a(WK,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(q6||(q6={}));a(svt,"validateVisitor");a(avt,"validateMissingCstMethods")});var FT,jK=x(()=>{"use strict";GK();ue();UK();fs();FT=class{static{a(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=Zt(t,"nodeLocationTracking")?t.nodeLocationTracking:$i.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=sn,this.cstFinallyStateUpdate=sn,this.cstPostTerminal=sn,this.cstPostNonTerminal=sn,this.cstPostRule=sn;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=U6,this.setNodeLocationFromNode=U6,this.cstPostRule=sn,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=sn,this.setNodeLocationFromNode=sn,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=W6,this.setNodeLocationFromNode=W6,this.cstPostRule=sn,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=sn,this.setNodeLocationFromNode=sn,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=sn,this.setNodeLocationFromNode=sn,this.cstPostRule=sn,this.setInitialNodeLocation=sn;else throw Error(`Invalid config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];FK(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];$K(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(Me(this.baseCstVisitorConstructor)){let t=zK(this.className,lr(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Me(this.baseCstVisitorWithDefaultsConstructor)){let t=WK(this.className,lr(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}});var $T,qK=x(()=>{"use strict";fs();$T=class{static{a(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Gp}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?Gp:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var GT,HK=x(()=>{"use strict";ue();$p();fs();Np();k1();Fi();GT=class{static{a(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Vp){if(Kr(this.definedRulesNames,t)){let o={message:Ha.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:On.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(o)}this.definedRulesNames.push(t);let i=this.defineRule(t,r,n);return this[t]=i,i}OVERRIDE_RULE(t,r,n=Vp){let i=wK(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let s=this.defineRule(t,r,n);return this[t]=s,s}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return t.apply(this,r),!0}catch(i){if(Fc(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return hT(Ve(this.gastProductionsCache))}}});var VT,YK=x(()=>{"use strict";ue();IT();$p();Bp();y1();fs();F6();Th();kh();VT=class{static{a(this,"RecognizerEngine")}initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Dp,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Zt(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(Qt(t)){if(De(t))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof t[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(Qt(t))this.tokensMap=pr(t,(s,o)=>(s[o.name]=o,s),{});else if(Zt(t,"modes")&&gi(fr(Ve(t.modes)),rK)){let s=fr(Ve(t.modes)),o=Ad(s);this.tokensMap=pr(o,(l,u)=>(l[u.name]=u,l),{})}else if(Ir(t))this.tokensMap=Sr(t);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Is;let n=Zt(t,"modes")?fr(Ve(t.modes)):Ve(t),i=gi(n,s=>De(s.categoryMatches));this.tokenMatcher=i?Dp:Sl,_l(Ve(this.tokensMap))}defineRule(t,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Zt(n,"resyncEnabled")?n.resyncEnabled:Vp.resyncEnabled,s=Zt(n,"recoveryValueFunc")?n.recoveryValueFunc:Vp.recoveryValueFunc,o=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=t,this.fullRuleNameToShort[t]=o;let l;return this.outputCst===!0?l=a(function(...f){try{this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,f);let d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,i,s)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):l=a(function(...f){try{return this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,f)}catch(d){return this.invokeRuleCatch(d,i,s)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(l,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,n){let i=this.RULE_STACK.length===1,s=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Fc(t)){let o=t;if(s){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l))if(o.resyncedTokens=this.reSyncTo(l),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(t);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,o.partialCstResult=u}throw o}}else{if(i)return this.moveToTerminatedState(),n(t);throw o}}else throw t}optionInternal(t,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),s;if(typeof t!="function"){s=t.DEF;let o=t.GATE;if(o!==void 0){let l=i;i=a(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else s=t;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(t,r){let n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),s;if(typeof r!="function"){s=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=a(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else s=r;if(i.call(this)===!0){let o=this.doSingleRepetition(s);for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(t,Jr.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,_T)}atLeastOneSepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let i=r.DEF,s=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let l=a(()=>this.tokenMatcher(this.LA(1),s),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,s,l,i,g1],l,1536,t,g1)}else throw this.raiseEarlyExitException(t,Jr.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let i=this.getLaFuncFromCache(n),s;if(typeof r!="function"){s=r.DEF;let l=r.GATE;if(l!==void 0){let u=i;i=a(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else s=r;let o=!0;for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,ST,o)}manySepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let i=r.DEF,s=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let l=a(()=>this.tokenMatcher(this.LA(1),s),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,s,l,i,m1],l,1280,t,m1)}}repetitionSepSecondInternal(t,r,n,i,s){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,i,s],n,1536,t,s)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=this.getKeyForAutomaticLookahead(256,r),i=Qt(t)?t:t.DEF,o=this.getLaFuncFromCache(n).call(this,i);if(o!==void 0)return i[o].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new S1(r,t))}}subruleInternal(t,r,n){let i;try{let s=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=t.apply(this,s),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),i}catch(s){throw this.subruleInternalError(s,n,t.ruleName)}}subruleInternalError(t,r,n){throw Fc(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let i;try{let s=this.LA(1);this.tokenMatcher(s,t)===!0?(this.consumeToken(),i=s):this.consumeInternalError(t,s,n)}catch(s){i=this.consumeInternalRecovery(t,r,s)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,i),i}consumeInternalError(t,r,n){let i,s=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Sh(i,r,s))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(s){throw s.name===B6?n:s}}else throw n}saveRecogState(){let t=this.errors,r=Sr(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Is)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var zT,XK=x(()=>{"use strict";$p();ue();Bp();fs();zT=class{static{a(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=Zt(t,"errorMessageProvider")?t.errorMessageProvider:$i.errorMessageProvider}SAVE_ERROR(t){if(Fc(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Sr(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Sr(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],l=Pp(t,s,r,this.maxLookahead)[0],u=[];for(let f=1;f<=this.maxLookahead;f++)u.push(this.LA(f));let h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new _1(h,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],s=Op(t,i,this.maxLookahead),o=[];for(let h=1;h<=this.maxLookahead;h++)o.push(this.LA(h));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new T1(u,this.LA(1),l))}}});var WT,KK=x(()=>{"use strict";y1();ue();WT=class{static{a(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,r){let n=this.gastProductionsCache[t];if(Me(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return wT([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=Kn(t.ruleStack),i=this.getGAstProductions()[r];return new TT(i,t).startWalking()}}});function w1(e,t,r,n=!1){jT(r);let i=ii(this.recordingProdStack),s=_n(t)?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),Zt(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),i.definition.push(o),this.recordingProdStack.pop(),qT}function cvt(e,t){jT(t);let r=ii(this.recordingProdStack),n=Qt(e)===!1,i=n===!1?e:e.DEF,s=new Mr({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});Zt(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);let o=O0(i,l=>_n(l.GATE));return s.hasPredicates=o,r.definition.push(s),tt(i,l=>{let u=new $r({definition:[]});s.definition.push(u),Zt(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Zt(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),qT}function JK(e){return e===0?"":`${e}`}function jT(e){if(e<0||e>ZK){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${ZK+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var qT,QK,ZK,tQ,eQ,lvt,UT,rQ=x(()=>{"use strict";ue();Fi();f1();kh();Th();fs();IT();qT={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(qT);QK=!0,ZK=Math.pow(2,8)-1,tQ=Bc({name:"RECORDING_PHASE_TOKEN",pattern:Zr.NA});_l([tQ]);eQ=wl(tQ,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(eQ);lvt={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},UT=class{static{a(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,t,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,t,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,t)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,t)},this[`MANY${r}`]=function(n){this.manyInternalRecord(t,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(t,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(t,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(t,n)}}this.consume=function(t,r,n){return this.consumeInternalRecord(r,t,n)},this.subrule=function(t,r,n){return this.subruleInternalRecord(r,t,n)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let t=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return Gp}topLevelRuleRecord(t,r){try{let n=new Pi({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return w1.call(this,wr,t,r)}atLeastOneInternalRecord(t,r){w1.call(this,Gr,r,t)}atLeastOneSepFirstInternalRecord(t,r){w1.call(this,Vr,r,t,QK)}manyInternalRecord(t,r){w1.call(this,Xe,r,t)}manySepFirstInternalRecord(t,r){w1.call(this,Nr,r,t,QK)}orInternalRecord(t,r){return cvt.call(this,t,r)}subruleInternalRecord(t,r,n){if(jT(r),!t||Zt(t,"ruleName")===!1){let l=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let i=ii(this.recordingProdStack),s=t.ruleName,o=new Cr({idx:r,nonTerminalName:s,label:n?.LABEL,referencedRule:void 0});return i.definition.push(o),this.outputCst?lvt:qT}consumeInternalRecord(t,r,n){if(jT(r),!w6(t)){let o=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=ii(this.recordingProdStack),s=new Ue({idx:r,terminalType:t,label:n?.LABEL});return i.definition.push(s),eQ}};a(w1,"recordProd");a(cvt,"recordOrProd");a(JK,"getIdxSuffix");a(jT,"assertMethodIdxIsValid")});var HT,nQ=x(()=>{"use strict";ue();Ep();fs();HT=class{static{a(this,"PerformanceTracer")}initPerformanceTracer(t){if(Zt(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=$i.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${t}>`);let{time:i,value:s}=c1(r),o=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return r()}}});function iQ(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,i);s&&(s.get||s.set)?Object.defineProperty(e.prototype,i,s):e.prototype[i]=r.prototype[i]})})}var sQ=x(()=>{"use strict";a(iQ,"applyMixins")});function YT(e=void 0){return function(){return e}}var Gp,$i,Vp,On,E1,v1,fs=x(()=>{"use strict";ue();Ep();OX();Th();Np();DK();F6();BK();jK();qK();HK();YK();XK();KK();rQ();nQ();sQ();k1();Gp=wl(Is,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Gp);$i=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:El,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Vp=Object.freeze({recoveryValueFunc:a(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(On||(On={}));a(YT,"EMPTY_ALT");E1=class e{static{a(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{u1(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),tt(this.definedRulesNames,i=>{let o=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=LK({rules:Ve(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(De(n)&&this.skipValidations===!1){let i=RK({rules:Ve(this.gastProductionsCache),tokenTypes:Ve(this.tokensMap),errMsgProvider:Ha,grammarName:r}),s=SK({lookaheadStrategy:this.lookaheadStrategy,rules:Ve(this.gastProductionsCache),tokenTypes:Ve(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,s)}}),De(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=MX(Ve(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:Ve(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Ve(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!De(this.definitionErrors))throw t=Dt(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: + ${t.join(` +------------------------------- +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Zt(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=Zt(r,"skipValidations")?r.skipValidations:$i.skipValidations}};E1.DEFER_DEFINITION_ERRORS_HANDLING=!1;iQ(E1,[RT,MT,FT,$T,VT,GT,zT,WT,UT,HT]);v1=class extends E1{static{a(this,"EmbeddedActionsParser")}constructor(t,r=$i){let n=Sr(r);n.outputCst=!1,super(t,n)}}});var aQ=x(()=>{"use strict";Fi()});var oQ=x(()=>{"use strict"});var lQ=x(()=>{"use strict";aQ();oQ()});var cQ=x(()=>{"use strict";d6()});var $c=x(()=>{"use strict";d6();fs();f1();Th();Bp();$6();Np();$p();E6();Fi();Fi();lQ();cQ()});function _h(e,t,r){return`${e.name}_${t}_${r}`}function dQ(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};gvt(t,e);let r=e.length;for(let n=0;npQ(e,t,o));return jp(e,t,n,r,...i)}function Svt(e,t,r){let n=Qn(e,t,r,{type:Gc});Vc(e,n);let i=jp(e,t,n,r,Ch(e,t,r));return _vt(e,t,r,i)}function Ch(e,t,r){let n=dr(Dt(r.definition,i=>pQ(e,t,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:wvt(e,n)}function mQ(e,t,r,n,i){let s=n.left,o=n.right,l=Qn(e,t,r,{type:mvt});Vc(e,l);let u=Qn(e,t,r,{type:fQ});return s.loopback=l,u.loopback=l,e.decisionMap[_h(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,wn(o,l),i===void 0?(wn(l,s),wn(l,u)):(wn(l,u),wn(l,i.left),wn(i.right,s)),{left:s,right:u}}function gQ(e,t,r,n,i){let s=n.left,o=n.right,l=Qn(e,t,r,{type:pvt});Vc(e,l);let u=Qn(e,t,r,{type:fQ}),h=Qn(e,t,r,{type:dvt});return l.loopback=h,u.loopback=h,wn(l,s),wn(l,u),wn(o,h),i!==void 0?(wn(h,u),wn(h,i.left),wn(i.right,s)):wn(h,l),e.decisionMap[_h(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}function _vt(e,t,r,n){let i=n.left,s=n.right;return wn(i,s),e.decisionMap[_h(t,"Option",r.idx)]=i,n}function Vc(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function jp(e,t,r,n,...i){let s=Qn(e,t,n,{type:fvt,start:r});r.end=s;for(let l of i)l!==void 0?(wn(r,l.left),wn(l.right,s)):wn(r,s);let o={left:r,right:s};return e.decisionMap[_h(t,Cvt(n),n.idx)]=r,o}function Cvt(e){if(e instanceof Mr)return"Alternation";if(e instanceof wr)return"Option";if(e instanceof Xe)return"Repetition";if(e instanceof Nr)return"RepetitionWithSeparator";if(e instanceof Gr)return"RepetitionMandatory";if(e instanceof Vr)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function wvt(e,t){let r=t.length;for(let s=0;s{"use strict";wd();CA();$c();a(_h,"buildATNKey");Gc=1,hvt=2,uQ=4,hQ=5,Up=7,fvt=8,dvt=9,pvt=10,mvt=11,fQ=12,A1=class{static{a(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},zp=class extends A1{static{a(this,"AtomTransition")}constructor(t,r){super(t),this.tokenType=r}},L1=class extends A1{static{a(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Wp=class extends A1{static{a(this,"RuleTransition")}constructor(t,r,n){super(t),this.rule=r,this.followState=n}isEpsilon(){return!0}};a(dQ,"createATN");a(gvt,"createRuleStartAndStopATNStates");a(pQ,"atom");a(yvt,"repetition");a(xvt,"repetitionSep");a(bvt,"repetitionMandatory");a(kvt,"repetitionMandatorySep");a(Tvt,"alternation");a(Svt,"option");a(Ch,"block");a(mQ,"plus");a(gQ,"star");a(_vt,"optional");a(Vc,"defineDecisionState");a(jp,"makeAlts");a(Cvt,"getProdType");a(wvt,"makeBlock");a(Y6,"tokenRef");a(Evt,"ruleRef");a(vvt,"buildRuleHandle");a(wn,"epsilon");a(Qn,"newState");a(X6,"addTransition");a(Avt,"removeState")});function K6(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}var R1,qp,xQ=x(()=>{"use strict";wd();R1={},qp=class{static{a(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){let r=K6(t);r in this.map||(this.map[r]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return Dt(this.configs,t=>t.alt)}get key(){let t="";for(let r in this.map)t+=r+":";return t}};a(K6,"getATNConfigKey")});function Lvt(e,t){let r={};return n=>{let i=n.toString(),s=r[i];return s!==void 0||(s={atnStartState:e,decision:t,states:{}},r[i]=s),s}}function kQ(e,t=!0){let r=new Set;for(let n of e){let i=new Set;for(let s of n){if(s===void 0){if(t)break;return!1}let o=[s.tokenTypeIdx].concat(s.categoryMatches);for(let l of o)if(r.has(l)){if(!i.has(l))return!1}else r.add(l),i.add(l)}}return!0}function Rvt(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;nCl(i)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Ovt(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n}function Ovt(e){if(e instanceof Cr)return"SUBRULE";if(e instanceof wr)return"OPTION";if(e instanceof Mr)return"OR";if(e instanceof Gr)return"AT_LEAST_ONE";if(e instanceof Vr)return"AT_LEAST_ONE_SEP";if(e instanceof Nr)return"MANY_SEP";if(e instanceof Xe)return"MANY";if(e instanceof Ue)return"CONSUME";throw Error("non exhaustive match")}function Pvt(e,t,r){let n=si(t.configs.elements,s=>s.state.transitions),i=Qq(n.filter(s=>s instanceof zp).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:e}}function Bvt(e,t){return e.edges[t.tokenTypeIdx]}function Fvt(e,t,r){let n=new qp,i=[];for(let o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Up){i.push(o);continue}let l=o.state.transitions.length;for(let u=0;u0&&!Wvt(s))for(let o of i)s.add(o);return s}function $vt(e,t){if(e instanceof zp&&p1(t,e.tokenType))return e.target}function Gvt(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function SQ(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function TQ(e,t,r,n){return n=_Q(e,n),t.edges[r.tokenTypeIdx]=n,n}function _Q(e,t){if(t===R1)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}function Vvt(e){let t=new qp,r=e.transitions.length;for(let n=0;n0){let i=[...e.stack],o={state:i.pop(),alt:e.alt,stack:i};KT(o,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function Yvt(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}var XT,bQ,D1,CQ=x(()=>{"use strict";$c();yQ();xQ();IA();EA();Zq();wd();Zb();vk();Ik();PA();a(Lvt,"createDFACache");XT=class{static{a(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,r){this.predicates[t]=r}toString(){let t="",r=this.predicates.length;for(let n=0;nconsole.log(n)}initialize(t){this.atn=dQ(t.rules),this.dfas=Rvt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:s}=t,o=this.dfas,l=this.logging,u=_h(n,"Alternation",r),f=this.atn.decisionMap[u].decision,d=Dt(vT({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>Dt(p,m=>m[0]));if(kQ(d,!1)&&!s){let p=pr(d,(m,g,y)=>(tt(g,b=>{b&&(m[b.tokenTypeIdx]=y,tt(b.categoryMatches,k=>{m[k]=y}))}),m),{});return i?function(m){var g;let y=this.LA(1),b=p[y.tokenTypeIdx];if(m!==void 0&&b!==void 0){let k=(g=m[b])===null||g===void 0?void 0:g.GATE;if(k!==void 0&&k.call(this)===!1)return}return b}:function(){let m=this.LA(1);return p[m.tokenTypeIdx]}}else return i?function(p){let m=new XT,g=p===void 0?0:p.length;for(let b=0;bDt(p,m=>m[0]));if(kQ(d)&&d[0][0]&&!s){let p=d[0],m=fr(p);if(m.length===1&&De(m[0].categoryMatches)){let y=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{let g=pr(m,(y,b)=>(b!==void 0&&(y[b.tokenTypeIdx]=!0,tt(b.categoryMatches,k=>{y[k]=!0})),y),{});return function(){let y=this.LA(1);return g[y.tokenTypeIdx]===!0}}}return function(){let p=Q6.call(this,o,f,bQ,l);return typeof p=="object"?!1:p===0}}};a(kQ,"isLL1Sequence");a(Rvt,"initATNSimulator");a(Q6,"adaptivePredict");a(Dvt,"performLookahead");a(Ivt,"computeLookaheadTarget");a(Nvt,"reportLookaheadAmbiguity");a(Mvt,"buildAmbiguityError");a(Ovt,"getProductionDslName");a(Pvt,"buildAdaptivePredictError");a(Bvt,"getExistingTargetState");a(Fvt,"computeReachSet");a($vt,"getReachableTarget");a(Gvt,"getUniqueAlt");a(SQ,"newDFAState");a(TQ,"addDFAEdge");a(_Q,"addDFAState");a(Vvt,"computeStartState");a(KT,"closure");a(zvt,"getEpsilonTarget");a(Wvt,"hasConfigInRuleStopState");a(Uvt,"allConfigsInRuleStopStates");a(jvt,"hasConflictTerminatingPrediction");a(qvt,"getConflictingAltSets");a(Hvt,"hasConflictingAltSet");a(Yvt,"hasStateAssociatedWithOneAlt")});var wQ=x(()=>{"use strict";CQ()});var EQ,Z6,vQ,QT,mr,Ke,ZT,AQ,J6,LQ,RQ,DQ,IQ,tL,NQ,MQ,OQ,JT,Hp,Yp,eL,Xp,PQ,rL,nL,iL,sL,aL,BQ,FQ,oL,$Q,lL,I1,GQ,VQ,zQ,WQ,UQ,jQ,qQ,HQ,tS,YQ,XQ,KQ,QQ,ZQ,JQ,tZ,eZ,rZ,nZ,iZ,eS,sZ,aZ,oZ,lZ,cZ,uZ,hZ,fZ,dZ,pZ,mZ,gZ,yZ,cL,uL,xZ,bZ,kZ,TZ,SZ,_Z,CZ,wZ,EZ,hL,dt,fL=x(()=>{"use strict";(function(e){function t(r){return typeof r=="string"}a(t,"is"),e.is=t})(EQ||(EQ={}));(function(e){function t(r){return typeof r=="string"}a(t,"is"),e.is=t})(Z6||(Z6={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}a(t,"is"),e.is=t})(vQ||(vQ={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}a(t,"is"),e.is=t})(QT||(QT={}));(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=QT.MAX_VALUE),i===Number.MAX_VALUE&&(i=QT.MAX_VALUE),{line:n,character:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&dt.uinteger(i.line)&&dt.uinteger(i.character)}a(r,"is"),e.is=r})(mr||(mr={}));(function(e){function t(n,i,s,o){if(dt.uinteger(n)&&dt.uinteger(i)&&dt.uinteger(s)&&dt.uinteger(o))return{start:mr.create(n,i),end:mr.create(s,o)};if(mr.is(n)&&mr.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${s}, ${o}]`)}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&mr.is(i.start)&&mr.is(i.end)}a(r,"is"),e.is=r})(Ke||(Ke={}));(function(e){function t(n,i){return{uri:n,range:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&Ke.is(i.range)&&(dt.string(i.uri)||dt.undefined(i.uri))}a(r,"is"),e.is=r})(ZT||(ZT={}));(function(e){function t(n,i,s,o){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&Ke.is(i.targetRange)&&dt.string(i.targetUri)&&Ke.is(i.targetSelectionRange)&&(Ke.is(i.originSelectionRange)||dt.undefined(i.originSelectionRange))}a(r,"is"),e.is=r})(AQ||(AQ={}));(function(e){function t(n,i,s,o){return{red:n,green:i,blue:s,alpha:o}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&dt.numberRange(i.red,0,1)&&dt.numberRange(i.green,0,1)&&dt.numberRange(i.blue,0,1)&&dt.numberRange(i.alpha,0,1)}a(r,"is"),e.is=r})(J6||(J6={}));(function(e){function t(n,i){return{range:n,color:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&Ke.is(i.range)&&J6.is(i.color)}a(r,"is"),e.is=r})(LQ||(LQ={}));(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&dt.string(i.label)&&(dt.undefined(i.textEdit)||Yp.is(i))&&(dt.undefined(i.additionalTextEdits)||dt.typedArray(i.additionalTextEdits,Yp.is))}a(r,"is"),e.is=r})(RQ||(RQ={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(DQ||(DQ={}));(function(e){function t(n,i,s,o,l,u){let h={startLine:n,endLine:i};return dt.defined(s)&&(h.startCharacter=s),dt.defined(o)&&(h.endCharacter=o),dt.defined(l)&&(h.kind=l),dt.defined(u)&&(h.collapsedText=u),h}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&dt.uinteger(i.startLine)&&dt.uinteger(i.startLine)&&(dt.undefined(i.startCharacter)||dt.uinteger(i.startCharacter))&&(dt.undefined(i.endCharacter)||dt.uinteger(i.endCharacter))&&(dt.undefined(i.kind)||dt.string(i.kind))}a(r,"is"),e.is=r})(IQ||(IQ={}));(function(e){function t(n,i){return{location:n,message:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&ZT.is(i.location)&&dt.string(i.message)}a(r,"is"),e.is=r})(tL||(tL={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(NQ||(NQ={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(MQ||(MQ={}));(function(e){function t(r){let n=r;return dt.objectLiteral(n)&&dt.string(n.href)}a(t,"is"),e.is=t})(OQ||(OQ={}));(function(e){function t(n,i,s,o,l,u){let h={range:n,message:i};return dt.defined(s)&&(h.severity=s),dt.defined(o)&&(h.code=o),dt.defined(l)&&(h.source=l),dt.defined(u)&&(h.relatedInformation=u),h}a(t,"create"),e.create=t;function r(n){var i;let s=n;return dt.defined(s)&&Ke.is(s.range)&&dt.string(s.message)&&(dt.number(s.severity)||dt.undefined(s.severity))&&(dt.integer(s.code)||dt.string(s.code)||dt.undefined(s.code))&&(dt.undefined(s.codeDescription)||dt.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(dt.string(s.source)||dt.undefined(s.source))&&(dt.undefined(s.relatedInformation)||dt.typedArray(s.relatedInformation,tL.is))}a(r,"is"),e.is=r})(JT||(JT={}));(function(e){function t(n,i,...s){let o={title:n,command:i};return dt.defined(s)&&s.length>0&&(o.arguments=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.string(i.title)&&dt.string(i.command)}a(r,"is"),e.is=r})(Hp||(Hp={}));(function(e){function t(s,o){return{range:s,newText:o}}a(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}a(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}a(n,"del"),e.del=n;function i(s){let o=s;return dt.objectLiteral(o)&&dt.string(o.newText)&&Ke.is(o.range)}a(i,"is"),e.is=i})(Yp||(Yp={}));(function(e){function t(n,i,s){let o={label:n};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&dt.string(i.label)&&(dt.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(dt.string(i.description)||i.description===void 0)}a(r,"is"),e.is=r})(eL||(eL={}));(function(e){function t(r){let n=r;return dt.string(n)}a(t,"is"),e.is=t})(Xp||(Xp={}));(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}a(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}a(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}a(n,"del"),e.del=n;function i(s){let o=s;return Yp.is(o)&&(eL.is(o.annotationId)||Xp.is(o.annotationId))}a(i,"is"),e.is=i})(PQ||(PQ={}));(function(e){function t(n,i){return{textDocument:n,edits:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&oL.is(i.textDocument)&&Array.isArray(i.edits)}a(r,"is"),e.is=r})(rL||(rL={}));(function(e){function t(n,i,s){let o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&dt.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||dt.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||dt.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Xp.is(i.annotationId))}a(r,"is"),e.is=r})(nL||(nL={}));(function(e){function t(n,i,s,o){let l={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}a(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&dt.string(i.oldUri)&&dt.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||dt.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||dt.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Xp.is(i.annotationId))}a(r,"is"),e.is=r})(iL||(iL={}));(function(e){function t(n,i,s){let o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&dt.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||dt.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||dt.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Xp.is(i.annotationId))}a(r,"is"),e.is=r})(sL||(sL={}));(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>dt.string(i.kind)?nL.is(i)||iL.is(i)||sL.is(i):rL.is(i)))}a(t,"is"),e.is=t})(aL||(aL={}));(function(e){function t(n){return{uri:n}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.string(i.uri)}a(r,"is"),e.is=r})(BQ||(BQ={}));(function(e){function t(n,i){return{uri:n,version:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.string(i.uri)&&dt.integer(i.version)}a(r,"is"),e.is=r})(FQ||(FQ={}));(function(e){function t(n,i){return{uri:n,version:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.string(i.uri)&&(i.version===null||dt.integer(i.version))}a(r,"is"),e.is=r})(oL||(oL={}));(function(e){function t(n,i,s,o){return{uri:n,languageId:i,version:s,text:o}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.string(i.uri)&&dt.string(i.languageId)&&dt.integer(i.version)&&dt.string(i.text)}a(r,"is"),e.is=r})($Q||($Q={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}a(t,"is"),e.is=t})(lL||(lL={}));(function(e){function t(r){let n=r;return dt.objectLiteral(r)&&lL.is(n.kind)&&dt.string(n.value)}a(t,"is"),e.is=t})(I1||(I1={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(GQ||(GQ={}));(function(e){e.PlainText=1,e.Snippet=2})(VQ||(VQ={}));(function(e){e.Deprecated=1})(zQ||(zQ={}));(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}a(t,"create"),e.create=t;function r(n){let i=n;return i&&dt.string(i.newText)&&Ke.is(i.insert)&&Ke.is(i.replace)}a(r,"is"),e.is=r})(WQ||(WQ={}));(function(e){e.asIs=1,e.adjustIndentation=2})(UQ||(UQ={}));(function(e){function t(r){let n=r;return n&&(dt.string(n.detail)||n.detail===void 0)&&(dt.string(n.description)||n.description===void 0)}a(t,"is"),e.is=t})(jQ||(jQ={}));(function(e){function t(r){return{label:r}}a(t,"create"),e.create=t})(qQ||(qQ={}));(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}a(t,"create"),e.create=t})(HQ||(HQ={}));(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}a(t,"fromPlainText"),e.fromPlainText=t;function r(n){let i=n;return dt.string(i)||dt.objectLiteral(i)&&dt.string(i.language)&&dt.string(i.value)}a(r,"is"),e.is=r})(tS||(tS={}));(function(e){function t(r){let n=r;return!!n&&dt.objectLiteral(n)&&(I1.is(n.contents)||tS.is(n.contents)||dt.typedArray(n.contents,tS.is))&&(r.range===void 0||Ke.is(r.range))}a(t,"is"),e.is=t})(YQ||(YQ={}));(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}a(t,"create"),e.create=t})(XQ||(XQ={}));(function(e){function t(r,n,...i){let s={label:r};return dt.defined(n)&&(s.documentation=n),dt.defined(i)?s.parameters=i:s.parameters=[],s}a(t,"create"),e.create=t})(KQ||(KQ={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(QQ||(QQ={}));(function(e){function t(r,n){let i={range:r};return dt.number(n)&&(i.kind=n),i}a(t,"create"),e.create=t})(ZQ||(ZQ={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(JQ||(JQ={}));(function(e){e.Deprecated=1})(tZ||(tZ={}));(function(e){function t(r,n,i,s,o){let l={name:r,kind:n,location:{uri:s,range:i}};return o&&(l.containerName=o),l}a(t,"create"),e.create=t})(eZ||(eZ={}));(function(e){function t(r,n,i,s){return s!==void 0?{name:r,kind:n,location:{uri:i,range:s}}:{name:r,kind:n,location:{uri:i}}}a(t,"create"),e.create=t})(rZ||(rZ={}));(function(e){function t(n,i,s,o,l,u){let h={name:n,detail:i,kind:s,range:o,selectionRange:l};return u!==void 0&&(h.children=u),h}a(t,"create"),e.create=t;function r(n){let i=n;return i&&dt.string(i.name)&&dt.number(i.kind)&&Ke.is(i.range)&&Ke.is(i.selectionRange)&&(i.detail===void 0||dt.string(i.detail))&&(i.deprecated===void 0||dt.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}a(r,"is"),e.is=r})(nZ||(nZ={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(iZ||(iZ={}));(function(e){e.Invoked=1,e.Automatic=2})(eS||(eS={}));(function(e){function t(n,i,s){let o={diagnostics:n};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.typedArray(i.diagnostics,JT.is)&&(i.only===void 0||dt.typedArray(i.only,dt.string))&&(i.triggerKind===void 0||i.triggerKind===eS.Invoked||i.triggerKind===eS.Automatic)}a(r,"is"),e.is=r})(sZ||(sZ={}));(function(e){function t(n,i,s){let o={title:n},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Hp.is(i)?o.command=i:o.edit=i,l&&s!==void 0&&(o.kind=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return i&&dt.string(i.title)&&(i.diagnostics===void 0||dt.typedArray(i.diagnostics,JT.is))&&(i.kind===void 0||dt.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Hp.is(i.command))&&(i.isPreferred===void 0||dt.boolean(i.isPreferred))&&(i.edit===void 0||aL.is(i.edit))}a(r,"is"),e.is=r})(aZ||(aZ={}));(function(e){function t(n,i){let s={range:n};return dt.defined(i)&&(s.data=i),s}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&Ke.is(i.range)&&(dt.undefined(i.command)||Hp.is(i.command))}a(r,"is"),e.is=r})(oZ||(oZ={}));(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&dt.uinteger(i.tabSize)&&dt.boolean(i.insertSpaces)}a(r,"is"),e.is=r})(lZ||(lZ={}));(function(e){function t(n,i,s){return{range:n,target:i,data:s}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&Ke.is(i.range)&&(dt.undefined(i.target)||dt.string(i.target))}a(r,"is"),e.is=r})(cZ||(cZ={}));(function(e){function t(n,i){return{range:n,parent:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&Ke.is(i.range)&&(i.parent===void 0||e.is(i.parent))}a(r,"is"),e.is=r})(uZ||(uZ={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(hZ||(hZ={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(fZ||(fZ={}));(function(e){function t(r){let n=r;return dt.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}a(t,"is"),e.is=t})(dZ||(dZ={}));(function(e){function t(n,i){return{range:n,text:i}}a(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&Ke.is(i.range)&&dt.string(i.text)}a(r,"is"),e.is=r})(pZ||(pZ={}));(function(e){function t(n,i,s){return{range:n,variableName:i,caseSensitiveLookup:s}}a(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&Ke.is(i.range)&&dt.boolean(i.caseSensitiveLookup)&&(dt.string(i.variableName)||i.variableName===void 0)}a(r,"is"),e.is=r})(mZ||(mZ={}));(function(e){function t(n,i){return{range:n,expression:i}}a(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&Ke.is(i.range)&&(dt.string(i.expression)||i.expression===void 0)}a(r,"is"),e.is=r})(gZ||(gZ={}));(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.defined(i)&&Ke.is(n.stoppedLocation)}a(r,"is"),e.is=r})(yZ||(yZ={}));(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}a(t,"is"),e.is=t})(cL||(cL={}));(function(e){function t(n){return{value:n}}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&(i.tooltip===void 0||dt.string(i.tooltip)||I1.is(i.tooltip))&&(i.location===void 0||ZT.is(i.location))&&(i.command===void 0||Hp.is(i.command))}a(r,"is"),e.is=r})(uL||(uL={}));(function(e){function t(n,i,s){let o={position:n,label:i};return s!==void 0&&(o.kind=s),o}a(t,"create"),e.create=t;function r(n){let i=n;return dt.objectLiteral(i)&&mr.is(i.position)&&(dt.string(i.label)||dt.typedArray(i.label,uL.is))&&(i.kind===void 0||cL.is(i.kind))&&i.textEdits===void 0||dt.typedArray(i.textEdits,Yp.is)&&(i.tooltip===void 0||dt.string(i.tooltip)||I1.is(i.tooltip))&&(i.paddingLeft===void 0||dt.boolean(i.paddingLeft))&&(i.paddingRight===void 0||dt.boolean(i.paddingRight))}a(r,"is"),e.is=r})(xZ||(xZ={}));(function(e){function t(r){return{kind:"snippet",value:r}}a(t,"createSnippet"),e.createSnippet=t})(bZ||(bZ={}));(function(e){function t(r,n,i,s){return{insertText:r,filterText:n,range:i,command:s}}a(t,"create"),e.create=t})(kZ||(kZ={}));(function(e){function t(r){return{items:r}}a(t,"create"),e.create=t})(TZ||(TZ={}));(function(e){e.Invoked=0,e.Automatic=1})(SZ||(SZ={}));(function(e){function t(r,n){return{range:r,text:n}}a(t,"create"),e.create=t})(_Z||(_Z={}));(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}a(t,"create"),e.create=t})(CZ||(CZ={}));(function(e){function t(r){let n=r;return dt.objectLiteral(n)&&Z6.is(n.uri)&&dt.string(n.name)}a(t,"is"),e.is=t})(wZ||(wZ={}));(function(e){function t(s,o,l,u){return new hL(s,o,l,u)}a(t,"create"),e.create=t;function r(s){let o=s;return!!(dt.defined(o)&&dt.string(o.uri)&&(dt.undefined(o.languageId)||dt.string(o.languageId))&&dt.uinteger(o.lineCount)&&dt.func(o.getText)&&dt.func(o.positionAt)&&dt.func(o.offsetAt))}a(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=i(o,(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p}),h=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],p=s.offsetAt(d.range.start),m=s.offsetAt(d.range.end);if(m<=h)l=l.substring(0,p)+d.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p}return l}a(n,"applyEdits"),e.applyEdits=n;function i(s,o){if(s.length<=1)return s;let l=s.length/2|0,u=s.slice(0,l),h=s.slice(l);i(u,o),i(h,o);let f=0,d=0,p=0;for(;f0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return mr.create(0,t);for(;nt?i=o:n=o+1}let s=n-1;return mr.create(s,t-r[s])}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line],i=t.line+1"u"}a(n,"undefined"),e.undefined=n;function i(m){return m===!0||m===!1}a(i,"boolean"),e.boolean=i;function s(m){return t.call(m)==="[object String]"}a(s,"string"),e.string=s;function o(m){return t.call(m)==="[object Number]"}a(o,"number"),e.number=o;function l(m,g,y){return t.call(m)==="[object Number]"&&g<=m&&m<=y}a(l,"numberRange"),e.numberRange=l;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}a(u,"integer"),e.integer=u;function h(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}a(h,"uinteger"),e.uinteger=h;function f(m){return t.call(m)==="[object Function]"}a(f,"func"),e.func=f;function d(m){return m!==null&&typeof m=="object"}a(d,"objectLiteral"),e.objectLiteral=d;function p(m,g){return Array.isArray(m)&&m.every(g)}a(p,"typedArray"),e.typedArray=p})(dt||(dt={}))});var N1,M1,wh,Eh,dL,Kp,rS=x(()=>{"use strict";fL();Wa();N1=class{static{a(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var t;return(t=this.nodeStack[this.nodeStack.length-1])!==null&&t!==void 0?t:this.rootNode}buildRootNode(t){return this.rootNode=new Kp(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){let r=new Eh;return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(t,r){let n=new wh(t.startOffset,t.image.length,Id(t),t.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(t){let r=t.container;if(r){let n=r.content.indexOf(t);n>=0&&r.content.splice(n,1)}}addHiddenNodes(t){let r=[];for(let s of t){let o=new wh(s.startOffset,s.image.length,Id(s),s.tokenType,!0);o.root=this.rootNode,r.push(o)}let n=this.current,i=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){let s=n.container.content.indexOf(n);if(s>0){n.container.content.splice(s,0,...r),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...r)}construct(t){let r=this.current;typeof t.$type=="string"&&(this.current.astNode=t),t.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},M1=class{static{a(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var t,r;let n=typeof((t=this._astNode)===null||t===void 0?void 0:t.$type)=="string"?this._astNode:(r=this.container)===null||r===void 0?void 0:r.astNode;if(!n)throw new Error("This node has no associated AST element");return n}set astNode(t){this._astNode=t}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},wh=class extends M1{static{a(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,r,n,i,s=!1){super(),this._hidden=s,this._offset=t,this._tokenType=i,this._length=r,this._range=n}},Eh=class extends M1{static{a(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new dL(this)}get children(){return this.content}get offset(){var t,r;return(r=(t=this.firstNonHiddenNode)===null||t===void 0?void 0:t.offset)!==null&&r!==void 0?r:0}get length(){return this.end-this.offset}get end(){var t,r;return(r=(t=this.lastNonHiddenNode)===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:0}get range(){let t=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(t&&r){if(this._rangeCache===void 0){let{range:n}=t,{range:i}=r;this._rangeCache={start:n.start,end:i.end.line=0;t--){let r=this.content[t];if(!r.hidden)return r}return this.content[this.content.length-1]}},dL=class e extends Array{static{a(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...n){return this.addParents(n),super.splice(t,r,...n)}addParents(t){for(let r of t)r.container=this.parent}},Kp=class extends Eh{static{a(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(t){super(),this._text="",this._text=t??""}}});function pL(e){return e.$type===nS}var nS,vZ,AZ,O1,P1,iS,Qp,B1,Xvt,mL,F1=x(()=>{"use strict";$c();wQ();Mo();qa();Oi();rS();nS=Symbol("Datatype");a(pL,"isDataTypeNode");vZ="\u200B",AZ=a(e=>e.endsWith(vZ)?e:e+vZ,"withRuleSuffix"),O1=class{static{a(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;let r=this.lexer.definition,n=t.LanguageMetaData.mode==="production";this.wrapper=new mL(r,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:n,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,r){this.wrapper.wrapOr(t,r)}optional(t,r){this.wrapper.wrapOption(t,r)}many(t,r){this.wrapper.wrapMany(t,r)}atLeastOne(t,r){this.wrapper.wrapAtLeastOne(t,r)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},P1=class extends O1{static{a(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new N1,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,r){let n=this.computeRuleType(t),i=this.wrapper.DEFINE_RULE(AZ(t.name),this.startImplementation(n,r).bind(this));return this.allRules.set(t.name,i),t.entry&&(this.mainRule=i),i}computeRuleType(t){if(!t.fragment){if(a1(t))return nS;{let r=Sp(t);return r??t.name}}}parse(t,r={}){this.nodeBuilder.buildRootNode(t);let n=this.lexerResult=this.lexer.tokenize(t);this.wrapper.input=n.tokens;let i=r.rule?this.allRules.get(r.rule):this.mainRule;if(!i)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");let s=i.call(this.wrapper,{});return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:s,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}startImplementation(t,r){return n=>{let i=!this.isRecording()&&t!==void 0;if(i){let o={$type:t};this.stack.push(o),t===nS&&(o.value="")}let s;try{s=r(n)}catch{s=void 0}return s===void 0&&i&&(s=this.construct()),s}}extractHiddenTokens(t){let r=this.lexerResult.hidden;if(!r.length)return[];let n=t.startOffset;for(let i=0;in)return r.splice(0,i);return r.splice(0,r.length)}consume(t,r,n){let i=this.wrapper.wrapConsume(t,r);if(!this.isRecording()&&this.isValidToken(i)){let s=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(s);let o=this.nodeBuilder.buildLeafNode(i,n),{assignment:l,isCrossRef:u}=this.getAssignment(n),h=this.current;if(l){let f=sa(n)?i.image:this.converter.convert(i.image,o);this.assign(l.operator,l.feature,f,o,u)}else if(pL(h)){let f=i.image;sa(n)||(f=this.converter.convert(f,o).toString()),h.value+=f}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&typeof t.endOffset=="number"&&!isNaN(t.endOffset)}subrule(t,r,n,i,s){let o;!this.isRecording()&&!n&&(o=this.nodeBuilder.buildCompositeNode(i));let l=this.wrapper.wrapSubrule(t,r,s);!this.isRecording()&&o&&o.length>0&&this.performSubruleAssignment(l,i,o)}performSubruleAssignment(t,r,n){let{assignment:i,isCrossRef:s}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,t,n,s);else if(!i){let o=this.current;if(pL(o))o.value+=t.toString();else if(typeof t=="object"&&t){let u=this.assignWithoutOverride(t,o);this.stack.pop(),this.stack.push(u)}}}action(t,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);let s={$type:t};this.stack.push(s),this.assign(r.operator,r.feature,n,n.$cstNode,!1)}else n.$type=t}}construct(){if(this.isRecording())return;let t=this.current;return iT(t),this.nodeBuilder.construct(t),this.stack.pop(),pL(t)?this.converter.convert(t.value,t.$cstNode):(j5(this.astReflection,t),t)}getAssignment(t){if(!this.assignmentMap.has(t)){let r=fh(t,Ua);this.assignmentMap.set(t,{assignment:r,isCrossRef:r?hh(r.terminal):!1})}return this.assignmentMap.get(t)}assign(t,r,n,i,s){let o=this.current,l;switch(s&&typeof n=="string"?l=this.linker.buildReference(o,r,i,n):l=n,t){case"=":{o[r]=l;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(l)}}assignWithoutOverride(t,r){for(let[i,s]of Object.entries(r)){let o=t[i];o===void 0?t[i]=s:Array.isArray(o)&&Array.isArray(s)&&(s.push(...o),t[i]=s)}let n=t.$cstNode;return n&&(n.astNode=void 0,t.$cstNode=void 0),t}get definitionErrors(){return this.wrapper.definitionErrors}},iS=class{static{a(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(t){return El.buildMismatchTokenMessage(t)}buildNotAllInputParsedMessage(t){return El.buildNotAllInputParsedMessage(t)}buildNoViableAltMessage(t){return El.buildNoViableAltMessage(t)}buildEarlyExitMessage(t){return El.buildEarlyExitMessage(t)}},Qp=class extends iS{static{a(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:t,actual:r}){return`Expecting ${t.LABEL?"`"+t.LABEL+"`":t.name.endsWith(":KW")?`keyword '${t.name.substring(0,t.name.length-3)}'`:`token of type '${t.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:t}){return`Expecting end of file but found \`${t.image}\`.`}},B1=class extends O1{static{a(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(t){this.resetState();let r=this.lexer.tokenize(t,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(t,r){let n=this.wrapper.DEFINE_RULE(AZ(t.name),this.startImplementation(r).bind(this));return this.allRules.set(t.name,n),t.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(t){return r=>{let n=this.keepStackSize();try{t(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let t=this.elementStack.length;return this.stackSize=t,t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,r,n){this.wrapper.wrapConsume(t,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(t,r,n,i,s){this.before(i),this.wrapper.wrapSubrule(t,r,s),this.after(i)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(t);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},Xvt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Qp},mL=class extends v1{static{a(this,"ChevrotainWrapper")}constructor(t,r){let n=r&&"maxLookahead"in r;super(t,Object.assign(Object.assign(Object.assign({},Xvt),{lookaheadStrategy:n?new vl({maxLookahead:r.maxLookahead}):new D1({logging:r.skipValidations?()=>{}:void 0})}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,r){return this.RULE(t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,r){return this.consume(t,r)}wrapSubrule(t,r,n){return this.subrule(t,r,{ARGS:[n]})}wrapOr(t,r){this.or(t,r)}wrapOption(t,r){this.option(t,r)}wrapMany(t,r){this.many(t,r)}wrapAtLeastOne(t,r){this.atLeastOne(t,r)}}});function $1(e,t,r){return Kvt({parser:t,tokens:r,ruleNames:new Map},e),t}function Kvt(e,t){let r=i1(t,!1),n=kr(t.rules).filter(xi).filter(i=>r.has(i));for(let i of n){let s=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});e.parser.rule(i,vh(s,i.definition))}}function vh(e,t,r=!1){let n;if(sa(t))n=n4t(e,t);else if(bl(t))n=Qvt(e,t);else if(Ua(t))n=vh(e,t.terminal);else if(hh(t))n=LZ(e,t);else if(ja(t))n=Zvt(e,t);else if(eT(t))n=t4t(e,t);else if(nT(t))n=e4t(e,t);else if(Pc(t))n=r4t(e,t);else if(P5(t)){let i=e.consume++;n=a(()=>e.parser.consume(i,Is,t),"method")}else throw new ch(t.$cstNode,`Unexpected element type: ${t.$type}`);return RZ(e,r?void 0:sS(t),n,t.cardinality)}function Qvt(e,t){let r=o1(t);return()=>e.parser.action(r,t)}function Zvt(e,t){let r=t.rule.ref;if(xi(r)){let n=e.subrule++,i=r.fragment,s=t.arguments.length>0?Jvt(r,t.arguments):()=>({});return o=>e.parser.subrule(n,DZ(e,r),i,t,s(o))}else if(Rs(r)){let n=e.consume++,i=gL(e,r.name);return()=>e.parser.consume(n,i,t)}else if(r)No(r);else throw new ch(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function Jvt(e,t){let r=t.map(n=>Al(n.value));return n=>{let i={};for(let s=0;st(n)||r(n)}else if(A5(e)){let t=Al(e.left),r=Al(e.right);return n=>t(n)&&r(n)}else if(R5(e)){let t=Al(e.value);return r=>!t(r)}else if(D5(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(v5(e)){let t=!!e.true;return()=>t}No(e)}function t4t(e,t){if(t.elements.length===1)return vh(e,t.elements[0]);{let r=[];for(let i of t.elements){let s={ALT:vh(e,i,!0)},o=sS(i);o&&(s.GATE=Al(o)),r.push(s)}let n=e.or++;return i=>e.parser.alternatives(n,r.map(s=>{let o={ALT:a(()=>s.ALT(i),"ALT")},l=s.GATE;return l&&(o.GATE=()=>l(i)),o}))}}function e4t(e,t){if(t.elements.length===1)return vh(e,t.elements[0]);let r=[];for(let l of t.elements){let u={ALT:vh(e,l,!0)},h=sS(l);h&&(u.GATE=Al(h)),r.push(u)}let n=e.or++,i=a((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`},"idFunc"),s=a(l=>e.parser.alternatives(n,r.map((u,h)=>{let f={ALT:a(()=>!0,"ALT")},d=e.parser;f.ALT=()=>{if(u.ALT(l),!d.isRecording()){let m=i(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);let g=d.unorderedGroups.get(m);typeof g?.[h]>"u"&&(g[h]=!0)}};let p=u.GATE;return p?f.GATE=()=>p(l):f.GATE=()=>{let m=d.unorderedGroups.get(i(n,d));return!m?.[h]},f})),"alternatives"),o=RZ(e,sS(t),s,"*");return l=>{o(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(n,e.parser))}}function r4t(e,t){let r=t.elements.map(n=>vh(e,n));return n=>r.forEach(i=>i(n))}function sS(e){if(Pc(e))return e.guardCondition}function LZ(e,t,r=t.terminal){if(r)if(ja(r)&&xi(r.rule.ref)){let n=r.rule.ref,i=e.subrule++;return s=>e.parser.subrule(i,DZ(e,n),!1,t,s)}else if(ja(r)&&Rs(r.rule.ref)){let n=e.consume++,i=gL(e,r.rule.ref.name);return()=>e.parser.consume(n,i,t)}else if(sa(r)){let n=e.consume++,i=gL(e,r.value);return()=>e.parser.consume(n,i,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let n=cT(t.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+o1(t.type.ref));return LZ(e,t,i)}}function n4t(e,t){let r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}function RZ(e,t,r,n){let i=t&&Al(t);if(!n)if(i){let s=e.or++;return o=>e.parser.alternatives(s,[{ALT:a(()=>r(o),"ALT"),GATE:a(()=>i(o),"GATE")},{ALT:YT(),GATE:a(()=>!i(o),"GATE")}])}else return r;if(n==="*"){let s=e.many++;return o=>e.parser.many(s,{DEF:a(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else if(n==="+"){let s=e.many++;if(i){let o=e.or++;return l=>e.parser.alternatives(o,[{ALT:a(()=>e.parser.atLeastOne(s,{DEF:a(()=>r(l),"DEF")}),"ALT"),GATE:a(()=>i(l),"GATE")},{ALT:YT(),GATE:a(()=>!i(l),"GATE")}])}else return o=>e.parser.atLeastOne(s,{DEF:a(()=>r(o),"DEF")})}else if(n==="?"){let s=e.optional++;return o=>e.parser.optional(s,{DEF:a(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else No(n)}function DZ(e,t){let r=i4t(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function i4t(e,t){if(xi(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,i=t.$type;for(;!xi(n);)(Pc(n)||eT(n)||nT(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,e.ruleNames.set(t,i),i}}function gL(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}var aS=x(()=>{"use strict";$c();Mo();Kk();us();qa();a($1,"createParser");a(Kvt,"buildRules");a(vh,"buildElement");a(Qvt,"buildAction");a(Zvt,"buildRuleCall");a(Jvt,"buildRuleCallPredicate");a(Al,"buildPredicate");a(t4t,"buildAlternatives");a(e4t,"buildUnorderedGroup");a(r4t,"buildGroup");a(sS,"getGuardCondition");a(LZ,"buildCrossReference");a(n4t,"buildKeyword");a(RZ,"wrap");a(DZ,"getRule");a(i4t,"getRuleName");a(gL,"getToken")});function yL(e){let t=e.Grammar,r=e.parser.Lexer,n=new B1(e);return $1(t,n,r.definition),n.finalize(),n}var xL=x(()=>{"use strict";F1();aS();a(yL,"createCompletionParser")});function bL(e){let t=IZ(e);return t.finalize(),t}function IZ(e){let t=e.Grammar,r=e.parser.Lexer,n=new P1(e);return $1(t,n,r.definition)}var kL=x(()=>{"use strict";F1();aS();a(bL,"createLangiumParser");a(IZ,"prepareLangiumParser")});var Ll,oS=x(()=>{"use strict";$c();Mo();Oi();qa();Tp();us();Ll=class{static{a(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,r){let n=kr(i1(t,!1)),i=this.buildTerminalTokens(n),s=this.buildKeywordTokens(n,i,r);return i.forEach(o=>{let l=o.PATTERN;typeof l=="object"&&l&&"test"in l&&kp(l)?s.unshift(o):s.push(o)}),s}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(Rs).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(t){let r=_p(t),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:t.name,PATTERN:n};return typeof n=="function"&&(i.LINE_BREAKS=!0),t.hidden&&(i.GROUP=kp(r)?Zr.SKIPPED:"hidden"),i}requiresCustomPattern(t){return t.flags.includes("u")||t.flags.includes("s")?!0:!!(t.source.includes("?<=")||t.source.includes("?(r.lastIndex=i,r.exec(n))}buildKeywordTokens(t,r,n){return t.filter(xi).flatMap(i=>Oo(i).filter(sa)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(t,r,n){let i=this.buildKeywordPattern(t,n),s={name:t.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(t,r)};return typeof i=="function"&&(s.LINE_BREAKS=!0),s}buildKeywordPattern(t,r){return r?new RegExp(Z5(t.value)):t.value}findLongerAlt(t,r){return r.reduce((n,i)=>{let s=i?.PATTERN;return s?.source&&J5("^"+s.source+"$",t.value)&&n.push(i),n},[])}}});var Ah,Fo,TL=x(()=>{"use strict";Mo();qa();Ah=class{static{a(this,"DefaultValueConverter")}convert(t,r){let n=r.grammarSource;if(hh(n)&&(n=r6(n)),ja(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,t,r)}return t}runConverter(t,r,n){var i;switch(t.name.toUpperCase()){case"INT":return Fo.convertInt(r);case"STRING":return Fo.convertString(r);case"ID":return Fo.convertID(r)}switch((i=c6(t))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Fo.convertNumber(r);case"boolean":return Fo.convertBoolean(r);case"bigint":return Fo.convertBigint(r);case"date":return Fo.convertDate(r);default:return r}}};(function(e){function t(h){let f="";for(let d=1;d{"use strict";Object.defineProperty(CL,"__esModule",{value:!0});var SL;function _L(){if(SL===void 0)throw new Error("No runtime abstraction layer installed");return SL}a(_L,"RAL");(function(e){function t(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");SL=r}a(t,"install"),e.install=t})(_L||(_L={}));CL.default=_L});var OZ=bs(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.stringArray=ki.array=ki.func=ki.error=ki.number=ki.string=ki.boolean=void 0;function s4t(e){return e===!0||e===!1}a(s4t,"boolean");ki.boolean=s4t;function NZ(e){return typeof e=="string"||e instanceof String}a(NZ,"string");ki.string=NZ;function a4t(e){return typeof e=="number"||e instanceof Number}a(a4t,"number");ki.number=a4t;function o4t(e){return e instanceof Error}a(o4t,"error");ki.error=o4t;function l4t(e){return typeof e=="function"}a(l4t,"func");ki.func=l4t;function MZ(e){return Array.isArray(e)}a(MZ,"array");ki.array=MZ;function c4t(e){return MZ(e)&&e.every(t=>NZ(t))}a(c4t,"stringArray");ki.stringArray=c4t});var vL=bs(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.Emitter=Zp.Event=void 0;var u4t=wL(),PZ;(function(e){let t={dispose(){}};e.None=function(){return t}})(PZ||(Zp.Event=PZ={}));var EL=class{static{a(this,"CallbackList")}add(t,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:a(()=>this.remove(t,r),"dispose")})}remove(t,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new EL),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,r);let i={dispose:a(()=>{this._callbacks&&(this._callbacks.remove(t,r),i.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Zp.Emitter=lS;lS._noop=function(){}});var BZ=bs(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});Jp.CancellationTokenSource=Jp.CancellationToken=void 0;var h4t=wL(),f4t=OZ(),AL=vL(),cS;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:AL.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:AL.Event.None});function t(r){let n=r;return n&&(n===e.None||n===e.Cancelled||f4t.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}a(t,"is"),e.is=t})(cS||(Jp.CancellationToken=cS={}));var d4t=Object.freeze(function(e,t){let r=(0,h4t.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),uS=class{static{a(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?d4t:(this._emitter||(this._emitter=new AL.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},LL=class{static{a(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new uS),this._token}cancel(){this._token?this._token.cancel():this._token=cS.Cancelled}dispose(){this._token?this._token instanceof uS&&this._token.dispose():this._token=cS.None}};Jp.CancellationTokenSource=LL});var Pe={};var oa=x(()=>{"use strict";je(Pe,Ki(BZ(),1))});function RL(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function fS(){return hS=performance.now(),new Pe.CancellationTokenSource}function $Z(e){FZ=e}function Go(e){return e===$o}async function mn(e){if(e===Pe.CancellationToken.None)return;let t=performance.now();if(t-hS>=FZ&&(hS=t,await RL(),hS=performance.now()),e.isCancellationRequested)throw $o}var hS,FZ,$o,Gi,la=x(()=>{"use strict";oa();a(RL,"delayNextTick");hS=0,FZ=10;a(fS,"startCancelableOperation");a($Z,"setInterruptionPeriod");$o=Symbol("OperationCancelled");a(Go,"isOperationCancelled");a(mn,"interruptAndCheck");Gi=class{static{a(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=n=>(t(n),this),this.reject=n=>(r(n),this)})}}});function DL(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);DL(n,t),DL(i,t);let s=0,o=0,l=0;for(;sr.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function p4t(e){let t=zZ(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var dS,tm,WZ=x(()=>{"use strict";dS=class e{static{a(this,"FullTextDocument")}constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(e.isIncremental(n)){let i=zZ(n.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),h=this._lineOffsets,f=GZ(n.text,!1,s);if(u-l===f.length)for(let p=0,m=f.length;pt?i=o:n=o+1}let s=n-1;return t=this.ensureBeforeEOL(t,r[s]),{line:s,character:t-r[s]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let i=t.line+1r&&VZ(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(i,s,o,l){return new dS(i,s,o,l)}a(t,"create"),e.create=t;function r(i,s,o){if(i instanceof dS)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}a(r,"update"),e.update=r;function n(i,s){let o=i.getText(),l=DL(s.map(p4t),(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p}),u=0,h=[];for(let f of l){let d=i.offsetAt(f.range.start);if(du&&h.push(o.substring(u,d)),f.newText.length&&h.push(f.newText),u=i.offsetAt(f.range.end)}return h.push(o.substr(u)),h.join("")}a(n,"applyEdits"),e.applyEdits=n})(tm||(tm={}));a(DL,"mergeSort");a(GZ,"computeLineOffsets");a(VZ,"isEOL");a(zZ,"getWellformedRange");a(p4t,"getWellformedEdit")});var UZ,Vi,em,IL=x(()=>{"use strict";(()=>{"use strict";var e={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}a(s,"e");function o(u,h){for(var f,d="",p=0,m=-1,g=0,y=0;y<=u.length;++y){if(y2){var b=d.lastIndexOf("/");if(b!==d.length-1){b===-1?(d="",p=0):p=(d=d.slice(0,b)).length-1-d.lastIndexOf("/"),m=y,g=0;continue}}else if(d.length===2||d.length===1){d="",p=0,m=y,g=0;continue}}h&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+u.slice(m+1,y):d=u.slice(m+1,y),p=y-m-1;m=y,g=0}else f===46&&g!==-1?++g:g=-1}return d}a(o,"r");var l={resolve:a(function(){for(var u,h="",f=!1,d=arguments.length-1;d>=-1&&!f;d--){var p;d>=0?p=arguments[d]:(u===void 0&&(u=process.cwd()),p=u),s(p),p.length!==0&&(h=p+"/"+h,f=p.charCodeAt(0)===47)}return h=o(h,!f),f?h.length>0?"/"+h:"/":h.length>0?h:"."},"resolve"),normalize:a(function(u){if(s(u),u.length===0)return".";var h=u.charCodeAt(0)===47,f=u.charCodeAt(u.length-1)===47;return(u=o(u,!h)).length!==0||h||(u="."),u.length>0&&f&&(u+="/"),h?"/"+u:u},"normalize"),isAbsolute:a(function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},"isAbsolute"),join:a(function(){if(arguments.length===0)return".";for(var u,h=0;h0&&(u===void 0?u=f:u+="/"+f)}return u===void 0?".":l.normalize(u)},"join"),relative:a(function(u,h){if(s(u),s(h),u===h||(u=l.resolve(u))===(h=l.resolve(h)))return"";for(var f=1;fy){if(h.charCodeAt(m+k)===47)return h.slice(m+k+1);if(k===0)return h.slice(m+k)}else p>y&&(u.charCodeAt(f+k)===47?b=k:k===0&&(b=0));break}var T=u.charCodeAt(f+k);if(T!==h.charCodeAt(m+k))break;T===47&&(b=k)}var _="";for(k=f+b+1;k<=d;++k)k!==d&&u.charCodeAt(k)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+h.slice(m+b):(m+=b,h.charCodeAt(m)===47&&++m,h.slice(m))},"relative"),_makeLong:a(function(u){return u},"_makeLong"),dirname:a(function(u){if(s(u),u.length===0)return".";for(var h=u.charCodeAt(0),f=h===47,d=-1,p=!0,m=u.length-1;m>=1;--m)if((h=u.charCodeAt(m))===47){if(!p){d=m;break}}else p=!1;return d===-1?f?"/":".":f&&d===1?"//":u.slice(0,d)},"dirname"),basename:a(function(u,h){if(h!==void 0&&typeof h!="string")throw new TypeError('"ext" argument must be a string');s(u);var f,d=0,p=-1,m=!0;if(h!==void 0&&h.length>0&&h.length<=u.length){if(h.length===u.length&&h===u)return"";var g=h.length-1,y=-1;for(f=u.length-1;f>=0;--f){var b=u.charCodeAt(f);if(b===47){if(!m){d=f+1;break}}else y===-1&&(m=!1,y=f+1),g>=0&&(b===h.charCodeAt(g)?--g==-1&&(p=f):(g=-1,p=y))}return d===p?p=y:p===-1&&(p=u.length),u.slice(d,p)}for(f=u.length-1;f>=0;--f)if(u.charCodeAt(f)===47){if(!m){d=f+1;break}}else p===-1&&(m=!1,p=f+1);return p===-1?"":u.slice(d,p)},"basename"),extname:a(function(u){s(u);for(var h=-1,f=0,d=-1,p=!0,m=0,g=u.length-1;g>=0;--g){var y=u.charCodeAt(g);if(y!==47)d===-1&&(p=!1,d=g+1),y===46?h===-1?h=g:m!==1&&(m=1):h!==-1&&(m=-1);else if(!p){f=g+1;break}}return h===-1||d===-1||m===0||m===1&&h===d-1&&h===f+1?"":u.slice(h,d)},"extname"),format:a(function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(h,f){var d=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return d?d===f.root?d+p:d+"/"+p:p}(0,u)},"format"),parse:a(function(u){s(u);var h={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return h;var f,d=u.charCodeAt(0),p=d===47;p?(h.root="/",f=1):f=0;for(var m=-1,g=0,y=-1,b=!0,k=u.length-1,T=0;k>=f;--k)if((d=u.charCodeAt(k))!==47)y===-1&&(b=!1,y=k+1),d===46?m===-1?m=k:T!==1&&(T=1):m!==-1&&(T=-1);else if(!b){g=k+1;break}return m===-1||y===-1||T===0||T===1&&m===y-1&&m===g+1?y!==-1&&(h.base=h.name=g===0&&p?u.slice(1,y):u.slice(g,y)):(g===0&&p?(h.name=u.slice(1,m),h.base=u.slice(1,y)):(h.name=u.slice(g,m),h.base=u.slice(g,y)),h.ext=u.slice(m,y)),g>0?h.dir=u.slice(0,g-1):p&&(h.dir="/"),h},"parse"),sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},t={};function r(i){var s=t[i];if(s!==void 0)return s.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}a(r,"r"),r.d=(i,s)=>{for(var o in s)r.o(s,o)&&!r.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:s[o]})},r.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:a(()=>p,"URI"),Utils:a(()=>F,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(S,v){if(!S.scheme&&v)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${S.authority}", path: "${S.path}", query: "${S.query}", fragment: "${S.fragment}"}`);if(S.scheme&&!s.test(S.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(S.path){if(S.authority){if(!o.test(S.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(S.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}a(u,"s");let h="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{a(this,"f")}static isUri(v){return v instanceof p||!!v&&typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="string"&&typeof v.with=="function"&&typeof v.toString=="function"}scheme;authority;path;query;fragment;constructor(v,R,B,I,M,O=!1){typeof v=="object"?(this.scheme=v.scheme||h,this.authority=v.authority||h,this.path=v.path||h,this.query=v.query||h,this.fragment=v.fragment||h):(this.scheme=function(N,E){return N||E?N:"file"}(v,O),this.authority=R||h,this.path=function(N,E){switch(N){case"https":case"http":case"file":E?E[0]!==f&&(E=f+E):E=f}return E}(this.scheme,B||h),this.query=I||h,this.fragment=M||h,u(this,O))}get fsPath(){return T(this,!1)}with(v){if(!v)return this;let{scheme:R,authority:B,path:I,query:M,fragment:O}=v;return R===void 0?R=this.scheme:R===null&&(R=h),B===void 0?B=this.authority:B===null&&(B=h),I===void 0?I=this.path:I===null&&(I=h),M===void 0?M=this.query:M===null&&(M=h),O===void 0?O=this.fragment:O===null&&(O=h),R===this.scheme&&B===this.authority&&I===this.path&&M===this.query&&O===this.fragment?this:new g(R,B,I,M,O)}static parse(v,R=!1){let B=d.exec(v);return B?new g(B[2]||h,D(B[4]||h),D(B[5]||h),D(B[7]||h),D(B[9]||h),R):new g(h,h,h,h,h)}static file(v){let R=h;if(i&&(v=v.replace(/\\/g,f)),v[0]===f&&v[1]===f){let B=v.indexOf(f,2);B===-1?(R=v.substring(2),v=f):(R=v.substring(2,B),v=v.substring(B)||f)}return new g("file",R,v,h,h)}static from(v){let R=new g(v.scheme,v.authority,v.path,v.query,v.fragment);return u(R,!0),R}toString(v=!1){return _(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof p)return v;{let R=new g(v);return R._formatted=v.external,R._fsPath=v._sep===m?v.fsPath:null,R}}return v}}let m=i?1:void 0;class g extends p{static{a(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath}toString(v=!1){return v?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){let v={$mid:1};return this._fsPath&&(v.fsPath=this._fsPath,v._sep=m),this._formatted&&(v.external=this._formatted),this.path&&(v.path=this.path),this.scheme&&(v.scheme=this.scheme),this.authority&&(v.authority=this.authority),this.query&&(v.query=this.query),this.fragment&&(v.fragment=this.fragment),v}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function b(S,v,R){let B,I=-1;for(let M=0;M=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||v&&O===47||R&&O===91||R&&O===93||R&&O===58)I!==-1&&(B+=encodeURIComponent(S.substring(I,M)),I=-1),B!==void 0&&(B+=S.charAt(M));else{B===void 0&&(B=S.substr(0,M));let N=y[O];N!==void 0?(I!==-1&&(B+=encodeURIComponent(S.substring(I,M)),I=-1),B+=N):I===-1&&(I=M)}}return I!==-1&&(B+=encodeURIComponent(S.substring(I))),B!==void 0?B:S}a(b,"d");function k(S){let v;for(let R=0;R1&&S.scheme==="file"?`//${S.authority}${S.path}`:S.path.charCodeAt(0)===47&&(S.path.charCodeAt(1)>=65&&S.path.charCodeAt(1)<=90||S.path.charCodeAt(1)>=97&&S.path.charCodeAt(1)<=122)&&S.path.charCodeAt(2)===58?v?S.path.substr(1):S.path[1].toLowerCase()+S.path.substr(2):S.path,i&&(R=R.replace(/\//g,"\\")),R}a(T,"m");function _(S,v){let R=v?k:b,B="",{scheme:I,authority:M,path:O,query:N,fragment:E}=S;if(I&&(B+=I,B+=":"),(M||I==="file")&&(B+=f,B+=f),M){let V=M.indexOf("@");if(V!==-1){let G=M.substr(0,V);M=M.substr(V+1),V=G.lastIndexOf(":"),V===-1?B+=R(G,!1,!1):(B+=R(G.substr(0,V),!1,!1),B+=":",B+=R(G.substr(V+1),!1,!0)),B+="@"}M=M.toLowerCase(),V=M.lastIndexOf(":"),V===-1?B+=R(M,!1,!0):(B+=R(M.substr(0,V),!1,!0),B+=M.substr(V))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58){let V=O.charCodeAt(1);V>=65&&V<=90&&(O=`/${String.fromCharCode(V+32)}:${O.substr(3)}`)}else if(O.length>=2&&O.charCodeAt(1)===58){let V=O.charCodeAt(0);V>=65&&V<=90&&(O=`${String.fromCharCode(V+32)}:${O.substr(2)}`)}B+=R(O,!0,!1)}return N&&(B+="?",B+=R(N,!1,!1)),E&&(B+="#",B+=v?E:b(E,!1,!1)),B}a(_,"y");function L(S){try{return decodeURIComponent(S)}catch{return S.length>3?S.substr(0,3)+L(S.substr(3)):S}}a(L,"v");let C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D(S){return S.match(C)?S.replace(C,v=>L(v)):S}a(D,"C");var $=r(470);let w=$.posix||$,A="/";var F;(function(S){S.joinPath=function(v,...R){return v.with({path:w.join(v.path,...R)})},S.resolvePath=function(v,...R){let B=v.path,I=!1;B[0]!==A&&(B=A+B,I=!0);let M=w.resolve(B,...R);return I&&M[0]===A&&!v.authority&&(M=M.substring(1)),v.with({path:M})},S.dirname=function(v){if(v.path.length===0||v.path===A)return v;let R=w.dirname(v.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),v.with({path:R})},S.basename=function(v){return w.basename(v.path)},S.extname=function(v){return w.extname(v.path)}})(F||(F={}))})(),UZ=n})();({URI:Vi,Utils:em}=UZ)});var zi,Vo=x(()=>{"use strict";IL();(function(e){e.basename=em.basename,e.dirname=em.dirname,e.extname=em.extname,e.joinPath=em.joinPath,e.resolvePath=em.resolvePath;function t(i,s){return i?.toString()===s?.toString()}a(t,"equals"),e.equals=t;function r(i,s){let o=typeof i=="string"?i:i.path,l=typeof s=="string"?s:s.path,u=o.split("/").filter(m=>m.length>0),h=l.split("/").filter(m=>m.length>0),f=0;for(;f{"use strict";WZ();rm();oa();us();Vo();(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(Or||(Or={}));G1=class{static{a(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,r=Pe.CancellationToken.None){let n=await this.fileSystemProvider.readFile(t);return this.createAsync(t,n,r)}fromTextDocument(t,r,n){return r=r??Vi.parse(t.uri),Pe.CancellationToken.is(n)?this.createAsync(r,t,n):this.create(r,t,n)}fromString(t,r,n){return Pe.CancellationToken.is(n)?this.createAsync(r,t,n):this.create(r,t,n)}fromModel(t,r){return this.create(r,{$model:t})}create(t,r,n){if(typeof r=="string"){let i=this.parse(t,r,n);return this.createLangiumDocument(i,t,void 0,r)}else if("$model"in r){let i={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,t)}else{let i=this.parse(t,r.getText(),n);return this.createLangiumDocument(i,t,r)}}async createAsync(t,r,n){if(typeof r=="string"){let i=await this.parseAsync(t,r,n);return this.createLangiumDocument(i,t,void 0,r)}else{let i=await this.parseAsync(t,r.getText(),n);return this.createLangiumDocument(i,t,r)}}createLangiumDocument(t,r,n,i){let s;if(n)s={parseResult:t,uri:r,state:Or.Parsed,references:[],textDocument:n};else{let o=this.createTextDocumentGetter(r,i);s={parseResult:t,uri:r,state:Or.Parsed,references:[],get textDocument(){return o()}}}return t.value.$document=s,s}async update(t,r){var n,i;let s=(n=t.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,o=(i=this.textDocuments)===null||i===void 0?void 0:i.get(t.uri.toString()),l=o?o.getText():await this.fileSystemProvider.readFile(t.uri);if(o)Object.defineProperty(t,"textDocument",{value:o});else{let u=this.createTextDocumentGetter(t.uri,l);Object.defineProperty(t,"textDocument",{get:u})}return s!==l&&(t.parseResult=await this.parseAsync(t.uri,l,r),t.parseResult.value.$document=t),t.state=Or.Parsed,t}parse(t,r,n){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(r,n)}parseAsync(t,r,n){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(t,r){let n=this.serviceRegistry,i;return()=>i??(i=tm.create(t.toString(),n.getServices(t).LanguageMetaData.languageId,0,r??""))}},V1=class{static{a(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.serviceRegistry=t.ServiceRegistry}get all(){return kr(this.documentMap.values())}addDocument(t){let r=t.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,t)}getDocument(t){let r=t.toString();return this.documentMap.get(r)}async getOrCreateDocument(t,r){let n=this.getDocument(t);return n||(n=await this.langiumDocumentFactory.fromUri(t,r),this.addDocument(n),n)}createDocument(t,r,n){if(n)return this.langiumDocumentFactory.fromString(r,t,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,t);return this.addDocument(i),i}}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){let r=t.toString(),n=this.documentMap.get(r);return n&&(this.serviceRegistry.getServices(t).references.Linker.unlink(n),n.state=Or.Changed,n.precomputedScopes=void 0,n.diagnostics=void 0),n}deleteDocument(t){let r=t.toString(),n=this.documentMap.get(r);return n&&(n.state=Or.Changed,this.documentMap.delete(r)),n}}});var NL,z1,ML=x(()=>{"use strict";oa();za();Oi();la();rm();NL=Symbol("ref_resolving"),z1=class{static{a(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(t,r=Pe.CancellationToken.None){for(let n of aa(t.parseResult.value))await mn(r),xp(n).forEach(i=>this.doLink(i,t))}doLink(t,r){var n;let i=t.reference;if(i._ref===void 0){i._ref=NL;try{let s=this.getCandidate(t);if(ah(s))i._ref=s;else if(i._nodeDescription=s,this.langiumDocuments().hasDocument(s.documentUri)){let o=this.loadAstNode(s);i._ref=o??this.createLinkingError(t,s)}else i._ref=void 0}catch(s){console.error(`An error occurred while resolving reference to '${i.$refText}':`,s);let o=(n=s.message)!==null&&n!==void 0?n:String(s);i._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${i.$refText}': ${o}`})}r.references.push(i)}}unlink(t){for(let r of t.references)delete r._ref,delete r._nodeDescription;t.references=[]}getCandidate(t){let n=this.scopeProvider.getScope(t).getElement(t.reference.$refText);return n??this.createLinkingError(t)}buildReference(t,r,n,i){let s=this,o={$refNode:n,$refText:i,get ref(){var l;if(an(this._ref))return this._ref;if(k5(this._nodeDescription)){let u=s.loadAstNode(this._nodeDescription);this._ref=u??s.createLinkingError({reference:o,container:t,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=NL;let u=Z0(t).$document,h=s.getLinkedNode({reference:o,container:t,property:r});if(h.error&&u&&u.state{"use strict";qa();a(jZ,"isNamed");W1=class{static{a(this,"DefaultNameProvider")}getName(t){if(jZ(t))return t.name}getNameNode(t){return s1(t.$cstNode,"name")}}});var U1,PL=x(()=>{"use strict";qa();za();Oi();Wa();us();Vo();U1=class{static{a(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){let r=l6(t),n=t.astNode;if(r&&n){let i=n[r.feature];if(ai(i))return i.ref;if(Array.isArray(i)){for(let s of i)if(ai(s)&&s.$refNode&&s.$refNode.offset<=t.offset&&s.$refNode.end>=t.end)return s.ref}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===t||S5(t,i)))return n}}}findDeclarationNode(t){let r=this.findDeclaration(t);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(t,r){let n=[];if(r.includeDeclaration){let s=this.getReferenceToSelf(t);s&&n.push(s)}let i=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return r.documentUri&&(i=i.filter(s=>zi.equals(s.sourceUri,r.documentUri))),n.push(...i),kr(n)}getReferenceToSelf(t){let r=this.nameProvider.getNameNode(t);if(r){let n=bi(t),i=this.nodeLocator.getAstNodePath(t);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:lh(r),local:!0}}}}});var Ya,Lh,nm=x(()=>{"use strict";us();Ya=class{static{a(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(let[r,n]of t)this.add(r,n)}get size(){return Dd.sum(kr(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,r){if(r===void 0)return this.map.delete(t);{let n=this.map.get(t);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(t):n.splice(i,1),!0}return!1}}get(t){var r;return(r=this.map.get(t))!==null&&r!==void 0?r:[]}has(t,r){if(r===void 0)return this.map.has(t);{let n=this.map.get(t);return n?n.indexOf(r)>=0:!1}}add(t,r){return this.map.has(t)?this.map.get(t).push(r):this.map.set(t,[r]),this}addAll(t,r){return this.map.has(t)?this.map.get(t).push(...r):this.map.set(t,Array.from(r)),this}forEach(t){this.map.forEach((r,n)=>r.forEach(i=>t(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return kr(this.map.entries()).flatMap(([t,r])=>r.map(n=>[t,n]))}keys(){return kr(this.map.keys())}values(){return kr(this.map.values()).flat()}entriesGroupedByKey(){return kr(this.map.entries())}},Lh=class{static{a(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(let[r,n]of t)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(t,r){return this.map.set(t,r),this.inverse.set(r,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){let r=this.map.get(t);return r!==void 0?(this.map.delete(t),this.inverse.delete(r),!0):!1}}});var j1,BL=x(()=>{"use strict";oa();Oi();nm();la();j1=class{static{a(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,r=Pe.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,r)}async computeExportsForNode(t,r,n=J0,i=Pe.CancellationToken.None){let s=[];this.exportNode(t,s,r);for(let o of n(t))await mn(i),this.exportNode(o,s,r);return s}exportNode(t,r,n){let i=this.nameProvider.getName(t);i&&r.push(this.descriptions.createDescription(t,i,n))}async computeLocalScopes(t,r=Pe.CancellationToken.None){let n=t.parseResult.value,i=new Ya;for(let s of Oo(n))await mn(r),this.processNode(s,t,i);return i}processNode(t,r,n){let i=t.$container;if(i){let s=this.nameProvider.getName(t);s&&n.add(i,this.descriptions.createDescription(t,s,r))}}}});var im,q1,m4t,FL=x(()=>{"use strict";us();im=class{static{a(this,"StreamScope")}constructor(t,r,n){var i;this.elements=t,this.outerScope=r,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===t.toLowerCase()):this.elements.find(n=>n.name===t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(t)}},q1=class{static{a(this,"MapScope")}constructor(t,r,n){var i;this.elements=new Map,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1;for(let s of t){let o=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(o,s)}this.outerScope=r}getElement(t){let r=this.caseInsensitive?t.toLowerCase():t,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(t)}getAllElements(){let t=kr(this.elements.values());return this.outerScope&&(t=t.concat(this.outerScope.getAllElements())),t}},m4t={getElement(){},getAllElements(){return z0}}});var sm,H1,Rh,pS,am,mS=x(()=>{"use strict";sm=class{static{a(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},H1=class extends sm{static{a(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,r){this.throwIfDisposed(),this.cache.set(t,r)}get(t,r){if(this.throwIfDisposed(),this.cache.has(t))return this.cache.get(t);if(r){let n=r();return this.cache.set(t,n),n}else return}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},Rh=class extends sm{static{a(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(r=>r)}has(t,r){return this.throwIfDisposed(),this.cacheForContext(t).has(r)}set(t,r,n){this.throwIfDisposed(),this.cacheForContext(t).set(r,n)}get(t,r,n){this.throwIfDisposed();let i=this.cacheForContext(t);if(i.has(r))return i.get(r);if(n){let s=n();return i.set(r,s),s}else return}delete(t,r){return this.throwIfDisposed(),this.cacheForContext(t).delete(r)}clear(t){if(this.throwIfDisposed(),t){let r=this.converter(t);this.cache.delete(r)}else this.cache.clear()}cacheForContext(t){let r=this.converter(t),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},pS=class extends Rh{static{a(this,"DocumentCache")}constructor(t,r){super(n=>n.toString()),r?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((n,i)=>{for(let s of i)this.clear(s)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((n,i)=>{let s=n.concat(i);for(let o of s)this.clear(o)}))}},am=class extends H1{static{a(this,"WorkspaceCache")}constructor(t,r){super(),r?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((n,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var Y1,$L=x(()=>{"use strict";FL();Oi();us();mS();Y1=class{static{a(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new am(t.shared)}getScope(t){let r=[],n=this.reflection.getReferenceType(t),i=bi(t.container).precomputedScopes;if(i){let o=t.container;do{let l=i.get(o);l.length>0&&r.push(kr(l).filter(u=>this.reflection.isSubtype(u.type,n))),o=o.$container}while(o)}let s=this.getGlobalScope(n,t);for(let o=r.length-1;o>=0;o--)s=this.createScope(r[o],s);return s}createScope(t,r,n){return new im(kr(t),r,n)}createScopeForNodes(t,r,n){let i=kr(t).map(s=>{let o=this.nameProvider.getName(s);if(o)return this.descriptions.createDescription(s,o)}).nonNullable();return new im(i,r,n)}getGlobalScope(t,r){return this.globalScopeCache.get(t,()=>new q1(this.indexManager.allElements(t)))}}});function GL(e){return typeof e.$comment=="string"}function qZ(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}var X1,gS=x(()=>{"use strict";IL();za();Oi();qa();a(GL,"isAstNodeWithComment");a(qZ,"isIntermediateReference");X1=class{static{a(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,r){let n=r??{},i=r?.replacer,s=a((l,u)=>this.replacer(l,u,n),"defaultReplacer"),o=i?(l,u)=>i(l,u,s):s;try{return this.currentDocument=bi(t),JSON.stringify(t,o,r?.space)}finally{this.currentDocument=void 0}}deserialize(t,r){let n=r??{},i=JSON.parse(t);return this.linkNode(i,i,n),i}replacer(t,r,{refText:n,sourceText:i,textRegions:s,comments:o,uriConverter:l}){var u,h,f,d;if(!this.ignoreProperties.has(t))if(ai(r)){let p=r.ref,m=n?r.$refText:void 0;if(p){let g=bi(p),y="";this.currentDocument&&this.currentDocument!==g&&(l?y=l(g.uri,r):y=g.uri.toString());let b=this.astNodeLocator.getAstNodePath(p);return{$ref:`${y}#${b}`,$refText:m}}else return{$error:(h=(u=r.error)===null||u===void 0?void 0:u.message)!==null&&h!==void 0?h:"Could not resolve reference",$refText:m}}else if(an(r)){let p;if(s&&(p=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!t||r.$document)&&p?.$textRegion&&(p.$textRegion.documentURI=(f=this.currentDocument)===null||f===void 0?void 0:f.uri.toString())),i&&!t&&(p??(p=Object.assign({},r)),p.$sourceText=(d=r.$cstNode)===null||d===void 0?void 0:d.text),o){p??(p=Object.assign({},r));let m=this.commentProvider.getComment(r);m&&(p.$comment=m.replace(/\r/g,""))}return p??r}else return r}addAstNodeRegionWithAssignmentsTo(t){let r=a(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(t.$cstNode){let n=t.$textRegion=r(t.$cstNode),i=n.assignments={};return Object.keys(t).filter(s=>!s.startsWith("$")).forEach(s=>{let o=i6(t.$cstNode,s).map(r);o.length!==0&&(i[s]=o)}),t}}linkNode(t,r,n,i,s,o){for(let[u,h]of Object.entries(t))if(Array.isArray(h))for(let f=0;f{"use strict";Vo();K1=class{static{a(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){let r=t.LanguageMetaData;for(let n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,t);this.languageIdMap.set(r.languageId,t),this.languageIdMap.size===1?this.singleton=t:this.singleton=void 0}getServices(t){var r,n;if(this.singleton!==void 0)return this.singleton;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let i=(n=(r=this.textDocuments)===null||r===void 0?void 0:r.get(t))===null||n===void 0?void 0:n.languageId;if(i!==void 0){let l=this.languageIdMap.get(i);if(l)return l}let s=zi.extname(t),o=this.fileExtensionMap.get(s);if(!o)throw i?new Error(`The service registry contains no services for the extension '${s}' for language '${i}'.`):new Error(`The service registry contains no services for the extension '${s}'.`);return o}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Dh(e){return{code:e}}var om,Q1,Z1=x(()=>{"use strict";ca();nm();la();us();a(Dh,"diagnosticData");(function(e){e.all=["fast","slow","built-in"]})(om||(om={}));Q1=class{static{a(this,"ValidationRegistry")}constructor(t){this.entries=new Ya,this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[i,s]of Object.entries(t)){let o=s;if(Array.isArray(o))for(let l of o){let u={check:this.wrapValidationException(l,r),category:n};this.addEntry(i,u)}else if(typeof o=="function"){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}else No(o)}}wrapValidationException(t,r){return async(n,i,s)=>{await this.handleException(()=>t.call(r,n,i,s),"An error occurred during validation",i,n)}}async handleException(t,r,n,i){try{await t()}catch(s){if(Go(s))throw s;console.error(`${r}:`,s),s instanceof Error&&s.stack&&console.error(s.stack);let o=s instanceof Error?s.message:String(s);n("error",`${r}: ${o}`,{node:i})}}addEntry(t,r){if(t==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(t))this.entries.add(n,r)}getChecks(t,r){let n=kr(this.entries.get(t)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}registerBeforeDocument(t,r=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",r))}registerAfterDocument(t,r=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",r))}wrapPreparationException(t,r,n){return async(i,s,o,l)=>{await this.handleException(()=>t.call(n,i,s,o,l),r,s,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function HZ(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=s1(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=a6(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function yS(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function YZ(e){switch(e){case"error":return Dh(ua.LexingError);case"warning":return Dh(ua.LexingWarning);case"info":return Dh(ua.LexingInfo);case"hint":return Dh(ua.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var J1,ua,zL=x(()=>{"use strict";oa();qa();Oi();Wa();la();Z1();J1=class{static{a(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,r={},n=Pe.CancellationToken.None){let i=t.parseResult,s=[];if(await mn(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,s,r),r.stopAfterLexingErrors&&s.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===ua.LexingError})||(this.processParsingErrors(i,s,r),r.stopAfterParsingErrors&&s.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===ua.ParsingError}))||(this.processLinkingErrors(t,s,r),r.stopAfterLinkingErrors&&s.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===ua.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,r,n))}catch(o){if(Go(o))throw o;console.error("An error occurred during validation:",o)}return await mn(n),s}processLexingErrors(t,r,n){var i,s,o;let l=[...t.lexerErrors,...(s=(i=t.lexerReport)===null||i===void 0?void 0:i.diagnostics)!==null&&s!==void 0?s:[]];for(let u of l){let h=(o=u.severity)!==null&&o!==void 0?o:"error",f={severity:yS(h),range:{start:{line:u.line-1,character:u.column-1},end:{line:u.line-1,character:u.column+u.length-1}},message:u.message,data:YZ(h),source:this.getSource()};r.push(f)}}processParsingErrors(t,r,n){for(let i of t.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){let o=i.previousToken;if(isNaN(o.startOffset)){let l={line:0,character:0};s={start:l,end:l}}else{let l={line:o.endLine-1,character:o.endColumn};s={start:l,end:l}}}}else s=Id(i.token);if(s){let o={severity:yS("error"),range:s,message:i.message,data:Dh(ua.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(t,r,n){for(let i of t.references){let s=i.error;if(s){let o={node:s.container,property:s.property,index:s.index,data:{code:ua.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};r.push(this.toDiagnostic("error",s.message,o))}}}async validateAst(t,r,n=Pe.CancellationToken.None){let i=[],s=a((o,l,u)=>{i.push(this.toDiagnostic(o,l,u))},"acceptor");return await this.validateAstBefore(t,r,s,n),await this.validateAstNodes(t,r,s,n),await this.validateAstAfter(t,r,s,n),i}async validateAstBefore(t,r,n,i=Pe.CancellationToken.None){var s;let o=this.validationRegistry.checksBefore;for(let l of o)await mn(i),await l(t,n,(s=r.categories)!==null&&s!==void 0?s:[],i)}async validateAstNodes(t,r,n,i=Pe.CancellationToken.None){await Promise.all(aa(t).map(async s=>{await mn(i);let o=this.validationRegistry.getChecks(s.$type,r.categories);for(let l of o)await l(s,n,i)}))}async validateAstAfter(t,r,n,i=Pe.CancellationToken.None){var s;let o=this.validationRegistry.checksAfter;for(let l of o)await mn(i),await l(t,n,(s=r.categories)!==null&&s!==void 0?s:[],i)}toDiagnostic(t,r,n){return{message:r,range:HZ(n),severity:yS(t),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};a(HZ,"getDiagnosticRange");a(yS,"toDiagnosticSeverity");a(YZ,"toDiagnosticData");(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(ua||(ua={}))});var ty,ey,WL=x(()=>{"use strict";oa();za();Oi();Wa();la();Vo();ty=class{static{a(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(t,r,n){let i=n??bi(t);r??(r=this.nameProvider.getName(t));let s=this.astNodeLocator.getAstNodePath(t);if(!r)throw new Error(`Node at path ${s} has no name.`);let o,l=a(()=>{var u;return o??(o=lh((u=this.nameProvider.getNameNode(t))!==null&&u!==void 0?u:t.$cstNode))},"nameSegmentGetter");return{node:t,name:r,get nameSegment(){return l()},selectionSegment:lh(t.$cstNode),type:t.$type,documentUri:i.uri,path:s}}},ey=class{static{a(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,r=Pe.CancellationToken.None){let n=[],i=t.parseResult.value;for(let s of aa(i))await mn(r),xp(s).filter(o=>!ah(o)).forEach(o=>{let l=this.createDescription(o);l&&n.push(l)});return n}createDescription(t){let r=t.reference.$nodeDescription,n=t.reference.$refNode;if(!r||!n)return;let i=bi(t.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:lh(n),local:zi.equals(r.documentUri,i)}}}});var ry,UL=x(()=>{"use strict";ry=class{static{a(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){if(t.$container){let r=this.getAstNodePath(t.$container),n=this.getPathSegment(t);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:t,$containerIndex:r}){if(!t)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?t+this.indexSeparator+r:t}getAstNode(t,r){return r.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;let o=s.indexOf(this.indexSeparator);if(o>0){let l=s.substring(0,o),u=parseInt(s.substring(o+1)),h=i[l];return h?.[u]}return i[s]},t)}}});var tn={};var xS=x(()=>{"use strict";je(tn,Ki(vL(),1))});var ny,jL=x(()=>{"use strict";xS();la();ny=class{static{a(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Gi,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new tn.Emitter,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){var r,n;this.workspaceConfig=(n=(r=t.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(t){if(this.workspaceConfig){if(t.register){let r=this.serviceRegistry.all;t.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(t.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await t.fetchConfiguration(r);r.forEach((i,s)=>{this.updateSectionConfiguration(i.section,n[s])})}}this._ready.resolve()}updateConfiguration(t){t.settings&&Object.keys(t.settings).forEach(r=>{let n=t.settings[r];this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(t,r){this.settings[t]=r}async getConfiguration(t,r){await this.ready;let n=this.toSectionName(t);if(this.settings[n])return this.settings[n][r]}toSectionName(t){return`${t}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}});var zc,qL=x(()=>{"use strict";(function(e){function t(r){return{dispose:a(async()=>await r(),"dispose")}}a(t,"create"),e.create=t})(zc||(zc={}))});var iy,HL=x(()=>{"use strict";oa();qL();nm();la();us();Z1();rm();iy=class{static{a(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Ya,this.documentPhaseListeners=new Ya,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Or.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},n=Pe.CancellationToken.None){var i,s;for(let o of t){let l=o.uri.toString();if(o.state===Or.Validated){if(typeof r.validation=="boolean"&&r.validation)o.state=Or.IndexedReferences,o.diagnostics=void 0,this.buildState.delete(l);else if(typeof r.validation=="object"){let u=this.buildState.get(l),h=(i=u?.result)===null||i===void 0?void 0:i.validationChecks;if(h){let d=((s=r.validation.categories)!==null&&s!==void 0?s:om.all).filter(p=>!h.includes(p));d.length>0&&(this.buildState.set(l,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:d})},result:u.result}),o.state=Or.IndexedReferences)}}}else this.buildState.delete(l)}this.currentState=Or.Changed,await this.emitUpdate(t.map(o=>o.uri),[]),await this.buildDocuments(t,r,n)}async update(t,r,n=Pe.CancellationToken.None){this.currentState=Or.Changed;for(let o of r)this.langiumDocuments.deleteDocument(o),this.buildState.delete(o.toString()),this.indexManager.remove(o);for(let o of t){if(!this.langiumDocuments.invalidateDocument(o)){let u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o);u.state=Or.Changed,this.langiumDocuments.addDocument(u)}this.buildState.delete(o.toString())}let i=kr(t).concat(r).map(o=>o.toString()).toSet();this.langiumDocuments.all.filter(o=>!i.has(o.uri.toString())&&this.shouldRelink(o,i)).forEach(o=>{this.serviceRegistry.getServices(o.uri).references.Linker.unlink(o),o.state=Math.min(o.state,Or.ComputedScopes),o.diagnostics=void 0}),await this.emitUpdate(t,r),await mn(n);let s=this.sortDocuments(this.langiumDocuments.all.filter(o=>{var l;return o.staten(t,r)))}sortDocuments(t){let r=0,n=t.length-1;for(;r=0&&!this.hasTextDocument(t[n]);)n--;rn.error!==void 0)?!0:this.indexManager.isAffected(t,r)}onUpdate(t){return this.updateListeners.push(t),zc.create(()=>{let r=this.updateListeners.indexOf(t);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(t,r,n){this.prepareBuild(t,r),await this.runCancelable(t,Or.Parsed,n,s=>this.langiumDocumentFactory.update(s,n)),await this.runCancelable(t,Or.IndexedContent,n,s=>this.indexManager.updateContent(s,n)),await this.runCancelable(t,Or.ComputedScopes,n,async s=>{let o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await o.computeLocalScopes(s,n)}),await this.runCancelable(t,Or.Linked,n,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,n)),await this.runCancelable(t,Or.IndexedReferences,n,s=>this.indexManager.updateReferences(s,n));let i=t.filter(s=>this.shouldValidate(s));await this.runCancelable(i,Or.Validated,n,s=>this.validate(s,n));for(let s of t){let o=this.buildState.get(s.uri.toString());o&&(o.completed=!0)}}prepareBuild(t,r){for(let n of t){let i=n.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:r,result:s?.result})}}async runCancelable(t,r,n,i){let s=t.filter(l=>l.statel.state===r);await this.notifyBuildPhase(o,r,n),this.currentState=r}onBuildPhase(t,r){return this.buildPhaseListeners.add(t,r),zc.create(()=>{this.buildPhaseListeners.delete(t,r)})}onDocumentPhase(t,r){return this.documentPhaseListeners.add(t,r),zc.create(()=>{this.documentPhaseListeners.delete(t,r)})}waitUntil(t,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=Pe.CancellationToken.None),i){let s=this.langiumDocuments.getDocument(i);if(s&&s.state>t)return Promise.resolve(i)}return this.currentState>=t?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject($o):new Promise((s,o)=>{let l=this.onBuildPhase(t,()=>{if(l.dispose(),u.dispose(),i){let h=this.langiumDocuments.getDocument(i);s(h?.uri)}else s(void 0)}),u=n.onCancellationRequested(()=>{l.dispose(),u.dispose(),o($o)})})}async notifyDocumentPhase(t,r,n){let s=this.documentPhaseListeners.get(r).slice();for(let o of s)try{await o(t,n)}catch(l){if(!Go(l))throw l}}async notifyBuildPhase(t,r,n){if(t.length===0)return;let s=this.buildPhaseListeners.get(r).slice();for(let o of s)await mn(n),await o(t,n)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,r){var n,i;let s=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,o=this.getBuildOptions(t).validation,l=typeof o=="object"?o:void 0,u=await s.validateDocument(t,l,r);t.diagnostics?t.diagnostics.push(...u):t.diagnostics=u;let h=this.buildState.get(t.uri.toString());if(h){(n=h.result)!==null&&n!==void 0||(h.result={});let f=(i=l?.categories)!==null&&i!==void 0?i:om.all;h.result.validationChecks?h.result.validationChecks.push(...f):h.result.validationChecks=[...f]}}getBuildOptions(t){var r,n;return(n=(r=this.buildState.get(t.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var sy,YL=x(()=>{"use strict";Oi();mS();oa();us();Vo();sy=class{static{a(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new Rh,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,r){let n=bi(t).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(o=>{zi.equals(o.targetUri,n)&&o.targetPath===r&&i.push(o)})}),kr(i)}allElements(t,r){let n=kr(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,t)).flat()}getFileDescriptions(t,r){var n;return r?this.symbolByTypeIndex.get(t,r,()=>{var s;return((s=this.symbolIndex.get(t))!==null&&s!==void 0?s:[]).filter(l=>this.astReflection.isSubtype(l.type,r))}):(n=this.symbolIndex.get(t))!==null&&n!==void 0?n:[]}remove(t){let r=t.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(t,r=Pe.CancellationToken.None){let i=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,r),s=t.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(t,r=Pe.CancellationToken.None){let i=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,r);this.referenceIndex.set(t.uri.toString(),i)}isAffected(t,r){let n=this.referenceIndex.get(t.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}}});var ay,XL=x(()=>{"use strict";oa();la();Vo();ay=class{static{a(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Gi,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){var r;this.folders=(r=t.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(t){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(t,r=Pe.CancellationToken.None){let n=await this.performStartup(t);await mn(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(t){let r=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),n=[],i=a(s=>{n.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)},"collector");return await this.loadAdditionalDocuments(t,i),await Promise.all(t.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,r,i))),this._ready.resolve(),n}loadAdditionalDocuments(t,r){return Promise.resolve()}getRootFolder(t){return Vi.parse(t.uri)}async traverseFolder(t,r,n,i){let s=await this.fileSystemProvider.readDirectory(r);await Promise.all(s.map(async o=>{if(this.includeEntry(t,o,n)){if(o.isDirectory)await this.traverseFolder(t,o.uri,n,i);else if(o.isFile){let l=await this.langiumDocuments.getOrCreateDocument(o.uri);i(l)}}}))}includeEntry(t,r,n){let i=zi.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let s=zi.extname(r.uri);return n.includes(s)}return!1}}});function kS(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function QL(e){return e&&"modes"in e&&"defaultMode"in e}function KL(e){return!kS(e)&&!QL(e)}var oy,bS,Ih,TS=x(()=>{"use strict";$c();oy=class{static{a(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,r,n,i,s){return Ip.buildUnexpectedCharactersMessage(t,r,n,i,s)}buildUnableToPopLexerModeMessage(t){return Ip.buildUnableToPopLexerModeMessage(t)}},bS={mode:"full"},Ih=class{static{a(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=KL(r)?Object.values(r):r,i=t.LanguageMetaData.mode==="production";this.chevrotainLexer=new Zr(n,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,r=bS){var n,i,s;let o=this.chevrotainLexer.tokenize(t);return{tokens:o.tokens,errors:o.errors,hidden:(n=o.groups.hidden)!==null&&n!==void 0?n:[],report:(s=(i=this.tokenBuilder).flushLexingReport)===null||s===void 0?void 0:s.call(i,t)}}toTokenTypeDictionary(t){if(KL(t))return t;let r=QL(t)?Object.values(t.modes).flat():t,n={};return r.forEach(i=>n[i.name]=i),n}};a(kS,"isTokenTypeArray");a(QL,"isIMultiModeLexerDefinition");a(KL,"isTokenTypeDictionary")});function tR(e,t,r){let n,i;typeof e=="string"?(i=t,n=r):(i=e.range.start,n=t),i||(i=mr.create(0,0));let s=QZ(e),o=rR(n),l=y4t({lines:s,position:i,options:o});return S4t({index:0,tokens:l,position:i})}function eR(e,t){let r=rR(t),n=QZ(e);if(n.length===0)return!1;let i=n[0],s=n[n.length-1],o=r.start,l=r.end;return!!o?.exec(i)&&!!l?.exec(s)}function QZ(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(K5)}function y4t(e){var t,r,n;let i=[],s=e.position.line,o=e.position.character;for(let l=0;l=f.length){if(i.length>0){let m=mr.create(s,o);i.push({type:"break",content:"",range:Ke.create(m,m)})}}else{XZ.lastIndex=d;let m=XZ.exec(f);if(m){let g=m[0],y=m[1],b=mr.create(s,o+d),k=mr.create(s,o+d+g.length);i.push({type:"tag",content:y,range:Ke.create(b,k)}),d+=g.length,d=JL(f,d)}if(d0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function x4t(e,t,r,n){let i=[];if(e.length===0){let s=mr.create(r,n),o=mr.create(r,n+t.length);i.push({type:"text",content:t,range:Ke.create(s,o)})}else{let s=0;for(let l of e){let u=l.index,h=t.substring(s,u);h.length>0&&i.push({type:"text",content:t.substring(s,u),range:Ke.create(mr.create(r,s+n),mr.create(r,u+n))});let f=h.length+1,d=l[1];if(i.push({type:"inline-tag",content:d,range:Ke.create(mr.create(r,s+f+n),mr.create(r,s+f+d.length+n))}),f+=d.length,l.length===4){f+=l[2].length;let p=l[3];i.push({type:"text",content:p,range:Ke.create(mr.create(r,s+f+n),mr.create(r,s+f+p.length+n))})}else i.push({type:"text",content:"",range:Ke.create(mr.create(r,s+f+n),mr.create(r,s+f+n))});s=u+l[0].length}let o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:Ke.create(mr.create(r,s+n),mr.create(r,s+n+o.length))})}return i}function JL(e,t){let r=e.substring(t).match(b4t);return r?t+r.index:e.length}function T4t(e){let t=e.match(k4t);if(t&&typeof t.index=="number")return t.index}function S4t(e){var t,r,n,i;let s=mr.create(e.position.line,e.position.character);if(e.tokens.length===0)return new SS([],Ke.create(s,s));let o=[];for(;e.index0){let u=JL(t,s);o=t.substring(u),t=t.substring(0,s)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(o=`\`${o}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,t,o))!==null&&i!==void 0?i:v4t(t,o)}}function v4t(e,t){try{return Vi.parse(e,!0),`[${t}](${e})`}catch{return e}}function KZ(e){return e.endsWith(` +`)?` +`:` + +`}var XZ,g4t,b4t,k4t,SS,ly,cy,_S,nR=x(()=>{"use strict";fL();Tp();Vo();a(tR,"parseJSDoc");a(eR,"isJSDoc");a(QZ,"getLines");XZ=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,g4t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;a(y4t,"tokenize");a(x4t,"buildInlineTokens");b4t=/\S/,k4t=/\s*$/;a(JL,"skipWhitespace");a(T4t,"lastCharacter");a(S4t,"parseJSDocComment");a(_4t,"parseJSDocElement");a(C4t,"appendEmptyLine");a(ZZ,"parseJSDocText");a(w4t,"parseJSDocInline");a(JZ,"parseJSDocTag");a(tJ,"parseJSDocLine");a(rR,"normalizeOptions");a(ZL,"normalizeOption");SS=class{static{a(this,"JSDocCommentImpl")}constructor(t,r){this.elements=t,this.range=r}getTag(t){return this.getAllTags().find(r=>r.name===t)}getTags(t){return this.getAllTags().filter(r=>r.name===t)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(let r of this.elements)if(t.length===0)t=r.toString();else{let n=r.toString();t+=KZ(t)+n}return t.trim()}toMarkdown(t){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(t);else{let i=n.toMarkdown(t);r+=KZ(r)+i}return r.trim()}},ly=class{static{a(this,"JSDocTagImpl")}constructor(t,r,n,i){this.name=t,this.content=r,this.inline=n,this.range=i}toString(){let t=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?t=`${t} ${r}`:this.content.inlines.length>1&&(t=`${t} +${r}`),this.inline?`{${t}}`:t}toMarkdown(t){var r,n;return(n=(r=t?.renderTag)===null||r===void 0?void 0:r.call(t,this))!==null&&n!==void 0?n:this.toMarkdownDefault(t)}toMarkdownDefault(t){let r=this.content.toMarkdown(t);if(this.inline){let s=E4t(this.name,r,t??{});if(typeof s=="string")return s}let n="";t?.tag==="italic"||t?.tag===void 0?n="*":t?.tag==="bold"?n="**":t?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i} +${r}`),this.inline?`{${i}}`:i}};a(E4t,"renderInlineTag");a(v4t,"renderLinkDefault");cy=class{static{a(this,"JSDocTextImpl")}constructor(t,r){this.inlines=t,this.range=r}toString(){let t="";for(let r=0;rn.range.start.line&&(t+=` +`)}return t}toMarkdown(t){let r="";for(let n=0;ni.range.start.line&&(r+=` +`)}return r}},_S=class{static{a(this,"JSDocLineImpl")}constructor(t,r){this.text=t,this.range=r}toString(){return this.text}toMarkdown(){return this.text}};a(KZ,"fillNewlines")});var uy,iR=x(()=>{"use strict";Oi();nR();uy=class{static{a(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(t){let r=this.commentProvider.getComment(t);if(r&&eR(r))return tR(r).toMarkdown({renderLink:a((i,s)=>this.documentationLinkRenderer(t,i,s),"renderLink"),renderTag:a(i=>this.documentationTagRenderer(t,i),"renderTag")})}documentationLinkRenderer(t,r,n){var i;let s=(i=this.findNameInPrecomputedScopes(t,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(t,r);if(s&&s.nameSegment){let o=s.nameSegment.range.start.line+1,l=s.nameSegment.range.start.character+1,u=s.documentUri.with({fragment:`L${o},${l}`});return`[${n}](${u.toString()})`}else return}documentationTagRenderer(t,r){}findNameInPrecomputedScopes(t,r){let i=bi(t).precomputedScopes;if(!i)return;let s=t;do{let l=i.get(s).find(u=>u.name===r);if(l)return l;s=s.$container}while(s)}findNameInGlobalScope(t,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var hy,sR=x(()=>{"use strict";gS();Wa();hy=class{static{a(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){var r;return GL(t)?t.$comment:(r=C5(t.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var fy,aR,oR,lR=x(()=>{"use strict";la();xS();fy=class{static{a(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,r){return Promise.resolve(this.syncParser.parse(t))}},aR=class{static{a(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(t.lock(),r.resolve(t))}}),this.workerPool.push(t)}}async parse(t,r){let n=await this.acquireParserWorker(r),i=new Gi,s,o=r.onCancellationRequested(()=>{s=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(t).then(l=>{let u=this.hydrator.hydrate(l);i.resolve(u)}).catch(l=>{i.reject(l)}).finally(()=>{o.dispose(),clearTimeout(s)}),i.promise}terminateWorker(t){t.terminate();let r=this.workerPool.indexOf(t);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(t){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new Gi;return t.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject($o)}),this.queue.push(r),r.promise}},oR=class{static{a(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,r,n,i){this.onReadyEmitter=new tn.Emitter,this.deferred=new Gi,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=i,r(s=>{let o=s;this.deferred.resolve(o),this.unlock()}),n(s=>{this.deferred.reject(s),this.unlock()})}terminate(){this.deferred.reject($o),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Gi,this.sendMessage(t),this.deferred.promise}}});var dy,cR=x(()=>{"use strict";oa();la();dy=class{static{a(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Pe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();let r=fS();return this.previousTokenSource=r,this.enqueue(this.writeQueue,t,r.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,r,n=Pe.CancellationToken.None){let i=new Gi,s={action:r,deferred:i,cancellationToken:n};return t.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let t=[];if(this.writeQueue.length>0)t.push(this.writeQueue.shift());else if(this.readQueue.length>0)t.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(t.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let s=await Promise.resolve().then(()=>r(i));n.resolve(s)}catch(s){Go(s)?n.resolve(void 0):n.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var py,uR=x(()=>{"use strict";rS();Mo();za();Oi();nm();Wa();py=class{static{a(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new Lh,this.tokenTypeIdMap=new Lh,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(r=>Object.assign(Object.assign({},r),{message:r.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){let r=new Map,n=new Map;for(let i of aa(t))r.set(i,{});if(t.$cstNode)for(let i of oh(t.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(t,r){let n=r.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,t.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(t.$cstNode,r));for(let[i,s]of Object.entries(t))if(!i.startsWith("$"))if(Array.isArray(s)){let o=[];n[i]=o;for(let l of s)an(l)?o.push(this.dehydrateAstNode(l,r)):ai(l)?o.push(this.dehydrateReference(l,r)):o.push(l)}else an(s)?n[i]=this.dehydrateAstNode(s,r):ai(s)?n[i]=this.dehydrateReference(s,r):s!==void 0&&(n[i]=s);return n}dehydrateReference(t,r){let n={};return n.$refText=t.$refText,t.$refNode&&(n.$refNode=r.cstNodes.get(t.$refNode)),n}dehydrateCstNode(t,r){let n=r.cstNodes.get(t);return V0(t)?n.fullText=t.fullText:n.grammarSource=this.getGrammarElementId(t.grammarSource),n.hidden=t.hidden,n.astNode=r.astNodes.get(t.astNode),Va(t)?n.content=t.content.map(i=>this.dehydrateCstNode(i,r)):Oc(t)&&(n.tokenType=t.tokenType.name,n.offset=t.offset,n.length=t.length,n.startLine=t.range.start.line,n.startColumn=t.range.start.character,n.endLine=t.range.end.line,n.endColumn=t.range.end.character),n}hydrate(t){let r=t.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(t){let r=new Map,n=new Map;for(let s of aa(t))r.set(s,{});let i;if(t.$cstNode)for(let s of oh(t.$cstNode)){let o;"fullText"in s?(o=new Kp(s.fullText),i=o):"content"in s?o=new Eh:"tokenType"in s&&(o=this.hydrateCstLeafNode(s)),o&&(n.set(s,o),o.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(t,r){let n=r.astNodes.get(t);n.$type=t.$type,n.$containerIndex=t.$containerIndex,n.$containerProperty=t.$containerProperty,t.$cstNode&&(n.$cstNode=r.cstNodes.get(t.$cstNode));for(let[i,s]of Object.entries(t))if(!i.startsWith("$"))if(Array.isArray(s)){let o=[];n[i]=o;for(let l of s)an(l)?o.push(this.setParent(this.hydrateAstNode(l,r),n)):ai(l)?o.push(this.hydrateReference(l,n,i,r)):o.push(l)}else an(s)?n[i]=this.setParent(this.hydrateAstNode(s,r),n):ai(s)?n[i]=this.hydrateReference(s,n,i,r):s!==void 0&&(n[i]=s);return n}setParent(t,r){return t.$container=r,t}hydrateReference(t,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,r,n=0){let i=r.cstNodes.get(t);if(typeof t.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(t.grammarSource)),i.astNode=r.astNodes.get(t.astNode),Va(i))for(let s of t.content){let o=this.hydrateCstNode(s,r,n++);i.content.push(o)}return i}hydrateCstLeafNode(t){let r=this.getTokenType(t.tokenType),n=t.offset,i=t.length,s=t.startLine,o=t.startColumn,l=t.endLine,u=t.endColumn,h=t.hidden;return new wh(n,i,{start:{line:s,character:o},end:{line:l,character:u}},r,h)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(let r of aa(this.grammar))X0(r)&&this.grammarElementIdMap.set(r,t++)}}});function Wi(e){return{documentation:{CommentProvider:a(t=>new hy(t),"CommentProvider"),DocumentationProvider:a(t=>new uy(t),"DocumentationProvider")},parser:{AsyncParser:a(t=>new fy(t),"AsyncParser"),GrammarConfig:a(t=>h6(t),"GrammarConfig"),LangiumParser:a(t=>bL(t),"LangiumParser"),CompletionParser:a(t=>yL(t),"CompletionParser"),ValueConverter:a(()=>new Ah,"ValueConverter"),TokenBuilder:a(()=>new Ll,"TokenBuilder"),Lexer:a(t=>new Ih(t),"Lexer"),ParserErrorMessageProvider:a(()=>new Qp,"ParserErrorMessageProvider"),LexerErrorMessageProvider:a(()=>new oy,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:a(()=>new ry,"AstNodeLocator"),AstNodeDescriptionProvider:a(t=>new ty(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:a(t=>new ey(t),"ReferenceDescriptionProvider")},references:{Linker:a(t=>new z1(t),"Linker"),NameProvider:a(()=>new W1,"NameProvider"),ScopeProvider:a(t=>new Y1(t),"ScopeProvider"),ScopeComputation:a(t=>new j1(t),"ScopeComputation"),References:a(t=>new U1(t),"References")},serializer:{Hydrator:a(t=>new py(t),"Hydrator"),JsonSerializer:a(t=>new X1(t),"JsonSerializer")},validation:{DocumentValidator:a(t=>new J1(t),"DocumentValidator"),ValidationRegistry:a(t=>new Q1(t),"ValidationRegistry")},shared:a(()=>e.shared,"shared")}}function Ui(e){return{ServiceRegistry:a(t=>new K1(t),"ServiceRegistry"),workspace:{LangiumDocuments:a(t=>new V1(t),"LangiumDocuments"),LangiumDocumentFactory:a(t=>new G1(t),"LangiumDocumentFactory"),DocumentBuilder:a(t=>new iy(t),"DocumentBuilder"),IndexManager:a(t=>new sy(t),"IndexManager"),WorkspaceManager:a(t=>new ay(t),"WorkspaceManager"),FileSystemProvider:a(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:a(()=>new dy,"WorkspaceLock"),ConfigurationProvider:a(t=>new ny(t),"ConfigurationProvider")}}}var hR=x(()=>{"use strict";f6();xL();kL();oS();TL();ML();OL();PL();BL();$L();gS();VL();zL();Z1();WL();UL();jL();HL();rm();YL();XL();TS();iR();sR();F1();lR();cR();uR();a(Wi,"createDefaultCoreModule");a(Ui,"createDefaultSharedCoreModule")});function un(e,t,r,n,i,s,o,l,u){let h=[e,t,r,n,i,s,o,l,u].reduce(CS,{});return sJ(h)}function iJ(e){if(e&&e[nJ])for(let t of Object.values(e))iJ(t);return e}function sJ(e,t){let r=new Proxy({},{deleteProperty:a(()=>!1,"deleteProperty"),set:a(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:a((n,i)=>i===nJ?!0:rJ(n,i,e,t||r),"get"),getOwnPropertyDescriptor:a((n,i)=>(rJ(n,i,e,t||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:a((n,i)=>i in e,"has"),ownKeys:a(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function rJ(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]});if(e[t]===eJ)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let i=r[t];e[t]=eJ;try{e[t]=typeof i=="function"?i(n):sJ(i,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}function CS(e,t){if(t){for(let[r,n]of Object.entries(t))if(n!==void 0){let i=e[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?e[r]=CS(i,n):e[r]=n}}return e}var fR,nJ,eJ,dR=x(()=>{"use strict";(function(e){e.merge=(t,r)=>CS(CS({},t),r)})(fR||(fR={}));a(un,"inject");nJ=Symbol("isProxy");a(iJ,"eagerLoad");a(sJ,"_inject");eJ=Symbol();a(rJ,"_resolve");a(CS,"_merge")});var aJ=x(()=>{"use strict"});var oJ=x(()=>{"use strict";sR();iR();nR()});var lJ=x(()=>{"use strict"});var cJ=x(()=>{"use strict";f6();lJ()});var pR,Nh,wS,mR,uJ=x(()=>{"use strict";$c();oS();TS();pR={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(Nh||(Nh={}));wS=class extends Ll{static{a(this,"IndentationAwareTokenBuilder")}constructor(t=pR){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},pR),t),this.indentTokenType=Bc({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Bc({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,r){let n=super.buildTokens(t,r);if(!kS(n))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:s,whitespaceTokenName:o,ignoreIndentationDelimiters:l}=this.options,u,h,f,d=[];for(let p of n){for(let[m,g]of l)p.name===m?p.PUSH_MODE=Nh.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===s?u=p:p.name===i?h=p:p.name===o?f=p:d.push(p)}if(!u||!h||!f)throw new Error("Some indentation/whitespace tokens not found!");return l.length>0?{modes:{[Nh.REGULAR]:[u,h,...d,f],[Nh.IGNORE_INDENTATION]:[...d,f]},defaultMode:Nh.REGULAR}:[u,h,f,...d]}flushLexingReport(t){let r=super.flushLexingReport(t);return Object.assign(Object.assign({},r),{remainingDedents:this.flushRemainingDedents(t)})}isStartOfLine(t,r){return r===0||`\r +`.includes(t[r-1])}matchWhitespace(t,r,n,i){var s;this.whitespaceRegExp.lastIndex=r;let o=this.whitespaceRegExp.exec(t);return{currIndentLevel:(s=o?.[0].length)!==null&&s!==void 0?s:0,prevIndentLevel:this.indentationStack.at(-1),match:o}}createIndentationTokenInstance(t,r,n,i){let s=this.getLineNumber(r,i);return wl(t,n,i,i+n.length,s,s,1,n.length)}getLineNumber(t,r){return t.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(t,r,n,i){if(!this.isStartOfLine(t,r))return null;let{currIndentLevel:s,prevIndentLevel:o,match:l}=this.matchWhitespace(t,r,n,i);return s<=o?null:(this.indentationStack.push(s),l)}dedentMatcher(t,r,n,i){var s,o,l,u;if(!this.isStartOfLine(t,r))return null;let{currIndentLevel:h,prevIndentLevel:f,match:d}=this.matchWhitespace(t,r,n,i);if(h>=f)return null;let p=this.indentationStack.lastIndexOf(h);if(p===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${h} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:(o=(s=d?.[0])===null||s===void 0?void 0:s.length)!==null&&o!==void 0?o:0,line:this.getLineNumber(t,r),column:1}),null;let m=this.indentationStack.length-p-1,g=(u=(l=t.substring(0,r).match(/[\r\n]+$/))===null||l===void 0?void 0:l[0].length)!==null&&u!==void 0?u:1;for(let y=0;y1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,t,"",t.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},mR=class extends Ih{static{a(this,"IndentationAwareLexer")}constructor(t){if(super(t),t.parser.TokenBuilder instanceof wS)this.indentationTokenBuilder=t.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(t,r=bS){let n=super.tokenize(t),i=n.report;r?.mode==="full"&&n.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:s,dedentTokenType:o}=this.indentationTokenBuilder,l=s.tokenTypeIdx,u=o.tokenTypeIdx,h=[],f=n.tokens.length-1;for(let d=0;d=0&&h.push(n.tokens[f]),n.tokens=h,n}}});var hJ=x(()=>{"use strict"});var fJ=x(()=>{"use strict";lR();xL();rS();uJ();kL();F1();TS();aS();hJ();oS();TL()});var dJ=x(()=>{"use strict";ML();OL();PL();FL();BL();$L()});var pJ=x(()=>{"use strict";uR();gS()});var ES,ji,gR=x(()=>{"use strict";ES=class{static{a(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},ji={fileSystemProvider:a(()=>new ES,"fileSystemProvider")}});function R4t(){let e=un(Ui(ji),L4t),t=un(Wi({shared:e}),A4t);return e.ServiceRegistry.register(t),t}function Rl(e){var t;let r=R4t(),n=r.serializer.JsonSerializer.deserialize(e);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,Vi.parse(`memory://${(t=n.name)!==null&&t!==void 0?t:"grammar"}.langium`)),n}var A4t,L4t,mJ=x(()=>{"use strict";hR();dR();Mo();gR();Vo();A4t={Grammar:a(()=>{},"Grammar"),LanguageMetaData:a(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},L4t={AstReflection:a(()=>new yp,"AstReflection")};a(R4t,"createMinimalGrammarServices");a(Rl,"loadGrammarFromJson")});var cr={};Be(cr,{AstUtils:()=>sT,BiMap:()=>Lh,Cancellation:()=>Pe,ContextCache:()=>Rh,CstUtils:()=>Xk,DONE_RESULT:()=>yi,Deferred:()=>Gi,Disposable:()=>zc,DisposableCache:()=>sm,DocumentCache:()=>pS,EMPTY_STREAM:()=>z0,ErrorWithLocation:()=>ch,GrammarUtils:()=>uT,MultiMap:()=>Ya,OperationCancelled:()=>$o,Reduction:()=>Dd,RegExpUtils:()=>lT,SimpleCache:()=>H1,StreamImpl:()=>Ls,TreeStreamImpl:()=>Do,URI:()=>Vi,UriUtils:()=>zi,WorkspaceCache:()=>am,assertUnreachable:()=>No,delayNextTick:()=>RL,interruptAndCheck:()=>mn,isOperationCancelled:()=>Go,loadGrammarFromJson:()=>Rl,setInterruptionPeriod:()=>$Z,startCancelableOperation:()=>fS,stream:()=>kr});var gJ=x(()=>{"use strict";mS();xS();je(cr,tn);nm();qL();Kk();mJ();la();us();Vo();Oi();oa();Wa();qa();Tp()});var yJ=x(()=>{"use strict";zL();Z1()});var xJ=x(()=>{"use strict";WL();UL();jL();HL();rm();gR();YL();cR();XL()});var oi={};Be(oi,{AbstractAstReflection:()=>sh,AbstractCstNode:()=>M1,AbstractLangiumParser:()=>O1,AbstractParserErrorMessageProvider:()=>iS,AbstractThreadedAsyncParser:()=>aR,AstUtils:()=>sT,BiMap:()=>Lh,Cancellation:()=>Pe,CompositeCstNodeImpl:()=>Eh,ContextCache:()=>Rh,CstNodeBuilder:()=>N1,CstUtils:()=>Xk,DEFAULT_TOKENIZE_OPTIONS:()=>bS,DONE_RESULT:()=>yi,DatatypeSymbol:()=>nS,DefaultAstNodeDescriptionProvider:()=>ty,DefaultAstNodeLocator:()=>ry,DefaultAsyncParser:()=>fy,DefaultCommentProvider:()=>hy,DefaultConfigurationProvider:()=>ny,DefaultDocumentBuilder:()=>iy,DefaultDocumentValidator:()=>J1,DefaultHydrator:()=>py,DefaultIndexManager:()=>sy,DefaultJsonSerializer:()=>X1,DefaultLangiumDocumentFactory:()=>G1,DefaultLangiumDocuments:()=>V1,DefaultLexer:()=>Ih,DefaultLexerErrorMessageProvider:()=>oy,DefaultLinker:()=>z1,DefaultNameProvider:()=>W1,DefaultReferenceDescriptionProvider:()=>ey,DefaultReferences:()=>U1,DefaultScopeComputation:()=>j1,DefaultScopeProvider:()=>Y1,DefaultServiceRegistry:()=>K1,DefaultTokenBuilder:()=>Ll,DefaultValueConverter:()=>Ah,DefaultWorkspaceLock:()=>dy,DefaultWorkspaceManager:()=>ay,Deferred:()=>Gi,Disposable:()=>zc,DisposableCache:()=>sm,DocumentCache:()=>pS,DocumentState:()=>Or,DocumentValidator:()=>ua,EMPTY_SCOPE:()=>m4t,EMPTY_STREAM:()=>z0,EmptyFileSystem:()=>ji,EmptyFileSystemProvider:()=>ES,ErrorWithLocation:()=>ch,GrammarAST:()=>Q0,GrammarUtils:()=>uT,IndentationAwareLexer:()=>mR,IndentationAwareTokenBuilder:()=>wS,JSDocDocumentationProvider:()=>uy,LangiumCompletionParser:()=>B1,LangiumParser:()=>P1,LangiumParserErrorMessageProvider:()=>Qp,LeafCstNodeImpl:()=>wh,LexingMode:()=>Nh,MapScope:()=>q1,Module:()=>fR,MultiMap:()=>Ya,OperationCancelled:()=>$o,ParserWorker:()=>oR,Reduction:()=>Dd,RegExpUtils:()=>lT,RootCstNodeImpl:()=>Kp,SimpleCache:()=>H1,StreamImpl:()=>Ls,StreamScope:()=>im,TextDocument:()=>tm,TreeStreamImpl:()=>Do,URI:()=>Vi,UriUtils:()=>zi,ValidationCategory:()=>om,ValidationRegistry:()=>Q1,ValueConverter:()=>Fo,WorkspaceCache:()=>am,assertUnreachable:()=>No,createCompletionParser:()=>yL,createDefaultCoreModule:()=>Wi,createDefaultSharedCoreModule:()=>Ui,createGrammarConfig:()=>h6,createLangiumParser:()=>bL,createParser:()=>$1,delayNextTick:()=>RL,diagnosticData:()=>Dh,eagerLoad:()=>iJ,getDiagnosticRange:()=>HZ,indentationBuilderDefaultOptions:()=>pR,inject:()=>un,interruptAndCheck:()=>mn,isAstNode:()=>an,isAstNodeDescription:()=>k5,isAstNodeWithComment:()=>GL,isCompositeCstNode:()=>Va,isIMultiModeLexerDefinition:()=>QL,isJSDoc:()=>eR,isLeafCstNode:()=>Oc,isLinkingError:()=>ah,isNamed:()=>jZ,isOperationCancelled:()=>Go,isReference:()=>ai,isRootCstNode:()=>V0,isTokenTypeArray:()=>kS,isTokenTypeDictionary:()=>KL,loadGrammarFromJson:()=>Rl,parseJSDoc:()=>tR,prepareLangiumParser:()=>IZ,setInterruptionPeriod:()=>$Z,startCancelableOperation:()=>fS,stream:()=>kr,toDiagnosticData:()=>YZ,toDiagnosticSeverity:()=>yS});var ca=x(()=>{"use strict";hR();dR();VL();aJ();za();oJ();cJ();fJ();dJ();pJ();gJ();je(oi,cr);yJ();xJ();Mo()});function wJ(e){return zo.isInstance(e,my)}function EJ(e){return zo.isInstance(e,lm)}function vJ(e){return zo.isInstance(e,cm)}function AJ(e){return zo.isInstance(e,um)}function LJ(e){return zo.isInstance(e,gy)}function RJ(e){return zo.isInstance(e,hm)}function DJ(e){return zo.isInstance(e,yy)}function IJ(e){return zo.isInstance(e,xy)}function NJ(e){return zo.isInstance(e,by)}function MJ(e){return zo.isInstance(e,ky)}var D4t,Ht,CR,my,vS,lm,AS,LS,cm,yR,xR,bR,um,kR,gy,TR,hm,SR,yy,xy,by,ky,DS,_R,RS,OJ,zo,bJ,I4t,kJ,N4t,TJ,M4t,SJ,O4t,_J,P4t,CJ,B4t,F4t,$4t,G4t,V4t,z4t,W4t,Ns,wR,ER,vR,AR,LR,RR,U4t,j4t,q4t,H4t,fm,Dl,ds,Y4t,ps=x(()=>{"use strict";ca();ca();ca();ca();D4t=Object.defineProperty,Ht=a((e,t)=>D4t(e,"name",{value:t,configurable:!0}),"__name"),CR="Statement",my="Architecture";a(wJ,"isArchitecture");Ht(wJ,"isArchitecture");vS="Axis",lm="Branch";a(EJ,"isBranch");Ht(EJ,"isBranch");AS="Checkout",LS="CherryPicking",cm="Commit";a(vJ,"isCommit");Ht(vJ,"isCommit");yR="Curve",xR="Edge",bR="Entry",um="GitGraph";a(AJ,"isGitGraph");Ht(AJ,"isGitGraph");kR="Group",gy="Info";a(LJ,"isInfo");Ht(LJ,"isInfo");TR="Junction",hm="Merge";a(RJ,"isMerge");Ht(RJ,"isMerge");SR="Option",yy="Packet";a(DJ,"isPacket");Ht(DJ,"isPacket");xy="PacketBlock";a(IJ,"isPacketBlock");Ht(IJ,"isPacketBlock");by="Pie";a(NJ,"isPie");Ht(NJ,"isPie");ky="PieSection";a(MJ,"isPieSection");Ht(MJ,"isPieSection");DS="Radar",_R="Service",RS="Direction",OJ=class extends sh{static{a(this,"MermaidAstReflection")}static{Ht(this,"MermaidAstReflection")}getAllTypes(){return[my,vS,lm,AS,LS,cm,yR,RS,xR,bR,um,kR,gy,TR,hm,SR,yy,xy,by,ky,DS,_R,CR]}computeIsSubtype(e,t){switch(e){case lm:case AS:case LS:case cm:case hm:return this.isSubtype(CR,t);case RS:return this.isSubtype(um,t);default:return!1}}getReferenceType(e){let t=`${e.container.$type}:${e.property}`;switch(t){case"Entry:axis":return vS;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case my:return{name:my,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case vS:return{name:vS,properties:[{name:"label"},{name:"name"}]};case lm:return{name:lm,properties:[{name:"name"},{name:"order"}]};case AS:return{name:AS,properties:[{name:"branch"}]};case LS:return{name:LS,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case cm:return{name:cm,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case yR:return{name:yR,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case xR:return{name:xR,properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case bR:return{name:bR,properties:[{name:"axis"},{name:"value"}]};case um:return{name:um,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case kR:return{name:kR,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case gy:return{name:gy,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case TR:return{name:TR,properties:[{name:"id"},{name:"in"}]};case hm:return{name:hm,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case SR:return{name:SR,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case yy:return{name:yy,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case xy:return{name:xy,properties:[{name:"end"},{name:"label"},{name:"start"}]};case by:return{name:by,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case ky:return{name:ky,properties:[{name:"label"},{name:"value"}]};case DS:return{name:DS,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case _R:return{name:_R,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case RS:return{name:RS,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},zo=new OJ,I4t=Ht(()=>bJ??(bJ=Rl(`{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"InfoGrammar"),N4t=Ht(()=>kJ??(kJ=Rl(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),M4t=Ht(()=>TJ??(TJ=Rl(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"PieGrammar"),O4t=Ht(()=>SJ??(SJ=Rl(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"ArchitectureGrammar"),P4t=Ht(()=>_J??(_J=Rl(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),B4t=Ht(()=>CJ??(CJ=Rl(`{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`)),"RadarGrammar"),F4t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$4t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},G4t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},V4t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},z4t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},W4t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Ns={AstReflection:Ht(()=>new OJ,"AstReflection")},wR={Grammar:Ht(()=>I4t(),"Grammar"),LanguageMetaData:Ht(()=>F4t,"LanguageMetaData"),parser:{}},ER={Grammar:Ht(()=>N4t(),"Grammar"),LanguageMetaData:Ht(()=>$4t,"LanguageMetaData"),parser:{}},vR={Grammar:Ht(()=>M4t(),"Grammar"),LanguageMetaData:Ht(()=>G4t,"LanguageMetaData"),parser:{}},AR={Grammar:Ht(()=>O4t(),"Grammar"),LanguageMetaData:Ht(()=>V4t,"LanguageMetaData"),parser:{}},LR={Grammar:Ht(()=>P4t(),"Grammar"),LanguageMetaData:Ht(()=>z4t,"LanguageMetaData"),parser:{}},RR={Grammar:Ht(()=>B4t(),"Grammar"),LanguageMetaData:Ht(()=>W4t,"LanguageMetaData"),parser:{}},U4t=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,j4t=/accTitle[\t ]*:([^\n\r]*)/,q4t=/title([\t ][^\n\r]*|)/,H4t={ACC_DESCR:U4t,ACC_TITLE:j4t,TITLE:q4t},fm=class extends Ah{static{a(this,"AbstractMermaidValueConverter")}static{Ht(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return n===void 0&&(n=this.runCustomConverter(e,t,r)),n===void 0?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){let n=H4t[e.name];if(n===void 0)return;let i=n.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},Dl=class extends fm{static{a(this,"CommonValueConverter")}static{Ht(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},ds=class extends Ll{static{a(this,"AbstractMermaidTokenBuilder")}static{Ht(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},Y4t=class extends ds{static{a(this,"CommonTokenBuilder")}static{Ht(this,"CommonTokenBuilder")}}});function NS(e=ji){let t=un(Ui(e),Ns),r=un(Wi({shared:t}),LR,IS);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var X4t,IS,DR=x(()=>{"use strict";ps();ca();X4t=class extends ds{static{a(this,"GitGraphTokenBuilder")}static{Ht(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},IS={parser:{TokenBuilder:Ht(()=>new X4t,"TokenBuilder"),ValueConverter:Ht(()=>new Dl,"ValueConverter")}};a(NS,"createGitGraphServices");Ht(NS,"createGitGraphServices")});function OS(e=ji){let t=un(Ui(e),Ns),r=un(Wi({shared:t}),wR,MS);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var K4t,MS,IR=x(()=>{"use strict";ps();ca();K4t=class extends ds{static{a(this,"InfoTokenBuilder")}static{Ht(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},MS={parser:{TokenBuilder:Ht(()=>new K4t,"TokenBuilder"),ValueConverter:Ht(()=>new Dl,"ValueConverter")}};a(OS,"createInfoServices");Ht(OS,"createInfoServices")});function BS(e=ji){let t=un(Ui(e),Ns),r=un(Wi({shared:t}),ER,PS);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var Q4t,PS,NR=x(()=>{"use strict";ps();ca();Q4t=class extends ds{static{a(this,"PacketTokenBuilder")}static{Ht(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},PS={parser:{TokenBuilder:Ht(()=>new Q4t,"TokenBuilder"),ValueConverter:Ht(()=>new Dl,"ValueConverter")}};a(BS,"createPacketServices");Ht(BS,"createPacketServices")});function $S(e=ji){let t=un(Ui(e),Ns),r=un(Wi({shared:t}),vR,FS);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var Z4t,J4t,FS,MR=x(()=>{"use strict";ps();ca();Z4t=class extends ds{static{a(this,"PieTokenBuilder")}static{Ht(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},J4t=class extends fm{static{a(this,"PieValueConverter")}static{Ht(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},FS={parser:{TokenBuilder:Ht(()=>new Z4t,"TokenBuilder"),ValueConverter:Ht(()=>new J4t,"ValueConverter")}};a($S,"createPieServices");Ht($S,"createPieServices")});function VS(e=ji){let t=un(Ui(e),Ns),r=un(Wi({shared:t}),AR,GS);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var tAt,eAt,GS,OR=x(()=>{"use strict";ps();ca();tAt=class extends ds{static{a(this,"ArchitectureTokenBuilder")}static{Ht(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},eAt=class extends fm{static{a(this,"ArchitectureValueConverter")}static{Ht(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return t.replace(/[[\]]/g,"").trim()}},GS={parser:{TokenBuilder:Ht(()=>new tAt,"TokenBuilder"),ValueConverter:Ht(()=>new eAt,"ValueConverter")}};a(VS,"createArchitectureServices");Ht(VS,"createArchitectureServices")});function WS(e=ji){let t=un(Ui(e),Ns),r=un(Wi({shared:t}),RR,zS);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var rAt,zS,PR=x(()=>{"use strict";ps();ca();rAt=class extends ds{static{a(this,"RadarTokenBuilder")}static{Ht(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},zS={parser:{TokenBuilder:Ht(()=>new rAt,"TokenBuilder"),ValueConverter:Ht(()=>new Dl,"ValueConverter")}};a(WS,"createRadarServices");Ht(WS,"createRadarServices")});var PJ={};Be(PJ,{InfoModule:()=>MS,createInfoServices:()=>OS});var BJ=x(()=>{"use strict";IR();ps()});var FJ={};Be(FJ,{PacketModule:()=>PS,createPacketServices:()=>BS});var $J=x(()=>{"use strict";NR();ps()});var GJ={};Be(GJ,{PieModule:()=>FS,createPieServices:()=>$S});var VJ=x(()=>{"use strict";MR();ps()});var zJ={};Be(zJ,{ArchitectureModule:()=>GS,createArchitectureServices:()=>VS});var WJ=x(()=>{"use strict";OR();ps()});var UJ={};Be(UJ,{GitGraphModule:()=>IS,createGitGraphServices:()=>NS});var jJ=x(()=>{"use strict";DR();ps()});var qJ={};Be(qJ,{RadarModule:()=>zS,createRadarServices:()=>WS});var HJ=x(()=>{"use strict";PR();ps()});async function Xa(e,t){let r=nAt[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);Wc[e]||await r();let i=Wc[e].parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new iAt(i);return i.value}var Wc,nAt,iAt,dm=x(()=>{"use strict";DR();IR();NR();MR();OR();PR();ps();Wc={},nAt={info:Ht(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(BJ(),PJ)),t=e().Info.parser.LangiumParser;Wc.info=t},"info"),packet:Ht(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>($J(),FJ)),t=e().Packet.parser.LangiumParser;Wc.packet=t},"packet"),pie:Ht(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(VJ(),GJ)),t=e().Pie.parser.LangiumParser;Wc.pie=t},"pie"),architecture:Ht(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(WJ(),zJ)),t=e().Architecture.parser.LangiumParser;Wc.architecture=t},"architecture"),gitGraph:Ht(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(jJ(),UJ)),t=e().GitGraph.parser.LangiumParser;Wc.gitGraph=t},"gitGraph"),radar:Ht(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(HJ(),qJ)),t=e().Radar.parser.LangiumParser;Wc.radar=t},"radar")};a(Xa,"parse");Ht(Xa,"parse");iAt=class extends Error{static{a(this,"MermaidParseError")}constructor(e){let t=e.lexerErrors.map(n=>n.message).join(` +`),r=e.parserErrors.map(n=>n.message).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{Ht(this,"MermaidParseError")}}});function Uc(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var Ty=x(()=>{"use strict";a(Uc,"populateCommonDb")});var gr,US=x(()=>{"use strict";gr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var pm,BR=x(()=>{"use strict";pm=class{constructor(t){this.init=t;this.records=this.init()}static{a(this,"ImperativeState")}reset(){this.records=this.init()}}});function FR(){return Uv({length:7})}function aAt(e,t){let r=Object.create(null);return e.reduce((n,i)=>{let s=t(i);return r[s]||(r[s]=!0,n.push(i)),n},[])}function YJ(e,t,r){let n=e.indexOf(t);n===-1?e.push(r):e.splice(n,1,r)}function KJ(e){let t=e.reduce((i,s)=>i.seq>s.seq?i:s,e[0]),r="";e.forEach(function(i){i===t?r+=" *":r+=" |"});let n=[r,t.id,t.seq];for(let i in Ut.records.branches)Ut.records.branches.get(i)===t.id&&n.push(i);if(P.debug(n.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let i=Ut.records.commits.get(t.parents[0]);YJ(e,t,i),t.parents[1]&&e.push(Ut.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let i=Ut.records.commits.get(t.parents[0]);YJ(e,t,i)}}e=aAt(e,i=>i.id),KJ(e)}var sAt,Mh,Ut,oAt,lAt,cAt,uAt,hAt,fAt,dAt,XJ,pAt,mAt,gAt,yAt,xAt,QJ,bAt,kAt,TAt,jS,$R=x(()=>{"use strict";zt();Ee();$n();Fe();Sn();US();BR();zs();sAt=We.gitGraph,Mh=a(()=>Nn({...sAt,...Re().gitGraph}),"getConfig"),Ut=new pm(()=>{let e=Mh(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});a(FR,"getID");a(aAt,"uniqBy");oAt=a(function(e){Ut.records.direction=e},"setDirection"),lAt=a(function(e){P.debug("options str",e),e=e?.trim(),e=e||"{}";try{Ut.records.options=JSON.parse(e)}catch(t){P.error("error while parsing gitGraph options",t.message)}},"setOptions"),cAt=a(function(){return Ut.records.options},"getOptions"),uAt=a(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags;P.info("commit",t,r,n,i),P.debug("Entering commit:",t,r,n,i);let s=Mh();r=Rt.sanitizeText(r,s),t=Rt.sanitizeText(t,s),i=i?.map(l=>Rt.sanitizeText(l,s));let o={id:r||Ut.records.seq+"-"+FR(),message:t,seq:Ut.records.seq++,type:n??gr.NORMAL,tags:i??[],parents:Ut.records.head==null?[]:[Ut.records.head.id],branch:Ut.records.currBranch};Ut.records.head=o,P.info("main branch",s.mainBranchName),Ut.records.commits.set(o.id,o),Ut.records.branches.set(Ut.records.currBranch,o.id),P.debug("in pushCommit "+o.id)},"commit"),hAt=a(function(e){let t=e.name,r=e.order;if(t=Rt.sanitizeText(t,Mh()),Ut.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);Ut.records.branches.set(t,Ut.records.head!=null?Ut.records.head.id:null),Ut.records.branchConfig.set(t,{name:t,order:r}),XJ(t),P.debug("in createBranch")},"branch"),fAt=a(e=>{let t=e.branch,r=e.id,n=e.type,i=e.tags,s=Mh();t=Rt.sanitizeText(t,s),r&&(r=Rt.sanitizeText(r,s));let o=Ut.records.branches.get(Ut.records.currBranch),l=Ut.records.branches.get(t),u=o?Ut.records.commits.get(o):void 0,h=l?Ut.records.commits.get(l):void 0;if(u&&h&&u.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(Ut.records.currBranch===t){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${Ut.records.currBranch})has no commits`);throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},p}if(!Ut.records.branches.has(t)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(r&&Ut.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw p.hash={text:`merge ${t} ${r} ${n} ${i?.join(" ")}`,token:`merge ${t} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},p}let f=l||"",d={id:r||`${Ut.records.seq}-${FR()}`,message:`merged branch ${t} into ${Ut.records.currBranch}`,seq:Ut.records.seq++,parents:Ut.records.head==null?[]:[Ut.records.head.id,f],branch:Ut.records.currBranch,type:gr.MERGE,customType:n,customId:!!r,tags:i??[]};Ut.records.head=d,Ut.records.commits.set(d.id,d),Ut.records.branches.set(Ut.records.currBranch,d.id),P.debug(Ut.records.branches),P.debug("in mergeBranch")},"merge"),dAt=a(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent;P.debug("Entering cherryPick:",t,r,n);let s=Mh();if(t=Rt.sanitizeText(t,s),r=Rt.sanitizeText(r,s),n=n?.map(u=>Rt.sanitizeText(u,s)),i=Rt.sanitizeText(i,s),!t||!Ut.records.commits.has(t)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},u}let o=Ut.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=o.branch;if(o.type===gr.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!Ut.records.commits.has(r)){if(l===Ut.records.currBranch){let d=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw d.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},d}let u=Ut.records.branches.get(Ut.records.currBranch);if(u===void 0||!u){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${Ut.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},d}let h=Ut.records.commits.get(u);if(h===void 0||!h){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${Ut.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},d}let f={id:Ut.records.seq+"-"+FR(),message:`cherry-picked ${o?.message} into ${Ut.records.currBranch}`,seq:Ut.records.seq++,parents:Ut.records.head==null?[]:[Ut.records.head.id,o.id],branch:Ut.records.currBranch,type:gr.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===gr.MERGE?`|parent:${i}`:""}`]};Ut.records.head=f,Ut.records.commits.set(f.id,f),Ut.records.branches.set(Ut.records.currBranch,f.id),P.debug(Ut.records.branches),P.debug("in cherryPick")}},"cherryPick"),XJ=a(function(e){if(e=Rt.sanitizeText(e,Mh()),Ut.records.branches.has(e)){Ut.records.currBranch=e;let t=Ut.records.branches.get(Ut.records.currBranch);t===void 0||!t?Ut.records.head=null:Ut.records.head=Ut.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");a(YJ,"upsert");a(KJ,"prettyPrintCommitHistory");pAt=a(function(){P.debug(Ut.records.commits);let e=QJ()[0];KJ([e])},"prettyPrint"),mAt=a(function(){Ut.reset(),Ye()},"clear"),gAt=a(function(){return[...Ut.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),yAt=a(function(){return Ut.records.branches},"getBranches"),xAt=a(function(){return Ut.records.commits},"getCommits"),QJ=a(function(){let e=[...Ut.records.commits.values()];return e.forEach(function(t){P.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),bAt=a(function(){return Ut.records.currBranch},"getCurrentBranch"),kAt=a(function(){return Ut.records.direction},"getDirection"),TAt=a(function(){return Ut.records.head},"getHead"),jS={commitType:gr,getConfig:Mh,setDirection:oAt,setOptions:lAt,getOptions:cAt,commit:uAt,branch:hAt,merge:fAt,cherryPick:dAt,checkout:XJ,prettyPrint:pAt,clear:mAt,getBranchesAsObjArray:gAt,getBranches:yAt,getCommits:xAt,getCommitsArray:QJ,getCurrentBranch:bAt,getDirection:kAt,getHead:TAt,setAccTitle:rr,getAccTitle:ir,getAccDescription:ar,setAccDescription:sr,setDiagramTitle:xr,getDiagramTitle:or}});var SAt,_At,CAt,wAt,EAt,vAt,AAt,ZJ,JJ=x(()=>{"use strict";dm();zt();Ty();$R();US();SAt=a((e,t)=>{Uc(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)_At(r,t)},"populate"),_At=a((e,t)=>{let n={Commit:a(i=>t.commit(CAt(i)),"Commit"),Branch:a(i=>t.branch(wAt(i)),"Branch"),Merge:a(i=>t.merge(EAt(i)),"Merge"),Checkout:a(i=>t.checkout(vAt(i)),"Checkout"),CherryPicking:a(i=>t.cherryPick(AAt(i)),"CherryPicking")}[e.$type];n?n(e):P.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),CAt=a(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?gr[e.type]:gr.NORMAL,tags:e.tags??void 0}),"parseCommit"),wAt=a(e=>({name:e.name,order:e.order??0}),"parseBranch"),EAt=a(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?gr[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),vAt=a(e=>e.branch,"parseCheckout"),AAt=a(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),ZJ={parse:a(async e=>{let t=await Xa("gitGraph",e);P.debug(t),SAt(t,jS)},"parse")}});var LAt,ha,qc,Hc,Wo,Il,Oh,ms,gs,qS,Sy,HS,jc,Qe,RAt,ett,rtt,DAt,IAt,NAt,MAt,OAt,PAt,BAt,FAt,$At,GAt,VAt,zAt,ttt,WAt,_y,UAt,jAt,qAt,HAt,YAt,ntt,itt=x(()=>{"use strict";$e();pe();zt();Ee();US();LAt=Y(),ha=LAt?.gitGraph,qc=10,Hc=40,Wo=4,Il=2,Oh=8,ms=new Map,gs=new Map,qS=30,Sy=new Map,HS=[],jc=0,Qe="LR",RAt=a(()=>{ms.clear(),gs.clear(),Sy.clear(),jc=0,HS=[],Qe="LR"},"clear"),ett=a(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),t.appendChild(i)}),t},"drawText"),rtt=a(e=>{let t,r,n;return Qe==="BT"?(r=a((i,s)=>i<=s,"comparisonFunc"),n=1/0):(r=a((i,s)=>i>=s,"comparisonFunc"),n=0),e.forEach(i=>{let s=Qe==="TB"||Qe=="BT"?gs.get(i)?.y:gs.get(i)?.x;s!==void 0&&r(s,n)&&(t=i,n=s)}),t},"findClosestParent"),DAt=a(e=>{let t="",r=1/0;return e.forEach(n=>{let i=gs.get(n).y;i<=r&&(t=n,r=i)}),t||void 0},"findClosestParentBT"),IAt=a((e,t,r)=>{let n=r,i=r,s=[];e.forEach(o=>{let l=t.get(o);if(!l)throw new Error(`Commit not found for key ${o}`);l.parents.length?(n=MAt(l),i=Math.max(n,i)):s.push(l),OAt(l,n)}),n=i,s.forEach(o=>{PAt(o,n,r)}),e.forEach(o=>{let l=t.get(o);if(l?.parents.length){let u=DAt(l.parents);n=gs.get(u).y-Hc,n<=i&&(i=n);let h=ms.get(l.branch).pos,f=n-qc;gs.set(l.id,{x:h,y:f})}})},"setParallelBTPos"),NAt=a(e=>{let t=rtt(e.parents.filter(n=>n!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=gs.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),MAt=a(e=>NAt(e)+Hc,"calculateCommitPosition"),OAt=a((e,t)=>{let r=ms.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let n=r.pos,i=t+qc;return gs.set(e.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),PAt=a((e,t,r)=>{let n=ms.get(e.branch);if(!n)throw new Error(`Branch not found for commit ${e.id}`);let i=t+r,s=n.pos;gs.set(e.id,{x:s,y:i})},"setRootPosition"),BAt=a((e,t,r,n,i,s)=>{if(s===gr.HIGHLIGHT)e.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${i%Oh} ${n}-outer`),e.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${i%Oh} ${n}-inner`);else if(s===gr.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${n}`);else{let o=e.append("circle");if(o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",t.type===gr.MERGE?9:10),o.attr("class",`commit ${t.id} commit${i%Oh}`),s===gr.MERGE){let l=e.append("circle");l.attr("cx",r.x),l.attr("cy",r.y),l.attr("r",6),l.attr("class",`commit ${n} ${t.id} commit${i%Oh}`)}s===gr.REVERSE&&e.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${t.id} commit${i%Oh}`)}},"drawCommitBullet"),FAt=a((e,t,r,n)=>{if(t.type!==gr.CHERRY_PICK&&(t.customId&&t.type===gr.MERGE||t.type!==gr.MERGE)&&ha?.showCommitLabel){let i=e.append("g"),s=i.insert("rect").attr("class","commit-label-bkg"),o=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id),l=o.node()?.getBBox();if(l&&(s.attr("x",r.posWithOffset-l.width/2-Il).attr("y",r.y+13.5).attr("width",l.width+2*Il).attr("height",l.height+2*Il),Qe==="TB"||Qe==="BT"?(s.attr("x",r.x-(l.width+4*Wo+5)).attr("y",r.y-12),o.attr("x",r.x-(l.width+4*Wo)).attr("y",r.y+l.height-12)):o.attr("x",r.posWithOffset-l.width/2),ha.rotateCommitLabel))if(Qe==="TB"||Qe==="BT")o.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),s.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;i.attr("transform","translate("+u+", "+h+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),$At=a((e,t,r,n)=>{if(t.tags.length>0){let i=0,s=0,o=0,l=[];for(let u of t.tags.reverse()){let h=e.insert("polygon"),f=e.append("circle"),d=e.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=d.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");s=Math.max(s,p.width),o=Math.max(o,p.height),d.attr("x",r.posWithOffset-p.width/2),l.push({tag:d,hole:f,rect:h,yOffset:i}),i+=20}for(let{tag:u,hole:h,rect:f,yOffset:d}of l){let p=o/2,m=r.y-19.2-d;if(f.attr("class","tag-label-bkg").attr("points",` + ${n-s/2-Wo/2},${m+Il} + ${n-s/2-Wo/2},${m-Il} + ${r.posWithOffset-s/2-Wo},${m-p-Il} + ${r.posWithOffset+s/2+Wo},${m-p-Il} + ${r.posWithOffset+s/2+Wo},${m+p+Il} + ${r.posWithOffset-s/2-Wo},${m+p+Il}`),h.attr("cy",m).attr("cx",n-s/2+Wo/2).attr("r",1.5).attr("class","tag-hole"),Qe==="TB"||Qe==="BT"){let g=n+d;f.attr("class","tag-label-bkg").attr("points",` + ${r.x},${g+2} + ${r.x},${g-2} + ${r.x+qc},${g-p-2} + ${r.x+qc+s+4},${g-p-2} + ${r.x+qc+s+4},${g+p+2} + ${r.x+qc},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+Wo/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),GAt=a(e=>{switch(e.customType??e.type){case gr.NORMAL:return"commit-normal";case gr.REVERSE:return"commit-reverse";case gr.HIGHLIGHT:return"commit-highlight";case gr.MERGE:return"commit-merge";case gr.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),VAt=a((e,t,r,n)=>{let i={x:0,y:0};if(e.parents.length>0){let s=rtt(e.parents);if(s){let o=n.get(s)??i;return t==="TB"?o.y+Hc:t==="BT"?(n.get(e.id)??i).y-Hc:o.x+Hc}}else return t==="TB"?qS:t==="BT"?(n.get(e.id)??i).y-Hc:0;return 0},"calculatePosition"),zAt=a((e,t,r)=>{let n=Qe==="BT"&&r?t:t+qc,i=Qe==="TB"||Qe==="BT"?n:ms.get(e.branch)?.pos,s=Qe==="TB"||Qe==="BT"?ms.get(e.branch)?.pos:n;if(s===void 0||i===void 0)throw new Error(`Position were undefined for commit ${e.id}`);return{x:s,y:i,posWithOffset:n}},"getCommitPosition"),ttt=a((e,t,r)=>{if(!ha)throw new Error("GitGraph config not found");let n=e.append("g").attr("class","commit-bullets"),i=e.append("g").attr("class","commit-labels"),s=Qe==="TB"||Qe==="BT"?qS:0,o=[...t.keys()],l=ha?.parallelCommits??!1,u=a((f,d)=>{let p=t.get(f)?.seq,m=t.get(d)?.seq;return p!==void 0&&m!==void 0?p-m:0},"sortKeys"),h=o.sort(u);Qe==="BT"&&(l&&IAt(h,t,s),h=h.reverse()),h.forEach(f=>{let d=t.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(s=VAt(d,Qe,s,gs));let p=zAt(d,s,l);if(r){let m=GAt(d),g=d.customType??d.type,y=ms.get(d.branch)?.index??0;BAt(n,d,p,m,y,g),FAt(i,d,p,s),$At(i,d,p,s)}Qe==="TB"||Qe==="BT"?gs.set(d.id,{x:p.x,y:p.posWithOffset}):gs.set(d.id,{x:p.posWithOffset,y:p.y}),s=Qe==="BT"&&l?s+Hc:s+Hc+qc,s>jc&&(jc=s)})},"drawCommits"),WAt=a((e,t,r,n,i)=>{let o=(Qe==="TB"||Qe==="BT"?r.xh.branch===o,"isOnBranchToGetCurve"),u=a(h=>h.seq>e.seq&&h.sequ(h)&&l(h))},"shouldRerouteArrow"),_y=a((e,t,r=0)=>{let n=e+Math.abs(e-t)/2;if(r>5)return n;if(HS.every(o=>Math.abs(o-n)>=10))return HS.push(n),n;let s=Math.abs(e-t);return _y(e,t-s/5,r+1)},"findLane"),UAt=a((e,t,r,n)=>{let i=gs.get(t.id),s=gs.get(r.id);if(i===void 0||s===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let o=WAt(t,r,i,s,n),l="",u="",h=0,f=0,d=ms.get(r.branch)?.index;r.type===gr.MERGE&&t.id!==r.parents[0]&&(d=ms.get(t.branch)?.index);let p;if(o){l="A 10 10, 0, 0, 0,",u="A 10 10, 0, 0, 1,",h=10,f=10;let m=i.ys.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===gr.MERGE&&t.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${s.y-h} ${u} ${i.x-f} ${s.y} L ${s.x} ${s.y}`:p=`M ${i.x} ${i.y} L ${s.x+h} ${i.y} ${l} ${s.x} ${i.y+f} L ${s.x} ${s.y}`),i.x===s.x&&(p=`M ${i.x} ${i.y} L ${s.x} ${s.y}`)):Qe==="BT"?(i.xs.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===gr.MERGE&&t.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${s.y+h} ${l} ${i.x-f} ${s.y} L ${s.x} ${s.y}`:p=`M ${i.x} ${i.y} L ${s.x-h} ${i.y} ${l} ${s.x} ${i.y-f} L ${s.x} ${s.y}`),i.x===s.x&&(p=`M ${i.x} ${i.y} L ${s.x} ${s.y}`)):(i.ys.y&&(r.type===gr.MERGE&&t.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${s.x-h} ${i.y} ${l} ${s.x} ${i.y-f} L ${s.x} ${s.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${s.y+h} ${u} ${i.x+f} ${s.y} L ${s.x} ${s.y}`),i.y===s.y&&(p=`M ${i.x} ${i.y} L ${s.x} ${s.y}`));if(p===void 0)throw new Error("Line definition not found");e.append("path").attr("d",p).attr("class","arrow arrow"+d%Oh)},"drawArrow"),jAt=a((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(n=>{let i=t.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(s=>{UAt(r,t.get(s),i,t)})})},"drawArrows"),qAt=a((e,t)=>{let r=e.append("g");t.forEach((n,i)=>{let s=i%Oh,o=ms.get(n.name)?.pos;if(o===void 0)throw new Error(`Position not found for branch ${n.name}`);let l=r.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",jc),l.attr("y2",o),l.attr("class","branch branch"+s),Qe==="TB"?(l.attr("y1",qS),l.attr("x1",o),l.attr("y2",jc),l.attr("x2",o)):Qe==="BT"&&(l.attr("y1",jc),l.attr("x1",o),l.attr("y2",qS),l.attr("x2",o)),HS.push(o);let u=n.name,h=ett(u),f=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+s);p.node().appendChild(h);let m=h.getBBox();f.attr("class","branchLabelBkg label"+s).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(ha?.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(ha?.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),Qe==="TB"?(f.attr("x",o-m.width/2-10).attr("y",0),p.attr("transform","translate("+(o-m.width/2-5)+", 0)")):Qe==="BT"?(f.attr("x",o-m.width/2-10).attr("y",jc),p.attr("transform","translate("+(o-m.width/2-5)+", "+jc+")")):f.attr("transform","translate(-19, "+(o-m.height/2)+")")})},"drawBranches"),HAt=a(function(e,t,r,n,i){return ms.set(e,{pos:t,index:r}),t+=50+(i?40:0)+(Qe==="TB"||Qe==="BT"?n.width/2:0),t},"setBranchPosition"),YAt=a(function(e,t,r,n){if(RAt(),P.debug("in gitgraph renderer",e+` +`,"id:",t,r),!ha)throw new Error("GitGraph config not found");let i=ha.rotateCommitLabel??!1,s=n.db;Sy=s.getCommits();let o=s.getBranchesAsObjArray();Qe=s.getDirection();let l=xt(`[id="${t}"]`),u=0;o.forEach((h,f)=>{let d=ett(h.name),p=l.append("g"),m=p.insert("g").attr("class","branchLabel"),g=m.insert("g").attr("class","label branch-label");g.node()?.appendChild(d);let y=d.getBBox();u=HAt(h.name,u,f,y,i),g.remove(),m.remove(),p.remove()}),ttt(l,Sy,!1),ha.showBranches&&qAt(l,o),jAt(l,Sy),ttt(l,Sy,!0),se.insertTitle(l,"gitTitleText",ha.titleTopMargin??0,s.getDiagramTitle()),rw(void 0,l,ha.diagramPadding,ha.useMaxWidth)},"draw"),ntt={draw:YAt}});var XAt,stt,att=x(()=>{"use strict";XAt=a(e=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(t=>` + .branch-label${t} { fill: ${e["gitBranchLabel"+t]}; } + .commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; } + .commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; } + .label${t} { fill: ${e["git"+t]}; } + .arrow${t} { stroke: ${e["git"+t]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${e.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + } + .commit-reverse { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`,"getStyles"),stt=XAt});var ott={};Be(ott,{diagram:()=>KAt});var KAt,ltt=x(()=>{"use strict";JJ();$R();itt();att();KAt={parser:ZJ,db:jS,renderer:ntt,styles:stt}});var GR,htt,ftt=x(()=>{"use strict";GR=function(){var e=a(function(R,B,I,M){for(I=I||{},M=R.length;M--;I[R[M]]=B);return I},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],s=[1,29],o=[1,30],l=[1,31],u=[1,32],h=[1,33],f=[1,34],d=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],b=[1,14],k=[1,15],T=[1,16],_=[1,19],L=[1,20],C=[1,21],D=[1,22],$=[1,23],w=[1,25],A=[1,35],F={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:a(function(B,I,M,O,N,E,V){var G=E.length-1;switch(N){case 1:return E[G-1];case 2:this.$=[];break;case 3:E[G-1].push(E[G]),this.$=E[G-1];break;case 4:case 5:this.$=E[G];break;case 6:case 7:this.$=[];break;case 8:O.setWeekday("monday");break;case 9:O.setWeekday("tuesday");break;case 10:O.setWeekday("wednesday");break;case 11:O.setWeekday("thursday");break;case 12:O.setWeekday("friday");break;case 13:O.setWeekday("saturday");break;case 14:O.setWeekday("sunday");break;case 15:O.setWeekend("friday");break;case 16:O.setWeekend("saturday");break;case 17:O.setDateFormat(E[G].substr(11)),this.$=E[G].substr(11);break;case 18:O.enableInclusiveEndDates(),this.$=E[G].substr(18);break;case 19:O.TopAxis(),this.$=E[G].substr(8);break;case 20:O.setAxisFormat(E[G].substr(11)),this.$=E[G].substr(11);break;case 21:O.setTickInterval(E[G].substr(13)),this.$=E[G].substr(13);break;case 22:O.setExcludes(E[G].substr(9)),this.$=E[G].substr(9);break;case 23:O.setIncludes(E[G].substr(9)),this.$=E[G].substr(9);break;case 24:O.setTodayMarker(E[G].substr(12)),this.$=E[G].substr(12);break;case 27:O.setDiagramTitle(E[G].substr(6)),this.$=E[G].substr(6);break;case 28:this.$=E[G].trim(),O.setAccTitle(this.$);break;case 29:case 30:this.$=E[G].trim(),O.setAccDescription(this.$);break;case 31:O.addSection(E[G].substr(8)),this.$=E[G].substr(8);break;case 33:O.addTask(E[G-1],E[G]),this.$="task";break;case 34:this.$=E[G-1],O.setClickEvent(E[G-1],E[G],null);break;case 35:this.$=E[G-2],O.setClickEvent(E[G-2],E[G-1],E[G]);break;case 36:this.$=E[G-2],O.setClickEvent(E[G-2],E[G-1],null),O.setLink(E[G-2],E[G]);break;case 37:this.$=E[G-3],O.setClickEvent(E[G-3],E[G-2],E[G-1]),O.setLink(E[G-3],E[G]);break;case 38:this.$=E[G-2],O.setClickEvent(E[G-2],E[G],null),O.setLink(E[G-2],E[G-1]);break;case 39:this.$=E[G-3],O.setClickEvent(E[G-3],E[G-1],E[G]),O.setLink(E[G-3],E[G-2]);break;case 40:this.$=E[G-1],O.setLink(E[G-1],E[G]);break;case 41:case 47:this.$=E[G-1]+" "+E[G];break;case 42:case 43:case 45:this.$=E[G-2]+" "+E[G-1]+" "+E[G];break;case 44:case 46:this.$=E[G-3]+" "+E[G-2]+" "+E[G-1]+" "+E[G];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:s,16:o,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:b,28:k,29:T,30:_,31:L,33:C,35:D,36:$,37:24,38:w,40:A},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:s,16:o,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:b,28:k,29:T,30:_,31:L,33:C,35:D,36:$,37:24,38:w,40:A},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:a(function(B,I){if(I.recoverable)this.trace(B);else{var M=new Error(B);throw M.hash=I,M}},"parseError"),parse:a(function(B){var I=this,M=[0],O=[],N=[null],E=[],V=this.table,G="",J=0,rt=0,nt=0,ct=2,pt=1,Lt=E.slice.call(arguments,1),bt=Object.create(this.lexer),ut={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(ut.yy[it]=this.yy[it]);bt.setInput(B,ut.yy),ut.yy.lexer=bt,ut.yy.parser=this,typeof bt.yylloc>"u"&&(bt.yylloc={});var st=bt.yylloc;E.push(st);var X=bt.options&&bt.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(ht){M.length=M.length-2*ht,N.length=N.length-ht,E.length=E.length-ht}a(H,"popStack");function at(){var ht;return ht=O.pop()||bt.lex()||pt,typeof ht!="number"&&(ht instanceof Array&&(O=ht,ht=O.pop()),ht=I.symbols_[ht]||ht),ht}a(at,"lex");for(var W,mt,q,Z,ye,ot,Jt={},ve,te,vt,It;;){if(q=M[M.length-1],this.defaultActions[q]?Z=this.defaultActions[q]:((W===null||typeof W>"u")&&(W=at()),Z=V[q]&&V[q][W]),typeof Z>"u"||!Z.length||!Z[0]){var yt="";It=[];for(ve in V[q])this.terminals_[ve]&&ve>ct&&It.push("'"+this.terminals_[ve]+"'");bt.showPosition?yt="Parse error on line "+(J+1)+`: +`+bt.showPosition()+` +Expecting `+It.join(", ")+", got '"+(this.terminals_[W]||W)+"'":yt="Parse error on line "+(J+1)+": Unexpected "+(W==pt?"end of input":"'"+(this.terminals_[W]||W)+"'"),this.parseError(yt,{text:bt.match,token:this.terminals_[W]||W,line:bt.yylineno,loc:st,expected:It})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+W);switch(Z[0]){case 1:M.push(W),N.push(bt.yytext),E.push(bt.yylloc),M.push(Z[1]),W=null,mt?(W=mt,mt=null):(rt=bt.yyleng,G=bt.yytext,J=bt.yylineno,st=bt.yylloc,nt>0&&nt--);break;case 2:if(te=this.productions_[Z[1]][1],Jt.$=N[N.length-te],Jt._$={first_line:E[E.length-(te||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(te||1)].first_column,last_column:E[E.length-1].last_column},X&&(Jt._$.range=[E[E.length-(te||1)].range[0],E[E.length-1].range[1]]),ot=this.performAction.apply(Jt,[G,rt,J,ut.yy,Z[1],N,E].concat(Lt)),typeof ot<"u")return ot;te&&(M=M.slice(0,-1*te*2),N=N.slice(0,-1*te),E=E.slice(0,-1*te)),M.push(this.productions_[Z[1]][0]),N.push(Jt.$),E.push(Jt._$),vt=V[M[M.length-2]][M[M.length-1]],M.push(vt);break;case 3:return!0}}return!0},"parse")},S=function(){var R={EOF:1,parseError:a(function(I,M){if(this.yy.parser)this.yy.parser.parseError(I,M);else throw new Error(I)},"parseError"),setInput:a(function(B,I){return this.yy=I||this.yy||{},this._input=B,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:a(function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var I=B.match(/(?:\r\n?|\n).*/g);return I?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},"input"),unput:a(function(B){var I=B.length,M=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var O=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),M.length-1&&(this.yylineno-=M.length-1);var N=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:M?(M.length===O.length?this.yylloc.first_column:0)+O[O.length-M.length].length-M[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(B){this.unput(this.match.slice(B))},"less"),pastInput:a(function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var B=this.pastInput(),I=new Array(B.length+1).join("-");return B+this.upcomingInput()+` +`+I+"^"},"showPosition"),test_match:a(function(B,I){var M,O,N;if(this.options.backtrack_lexer&&(N={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&&(N.yylloc.range=this.yylloc.range.slice(0))),O=B[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,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(B[0].length),this.matched+=B[0],M=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var E in N)this[E]=N[E];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,I,M,O;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),E=0;EI[0].length)){if(I=M,O=E,this.options.backtrack_lexer){if(B=this.test_match(M,N[E]),B!==!1)return B;if(this._backtrack){I=!1;continue}else return!1}else if(!this.options.flex)break}return I?(B=this.test_match(I,N[O]),B!==!1?B:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var I=this.next();return I||this.lex()},"lex"),begin:a(function(I){this.conditionStack.push(I)},"begin"),popState:a(function(){var I=this.conditionStack.length-1;return I>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(I){return I=this.conditionStack.length-1-Math.abs(I||0),I>=0?this.conditionStack[I]:"INITIAL"},"topState"),pushState:a(function(I){this.begin(I)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(I,M,O,N){var E=N;switch(O){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return R}();F.lexer=S;function v(){this.yy={}}return a(v,"Parser"),v.prototype=F,F.Parser=v,new v}();GR.parser=GR;htt=GR});var dtt=bs((VR,zR)=>{"use strict";(function(e,t){typeof VR=="object"&&typeof zR<"u"?zR.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(VR,function(){"use strict";var e="day";return function(t,r,n){var i=a(function(l){return l.add(4-l.isoWeekday(),e)},"a"),s=r.prototype;s.isoWeekYear=function(){return i(this).year()},s.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),e);var u,h,f,d,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,f=(h?n.utc:n)().year(u).startOf("year"),d=4-f.isoWeekday(),f.isoWeekday()>4&&(d+=7),f.add(d,e));return p.diff(m,"week")+1},s.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var o=s.startOf;s.startOf=function(l,u){var h=this.$utils(),f=!!h.u(u)||u;return h.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(l,u)}}})});var ptt=bs((WR,UR)=>{"use strict";(function(e,t){typeof WR=="object"&&typeof UR<"u"?UR.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(WR,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,o={},l=a(function(g){return(g=+g)+(g>68?1900:2e3)},"a"),u=a(function(g){return function(y){this[g]=+y}},"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var b=y.match(/([+-]|\d\d)/g),k=60*b[1]+(+b[2]||0);return k===0?0:b[0]==="+"?-k:k}(g)}],f=a(function(g){var y=o[g];return y&&(y.indexOf?y:y.s.concat(y.f))},"u"),d=a(function(g,y){var b,k=o.meridiem;if(k){for(var T=1;T<=24;T+=1)if(g.indexOf(k(T,0,y))>-1){b=T>12;break}}else b=g===(y?"pm":"PM");return b},"d"),p={A:[s,function(g){this.afternoon=d(g,!1)}],a:[s,function(g){this.afternoon=d(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[s,function(g){var y=o.ordinal,b=g.match(/\d+/);if(this.day=b[0],y)for(var k=1;k<=31;k+=1)y(k).replace(/\[|\]/g,"")===g&&(this.day=k)}],w:[i,u("week")],ww:[n,u("week")],M:[i,u("month")],MM:[n,u("month")],MMM:[s,function(g){var y=f("months"),b=(f("monthsShort")||y.map(function(k){return k.slice(0,3)})).indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[s,function(g){var y=f("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=l(g)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function m(g){var y,b;y=g,b=o&&o.formats;for(var k=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,A,F){var S=F&&F.toUpperCase();return A||b[F]||e[F]||b[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,R,B){return R||B.slice(1)})})).match(t),T=k.length,_=0;_-1)return new Date((M==="X"?1e3:1)*I);var E=m(M)(I),V=E.year,G=E.month,J=E.day,rt=E.hours,nt=E.minutes,ct=E.seconds,pt=E.milliseconds,Lt=E.zone,bt=E.week,ut=new Date,it=J||(V||G?1:ut.getDate()),st=V||ut.getFullYear(),X=0;V&&!G||(X=G>0?G-1:ut.getMonth());var H,at=rt||0,W=nt||0,mt=ct||0,q=pt||0;return Lt?new Date(Date.UTC(st,X,it,at,W,mt,q+60*Lt.offset*1e3)):O?new Date(Date.UTC(st,X,it,at,W,mt,q)):(H=new Date(st,X,it,at,W,mt,q),bt&&(H=N(H).week(bt).toDate()),H)}catch{return new Date("")}}(L,$,C,b),this.init(),S&&S!==!0&&(this.$L=this.locale(S).$L),F&&L!=this.format($)&&(this.$d=new Date("")),o={}}else if($ instanceof Array)for(var v=$.length,R=1;R<=v;R+=1){D[1]=$[R-1];var B=b.apply(this,D);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}R===v&&(this.$d=new Date(""))}else T.call(this,_)}}})});var mtt=bs((jR,qR)=>{"use strict";(function(e,t){typeof jR=="object"&&typeof qR<"u"?qR.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})(jR,function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(i){var s=this,o=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return o.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return o.ordinal(s.week(),"W");case"w":case"ww":return l.s(s.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(s.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(s.$H===0?24:s.$H),h==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return h}});return n.bind(this)(u)}}})});function Dtt(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let s="^\\s*"+i+"\\s*$",o=new RegExp(s);e[0].match(o)&&(t[i]=!0,e.shift(1),n=!0)})}var xtt,Ms,btt,ktt,Ttt,gtt,Uo,KR,QR,ZR,Cy,wy,JR,tD,KS,gm,eD,Stt,rD,Ey,nD,iD,QS,HR,t5t,e5t,r5t,n5t,i5t,s5t,a5t,o5t,l5t,c5t,u5t,h5t,f5t,d5t,p5t,m5t,g5t,y5t,x5t,b5t,k5t,T5t,S5t,_tt,_5t,C5t,w5t,Ctt,E5t,YR,wtt,Ett,YS,mm,v5t,A5t,XR,XS,Pn,vtt,L5t,Ph,R5t,ytt,D5t,Att,I5t,Ltt,N5t,M5t,Rtt,Itt=x(()=>{"use strict";xtt=Ki(Df(),1),Ms=Ki(Hy(),1),btt=Ki(dtt(),1),ktt=Ki(ptt(),1),Ttt=Ki(mtt(),1);zt();pe();Ee();Sn();Ms.default.extend(btt.default);Ms.default.extend(ktt.default);Ms.default.extend(Ttt.default);gtt={friday:5,saturday:6},Uo="",KR="",ZR="",Cy=[],wy=[],JR=new Map,tD=[],KS=[],gm="",eD="",Stt=["active","done","crit","milestone"],rD=[],Ey=!1,nD=!1,iD="sunday",QS="saturday",HR=0,t5t=a(function(){tD=[],KS=[],gm="",rD=[],YS=0,XR=void 0,XS=void 0,Pn=[],Uo="",KR="",eD="",QR=void 0,ZR="",Cy=[],wy=[],Ey=!1,nD=!1,HR=0,JR=new Map,Ye(),iD="sunday",QS="saturday"},"clear"),e5t=a(function(e){KR=e},"setAxisFormat"),r5t=a(function(){return KR},"getAxisFormat"),n5t=a(function(e){QR=e},"setTickInterval"),i5t=a(function(){return QR},"getTickInterval"),s5t=a(function(e){ZR=e},"setTodayMarker"),a5t=a(function(){return ZR},"getTodayMarker"),o5t=a(function(e){Uo=e},"setDateFormat"),l5t=a(function(){Ey=!0},"enableInclusiveEndDates"),c5t=a(function(){return Ey},"endDatesAreInclusive"),u5t=a(function(){nD=!0},"enableTopAxis"),h5t=a(function(){return nD},"topAxisEnabled"),f5t=a(function(e){eD=e},"setDisplayMode"),d5t=a(function(){return eD},"getDisplayMode"),p5t=a(function(){return Uo},"getDateFormat"),m5t=a(function(e){Cy=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),g5t=a(function(){return Cy},"getIncludes"),y5t=a(function(e){wy=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),x5t=a(function(){return wy},"getExcludes"),b5t=a(function(){return JR},"getLinks"),k5t=a(function(e){gm=e,tD.push(e)},"addSection"),T5t=a(function(){return tD},"getSections"),S5t=a(function(){let e=ytt(),t=10,r=0;for(;!e&&r[\d\w- ]+)/.exec(r);if(i!==null){let o=null;for(let u of i.groups.ids.split(" ")){let h=Ph(u);h!==void 0&&(!o||h.endTime>o.endTime)&&(o=h)}if(o)return o.endTime;let l=new Date;return l.setHours(0,0,0,0),l}let s=(0,Ms.default)(r,t.trim(),!0);if(s.isValid())return s.toDate();{P.debug("Invalid date:"+r),P.debug("With date format:"+t.trim());let o=new Date(r);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+r);return o}},"getStartDate"),wtt=a(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Ett=a(function(e,t,r,n=!1){r=r.trim();let s=/^until\s+(?[\d\w- ]+)/.exec(r);if(s!==null){let f=null;for(let p of s.groups.ids.split(" ")){let m=Ph(p);m!==void 0&&(!f||m.startTime{window.open(r,"_self")}),JR.set(n,r))}),Att(e,"clickable")},"setLink"),Att=a(function(e,t){e.split(",").forEach(function(r){let n=Ph(r);n!==void 0&&n.classes.push(t)})},"setClass"),I5t=a(function(e,t,r){if(Y().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s{se.runFunc(t,...n)})},"setClickFun"),Ltt=a(function(e,t){rD.push(function(){let r=document.querySelector(`[id="${e}"]`);r!==null&&r.addEventListener("click",function(){t()})},function(){let r=document.querySelector(`[id="${e}-text"]`);r!==null&&r.addEventListener("click",function(){t()})})},"pushFun"),N5t=a(function(e,t,r){e.split(",").forEach(function(n){I5t(n,t,r)}),Att(e,"clickable")},"setClickEvent"),M5t=a(function(e){rD.forEach(function(t){t(e)})},"bindFunctions"),Rtt={getConfig:a(()=>Y().gantt,"getConfig"),clear:t5t,setDateFormat:o5t,getDateFormat:p5t,enableInclusiveEndDates:l5t,endDatesAreInclusive:c5t,enableTopAxis:u5t,topAxisEnabled:h5t,setAxisFormat:e5t,getAxisFormat:r5t,setTickInterval:n5t,getTickInterval:i5t,setTodayMarker:s5t,getTodayMarker:a5t,setAccTitle:rr,getAccTitle:ir,setDiagramTitle:xr,getDiagramTitle:or,setDisplayMode:f5t,getDisplayMode:d5t,setAccDescription:sr,getAccDescription:ar,addSection:k5t,getSections:T5t,getTasks:S5t,addTask:L5t,findTaskById:Ph,addTaskOrg:R5t,setIncludes:m5t,getIncludes:g5t,setExcludes:y5t,getExcludes:x5t,setClickEvent:N5t,setLink:D5t,getLinks:b5t,bindFunctions:M5t,parseDuration:wtt,isInvalidDate:_tt,setWeekday:_5t,getWeekday:C5t,setWeekend:w5t};a(Dtt,"getTaskTags")});var ZS,O5t,Ntt,P5t,Nl,B5t,Mtt,Ott=x(()=>{"use strict";ZS=Ki(Hy(),1);zt();$e();Fe();pe();Gn();O5t=a(function(){P.debug("Something is calling, setConf, remove the call")},"setConf"),Ntt={monday:nc,tuesday:u2,wednesday:h2,thursday:lo,friday:f2,saturday:d2,sunday:va},P5t=a((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((s,o)=>s.startTime-o.startTime||s.order-o.order),i=0;for(let s of n)for(let o=0;o=r[o]){r[o]=s.endTime,s.order=o+t,o>i&&(i=o);break}return i},"getMaxIntersections"),B5t=a(function(e,t,r,n){let i=Y().gantt,s=Y().securityLevel,o;s==="sandbox"&&(o=xt("#i"+t));let l=s==="sandbox"?xt(o.nodes()[0].contentDocument.body):xt("body"),u=s==="sandbox"?o.nodes()[0].contentDocument:document,h=u.getElementById(t);Nl=h.parentElement.offsetWidth,Nl===void 0&&(Nl=1200),i.useWidth!==void 0&&(Nl=i.useWidth);let f=n.db.getTasks(),d=[];for(let w of f)d.push(w.type);d=$(d);let p={},m=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let w={};for(let F of f)w[F.section]===void 0?w[F.section]=[F]:w[F.section].push(F);let A=0;for(let F of Object.keys(w)){let S=P5t(w[F],A)+1;A+=S,m+=S*(i.barHeight+i.barGap),p[F]=S}}else{m+=f.length*(i.barHeight+i.barGap);for(let w of d)p[w]=f.filter(A=>A.type===w).length}h.setAttribute("viewBox","0 0 "+Nl+" "+m);let g=l.select(`[id="${t}"]`),y=g2().domain([Tx(f,function(w){return w.startTime}),kx(f,function(w){return w.endTime})]).rangeRound([0,Nl-i.leftPadding-i.rightPadding]);function b(w,A){let F=w.startTime,S=A.startTime,v=0;return F>S?v=1:FV.order))].map(V=>w.find(G=>G.order===V));g.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(V,G){return G=V.order,G*A+F-2}).attr("width",function(){return B-i.rightPadding/2}).attr("height",A).attr("class",function(V){for(let[G,J]of d.entries())if(V.type===J)return"section section"+G%i.numberSectionStyles;return"section section0"});let O=g.append("g").selectAll("rect").data(w).enter(),N=n.db.getLinks();if(O.append("rect").attr("id",function(V){return V.id}).attr("rx",3).attr("ry",3).attr("x",function(V){return V.milestone?y(V.startTime)+S+.5*(y(V.endTime)-y(V.startTime))-.5*v:y(V.startTime)+S}).attr("y",function(V,G){return G=V.order,G*A+F}).attr("width",function(V){return V.milestone?v:y(V.renderEndTime||V.endTime)-y(V.startTime)}).attr("height",v).attr("transform-origin",function(V,G){return G=V.order,(y(V.startTime)+S+.5*(y(V.endTime)-y(V.startTime))).toString()+"px "+(G*A+F+.5*v).toString()+"px"}).attr("class",function(V){let G="task",J="";V.classes.length>0&&(J=V.classes.join(" "));let rt=0;for(let[ct,pt]of d.entries())V.type===pt&&(rt=ct%i.numberSectionStyles);let nt="";return V.active?V.crit?nt+=" activeCrit":nt=" active":V.done?V.crit?nt=" doneCrit":nt=" done":V.crit&&(nt+=" crit"),nt.length===0&&(nt=" task"),V.milestone&&(nt=" milestone "+nt),nt+=rt,nt+=" "+J,G+nt}),O.append("text").attr("id",function(V){return V.id+"-text"}).text(function(V){return V.task}).attr("font-size",i.fontSize).attr("x",function(V){let G=y(V.startTime),J=y(V.renderEndTime||V.endTime);V.milestone&&(G+=.5*(y(V.endTime)-y(V.startTime))-.5*v),V.milestone&&(J=G+v);let rt=this.getBBox().width;return rt>J-G?J+rt+1.5*i.leftPadding>B?G+S-5:J+S+5:(J-G)/2+G+S}).attr("y",function(V,G){return G=V.order,G*A+i.barHeight/2+(i.fontSize/2-2)+F}).attr("text-height",v).attr("class",function(V){let G=y(V.startTime),J=y(V.endTime);V.milestone&&(J=G+v);let rt=this.getBBox().width,nt="";V.classes.length>0&&(nt=V.classes.join(" "));let ct=0;for(let[Lt,bt]of d.entries())V.type===bt&&(ct=Lt%i.numberSectionStyles);let pt="";return V.active&&(V.crit?pt="activeCritText"+ct:pt="activeText"+ct),V.done?V.crit?pt=pt+" doneCritText"+ct:pt=pt+" doneText"+ct:V.crit&&(pt=pt+" critText"+ct),V.milestone&&(pt+=" milestoneText"),rt>J-G?J+rt+1.5*i.leftPadding>B?nt+" taskTextOutsideLeft taskTextOutside"+ct+" "+pt:nt+" taskTextOutsideRight taskTextOutside"+ct+" "+pt+" width-"+rt:nt+" taskText taskText"+ct+" "+pt+" width-"+rt}),Y().securityLevel==="sandbox"){let V;V=xt("#i"+t);let G=V.nodes()[0].contentDocument;O.filter(function(J){return N.has(J.id)}).each(function(J){var rt=G.querySelector("#"+J.id),nt=G.querySelector("#"+J.id+"-text");let ct=rt.parentNode;var pt=G.createElement("a");pt.setAttribute("xlink:href",N.get(J.id)),pt.setAttribute("target","_top"),ct.appendChild(pt),pt.appendChild(rt),pt.appendChild(nt)})}}a(T,"drawRects");function _(w,A,F,S,v,R,B,I){if(B.length===0&&I.length===0)return;let M,O;for(let{startTime:rt,endTime:nt}of R)(M===void 0||rtO)&&(O=nt);if(!M||!O)return;if((0,ZS.default)(O).diff((0,ZS.default)(M),"year")>5){P.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let N=n.db.getDateFormat(),E=[],V=null,G=(0,ZS.default)(M);for(;G.valueOf()<=O;)n.db.isInvalidDate(G,N,B,I)?V?V.end=G:V={start:G,end:G}:V&&(E.push(V),V=null),G=G.add(1,"d");g.append("g").selectAll("rect").data(E).enter().append("rect").attr("id",function(rt){return"exclude-"+rt.start.format("YYYY-MM-DD")}).attr("x",function(rt){return y(rt.start)+F}).attr("y",i.gridLineStartPadding).attr("width",function(rt){let nt=rt.end.add(1,"day");return y(nt)-y(rt.start)}).attr("height",v-A-i.gridLineStartPadding).attr("transform-origin",function(rt,nt){return(y(rt.start)+F+.5*(y(rt.end)-y(rt.start))).toString()+"px "+(nt*w+.5*v).toString()+"px"}).attr("class","exclude-range")}a(_,"drawExcludeDays");function L(w,A,F,S){let v=mw(y).tickSize(-S+A+i.gridLineStartPadding).tickFormat(Iu(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),B=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(B!==null){let I=B[1],M=B[2],O=n.db.getWeekday()||i.weekday;switch(M){case"millisecond":v.ticks(ao.every(I));break;case"second":v.ticks(Ts.every(I));break;case"minute":v.ticks(il.every(I));break;case"hour":v.ticks(sl.every(I));break;case"day":v.ticks(Us.every(I));break;case"week":v.ticks(Ntt[O].every(I));break;case"month":v.ticks(al.every(I));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+w+", "+(S-50)+")").call(v).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let I=pw(y).tickSize(-S+A+i.gridLineStartPadding).tickFormat(Iu(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(B!==null){let M=B[1],O=B[2],N=n.db.getWeekday()||i.weekday;switch(O){case"millisecond":I.ticks(ao.every(M));break;case"second":I.ticks(Ts.every(M));break;case"minute":I.ticks(il.every(M));break;case"hour":I.ticks(sl.every(M));break;case"day":I.ticks(Us.every(M));break;case"week":I.ticks(Ntt[N].every(M));break;case"month":I.ticks(al.every(M));break}}g.append("g").attr("class","grid").attr("transform","translate("+w+", "+A+")").call(I).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}a(L,"makeGrid");function C(w,A){let F=0,S=Object.keys(p).map(v=>[v,p[v]]);g.append("g").selectAll("text").data(S).enter().append(function(v){let R=v[0].split(Rt.lineBreakRegex),B=-(R.length-1)/2,I=u.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("dy",B+"em");for(let[M,O]of R.entries()){let N=u.createElementNS("http://www.w3.org/2000/svg","tspan");N.setAttribute("alignment-baseline","central"),N.setAttribute("x","10"),M>0&&N.setAttribute("dy","1em"),N.textContent=O,I.appendChild(N)}return I}).attr("x",10).attr("y",function(v,R){if(R>0)for(let B=0;B{"use strict";F5t=a(e=>` + .mermaid-main-font { + font-family: ${e.fontFamily}; + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${e.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: ${e.fontFamily}; + } +`,"getStyles"),Ptt=F5t});var Ftt={};Be(Ftt,{diagram:()=>$5t});var $5t,$tt=x(()=>{"use strict";ftt();Itt();Ott();Btt();$5t={parser:htt,db:Rtt,renderer:Mtt,styles:Ptt}});var ztt,Wtt=x(()=>{"use strict";dm();zt();ztt={parse:a(async e=>{let t=await Xa("info",e);P.debug(t)},"parse")}});var vy,sD=x(()=>{vy={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}});var U5t,j5t,Utt,jtt=x(()=>{"use strict";sD();U5t={version:vy.version+"-tiny"},j5t=a(()=>U5t.version,"getVersion"),Utt={getVersion:j5t}});var ys,Yc=x(()=>{"use strict";$e();pe();ys=a(e=>{let{securityLevel:t}=Y(),r=xt("body");if(t==="sandbox"){let s=xt(`#i${e}`).node()?.contentDocument??document;r=xt(s.body)}return r.select(`#${e}`)},"selectSvgElement")});var q5t,qtt,Htt=x(()=>{"use strict";zt();Yc();Gn();q5t=a((e,t,r)=>{P.debug(`rendering info diagram +`+e);let n=ys(t);Rr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),qtt={draw:q5t}});var Ytt={};Be(Ytt,{diagram:()=>H5t});var H5t,Xtt=x(()=>{"use strict";Wtt();jtt();Htt();H5t={parser:ztt,db:Utt,renderer:qtt}});var Ztt,aD,JS,oD,K5t,Q5t,Z5t,J5t,t6t,e6t,r6t,t_,lD=x(()=>{"use strict";zt();Sn();zs();Ztt=We.pie,aD={sections:new Map,showData:!1,config:Ztt},JS=aD.sections,oD=aD.showData,K5t=structuredClone(Ztt),Q5t=a(()=>structuredClone(K5t),"getConfig"),Z5t=a(()=>{JS=new Map,oD=aD.showData,Ye()},"clear"),J5t=a(({label:e,value:t})=>{JS.has(e)||(JS.set(e,t),P.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),t6t=a(()=>JS,"getSections"),e6t=a(e=>{oD=e},"setShowData"),r6t=a(()=>oD,"getShowData"),t_={getConfig:Q5t,clear:Z5t,setDiagramTitle:xr,getDiagramTitle:or,setAccTitle:rr,getAccTitle:ir,setAccDescription:sr,getAccDescription:ar,addSection:J5t,getSections:t6t,setShowData:e6t,getShowData:r6t}});var n6t,Jtt,tet=x(()=>{"use strict";dm();zt();Ty();lD();n6t=a((e,t)=>{Uc(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),Jtt={parse:a(async e=>{let t=await Xa("pie",e);P.debug(t),n6t(t,t_)},"parse")}});var i6t,eet,ret=x(()=>{"use strict";i6t=a(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; + } + .slice { + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; + } +`,"getStyles"),eet=i6t});var s6t,a6t,net,iet=x(()=>{"use strict";$e();pe();zt();Yc();Gn();Ee();s6t=a(e=>{let t=[...e.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return S2().value(n=>n.value)(t)},"createPieArcs"),a6t=a((e,t,r,n)=>{P.debug(`rendering pie chart +`+e);let i=n.db,s=Y(),o=Nn(i.getConfig(),s.pie),l=40,u=18,h=4,f=450,d=f,p=ys(t),m=p.append("g");m.attr("transform","translate("+d/2+","+f/2+")");let{themeVariables:g}=s,[y]=mo(g.pieOuterStrokeWidth);y??=2;let b=o.textPosition,k=Math.min(d,f)/2-l,T=Ra().innerRadius(0).outerRadius(k),_=Ra().innerRadius(k*b).outerRadius(k*b);m.append("circle").attr("cx",0).attr("cy",0).attr("r",k+y/2).attr("class","pieOuterCircle");let L=i.getSections(),C=s6t(L),D=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],$=rl(D);m.selectAll("mySlices").data(C).enter().append("path").attr("d",T).attr("fill",v=>$(v.data.label)).attr("class","pieCircle");let w=0;L.forEach(v=>{w+=v}),m.selectAll("mySlices").data(C).enter().append("text").text(v=>(v.data.value/w*100).toFixed(0)+"%").attr("transform",v=>"translate("+_.centroid(v)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(f-50)/2).attr("class","pieTitleText");let A=m.selectAll(".legend").data($.domain()).enter().append("g").attr("class","legend").attr("transform",(v,R)=>{let B=u+h,I=B*$.domain().length/2,M=12*u,O=R*B-I;return"translate("+M+","+O+")"});A.append("rect").attr("width",u).attr("height",u).style("fill",$).style("stroke",$),A.data(C).append("text").attr("x",u+h).attr("y",u-h).text(v=>{let{label:R,value:B}=v.data;return i.getShowData()?`${R} [${B}]`:R});let F=Math.max(...A.selectAll("text").nodes().map(v=>v?.getBoundingClientRect().width??0)),S=d+l+u+h+F;p.attr("viewBox",`0 0 ${S} ${f}`),Rr(p,f,S,o.useMaxWidth)},"draw"),net={draw:a6t}});var set={};Be(set,{diagram:()=>o6t});var o6t,aet=x(()=>{"use strict";tet();lD();ret();iet();o6t={parser:Jtt,db:t_,renderer:net,styles:eet}});var cD,uet,het=x(()=>{"use strict";cD=function(){var e=a(function($t,U,Tt,gt){for(Tt=Tt||{},gt=$t.length;gt--;Tt[$t[gt]]=U);return Tt},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],s=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],h=[2,36],f=[1,37],d=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],b=[1,14],k=[1,23],T=[1,18],_=[1,19],L=[1,20],C=[1,21],D=[1,22],$=[1,24],w=[1,25],A=[1,26],F=[1,27],S=[1,28],v=[1,29],R=[1,32],B=[1,33],I=[1,34],M=[1,39],O=[1,40],N=[1,42],E=[1,44],V=[1,62],G=[1,61],J=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],rt=[1,65],nt=[1,66],ct=[1,67],pt=[1,68],Lt=[1,69],bt=[1,70],ut=[1,71],it=[1,72],st=[1,73],X=[1,74],H=[1,75],at=[1,76],W=[4,5,6,7,8,9,10,11,12,13,14,15,18],mt=[1,90],q=[1,91],Z=[1,92],ye=[1,99],ot=[1,93],Jt=[1,96],ve=[1,94],te=[1,95],vt=[1,97],It=[1,98],yt=[1,102],ht=[10,55,56,57],wt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],Q={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:a(function(U,Tt,gt,Yt,Mt,kt,Ge){var Pt=kt.length-1;switch(Mt){case 23:this.$=kt[Pt];break;case 24:this.$=kt[Pt-1]+""+kt[Pt];break;case 26:this.$=kt[Pt-1]+kt[Pt];break;case 27:this.$=[kt[Pt].trim()];break;case 28:kt[Pt-2].push(kt[Pt].trim()),this.$=kt[Pt-2];break;case 29:this.$=kt[Pt-4],Yt.addClass(kt[Pt-2],kt[Pt]);break;case 37:this.$=[];break;case 42:this.$=kt[Pt].trim(),Yt.setDiagramTitle(this.$);break;case 43:this.$=kt[Pt].trim(),Yt.setAccTitle(this.$);break;case 44:case 45:this.$=kt[Pt].trim(),Yt.setAccDescription(this.$);break;case 46:Yt.addSection(kt[Pt].substr(8)),this.$=kt[Pt].substr(8);break;case 47:Yt.addPoint(kt[Pt-3],"",kt[Pt-1],kt[Pt],[]);break;case 48:Yt.addPoint(kt[Pt-4],kt[Pt-3],kt[Pt-1],kt[Pt],[]);break;case 49:Yt.addPoint(kt[Pt-4],"",kt[Pt-2],kt[Pt-1],kt[Pt]);break;case 50:Yt.addPoint(kt[Pt-5],kt[Pt-4],kt[Pt-2],kt[Pt-1],kt[Pt]);break;case 51:Yt.setXAxisLeftText(kt[Pt-2]),Yt.setXAxisRightText(kt[Pt]);break;case 52:kt[Pt-1].text+=" \u27F6 ",Yt.setXAxisLeftText(kt[Pt-1]);break;case 53:Yt.setXAxisLeftText(kt[Pt]);break;case 54:Yt.setYAxisBottomText(kt[Pt-2]),Yt.setYAxisTopText(kt[Pt]);break;case 55:kt[Pt-1].text+=" \u27F6 ",Yt.setYAxisBottomText(kt[Pt-1]);break;case 56:Yt.setYAxisBottomText(kt[Pt]);break;case 57:Yt.setQuadrant1Text(kt[Pt]);break;case 58:Yt.setQuadrant2Text(kt[Pt]);break;case 59:Yt.setQuadrant3Text(kt[Pt]);break;case 60:Yt.setQuadrant4Text(kt[Pt]);break;case 64:this.$={text:kt[Pt],type:"text"};break;case 65:this.$={text:kt[Pt-1].text+""+kt[Pt],type:kt[Pt-1].type};break;case 66:this.$={text:kt[Pt],type:"text"};break;case 67:this.$={text:kt[Pt],type:"markdown"};break;case 68:this.$=kt[Pt];break;case 69:this.$=kt[Pt-1]+""+kt[Pt];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:n,56:i,57:s},{1:[3]},{18:t,26:8,27:2,28:r,55:n,56:i,57:s},{18:t,26:9,27:2,28:r,55:n,56:i,57:s},e(o,[2,33],{29:10}),e(l,[2,61]),e(l,[2,62]),e(l,[2,63]),{1:[2,30]},{1:[2,31]},e(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:f,5:d,10:p,12:m,13:g,14:y,18:b,25:k,35:T,37:_,39:L,41:C,42:D,48:$,50:w,51:A,52:F,53:S,54:v,60:R,61:B,63:I,64:M,65:O,66:N,67:E}),e(o,[2,34]),{27:45,55:n,56:i,57:s},e(u,[2,37]),e(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:f,5:d,10:p,12:m,13:g,14:y,18:b,25:k,35:T,37:_,39:L,41:C,42:D,48:$,50:w,51:A,52:F,53:S,54:v,60:R,61:B,63:I,64:M,65:O,66:N,67:E}),e(u,[2,39]),e(u,[2,40]),e(u,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(u,[2,45]),e(u,[2,46]),{18:[1,50]},{4:f,5:d,10:p,12:m,13:g,14:y,43:51,58:31,60:R,61:B,63:I,64:M,65:O,66:N,67:E},{4:f,5:d,10:p,12:m,13:g,14:y,43:52,58:31,60:R,61:B,63:I,64:M,65:O,66:N,67:E},{4:f,5:d,10:p,12:m,13:g,14:y,43:53,58:31,60:R,61:B,63:I,64:M,65:O,66:N,67:E},{4:f,5:d,10:p,12:m,13:g,14:y,43:54,58:31,60:R,61:B,63:I,64:M,65:O,66:N,67:E},{4:f,5:d,10:p,12:m,13:g,14:y,43:55,58:31,60:R,61:B,63:I,64:M,65:O,66:N,67:E},{4:f,5:d,10:p,12:m,13:g,14:y,43:56,58:31,60:R,61:B,63:I,64:M,65:O,66:N,67:E},{4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,44:[1,57],47:[1,58],58:60,59:59,63:I,64:M,65:O,66:N,67:E},e(J,[2,64]),e(J,[2,66]),e(J,[2,67]),e(J,[2,70]),e(J,[2,71]),e(J,[2,72]),e(J,[2,73]),e(J,[2,74]),e(J,[2,75]),e(J,[2,76]),e(J,[2,77]),e(J,[2,78]),e(J,[2,79]),e(J,[2,80]),e(o,[2,35]),e(u,[2,38]),e(u,[2,42]),e(u,[2,43]),e(u,[2,44]),{3:64,4:rt,5:nt,6:ct,7:pt,8:Lt,9:bt,10:ut,11:it,12:st,13:X,14:H,15:at,21:63},e(u,[2,53],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,49:[1,77],63:I,64:M,65:O,66:N,67:E}),e(u,[2,56],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,49:[1,78],63:I,64:M,65:O,66:N,67:E}),e(u,[2,57],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,63:I,64:M,65:O,66:N,67:E}),e(u,[2,58],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,63:I,64:M,65:O,66:N,67:E}),e(u,[2,59],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,63:I,64:M,65:O,66:N,67:E}),e(u,[2,60],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,63:I,64:M,65:O,66:N,67:E}),{45:[1,79]},{44:[1,80]},e(J,[2,65]),e(J,[2,81]),e(J,[2,82]),e(J,[2,83]),{3:82,4:rt,5:nt,6:ct,7:pt,8:Lt,9:bt,10:ut,11:it,12:st,13:X,14:H,15:at,18:[1,81]},e(W,[2,23]),e(W,[2,1]),e(W,[2,2]),e(W,[2,3]),e(W,[2,4]),e(W,[2,5]),e(W,[2,6]),e(W,[2,7]),e(W,[2,8]),e(W,[2,9]),e(W,[2,10]),e(W,[2,11]),e(W,[2,12]),e(u,[2,52],{58:31,43:83,4:f,5:d,10:p,12:m,13:g,14:y,60:R,61:B,63:I,64:M,65:O,66:N,67:E}),e(u,[2,55],{58:31,43:84,4:f,5:d,10:p,12:m,13:g,14:y,60:R,61:B,63:I,64:M,65:O,66:N,67:E}),{46:[1,85]},{45:[1,86]},{4:mt,5:q,6:Z,8:ye,11:ot,13:Jt,16:89,17:ve,18:te,19:vt,20:It,22:88,23:87},e(W,[2,24]),e(u,[2,51],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,63:I,64:M,65:O,66:N,67:E}),e(u,[2,54],{59:59,58:60,4:f,5:d,8:V,10:p,12:m,13:g,14:y,18:G,63:I,64:M,65:O,66:N,67:E}),e(u,[2,47],{22:88,16:89,23:100,4:mt,5:q,6:Z,8:ye,11:ot,13:Jt,17:ve,18:te,19:vt,20:It}),{46:[1,101]},e(u,[2,29],{10:yt}),e(ht,[2,27],{16:103,4:mt,5:q,6:Z,8:ye,11:ot,13:Jt,17:ve,18:te,19:vt,20:It}),e(wt,[2,25]),e(wt,[2,13]),e(wt,[2,14]),e(wt,[2,15]),e(wt,[2,16]),e(wt,[2,17]),e(wt,[2,18]),e(wt,[2,19]),e(wt,[2,20]),e(wt,[2,21]),e(wt,[2,22]),e(u,[2,49],{10:yt}),e(u,[2,48],{22:88,16:89,23:104,4:mt,5:q,6:Z,8:ye,11:ot,13:Jt,17:ve,18:te,19:vt,20:It}),{4:mt,5:q,6:Z,8:ye,11:ot,13:Jt,16:89,17:ve,18:te,19:vt,20:It,22:105},e(wt,[2,26]),e(u,[2,50],{10:yt}),e(ht,[2,28],{16:103,4:mt,5:q,6:Z,8:ye,11:ot,13:Jt,17:ve,18:te,19:vt,20:It})],defaultActions:{8:[2,30],9:[2,31]},parseError:a(function(U,Tt){if(Tt.recoverable)this.trace(U);else{var gt=new Error(U);throw gt.hash=Tt,gt}},"parseError"),parse:a(function(U){var Tt=this,gt=[0],Yt=[],Mt=[null],kt=[],Ge=this.table,Pt="",nr=0,Ze=0,yr=0,Je=2,ke=1,He=kt.slice.call(arguments,1),Te=Object.create(this.lexer),ur={yy:{}};for(var yn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yn)&&(ur.yy[yn]=this.yy[yn]);Te.setInput(U,ur.yy),ur.yy.lexer=Te,ur.yy.parser=this,typeof Te.yylloc>"u"&&(Te.yylloc={});var we=Te.yylloc;kt.push(we);var Oe=Te.options&&Te.options.ranges;typeof ur.yy.parseError=="function"?this.parseError=ur.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ae(et){gt.length=gt.length-2*et,Mt.length=Mt.length-et,kt.length=kt.length-et}a(Ae,"popStack");function xe(){var et;return et=Yt.pop()||Te.lex()||ke,typeof et!="number"&&(et instanceof Array&&(Yt=et,et=Yt.pop()),et=Tt.symbols_[et]||et),et}a(xe,"lex");for(var he,ge,be,jt,An,ne,Si={},fn,Pr,vr,ci;;){if(be=gt[gt.length-1],this.defaultActions[be]?jt=this.defaultActions[be]:((he===null||typeof he>"u")&&(he=xe()),jt=Ge[be]&&Ge[be][he]),typeof jt>"u"||!jt.length||!jt[0]){var Kt="";ci=[];for(fn in Ge[be])this.terminals_[fn]&&fn>Je&&ci.push("'"+this.terminals_[fn]+"'");Te.showPosition?Kt="Parse error on line "+(nr+1)+`: +`+Te.showPosition()+` +Expecting `+ci.join(", ")+", got '"+(this.terminals_[he]||he)+"'":Kt="Parse error on line "+(nr+1)+": Unexpected "+(he==ke?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(Kt,{text:Te.match,token:this.terminals_[he]||he,line:Te.yylineno,loc:we,expected:ci})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+be+", token: "+he);switch(jt[0]){case 1:gt.push(he),Mt.push(Te.yytext),kt.push(Te.yylloc),gt.push(jt[1]),he=null,ge?(he=ge,ge=null):(Ze=Te.yyleng,Pt=Te.yytext,nr=Te.yylineno,we=Te.yylloc,yr>0&&yr--);break;case 2:if(Pr=this.productions_[jt[1]][1],Si.$=Mt[Mt.length-Pr],Si._$={first_line:kt[kt.length-(Pr||1)].first_line,last_line:kt[kt.length-1].last_line,first_column:kt[kt.length-(Pr||1)].first_column,last_column:kt[kt.length-1].last_column},Oe&&(Si._$.range=[kt[kt.length-(Pr||1)].range[0],kt[kt.length-1].range[1]]),ne=this.performAction.apply(Si,[Pt,Ze,nr,ur.yy,jt[1],Mt,kt].concat(He)),typeof ne<"u")return ne;Pr&&(gt=gt.slice(0,-1*Pr*2),Mt=Mt.slice(0,-1*Pr),kt=kt.slice(0,-1*Pr)),gt.push(this.productions_[jt[1]][0]),Mt.push(Si.$),kt.push(Si._$),vr=Ge[gt[gt.length-2]][gt[gt.length-1]],gt.push(vr);break;case 3:return!0}}return!0},"parse")},Nt=function(){var $t={EOF:1,parseError:a(function(Tt,gt){if(this.yy.parser)this.yy.parser.parseError(Tt,gt);else throw new Error(Tt)},"parseError"),setInput:a(function(U,Tt){return this.yy=Tt||this.yy||{},this._input=U,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:a(function(){var U=this._input[0];this.yytext+=U,this.yyleng++,this.offset++,this.match+=U,this.matched+=U;var Tt=U.match(/(?:\r\n?|\n).*/g);return Tt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),U},"input"),unput:a(function(U){var Tt=U.length,gt=U.split(/(?:\r\n?|\n)/g);this._input=U+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Tt),this.offset-=Tt;var Yt=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),gt.length-1&&(this.yylineno-=gt.length-1);var Mt=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:gt?(gt.length===Yt.length?this.yylloc.first_column:0)+Yt[Yt.length-gt.length].length-gt[0].length:this.yylloc.first_column-Tt},this.options.ranges&&(this.yylloc.range=[Mt[0],Mt[0]+this.yyleng-Tt]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(U){this.unput(this.match.slice(U))},"less"),pastInput:a(function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(U.length>20?"...":"")+U.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(U.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var U=this.pastInput(),Tt=new Array(U.length+1).join("-");return U+this.upcomingInput()+` +`+Tt+"^"},"showPosition"),test_match:a(function(U,Tt){var gt,Yt,Mt;if(this.options.backtrack_lexer&&(Mt={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&&(Mt.yylloc.range=this.yylloc.range.slice(0))),Yt=U[0].match(/(?:\r\n?|\n).*/g),Yt&&(this.yylineno+=Yt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Yt?Yt[Yt.length-1].length-Yt[Yt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.matches=U,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(U[0].length),this.matched+=U[0],gt=this.performAction.call(this,this.yy,this,Tt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),gt)return gt;if(this._backtrack){for(var kt in Mt)this[kt]=Mt[kt];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var U,Tt,gt,Yt;this._more||(this.yytext="",this.match="");for(var Mt=this._currentRules(),kt=0;ktTt[0].length)){if(Tt=gt,Yt=kt,this.options.backtrack_lexer){if(U=this.test_match(gt,Mt[kt]),U!==!1)return U;if(this._backtrack){Tt=!1;continue}else return!1}else if(!this.options.flex)break}return Tt?(U=this.test_match(Tt,Mt[Yt]),U!==!1?U:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var Tt=this.next();return Tt||this.lex()},"lex"),begin:a(function(Tt){this.conditionStack.push(Tt)},"begin"),popState:a(function(){var Tt=this.conditionStack.length-1;return Tt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(Tt){return Tt=this.conditionStack.length-1-Math.abs(Tt||0),Tt>=0?this.conditionStack[Tt]:"INITIAL"},"topState"),pushState:a(function(Tt){this.begin(Tt)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(Tt,gt,Yt,Mt){var kt=Mt;switch(Yt){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return $t}();Q.lexer=Nt;function z(){this.yy={}}return a(z,"Parser"),z.prototype=Q,Q.Parser=z,new z}();cD.parser=cD;uet=cD});var qi,e_,fet=x(()=>{"use strict";$e();zs();zt();qm();qi=zl(),e_=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{a(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:We.quadrantChart?.chartWidth||500,chartWidth:We.quadrantChart?.chartHeight||500,titlePadding:We.quadrantChart?.titlePadding||10,titleFontSize:We.quadrantChart?.titleFontSize||20,quadrantPadding:We.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:We.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:We.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:We.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:We.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:We.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:We.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:We.quadrantChart?.pointTextPadding||5,pointLabelFontSize:We.quadrantChart?.pointLabelFontSize||12,pointRadius:We.quadrantChart?.pointRadius||5,xAxisPosition:We.quadrantChart?.xAxisPosition||"top",yAxisPosition:We.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:We.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:We.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:qi.quadrant1Fill,quadrant2Fill:qi.quadrant2Fill,quadrant3Fill:qi.quadrant3Fill,quadrant4Fill:qi.quadrant4Fill,quadrant1TextFill:qi.quadrant1TextFill,quadrant2TextFill:qi.quadrant2TextFill,quadrant3TextFill:qi.quadrant3TextFill,quadrant4TextFill:qi.quadrant4TextFill,quadrantPointFill:qi.quadrantPointFill,quadrantPointTextFill:qi.quadrantPointTextFill,quadrantXAxisTextFill:qi.quadrantXAxisTextFill,quadrantYAxisTextFill:qi.quadrantYAxisTextFill,quadrantTitleFill:qi.quadrantTitleFill,quadrantInternalBorderStrokeFill:qi.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:qi.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,P.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,r){this.classes.set(t,r)}setConfig(t){P.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){P.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,r,n,i){let s=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,o={top:t==="top"&&r?s:0,bottom:t==="bottom"&&r?s:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,f={top:i?h:0},d=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+o.top+f.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-o.top-o.bottom-f.top,y=m/2,b=g/2;return{xAxisSpace:o,yAxisSpace:u,titleSpace:f,quadrantSpace:{quadrantLeft:d,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:b}}}getAxisLabels(t,r,n,i){let{quadrantSpace:s,titleSpace:o}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:f,quadrantTop:d,quadrantWidth:p}=s,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?f/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+f+(m?f/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(t){let{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:s,quadrantTop:o}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+s,y:o,width:s,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:o,width:s,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:o+n,width:s,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+s,y:o+n,width:s,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(t){let{quadrantSpace:r}=t,{quadrantHeight:n,quadrantLeft:i,quadrantTop:s,quadrantWidth:o}=r,l=Ea().domain([0,1]).range([i,o+i]),u=Ea().domain([0,1]).range([n+s,s]);return this.data.points.map(f=>{let d=this.classes.get(f.className);return d&&(f={...d,...f}),{x:l(f.x),y:u(f.y),fill:f.color??this.themeConfig.quadrantPointFill,radius:f.radius??this.config.pointRadius,text:{text:f.text,fill:this.themeConfig.quadrantPointTextFill,x:l(f.x),y:u(f.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:f.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:f.strokeWidth??"0px"}})}getBorders(t){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=t,{quadrantHalfHeight:i,quadrantHeight:s,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u,x2:o+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o+h,y1:u+r,x2:o+h,y2:u+s-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u+s,x2:o+h+r,y2:u+s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o,y1:u+r,x2:o,y2:u+s-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+l,y1:u+r,x2:o+l,y2:u+s-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+r,y1:u+i,x2:o+h-r,y2:u+i}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,s=this.calculateSpace(i,t,r,n);return{points:this.getQuadrantPoints(s),quadrants:this.getQuadrants(s),axisLabels:this.getAxisLabels(i,t,r,s),borderLines:this.getBorders(s),title:this.getTitle(n)}}}});function uD(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function det(e){return!/^\d+$/.test(e)}function pet(e){return!/^\d+px$/.test(e)}var Bh,met=x(()=>{"use strict";Bh=class extends Error{static{a(this,"InvalidStyleError")}constructor(t,r,n){super(`value for ${t} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};a(uD,"validateHexCode");a(det,"validateNumber");a(pet,"validateSizeInPixels")});function Ml(e){return er(e.trim(),u6t)}function h6t(e){li.setData({quadrant1Text:Ml(e.text)})}function f6t(e){li.setData({quadrant2Text:Ml(e.text)})}function d6t(e){li.setData({quadrant3Text:Ml(e.text)})}function p6t(e){li.setData({quadrant4Text:Ml(e.text)})}function m6t(e){li.setData({xAxisLeftText:Ml(e.text)})}function g6t(e){li.setData({xAxisRightText:Ml(e.text)})}function y6t(e){li.setData({yAxisTopText:Ml(e.text)})}function x6t(e){li.setData({yAxisBottomText:Ml(e.text)})}function hD(e){let t={};for(let r of e){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(det(i))throw new Bh(n,i,"number");t.radius=parseInt(i)}else if(n==="color"){if(uD(i))throw new Bh(n,i,"hex code");t.color=i}else if(n==="stroke-color"){if(uD(i))throw new Bh(n,i,"hex code");t.strokeColor=i}else if(n==="stroke-width"){if(pet(i))throw new Bh(n,i,"number of pixels (eg. 10px)");t.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return t}function b6t(e,t,r,n,i){let s=hD(i);li.addPoints([{x:r,y:n,text:Ml(e.text),className:t,...s}])}function k6t(e,t){li.addClass(e,hD(t))}function T6t(e){li.setConfig({chartWidth:e})}function S6t(e){li.setConfig({chartHeight:e})}function _6t(){let e=Y(),{themeVariables:t,quadrantChart:r}=e;return r&&li.setConfig(r),li.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),li.setData({titleText:or()}),li.build()}var u6t,li,C6t,get,yet=x(()=>{"use strict";pe();Fe();Sn();fet();met();u6t=Y();a(Ml,"textSanitizer");li=new e_;a(h6t,"setQuadrant1Text");a(f6t,"setQuadrant2Text");a(d6t,"setQuadrant3Text");a(p6t,"setQuadrant4Text");a(m6t,"setXAxisLeftText");a(g6t,"setXAxisRightText");a(y6t,"setYAxisTopText");a(x6t,"setYAxisBottomText");a(hD,"parseStyles");a(b6t,"addPoint");a(k6t,"addClass");a(T6t,"setWidth");a(S6t,"setHeight");a(_6t,"getQuadrantData");C6t=a(function(){li.clear(),Ye()},"clear"),get={setWidth:T6t,setHeight:S6t,setQuadrant1Text:h6t,setQuadrant2Text:f6t,setQuadrant3Text:d6t,setQuadrant4Text:p6t,setXAxisLeftText:m6t,setXAxisRightText:g6t,setYAxisTopText:y6t,setYAxisBottomText:x6t,parseStyles:hD,addPoint:b6t,addClass:k6t,getQuadrantData:_6t,clear:C6t,setAccTitle:rr,getAccTitle:ir,setDiagramTitle:xr,getDiagramTitle:or,getAccDescription:ar,setAccDescription:sr}});var w6t,xet,bet=x(()=>{"use strict";$e();pe();zt();Gn();w6t=a((e,t,r,n)=>{function i(w){return w==="top"?"hanging":"middle"}a(i,"getDominantBaseLine");function s(w){return w==="left"?"start":"middle"}a(s,"getTextAnchor");function o(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}a(o,"getTransformation");let l=Y();P.debug(`Rendering quadrant chart +`+e);let u=l.securityLevel,h;u==="sandbox"&&(h=xt("#i"+t));let d=(u==="sandbox"?xt(h.nodes()[0].contentDocument.body):xt("body")).select(`[id="${t}"]`),p=d.append("g").attr("class","main"),m=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;Rr(d,g,m,l.quadrantChart?.useMaxWidth??!0),d.attr("viewBox","0 0 "+m+" "+g),n.db.setHeight(g),n.db.setWidth(m);let y=n.db.getQuadrantData(),b=p.append("g").attr("class","quadrants"),k=p.append("g").attr("class","border"),T=p.append("g").attr("class","data-points"),_=p.append("g").attr("class","labels"),L=p.append("g").attr("class","title");y.title&&L.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",i(y.title.horizontalPos)).attr("text-anchor",s(y.title.verticalPos)).attr("transform",o(y.title)).text(y.title.text),y.borderLines&&k.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",w=>w.x1).attr("y1",w=>w.y1).attr("x2",w=>w.x2).attr("y2",w=>w.y2).style("stroke",w=>w.strokeFill).style("stroke-width",w=>w.strokeWidth);let C=b.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");C.append("rect").attr("x",w=>w.x).attr("y",w=>w.y).attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",w=>w.fill),C.append("text").attr("x",0).attr("y",0).attr("fill",w=>w.text.fill).attr("font-size",w=>w.text.fontSize).attr("dominant-baseline",w=>i(w.text.horizontalPos)).attr("text-anchor",w=>s(w.text.verticalPos)).attr("transform",w=>o(w.text)).text(w=>w.text.text),_.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(w=>w.text).attr("fill",w=>w.fill).attr("font-size",w=>w.fontSize).attr("dominant-baseline",w=>i(w.horizontalPos)).attr("text-anchor",w=>s(w.verticalPos)).attr("transform",w=>o(w));let $=T.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");$.append("circle").attr("cx",w=>w.x).attr("cy",w=>w.y).attr("r",w=>w.radius).attr("fill",w=>w.fill).attr("stroke",w=>w.strokeColor).attr("stroke-width",w=>w.strokeWidth),$.append("text").attr("x",0).attr("y",0).text(w=>w.text.text).attr("fill",w=>w.text.fill).attr("font-size",w=>w.text.fontSize).attr("dominant-baseline",w=>i(w.text.horizontalPos)).attr("text-anchor",w=>s(w.text.verticalPos)).attr("transform",w=>o(w.text))},"draw"),xet={draw:w6t}});var ket={};Be(ket,{diagram:()=>E6t});var E6t,Tet=x(()=>{"use strict";het();yet();bet();E6t={parser:uet,db:get,renderer:xet,styles:a(()=>"","styles")}});var fD,wet,Eet=x(()=>{"use strict";fD=function(){var e=a(function(I,M,O,N){for(O=O||{},N=I.length;N--;O[I[N]]=M);return O},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],u=[1,25],h=[1,26],f=[1,28],d=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],b=[1,34],k=[1,35],T=[1,36],_=[1,37],L=[1,43],C=[1,42],D=[1,47],$=[1,50],w=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],F=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],v={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(M,O,N,E,V,G,J){var rt=G.length-1;switch(V){case 5:E.setOrientation(G[rt]);break;case 9:E.setDiagramTitle(G[rt].text.trim());break;case 12:E.setLineData({text:"",type:"text"},G[rt]);break;case 13:E.setLineData(G[rt-1],G[rt]);break;case 14:E.setBarData({text:"",type:"text"},G[rt]);break;case 15:E.setBarData(G[rt-1],G[rt]);break;case 16:this.$=G[rt].trim(),E.setAccTitle(this.$);break;case 17:case 18:this.$=G[rt].trim(),E.setAccDescription(this.$);break;case 19:this.$=G[rt-1];break;case 20:this.$=[Number(G[rt-2]),...G[rt]];break;case 21:this.$=[Number(G[rt])];break;case 22:E.setXAxisTitle(G[rt]);break;case 23:E.setXAxisTitle(G[rt-1]);break;case 24:E.setXAxisTitle({type:"text",text:""});break;case 25:E.setXAxisBand(G[rt]);break;case 26:E.setXAxisRangeData(Number(G[rt-2]),Number(G[rt]));break;case 27:this.$=G[rt-1];break;case 28:this.$=[G[rt-2],...G[rt]];break;case 29:this.$=[G[rt]];break;case 30:E.setYAxisTitle(G[rt]);break;case 31:E.setYAxisTitle(G[rt-1]);break;case 32:E.setYAxisTitle({type:"text",text:""});break;case 33:E.setYAxisRangeData(Number(G[rt-2]),Number(G[rt]));break;case 37:this.$={text:G[rt],type:"text"};break;case 38:this.$={text:G[rt],type:"text"};break;case 39:this.$={text:G[rt],type:"markdown"};break;case 40:this.$=G[rt];break;case 41:this.$=G[rt-1]+""+G[rt];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:n,34:i,35:s,36:o}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:n,34:i,35:s,36:o}),e(t,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(t,r,{4:2,7:4,3:21,5:n,34:i,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(t,[2,7],{4:22,34:i,35:s,36:o}),{11:23,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},{11:39,13:38,24:L,27:C,29:40,30:41,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},{11:45,15:44,27:D,33:46,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},{11:49,17:48,24:$,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},{11:52,17:51,24:$,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},{20:[1,53]},{22:[1,54]},e(w,[2,18]),{1:[2,2]},e(w,[2,8]),e(w,[2,9]),e(A,[2,37],{40:55,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_}),e(A,[2,38]),e(A,[2,39]),e(F,[2,40]),e(F,[2,42]),e(F,[2,43]),e(F,[2,44]),e(F,[2,45]),e(F,[2,46]),e(F,[2,47]),e(F,[2,48]),e(F,[2,49]),e(F,[2,50]),e(F,[2,51]),e(w,[2,10]),e(w,[2,22],{30:41,29:56,24:L,27:C}),e(w,[2,24]),e(w,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},e(w,[2,11]),e(w,[2,30],{33:60,27:D}),e(w,[2,32]),{31:[1,61]},e(w,[2,12]),{17:62,24:$},{25:63,27:S},e(w,[2,14]),{17:65,24:$},e(w,[2,16]),e(w,[2,17]),e(F,[2,41]),e(w,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(w,[2,31]),{27:[1,69]},e(w,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(w,[2,15]),e(w,[2,26]),e(w,[2,27]),{11:59,32:72,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:b,48:k,49:T,50:_},e(w,[2,33]),e(w,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(M,O){if(O.recoverable)this.trace(M);else{var N=new Error(M);throw N.hash=O,N}},"parseError"),parse:a(function(M){var O=this,N=[0],E=[],V=[null],G=[],J=this.table,rt="",nt=0,ct=0,pt=0,Lt=2,bt=1,ut=G.slice.call(arguments,1),it=Object.create(this.lexer),st={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(st.yy[X]=this.yy[X]);it.setInput(M,st.yy),st.yy.lexer=it,st.yy.parser=this,typeof it.yylloc>"u"&&(it.yylloc={});var H=it.yylloc;G.push(H);var at=it.options&&it.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(Q){N.length=N.length-2*Q,V.length=V.length-Q,G.length=G.length-Q}a(W,"popStack");function mt(){var Q;return Q=E.pop()||it.lex()||bt,typeof Q!="number"&&(Q instanceof Array&&(E=Q,Q=E.pop()),Q=O.symbols_[Q]||Q),Q}a(mt,"lex");for(var q,Z,ye,ot,Jt,ve,te={},vt,It,yt,ht;;){if(ye=N[N.length-1],this.defaultActions[ye]?ot=this.defaultActions[ye]:((q===null||typeof q>"u")&&(q=mt()),ot=J[ye]&&J[ye][q]),typeof ot>"u"||!ot.length||!ot[0]){var wt="";ht=[];for(vt in J[ye])this.terminals_[vt]&&vt>Lt&&ht.push("'"+this.terminals_[vt]+"'");it.showPosition?wt="Parse error on line "+(nt+1)+`: +`+it.showPosition()+` +Expecting `+ht.join(", ")+", got '"+(this.terminals_[q]||q)+"'":wt="Parse error on line "+(nt+1)+": Unexpected "+(q==bt?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(wt,{text:it.match,token:this.terminals_[q]||q,line:it.yylineno,loc:H,expected:ht})}if(ot[0]instanceof Array&&ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ye+", token: "+q);switch(ot[0]){case 1:N.push(q),V.push(it.yytext),G.push(it.yylloc),N.push(ot[1]),q=null,Z?(q=Z,Z=null):(ct=it.yyleng,rt=it.yytext,nt=it.yylineno,H=it.yylloc,pt>0&&pt--);break;case 2:if(It=this.productions_[ot[1]][1],te.$=V[V.length-It],te._$={first_line:G[G.length-(It||1)].first_line,last_line:G[G.length-1].last_line,first_column:G[G.length-(It||1)].first_column,last_column:G[G.length-1].last_column},at&&(te._$.range=[G[G.length-(It||1)].range[0],G[G.length-1].range[1]]),ve=this.performAction.apply(te,[rt,ct,nt,st.yy,ot[1],V,G].concat(ut)),typeof ve<"u")return ve;It&&(N=N.slice(0,-1*It*2),V=V.slice(0,-1*It),G=G.slice(0,-1*It)),N.push(this.productions_[ot[1]][0]),V.push(te.$),G.push(te._$),yt=J[N[N.length-2]][N[N.length-1]],N.push(yt);break;case 3:return!0}}return!0},"parse")},R=function(){var I={EOF:1,parseError:a(function(O,N){if(this.yy.parser)this.yy.parser.parseError(O,N);else throw new Error(O)},"parseError"),setInput:a(function(M,O){return this.yy=O||this.yy||{},this._input=M,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:a(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var O=M.match(/(?:\r\n?|\n).*/g);return O?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},"input"),unput:a(function(M){var O=M.length,N=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var E=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 V=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===E.length?this.yylloc.first_column:0)+E[E.length-N.length].length-N[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(M){this.unput(this.match.slice(M))},"less"),pastInput:a(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var M=this.pastInput(),O=new Array(M.length+1).join("-");return M+this.upcomingInput()+` +`+O+"^"},"showPosition"),test_match:a(function(M,O){var N,E,V;if(this.options.backtrack_lexer&&(V={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&&(V.yylloc.range=this.yylloc.range.slice(0))),E=M[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,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(M[0].length),this.matched+=M[0],N=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var G in V)this[G]=V[G];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,O,N,E;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),G=0;GO[0].length)){if(O=N,E=G,this.options.backtrack_lexer){if(M=this.test_match(N,V[G]),M!==!1)return M;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(M=this.test_match(O,V[E]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var O=this.next();return O||this.lex()},"lex"),begin:a(function(O){this.conditionStack.push(O)},"begin"),popState:a(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:a(function(O){this.begin(O)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(O,N,E,V){var G=V;switch(E){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return I}();v.lexer=R;function B(){this.yy={}}return a(B,"Parser"),B.prototype=v,v.Parser=B,new B}();fD.parser=fD;wet=fD});function dD(e){return e.type==="bar"}function r_(e){return e.type==="band"}function ym(e){return e.type==="linear"}var n_=x(()=>{"use strict";a(dD,"isBarPlot");a(r_,"isBandAxisData");a(ym,"isLinearAxisData")});var xm,pD=x(()=>{"use strict";$a();xm=class{constructor(t){this.parentGroup=t}static{a(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,r){if(!this.parentGroup)return{width:t.reduce((s,o)=>Math.max(o.length,s),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let s of t){let o=aG(i,1,s),l=o?o.width:s.length*r,u=o?o.height:r;n.width=Math.max(n.width,l),n.height=Math.max(n.height,u)}return i.remove(),n}}});var bm,mD=x(()=>{"use strict";bm=class{constructor(t,r,n,i){this.axisConfig=t;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{a(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let r=t.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*t.width;this.outerPadding=Math.min(n.width/2,i);let s=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,s<=r&&(r-=s,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-r}calculateSpaceIfDrawnVertical(t){let r=t.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*t.height;this.outerPadding=Math.min(n.height/2,i);let s=n.width+this.axisConfig.labelPadding*2;s<=r&&(r-=s,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=t.width-r,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}});var i_,vet=x(()=>{"use strict";$e();zt();mD();i_=class extends bm{static{a(this,"BandAxis")}constructor(t,r,n,i,s){super(t,i,s,r),this.categories=n,this.scale=Tf().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Tf().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),P.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}});var s_,Aet=x(()=>{"use strict";$e();mD();s_=class extends bm{static{a(this,"LinearAxis")}constructor(t,r,n,i,s){super(t,i,s,r),this.domain=n,this.scale=Ea().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Ea().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function gD(e,t,r,n){let i=new xm(n);return r_(e)?new i_(t,r,e.categories,e.title,i):new s_(t,r,[e.min,e.max],e.title,i)}var Let=x(()=>{"use strict";n_();pD();vet();Aet();a(gD,"getAxis")});function Ret(e,t,r,n){let i=new xm(n);return new yD(i,e,t,r)}var yD,Det=x(()=>{"use strict";pD();yD=class{constructor(t,r,n,i){this.textDimensionCalculator=t;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{a(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,t.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};a(Ret,"getChartTitleComponent")});var a_,Iet=x(()=>{"use strict";$e();a_=class{constructor(t,r,n,i,s){this.plotData=t;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=s}static{a(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=Da().y(n=>n[0]).x(n=>n[1])(t):r=Da().x(n=>n[0]).y(n=>n[1])(t),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}});var o_,Net=x(()=>{"use strict";o_=class{constructor(t,r,n,i,s,o){this.barData=t;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=s;this.plotIndex=o}static{a(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:this.boundingRect.x,y:s[0]-i,height:n,width:s[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:s[0]-i,y:s[1],width:n,height:this.boundingRect.y+this.boundingRect.height-s[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Met(e,t,r){return new xD(e,t,r)}var xD,Oet=x(()=>{"use strict";Iet();Net();xD=class{constructor(t,r,n){this.chartConfig=t;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0}}static{a(this,"BasePlot")}setAxes(t,r){this.xAxis=t,this.yAxis=r}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new a_(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...i.getDrawableElement())}break;case"bar":{let i=new o_(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...i.getDrawableElement())}break}return t}};a(Met,"getPlotComponent")});var l_,Pet=x(()=>{"use strict";Let();Det();Oet();n_();l_=class{constructor(t,r,n,i){this.chartConfig=t;this.chartData=r;this.componentStore={title:Ret(t,r,n,i),plot:Met(t,r,n),xAxis:gD(r.xAxis,t.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:gD(r.yAxis,t.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}static{a(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:s,height:o});t-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:t,height:r}),r-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:t,height:r}),n=l.width,t-=l.width,t>0&&(s+=t,t=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:s,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([n,n+s]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+o}),this.componentStore.yAxis.setRange([i,i+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>dD(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,s=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:o,height:l});t-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:t,height:r}),t-=u.width,i=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:t,height:r}),r-=u.height,s=n+u.height,t>0&&(o+=t,t=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:o,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:s}),this.componentStore.yAxis.setRange([i,i+o]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([s,s+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(h=>dD(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))t.push(...r.getDrawableElements());return t}}});var c_,Bet=x(()=>{"use strict";Pet();c_=class{static{a(this,"XYChartBuilder")}static build(t,r,n,i){return new l_(t,r,n,i).getDrawableElement()}}});function $et(){let e=zl(),t=Re();return Nn(e.xyChart,t.themeVariables.xyChart)}function Get(){let e=Re();return Nn(We.xyChart,e.xyChart)}function Vet(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function TD(e){let t=Re();return er(e.trim(),t)}function R6t(e){Fet=e}function D6t(e){e==="horizontal"?Ly.chartOrientation="horizontal":Ly.chartOrientation="vertical"}function I6t(e){Er.xAxis.title=TD(e.text)}function zet(e,t){Er.xAxis={type:"linear",title:Er.xAxis.title,min:e,max:t},u_=!0}function N6t(e){Er.xAxis={type:"band",title:Er.xAxis.title,categories:e.map(t=>TD(t.text))},u_=!0}function M6t(e){Er.yAxis.title=TD(e.text)}function O6t(e,t){Er.yAxis={type:"linear",title:Er.yAxis.title,min:e,max:t},kD=!0}function P6t(e){let t=Math.min(...e),r=Math.max(...e),n=ym(Er.yAxis)?Er.yAxis.min:1/0,i=ym(Er.yAxis)?Er.yAxis.max:-1/0;Er.yAxis={type:"linear",title:Er.yAxis.title,min:Math.min(n,t),max:Math.max(i,r)}}function Wet(e){let t=[];if(e.length===0)return t;if(!u_){let r=ym(Er.xAxis)?Er.xAxis.min:1/0,n=ym(Er.xAxis)?Er.xAxis.max:-1/0;zet(Math.min(r,1),Math.max(n,e.length))}if(kD||P6t(e),r_(Er.xAxis)&&(t=Er.xAxis.categories.map((r,n)=>[r,e[n]])),ym(Er.xAxis)){let r=Er.xAxis.min,n=Er.xAxis.max,i=(n-r)/(e.length-1),s=[];for(let o=r;o<=n;o+=i)s.push(`${o}`);t=s.map((o,l)=>[o,e[l]])}return t}function Uet(e){return bD[e===0?0:e%bD.length]}function B6t(e,t){let r=Wet(t);Er.plots.push({type:"line",strokeFill:Uet(Ay),strokeWidth:2,data:r}),Ay++}function F6t(e,t){let r=Wet(t);Er.plots.push({type:"bar",fill:Uet(Ay),data:r}),Ay++}function $6t(){if(Er.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Er.title=or(),c_.build(Ly,Er,Ry,Fet)}function G6t(){return Ry}function V6t(){return Ly}function z6t(){return Er}var Ay,Fet,Ly,Ry,Er,bD,u_,kD,W6t,jet,qet=x(()=>{"use strict";$n();zs();qm();Ee();Fe();Sn();Bet();n_();Ay=0,Ly=Get(),Ry=$et(),Er=Vet(),bD=Ry.plotColorPalette.split(",").map(e=>e.trim()),u_=!1,kD=!1;a($et,"getChartDefaultThemeConfig");a(Get,"getChartDefaultConfig");a(Vet,"getChartDefaultData");a(TD,"textSanitizer");a(R6t,"setTmpSVGG");a(D6t,"setOrientation");a(I6t,"setXAxisTitle");a(zet,"setXAxisRangeData");a(N6t,"setXAxisBand");a(M6t,"setYAxisTitle");a(O6t,"setYAxisRangeData");a(P6t,"setYAxisRangeFromPlotData");a(Wet,"transformDataWithoutCategory");a(Uet,"getPlotColorFromPalette");a(B6t,"setLineData");a(F6t,"setBarData");a($6t,"getDrawableElem");a(G6t,"getChartThemeConfig");a(V6t,"getChartConfig");a(z6t,"getXYChartData");W6t=a(function(){Ye(),Ay=0,Ly=Get(),Er=Vet(),Ry=$et(),bD=Ry.plotColorPalette.split(",").map(e=>e.trim()),u_=!1,kD=!1},"clear"),jet={getDrawableElem:$6t,clear:W6t,setAccTitle:rr,getAccTitle:ir,setDiagramTitle:xr,getDiagramTitle:or,getAccDescription:ar,setAccDescription:sr,setOrientation:D6t,setXAxisTitle:I6t,setXAxisRangeData:zet,setXAxisBand:N6t,setYAxisTitle:M6t,setYAxisRangeData:O6t,setLineData:B6t,setBarData:F6t,setTmpSVGG:R6t,getChartThemeConfig:G6t,getChartConfig:V6t,getXYChartData:z6t}});var U6t,Het,Yet=x(()=>{"use strict";zt();Yc();Gn();U6t=a((e,t,r,n)=>{let i=n.db,s=i.getChartThemeConfig(),o=i.getChartConfig(),l=i.getXYChartData().plots[0].data.map(_=>_[1]);function u(_){return _==="top"?"text-before-edge":"middle"}a(u,"getDominantBaseLine");function h(_){return _==="left"?"start":_==="right"?"end":"middle"}a(h,"getTextAnchor");function f(_){return`translate(${_.x}, ${_.y}) rotate(${_.rotation||0})`}a(f,"getTextTransformation"),P.debug(`Rendering xychart chart +`+e);let d=ys(t),p=d.append("g").attr("class","main"),m=p.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");Rr(d,o.height,o.width,!0),d.attr("viewBox",`0 0 ${o.width} ${o.height}`),m.attr("fill",s.backgroundColor),i.setTmpSVGG(d.append("g").attr("class","mermaid-tmp-group"));let g=i.getDrawableElem(),y={};function b(_){let L=p,C="";for(let[D]of _.entries()){let $=p;D>0&&y[C]&&($=y[C]),C+=_[D],L=y[C],L||(L=y[C]=$.append("g").attr("class",_[D]))}return L}a(b,"getGroup");for(let _ of g){if(_.data.length===0)continue;let L=b(_.groupTexts);switch(_.type){case"rect":if(L.selectAll("rect").data(_.data).enter().append("rect").attr("x",C=>C.x).attr("y",C=>C.y).attr("width",C=>C.width).attr("height",C=>C.height).attr("fill",C=>C.fill).attr("stroke",C=>C.strokeFill).attr("stroke-width",C=>C.strokeWidth),o.showDataLabel)if(o.chartOrientation==="horizontal"){let $=function(F,S){let{data:v,label:R}=F;return S*R.length*.7<=v.width-10};var k=$;a($,"fitsHorizontally");let C=.7,D=_.data.map((F,S)=>({data:F,label:l[S].toString()})).filter(F=>F.data.width>0&&F.data.height>0),w=D.map(F=>{let{data:S}=F,v=S.height*.7;for(;!$(F,v)&&v>0;)v-=1;return v}),A=Math.floor(Math.min(...w));L.selectAll("text").data(D).enter().append("text").attr("x",F=>F.data.x+F.data.width-10).attr("y",F=>F.data.y+F.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${A}px`).text(F=>F.label)}else{let $=function(F,S,v){let{data:R,label:B}=F,M=S*B.length*.7,O=R.x+R.width/2,N=O-M/2,E=O+M/2,V=N>=R.x&&E<=R.x+R.width,G=R.y+v+S<=R.y+R.height;return V&&G};var T=$;a($,"fitsInBar");let C=10,D=_.data.map((F,S)=>({data:F,label:l[S].toString()})).filter(F=>F.data.width>0&&F.data.height>0),w=D.map(F=>{let{data:S,label:v}=F,R=S.width/(v.length*.7);for(;!$(F,R,10)&&R>0;)R-=1;return R}),A=Math.floor(Math.min(...w));L.selectAll("text").data(D).enter().append("text").attr("x",F=>F.data.x+F.data.width/2).attr("y",F=>F.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${A}px`).text(F=>F.label)}break;case"text":L.selectAll("text").data(_.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",C=>C.fill).attr("font-size",C=>C.fontSize).attr("dominant-baseline",C=>u(C.verticalPos)).attr("text-anchor",C=>h(C.horizontalPos)).attr("transform",C=>f(C)).text(C=>C.text);break;case"path":L.selectAll("path").data(_.data).enter().append("path").attr("d",C=>C.path).attr("fill",C=>C.fill?C.fill:"none").attr("stroke",C=>C.strokeFill).attr("stroke-width",C=>C.strokeWidth);break}}},"draw"),Het={draw:U6t}});var Xet={};Be(Xet,{diagram:()=>j6t});var j6t,Ket=x(()=>{"use strict";Eet();qet();Yet();j6t={parser:wet,db:jet,renderer:Het}});var SD,Jet,trt=x(()=>{"use strict";SD=function(){var e=a(function(Q,Nt,z,$t){for(z=z||{},$t=Q.length;$t--;z[Q[$t]]=Nt);return z},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],s=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],l=[2,7],u=[1,26],h=[1,27],f=[1,28],d=[1,29],p=[1,33],m=[1,34],g=[1,35],y=[1,36],b=[1,37],k=[1,38],T=[1,24],_=[1,31],L=[1,32],C=[1,30],D=[1,39],$=[1,40],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],A=[1,61],F=[89,90],S=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],v=[27,29],R=[1,70],B=[1,71],I=[1,72],M=[1,73],O=[1,74],N=[1,75],E=[1,76],V=[1,83],G=[1,80],J=[1,84],rt=[1,85],nt=[1,86],ct=[1,87],pt=[1,88],Lt=[1,89],bt=[1,90],ut=[1,91],it=[1,92],st=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],X=[63,64],H=[1,101],at=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],W=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],mt=[1,110],q=[1,106],Z=[1,107],ye=[1,108],ot=[1,109],Jt=[1,111],ve=[1,116],te=[1,117],vt=[1,114],It=[1,115],yt={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:a(function(Nt,z,$t,U,Tt,gt,Yt){var Mt=gt.length-1;switch(Tt){case 4:this.$=gt[Mt].trim(),U.setAccTitle(this.$);break;case 5:case 6:this.$=gt[Mt].trim(),U.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:U.setDirection("TB");break;case 18:U.setDirection("BT");break;case 19:U.setDirection("RL");break;case 20:U.setDirection("LR");break;case 21:U.addRequirement(gt[Mt-3],gt[Mt-4]);break;case 22:U.addRequirement(gt[Mt-5],gt[Mt-6]),U.setClass([gt[Mt-5]],gt[Mt-3]);break;case 23:U.setNewReqId(gt[Mt-2]);break;case 24:U.setNewReqText(gt[Mt-2]);break;case 25:U.setNewReqRisk(gt[Mt-2]);break;case 26:U.setNewReqVerifyMethod(gt[Mt-2]);break;case 29:this.$=U.RequirementType.REQUIREMENT;break;case 30:this.$=U.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=U.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=U.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=U.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=U.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=U.RiskLevel.LOW_RISK;break;case 36:this.$=U.RiskLevel.MED_RISK;break;case 37:this.$=U.RiskLevel.HIGH_RISK;break;case 38:this.$=U.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=U.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=U.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=U.VerifyType.VERIFY_TEST;break;case 42:U.addElement(gt[Mt-3]);break;case 43:U.addElement(gt[Mt-5]),U.setClass([gt[Mt-5]],gt[Mt-3]);break;case 44:U.setNewElementType(gt[Mt-2]);break;case 45:U.setNewElementDocRef(gt[Mt-2]);break;case 48:U.addRelationship(gt[Mt-2],gt[Mt],gt[Mt-4]);break;case 49:U.addRelationship(gt[Mt-2],gt[Mt-4],gt[Mt]);break;case 50:this.$=U.Relationships.CONTAINS;break;case 51:this.$=U.Relationships.COPIES;break;case 52:this.$=U.Relationships.DERIVES;break;case 53:this.$=U.Relationships.SATISFIES;break;case 54:this.$=U.Relationships.VERIFIES;break;case 55:this.$=U.Relationships.REFINES;break;case 56:this.$=U.Relationships.TRACES;break;case 57:this.$=gt[Mt-2],U.defineClass(gt[Mt-1],gt[Mt]);break;case 58:U.setClass(gt[Mt-1],gt[Mt]);break;case 59:U.setClass([gt[Mt-2]],gt[Mt]);break;case 60:case 62:this.$=[gt[Mt]];break;case 61:case 63:this.$=gt[Mt-2].concat([gt[Mt]]);break;case 64:this.$=gt[Mt-2],U.setCssStyle(gt[Mt-1],gt[Mt]);break;case 65:this.$=[gt[Mt]];break;case 66:gt[Mt-2].push(gt[Mt]),this.$=gt[Mt-2];break;case 68:this.$=gt[Mt-1]+gt[Mt];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(s,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:o,7:13,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},e(s,[2,4]),e(s,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:43,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:44,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:45,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:46,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:47,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:48,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:49,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{4:17,5:o,7:50,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:f,24:d,25:23,33:25,41:p,42:m,43:g,44:y,45:b,46:k,54:T,72:_,74:L,77:C,89:D,90:$},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(w,[2,17]),e(w,[2,18]),e(w,[2,19]),e(w,[2,20]),{30:60,33:62,75:A,89:D,90:$},{30:63,33:62,75:A,89:D,90:$},{30:64,33:62,75:A,89:D,90:$},e(F,[2,29]),e(F,[2,30]),e(F,[2,31]),e(F,[2,32]),e(F,[2,33]),e(F,[2,34]),e(S,[2,81]),e(S,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(v,[2,79]),e(v,[2,80]),{27:[1,67],29:[1,68]},e(v,[2,85]),e(v,[2,86]),{62:69,65:R,66:B,67:I,68:M,69:O,70:N,71:E},{62:77,65:R,66:B,67:I,68:M,69:O,70:N,71:E},{30:78,33:62,75:A,89:D,90:$},{73:79,75:V,76:G,78:81,79:82,80:J,81:rt,82:nt,83:ct,84:pt,85:Lt,86:bt,87:ut,88:it},e(st,[2,60]),e(st,[2,62]),{73:93,75:V,76:G,78:81,79:82,80:J,81:rt,82:nt,83:ct,84:pt,85:Lt,86:bt,87:ut,88:it},{30:94,33:62,75:A,76:G,89:D,90:$},{5:[1,95]},{30:96,33:62,75:A,89:D,90:$},{5:[1,97]},{30:98,33:62,75:A,89:D,90:$},{63:[1,99]},e(X,[2,50]),e(X,[2,51]),e(X,[2,52]),e(X,[2,53]),e(X,[2,54]),e(X,[2,55]),e(X,[2,56]),{64:[1,100]},e(w,[2,59],{76:G}),e(w,[2,64],{76:H}),{33:103,75:[1,102],89:D,90:$},e(at,[2,65],{79:104,75:V,80:J,81:rt,82:nt,83:ct,84:pt,85:Lt,86:bt,87:ut,88:it}),e(W,[2,67]),e(W,[2,69]),e(W,[2,70]),e(W,[2,71]),e(W,[2,72]),e(W,[2,73]),e(W,[2,74]),e(W,[2,75]),e(W,[2,76]),e(W,[2,77]),e(W,[2,78]),e(w,[2,57],{76:H}),e(w,[2,58],{76:G}),{5:mt,28:105,31:q,34:Z,36:ye,38:ot,40:Jt},{27:[1,112],76:G},{5:ve,40:te,56:113,57:vt,59:It},{27:[1,118],76:G},{33:119,89:D,90:$},{33:120,89:D,90:$},{75:V,78:121,79:82,80:J,81:rt,82:nt,83:ct,84:pt,85:Lt,86:bt,87:ut,88:it},e(st,[2,61]),e(st,[2,63]),e(W,[2,68]),e(w,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:mt,28:126,31:q,34:Z,36:ye,38:ot,40:Jt},e(w,[2,28]),{5:[1,127]},e(w,[2,42]),{32:[1,128]},{32:[1,129]},{5:ve,40:te,56:130,57:vt,59:It},e(w,[2,47]),{5:[1,131]},e(w,[2,48]),e(w,[2,49]),e(at,[2,66],{79:104,75:V,80:J,81:rt,82:nt,83:ct,84:pt,85:Lt,86:bt,87:ut,88:it}),{33:132,89:D,90:$},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(w,[2,27]),{5:mt,28:145,31:q,34:Z,36:ye,38:ot,40:Jt},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(w,[2,46]),{5:ve,40:te,56:152,57:vt,59:It},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(w,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(w,[2,43]),{5:mt,28:159,31:q,34:Z,36:ye,38:ot,40:Jt},{5:mt,28:160,31:q,34:Z,36:ye,38:ot,40:Jt},{5:mt,28:161,31:q,34:Z,36:ye,38:ot,40:Jt},{5:mt,28:162,31:q,34:Z,36:ye,38:ot,40:Jt},{5:ve,40:te,56:163,57:vt,59:It},{5:ve,40:te,56:164,57:vt,59:It},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(w,[2,26]),e(w,[2,44]),e(w,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:a(function(Nt,z){if(z.recoverable)this.trace(Nt);else{var $t=new Error(Nt);throw $t.hash=z,$t}},"parseError"),parse:a(function(Nt){var z=this,$t=[0],U=[],Tt=[null],gt=[],Yt=this.table,Mt="",kt=0,Ge=0,Pt=0,nr=2,Ze=1,yr=gt.slice.call(arguments,1),Je=Object.create(this.lexer),ke={yy:{}};for(var He in this.yy)Object.prototype.hasOwnProperty.call(this.yy,He)&&(ke.yy[He]=this.yy[He]);Je.setInput(Nt,ke.yy),ke.yy.lexer=Je,ke.yy.parser=this,typeof Je.yylloc>"u"&&(Je.yylloc={});var Te=Je.yylloc;gt.push(Te);var ur=Je.options&&Je.options.ranges;typeof ke.yy.parseError=="function"?this.parseError=ke.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yn(vr){$t.length=$t.length-2*vr,Tt.length=Tt.length-vr,gt.length=gt.length-vr}a(yn,"popStack");function we(){var vr;return vr=U.pop()||Je.lex()||Ze,typeof vr!="number"&&(vr instanceof Array&&(U=vr,vr=U.pop()),vr=z.symbols_[vr]||vr),vr}a(we,"lex");for(var Oe,Ae,xe,he,ge,be,jt={},An,ne,Si,fn;;){if(xe=$t[$t.length-1],this.defaultActions[xe]?he=this.defaultActions[xe]:((Oe===null||typeof Oe>"u")&&(Oe=we()),he=Yt[xe]&&Yt[xe][Oe]),typeof he>"u"||!he.length||!he[0]){var Pr="";fn=[];for(An in Yt[xe])this.terminals_[An]&&An>nr&&fn.push("'"+this.terminals_[An]+"'");Je.showPosition?Pr="Parse error on line "+(kt+1)+`: +`+Je.showPosition()+` +Expecting `+fn.join(", ")+", got '"+(this.terminals_[Oe]||Oe)+"'":Pr="Parse error on line "+(kt+1)+": Unexpected "+(Oe==Ze?"end of input":"'"+(this.terminals_[Oe]||Oe)+"'"),this.parseError(Pr,{text:Je.match,token:this.terminals_[Oe]||Oe,line:Je.yylineno,loc:Te,expected:fn})}if(he[0]instanceof Array&&he.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xe+", token: "+Oe);switch(he[0]){case 1:$t.push(Oe),Tt.push(Je.yytext),gt.push(Je.yylloc),$t.push(he[1]),Oe=null,Ae?(Oe=Ae,Ae=null):(Ge=Je.yyleng,Mt=Je.yytext,kt=Je.yylineno,Te=Je.yylloc,Pt>0&&Pt--);break;case 2:if(ne=this.productions_[he[1]][1],jt.$=Tt[Tt.length-ne],jt._$={first_line:gt[gt.length-(ne||1)].first_line,last_line:gt[gt.length-1].last_line,first_column:gt[gt.length-(ne||1)].first_column,last_column:gt[gt.length-1].last_column},ur&&(jt._$.range=[gt[gt.length-(ne||1)].range[0],gt[gt.length-1].range[1]]),be=this.performAction.apply(jt,[Mt,Ge,kt,ke.yy,he[1],Tt,gt].concat(yr)),typeof be<"u")return be;ne&&($t=$t.slice(0,-1*ne*2),Tt=Tt.slice(0,-1*ne),gt=gt.slice(0,-1*ne)),$t.push(this.productions_[he[1]][0]),Tt.push(jt.$),gt.push(jt._$),Si=Yt[$t[$t.length-2]][$t[$t.length-1]],$t.push(Si);break;case 3:return!0}}return!0},"parse")},ht=function(){var Q={EOF:1,parseError:a(function(z,$t){if(this.yy.parser)this.yy.parser.parseError(z,$t);else throw new Error(z)},"parseError"),setInput:a(function(Nt,z){return this.yy=z||this.yy||{},this._input=Nt,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:a(function(){var Nt=this._input[0];this.yytext+=Nt,this.yyleng++,this.offset++,this.match+=Nt,this.matched+=Nt;var z=Nt.match(/(?:\r\n?|\n).*/g);return z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Nt},"input"),unput:a(function(Nt){var z=Nt.length,$t=Nt.split(/(?:\r\n?|\n)/g);this._input=Nt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;var U=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),$t.length-1&&(this.yylineno-=$t.length-1);var Tt=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:$t?($t.length===U.length?this.yylloc.first_column:0)+U[U.length-$t.length].length-$t[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[Tt[0],Tt[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(Nt){this.unput(this.match.slice(Nt))},"less"),pastInput:a(function(){var Nt=this.matched.substr(0,this.matched.length-this.match.length);return(Nt.length>20?"...":"")+Nt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var Nt=this.match;return Nt.length<20&&(Nt+=this._input.substr(0,20-Nt.length)),(Nt.substr(0,20)+(Nt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var Nt=this.pastInput(),z=new Array(Nt.length+1).join("-");return Nt+this.upcomingInput()+` +`+z+"^"},"showPosition"),test_match:a(function(Nt,z){var $t,U,Tt;if(this.options.backtrack_lexer&&(Tt={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&&(Tt.yylloc.range=this.yylloc.range.slice(0))),U=Nt[0].match(/(?:\r\n?|\n).*/g),U&&(this.yylineno+=U.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:U?U[U.length-1].length-U[U.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Nt[0].length},this.yytext+=Nt[0],this.match+=Nt[0],this.matches=Nt,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(Nt[0].length),this.matched+=Nt[0],$t=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$t)return $t;if(this._backtrack){for(var gt in Tt)this[gt]=Tt[gt];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Nt,z,$t,U;this._more||(this.yytext="",this.match="");for(var Tt=this._currentRules(),gt=0;gtz[0].length)){if(z=$t,U=gt,this.options.backtrack_lexer){if(Nt=this.test_match($t,Tt[gt]),Nt!==!1)return Nt;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(Nt=this.test_match(z,Tt[U]),Nt!==!1?Nt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var z=this.next();return z||this.lex()},"lex"),begin:a(function(z){this.conditionStack.push(z)},"begin"),popState:a(function(){var z=this.conditionStack.length-1;return z>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(z){return z=this.conditionStack.length-1-Math.abs(z||0),z>=0?this.conditionStack[z]:"INITIAL"},"topState"),pushState:a(function(z){this.begin(z)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(z,$t,U,Tt){var gt=Tt;switch(U){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return $t.yytext=$t.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?: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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return Q}();yt.lexer=ht;function wt(){this.yy={}}return a(wt,"Parser"),wt.prototype=yt,yt.Parser=wt,new wt}();SD.parser=SD;Jet=SD});var h_,ert=x(()=>{"use strict";pe();zt();Sn();h_=class{constructor(){this.relations=[];this.latestRequirement=this.getInitialRequirement();this.requirements=new Map;this.latestElement=this.getInitialElement();this.elements=new Map;this.classes=new Map;this.direction="TB";this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"};this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"};this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"};this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"};this.setAccTitle=rr;this.getAccTitle=ir;this.setAccDescription=sr;this.getAccDescription=ar;this.setDiagramTitle=xr;this.getDiagramTitle=or;this.getConfig=a(()=>Y().requirement,"getConfig");this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{a(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,r){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=t)}setNewReqText(t){this.latestRequirement!==void 0&&(this.latestRequirement.text=t)}setNewReqRisk(t){this.latestRequirement!==void 0&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),P.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){this.latestElement!==void 0&&(this.latestElement.type=t)}setNewElementDocRef(t){this.latestElement!==void 0&&(this.latestElement.docRef=t)}addRelationship(t,r,n){this.relations.push({type:t,src:r,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ye()}setCssStyle(t,r){for(let n of t){let i=this.requirements.get(n)??this.elements.get(n);if(!r||!i)return;for(let s of r)s.includes(",")?i.cssStyles.push(...s.split(",")):i.cssStyles.push(s)}}setClass(t,r){for(let n of t){let i=this.requirements.get(n)??this.elements.get(n);if(i)for(let s of r){i.classes.push(s);let o=this.classes.get(s)?.styles;o&&i.cssStyles.push(...o)}}}defineClass(t,r){for(let n of t){let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(s){if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)}),this.requirements.forEach(s=>{s.classes.includes(n)&&s.cssStyles.push(...r.flatMap(o=>o.split(",")))}),this.elements.forEach(s=>{s.classes.includes(n)&&s.cssStyles.push(...r.flatMap(o=>o.split(",")))})}}getClasses(){return this.classes}getData(){let t=Y(),r=[],n=[];for(let i of this.requirements.values()){let s=i;s.id=i.name,s.cssStyles=i.cssStyles,s.cssClasses=i.classes.join(" "),s.shape="requirementBox",s.look=t.look,r.push(s)}for(let i of this.elements.values()){let s=i;s.shape="requirementBox",s.look=t.look,s.id=i.name,s.cssStyles=i.cssStyles,s.cssClasses=i.classes.join(" "),r.push(s)}for(let i of this.relations){let s=0,o=i.type===this.Relationships.CONTAINS,l={id:`${i.src}-${i.dst}-${s}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",o?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:o?"normal":"dashed",arrowTypeStart:o?"requirement_contains":"",arrowTypeEnd:o?"":"requirement_arrow",look:t.look};n.push(l),s++}return{nodes:r,edges:n,other:{},config:t,direction:this.getDirection()}}}});var X6t,rrt,nrt=x(()=>{"use strict";X6t=a(e=>` + + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + +`,"getStyles"),rrt=X6t});var _D={};Be(_D,{draw:()=>K6t});var K6t,irt=x(()=>{"use strict";pe();zt();od();ih();Rd();Ee();K6t=a(async function(e,t,r,n){P.info("REF0:"),P.info("Drawing requirement diagram (unified)",t);let{securityLevel:i,state:s,layout:o}=Y(),l=n.db.getData(),u=ko(t,i);l.type=n.type,l.layoutAlgorithm=Mc(o),l.nodeSpacing=s?.nodeSpacing??50,l.rankSpacing=s?.rankSpacing??50,l.markers=["requirement_contains","requirement_arrow"],l.diagramId=t,await Lo(l,u);let h=8;se.insertTitle(u,"requirementDiagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Ro(u,h,"requirementDiagram",s?.useMaxWidth??!0)},"draw")});var srt={};Be(srt,{diagram:()=>Q6t});var Q6t,art=x(()=>{"use strict";trt();ert();nrt();irt();Q6t={parser:Jet,get db(){return new h_},renderer:_D,styles:rrt}});var CD,crt,urt=x(()=>{"use strict";CD=function(){var e=a(function(ut,it,st,X){for(st=st||{},X=ut.length;X--;st[ut[X]]=it);return st},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],s=[1,9],o=[1,11],l=[1,13],u=[1,14],h=[1,16],f=[1,17],d=[1,18],p=[1,24],m=[1,25],g=[1,26],y=[1,27],b=[1,28],k=[1,29],T=[1,30],_=[1,31],L=[1,32],C=[1,33],D=[1,34],$=[1,35],w=[1,36],A=[1,37],F=[1,38],S=[1,39],v=[1,41],R=[1,42],B=[1,43],I=[1,44],M=[1,45],O=[1,46],N=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],E=[4,5,16,50,52,53],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],J=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],rt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],nt=[68,69,70],ct=[1,122],pt={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:a(function(it,st,X,H,at,W,mt){var q=W.length-1;switch(at){case 3:return H.apply(W[q]),W[q];break;case 4:case 9:this.$=[];break;case 5:case 10:W[q-1].push(W[q]),this.$=W[q-1];break;case 6:case 7:case 11:case 12:this.$=W[q];break;case 8:case 13:this.$=[];break;case 15:W[q].type="createParticipant",this.$=W[q];break;case 16:W[q-1].unshift({type:"boxStart",boxData:H.parseBoxData(W[q-2])}),W[q-1].push({type:"boxEnd",boxText:W[q-2]}),this.$=W[q-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(W[q-2]),sequenceIndexStep:Number(W[q-1]),sequenceVisible:!0,signalType:H.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(W[q-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:H.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:H.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:H.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:H.LINETYPE.ACTIVE_START,actor:W[q-1].actor};break;case 23:this.$={type:"activeEnd",signalType:H.LINETYPE.ACTIVE_END,actor:W[q-1].actor};break;case 29:H.setDiagramTitle(W[q].substring(6)),this.$=W[q].substring(6);break;case 30:H.setDiagramTitle(W[q].substring(7)),this.$=W[q].substring(7);break;case 31:this.$=W[q].trim(),H.setAccTitle(this.$);break;case 32:case 33:this.$=W[q].trim(),H.setAccDescription(this.$);break;case 34:W[q-1].unshift({type:"loopStart",loopText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.LOOP_START}),W[q-1].push({type:"loopEnd",loopText:W[q-2],signalType:H.LINETYPE.LOOP_END}),this.$=W[q-1];break;case 35:W[q-1].unshift({type:"rectStart",color:H.parseMessage(W[q-2]),signalType:H.LINETYPE.RECT_START}),W[q-1].push({type:"rectEnd",color:H.parseMessage(W[q-2]),signalType:H.LINETYPE.RECT_END}),this.$=W[q-1];break;case 36:W[q-1].unshift({type:"optStart",optText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.OPT_START}),W[q-1].push({type:"optEnd",optText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.OPT_END}),this.$=W[q-1];break;case 37:W[q-1].unshift({type:"altStart",altText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.ALT_START}),W[q-1].push({type:"altEnd",signalType:H.LINETYPE.ALT_END}),this.$=W[q-1];break;case 38:W[q-1].unshift({type:"parStart",parText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.PAR_START}),W[q-1].push({type:"parEnd",signalType:H.LINETYPE.PAR_END}),this.$=W[q-1];break;case 39:W[q-1].unshift({type:"parStart",parText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.PAR_OVER_START}),W[q-1].push({type:"parEnd",signalType:H.LINETYPE.PAR_END}),this.$=W[q-1];break;case 40:W[q-1].unshift({type:"criticalStart",criticalText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.CRITICAL_START}),W[q-1].push({type:"criticalEnd",signalType:H.LINETYPE.CRITICAL_END}),this.$=W[q-1];break;case 41:W[q-1].unshift({type:"breakStart",breakText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.BREAK_START}),W[q-1].push({type:"breakEnd",optText:H.parseMessage(W[q-2]),signalType:H.LINETYPE.BREAK_END}),this.$=W[q-1];break;case 43:this.$=W[q-3].concat([{type:"option",optionText:H.parseMessage(W[q-1]),signalType:H.LINETYPE.CRITICAL_OPTION},W[q]]);break;case 45:this.$=W[q-3].concat([{type:"and",parText:H.parseMessage(W[q-1]),signalType:H.LINETYPE.PAR_AND},W[q]]);break;case 47:this.$=W[q-3].concat([{type:"else",altText:H.parseMessage(W[q-1]),signalType:H.LINETYPE.ALT_ELSE},W[q]]);break;case 48:W[q-3].draw="participant",W[q-3].type="addParticipant",W[q-3].description=H.parseMessage(W[q-1]),this.$=W[q-3];break;case 49:W[q-1].draw="participant",W[q-1].type="addParticipant",this.$=W[q-1];break;case 50:W[q-3].draw="actor",W[q-3].type="addParticipant",W[q-3].description=H.parseMessage(W[q-1]),this.$=W[q-3];break;case 51:W[q-1].draw="actor",W[q-1].type="addParticipant",this.$=W[q-1];break;case 52:W[q-1].type="destroyParticipant",this.$=W[q-1];break;case 53:this.$=[W[q-1],{type:"addNote",placement:W[q-2],actor:W[q-1].actor,text:W[q]}];break;case 54:W[q-2]=[].concat(W[q-1],W[q-1]).slice(0,2),W[q-2][0]=W[q-2][0].actor,W[q-2][1]=W[q-2][1].actor,this.$=[W[q-1],{type:"addNote",placement:H.PLACEMENT.OVER,actor:W[q-2].slice(0,2),text:W[q]}];break;case 55:this.$=[W[q-1],{type:"addLinks",actor:W[q-1].actor,text:W[q]}];break;case 56:this.$=[W[q-1],{type:"addALink",actor:W[q-1].actor,text:W[q]}];break;case 57:this.$=[W[q-1],{type:"addProperties",actor:W[q-1].actor,text:W[q]}];break;case 58:this.$=[W[q-1],{type:"addDetails",actor:W[q-1].actor,text:W[q]}];break;case 61:this.$=[W[q-2],W[q]];break;case 62:this.$=W[q];break;case 63:this.$=H.PLACEMENT.LEFTOF;break;case 64:this.$=H.PLACEMENT.RIGHTOF;break;case 65:this.$=[W[q-4],W[q-1],{type:"addMessage",from:W[q-4].actor,to:W[q-1].actor,signalType:W[q-3],msg:W[q],activate:!0},{type:"activeStart",signalType:H.LINETYPE.ACTIVE_START,actor:W[q-1].actor}];break;case 66:this.$=[W[q-4],W[q-1],{type:"addMessage",from:W[q-4].actor,to:W[q-1].actor,signalType:W[q-3],msg:W[q]},{type:"activeEnd",signalType:H.LINETYPE.ACTIVE_END,actor:W[q-4].actor}];break;case 67:this.$=[W[q-3],W[q-1],{type:"addMessage",from:W[q-3].actor,to:W[q-1].actor,signalType:W[q-2],msg:W[q]}];break;case 68:this.$={type:"addParticipant",actor:W[q]};break;case 69:this.$=H.LINETYPE.SOLID_OPEN;break;case 70:this.$=H.LINETYPE.DOTTED_OPEN;break;case 71:this.$=H.LINETYPE.SOLID;break;case 72:this.$=H.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=H.LINETYPE.DOTTED;break;case 74:this.$=H.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=H.LINETYPE.SOLID_CROSS;break;case 76:this.$=H.LINETYPE.DOTTED_CROSS;break;case 77:this.$=H.LINETYPE.SOLID_POINT;break;case 78:this.$=H.LINETYPE.DOTTED_POINT;break;case 79:this.$=H.parseMessage(W[q].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},e(N,[2,5]),{9:47,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},e(N,[2,7]),e(N,[2,8]),e(N,[2,14]),{12:48,50:A,52:F,53:S},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:O},{22:55,70:O},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(N,[2,29]),e(N,[2,30]),{32:[1,61]},{34:[1,62]},e(N,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:O},{22:72,70:O},{22:73,70:O},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:O},{22:90,70:O},{22:91,70:O},{22:92,70:O},e([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),e(N,[2,6]),e(N,[2,15]),e(E,[2,9],{10:93}),e(N,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},e(N,[2,21]),{5:[1,97]},{5:[1,98]},e(N,[2,24]),e(N,[2,25]),e(N,[2,26]),e(N,[2,27]),e(N,[2,28]),e(N,[2,31]),e(N,[2,32]),e(V,i,{7:99}),e(V,i,{7:100}),e(V,i,{7:101}),e(G,i,{40:102,7:103}),e(J,i,{42:104,7:105}),e(J,i,{7:105,42:106}),e(rt,i,{45:107,7:108}),e(V,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:O},e(nt,[2,69]),e(nt,[2,70]),e(nt,[2,71]),e(nt,[2,72]),e(nt,[2,73]),e(nt,[2,74]),e(nt,[2,75]),e(nt,[2,76]),e(nt,[2,77]),e(nt,[2,78]),{22:118,70:O},{22:120,58:119,70:O},{70:[2,63]},{70:[2,64]},{56:121,81:ct},{56:123,81:ct},{56:124,81:ct},{56:125,81:ct},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:A,52:F,53:S},{5:[1,131]},e(N,[2,19]),e(N,[2,20]),e(N,[2,22]),e(N,[2,23]),{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,132],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,133],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,134],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{16:[1,135]},{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,46],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,49:[1,136],50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{16:[1,137]},{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,44],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,48:[1,138],50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{16:[1,139]},{16:[1,140]},{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,42],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,47:[1,141],50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{4:s,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,142],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:b,36:k,37:T,38:_,39:L,41:C,43:D,44:$,46:w,50:A,52:F,53:S,54:v,59:R,60:B,61:I,62:M,70:O},{15:[1,143]},e(N,[2,49]),{15:[1,144]},e(N,[2,51]),e(N,[2,52]),{22:145,70:O},{22:146,70:O},{56:147,81:ct},{56:148,81:ct},{56:149,81:ct},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},e(N,[2,16]),e(E,[2,10]),{12:151,50:A,52:F,53:S},e(E,[2,12]),e(E,[2,13]),e(N,[2,18]),e(N,[2,34]),e(N,[2,35]),e(N,[2,36]),e(N,[2,37]),{15:[1,152]},e(N,[2,38]),{15:[1,153]},e(N,[2,39]),e(N,[2,40]),{15:[1,154]},e(N,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ct},{56:158,81:ct},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:O},e(E,[2,11]),e(G,i,{7:103,40:160}),e(J,i,{7:105,42:161}),e(rt,i,{7:108,45:162}),e(N,[2,48]),e(N,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:a(function(it,st){if(st.recoverable)this.trace(it);else{var X=new Error(it);throw X.hash=st,X}},"parseError"),parse:a(function(it){var st=this,X=[0],H=[],at=[null],W=[],mt=this.table,q="",Z=0,ye=0,ot=0,Jt=2,ve=1,te=W.slice.call(arguments,1),vt=Object.create(this.lexer),It={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(It.yy[yt]=this.yy[yt]);vt.setInput(it,It.yy),It.yy.lexer=vt,It.yy.parser=this,typeof vt.yylloc>"u"&&(vt.yylloc={});var ht=vt.yylloc;W.push(ht);var wt=vt.options&&vt.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Q(yr){X.length=X.length-2*yr,at.length=at.length-yr,W.length=W.length-yr}a(Q,"popStack");function Nt(){var yr;return yr=H.pop()||vt.lex()||ve,typeof yr!="number"&&(yr instanceof Array&&(H=yr,yr=H.pop()),yr=st.symbols_[yr]||yr),yr}a(Nt,"lex");for(var z,$t,U,Tt,gt,Yt,Mt={},kt,Ge,Pt,nr;;){if(U=X[X.length-1],this.defaultActions[U]?Tt=this.defaultActions[U]:((z===null||typeof z>"u")&&(z=Nt()),Tt=mt[U]&&mt[U][z]),typeof Tt>"u"||!Tt.length||!Tt[0]){var Ze="";nr=[];for(kt in mt[U])this.terminals_[kt]&&kt>Jt&&nr.push("'"+this.terminals_[kt]+"'");vt.showPosition?Ze="Parse error on line "+(Z+1)+`: +`+vt.showPosition()+` +Expecting `+nr.join(", ")+", got '"+(this.terminals_[z]||z)+"'":Ze="Parse error on line "+(Z+1)+": Unexpected "+(z==ve?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(Ze,{text:vt.match,token:this.terminals_[z]||z,line:vt.yylineno,loc:ht,expected:nr})}if(Tt[0]instanceof Array&&Tt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+z);switch(Tt[0]){case 1:X.push(z),at.push(vt.yytext),W.push(vt.yylloc),X.push(Tt[1]),z=null,$t?(z=$t,$t=null):(ye=vt.yyleng,q=vt.yytext,Z=vt.yylineno,ht=vt.yylloc,ot>0&&ot--);break;case 2:if(Ge=this.productions_[Tt[1]][1],Mt.$=at[at.length-Ge],Mt._$={first_line:W[W.length-(Ge||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(Ge||1)].first_column,last_column:W[W.length-1].last_column},wt&&(Mt._$.range=[W[W.length-(Ge||1)].range[0],W[W.length-1].range[1]]),Yt=this.performAction.apply(Mt,[q,ye,Z,It.yy,Tt[1],at,W].concat(te)),typeof Yt<"u")return Yt;Ge&&(X=X.slice(0,-1*Ge*2),at=at.slice(0,-1*Ge),W=W.slice(0,-1*Ge)),X.push(this.productions_[Tt[1]][0]),at.push(Mt.$),W.push(Mt._$),Pt=mt[X[X.length-2]][X[X.length-1]],X.push(Pt);break;case 3:return!0}}return!0},"parse")},Lt=function(){var ut={EOF:1,parseError:a(function(st,X){if(this.yy.parser)this.yy.parser.parseError(st,X);else throw new Error(st)},"parseError"),setInput:a(function(it,st){return this.yy=st||this.yy||{},this._input=it,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:a(function(){var it=this._input[0];this.yytext+=it,this.yyleng++,this.offset++,this.match+=it,this.matched+=it;var st=it.match(/(?:\r\n?|\n).*/g);return st?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),it},"input"),unput:a(function(it){var st=it.length,X=it.split(/(?:\r\n?|\n)/g);this._input=it+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-st),this.offset-=st;var H=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),X.length-1&&(this.yylineno-=X.length-1);var at=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:X?(X.length===H.length?this.yylloc.first_column:0)+H[H.length-X.length].length-X[0].length:this.yylloc.first_column-st},this.options.ranges&&(this.yylloc.range=[at[0],at[0]+this.yyleng-st]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(it){this.unput(this.match.slice(it))},"less"),pastInput:a(function(){var it=this.matched.substr(0,this.matched.length-this.match.length);return(it.length>20?"...":"")+it.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var it=this.match;return it.length<20&&(it+=this._input.substr(0,20-it.length)),(it.substr(0,20)+(it.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var it=this.pastInput(),st=new Array(it.length+1).join("-");return it+this.upcomingInput()+` +`+st+"^"},"showPosition"),test_match:a(function(it,st){var X,H,at;if(this.options.backtrack_lexer&&(at={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&&(at.yylloc.range=this.yylloc.range.slice(0))),H=it[0].match(/(?:\r\n?|\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+it[0].length},this.yytext+=it[0],this.match+=it[0],this.matches=it,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(it[0].length),this.matched+=it[0],X=this.performAction.call(this,this.yy,this,st,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var W in at)this[W]=at[W];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var it,st,X,H;this._more||(this.yytext="",this.match="");for(var at=this._currentRules(),W=0;Wst[0].length)){if(st=X,H=W,this.options.backtrack_lexer){if(it=this.test_match(X,at[W]),it!==!1)return it;if(this._backtrack){st=!1;continue}else return!1}else if(!this.options.flex)break}return st?(it=this.test_match(st,at[H]),it!==!1?it:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var st=this.next();return st||this.lex()},"lex"),begin:a(function(st){this.conditionStack.push(st)},"begin"),popState:a(function(){var st=this.conditionStack.length-1;return st>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(st){return st=this.conditionStack.length-1-Math.abs(st||0),st>=0?this.conditionStack[st]:"INITIAL"},"topState"),pushState:a(function(st){this.begin(st)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(st,X,H,at){var W=at;switch(H){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return X.yytext=X.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return X.yytext=X.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return ut}();pt.lexer=Lt;function bt(){this.yy={}}return a(bt,"Parser"),bt.prototype=pt,pt.Parser=bt,new bt}();CD.parser=CD;crt=CD});var eLt,rLt,nLt,f_,hrt=x(()=>{"use strict";pe();zt();BR();Fe();Sn();eLt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},rLt={FILLED:0,OPEN:1},nLt={LEFTOF:0,RIGHTOF:1,OVER:2},f_=class{constructor(){this.state=new pm(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}));this.setAccTitle=rr;this.setAccDescription=sr;this.setDiagramTitle=xr;this.getAccTitle=ir;this.getAccDescription=ar;this.getDiagramTitle=or;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(Y().wrap),this.LINETYPE=eLt,this.ARROWTYPE=rLt,this.PLACEMENT=nLt}static{a(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,r,n,i){let s=this.state.records.currentBox,o=this.state.records.actors.get(t);if(o){if(this.state.records.currentBox&&o.box&&this.state.records.currentBox!==o.box)throw new Error(`A same participant should only be defined in one Box: ${o.name} can't be in '${o.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=o.box?o.box:this.state.records.currentBox,o.box=s,o&&r===o.name&&n==null)return}if(n?.text==null&&(n={text:r,type:i}),(i==null||n.text==null)&&(n={text:r,type:i}),this.state.records.actors.set(t,{box:s,name:r,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let l=this.state.records.actors.get(this.state.records.prevActor);l&&(l.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let r,n=0;if(!t)return 0;for(r=0;r>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},l}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:r,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:i,activate:s}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();let r=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(r===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:Y().sequence?.wrap??!1}clear(){this.state.reset(),Ye()}parseMessage(t){let r=t.trim(),{wrap:n,cleanedText:i}=this.extractWrap(r),s={text:i,wrap:n};return P.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),n=r?.[1]?r[1].trim():"transparent",i=r?.[2]?r[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",i=t.trim());else{let l=new Option().style;l.color=n,l.color!==n&&(n="transparent",i=t.trim())}let{wrap:s,cleanedText:o}=this.extractWrap(i);return{text:o?er(o,Y()):void 0,color:n,wrap:s}}addNote(t,r,n){let i={actor:t,placement:r,message:n.text,wrap:n.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(t,r){let n=this.getActor(t);try{let i=er(r.text,Y());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let s=JSON.parse(i);this.insertLinks(n,s)}catch(i){P.error("error while parsing actor link text",i)}}addALink(t,r){let n=this.getActor(t);try{let i={},s=er(r.text,Y()),o=s.indexOf("@");s=s.replace(/=/g,"="),s=s.replace(/&/g,"&");let l=s.slice(0,o-1).trim(),u=s.slice(o+1).trim();i[l]=u,this.insertLinks(n,i)}catch(i){P.error("error while parsing actor link text",i)}}insertLinks(t,r){if(t.links==null)t.links=r;else for(let n in r)t.links[n]=r[n]}addProperties(t,r){let n=this.getActor(t);try{let i=er(r.text,Y()),s=JSON.parse(i);this.insertProperties(n,s)}catch(i){P.error("error while parsing actor properties text",i)}}insertProperties(t,r){if(t.properties==null)t.properties=r;else for(let n in r)t.properties[n]=r[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,r){let n=this.getActor(t),i=document.getElementById(r.text);try{let s=i.innerHTML,o=JSON.parse(s);o.properties&&this.insertProperties(n,o.properties),o.links&&this.insertLinks(n,o.links)}catch(s){P.error("error while parsing actor details text",s)}}getActorProperty(t,r){if(t?.properties!==void 0)return t.properties[r]}apply(t){if(Array.isArray(t))t.forEach(r=>{this.apply(r)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":rr(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return Y().sequence}}});var iLt,frt,drt=x(()=>{"use strict";iLt=a(e=>`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + } + + text.actor > tspan { + fill: ${e.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${e.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${e.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${e.signalColor}; + } + + #arrowhead path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${e.signalColor}; + } + + #crosshead path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + } + .actor-man circle, line { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: 2px; + } +`,"getStyles"),frt=iLt});var wD,Xc,mrt,grt,sLt,prt,ED,aLt,oLt,Dy,Fh,yrt,jo,vD,lLt,cLt,uLt,hLt,fLt,dLt,pLt,xrt,mLt,gLt,yLt,xLt,bLt,kLt,TLt,brt,SLt,AD,_Lt,hn,krt=x(()=>{"use strict";Fe();Jg();Ee();wD=Ki(Df(),1);$n();Xc=18*2,mrt="actor-top",grt="actor-bottom",sLt="actor-box",prt="actor-man",ED=a(function(e,t){return Mu(e,t)},"drawRect"),aLt=a(function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let s=t.links,o=t.actorCnt,l=t.rectData;var u="none";i&&(u="block !important");let h=e.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),s!=null){var m=20;for(let b in s){var g=h.append("a"),y=(0,wD.sanitizeUrl)(s[b]);g.attr("xlink:href",y),g.attr("target","_blank"),_Lt(n)(b,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:d}},"drawPopup"),oLt=a(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Dy=a(async function(e,t,r=null){let n=e.append("foreignObject"),i=await jl(t.text,Re()),o=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",o.height+2*t.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),t.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),Fh=a(function(e,t){let r=0,n=0,i=t.text.split(Rt.lineBreakRegex),[s,o]=mo(t.fontSize),l=[],u=0,h=a(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=a(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=a(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=a(()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[f,d]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&s!==void 0&&(u=f*s);let p=e.append("text");p.attr("x",t.x),p.attr("y",h()),t.anchor!==void 0&&p.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&p.style("font-family",t.fontFamily),o!==void 0&&p.style("font-size",o),t.fontWeight!==void 0&&p.style("font-weight",t.fontWeight),t.fill!==void 0&&p.attr("fill",t.fill),t.class!==void 0&&p.attr("class",t.class),t.dy!==void 0?p.attr("dy",t.dy):u!==0&&p.attr("dy",u);let m=d||$v;if(t.tspan){let g=p.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(m)}else p.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),yrt=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,Fh(e,t),n},"drawLabel"),jo=-1,vD=a((e,t,r,n)=>{e.select&&r.forEach(i=>{let s=t.get(i),o=e.select("#actor"+s.actorCnt);!n.mirrorActors&&s.stopy?o.attr("y2",s.stopy+s.height/2):n.mirrorActors&&o.attr("y2",s.stopy)})},"fixLifeLineHeights"),lLt=a(function(e,t,r,n){let i=n?t.stopy:t.starty,s=t.x+t.width/2,o=i+t.height,l=e.append("g").lower();var u=l;n||(jo++,Object.keys(t.links||{}).length&&!r.forceMenus&&u.attr("onclick",oLt(`actor${jo}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+jo).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),u=l.append("g"),t.actorCnt=jo,t.links!=null&&u.attr("id","root-"+jo));let h=Ia();var f="actor";t.properties?.class?f=t.properties.class:h.fill="#eaeaea",n?f+=` ${grt}`:f+=` ${mrt}`,h.x=t.x,h.y=i,h.width=t.width,h.height=t.height,h.class=f,h.rx=3,h.ry=3,h.name=t.name;let d=ED(u,h);if(t.rectData=h,t.properties?.icon){let m=t.properties.icon.trim();m.charAt(0)==="@"?M9(u,h.x+h.width-20,h.y+10,m.substr(1)):N9(u,h.x+h.width-20,h.y+10,m)}AD(r,Tn(t.description))(t.description,u,h.x,h.y,h.width,h.height,{class:`actor ${sLt}`},r);let p=t.height;if(d.node){let m=d.node().getBBox();t.height=m.height,p=m.height}return p},"drawActorTypeParticipant"),cLt=a(function(e,t,r,n){let i=n?t.stopy:t.starty,s=t.x+t.width/2,o=i+80,l=e.append("g").lower();n||(jo++,l.append("line").attr("id","actor"+jo).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=jo);let u=e.append("g"),h=prt;n?h+=` ${grt}`:h+=` ${mrt}`,u.attr("class",h),u.attr("name",t.name);let f=Ia();f.x=t.x,f.y=i,f.fill="#eaeaea",f.width=t.width,f.height=t.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+jo).attr("x1",s).attr("y1",i+25).attr("x2",s).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+jo).attr("x1",s-Xc/2).attr("y1",i+33).attr("x2",s+Xc/2).attr("y2",i+33),u.append("line").attr("x1",s-Xc/2).attr("y1",i+60).attr("x2",s).attr("y2",i+45),u.append("line").attr("x1",s).attr("y1",i+45).attr("x2",s+Xc/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",t.x+t.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",t.width),d.attr("height",t.height);let p=u.node().getBBox();return t.height=p.height,AD(r,Tn(t.description))(t.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${prt}`},r),t.height},"drawActorTypeActor"),uLt=a(async function(e,t,r,n){switch(t.type){case"actor":return await cLt(e,t,r,n);case"participant":return await lLt(e,t,r,n)}},"drawActor"),hLt=a(function(e,t,r){let i=e.append("g");xrt(i,t),t.name&&AD(r)(t.name,i,t.x,t.y+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),fLt=a(function(e){return e.append("g")},"anchorElement"),dLt=a(function(e,t,r,n,i){let s=Ia(),o=t.anchored;s.x=t.startx,s.y=t.starty,s.class="activation"+i%3,s.width=t.stopx-t.startx,s.height=r-t.starty,ED(o,s)},"drawActivation"),pLt=a(async function(e,t,r,n){let{boxMargin:i,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=e.append("g"),p=a(function(y,b,k,T){return d.append("line").attr("x1",y).attr("y1",b).attr("x2",k).attr("y2",T).attr("class","loopLine")},"drawLoopLine");p(t.startx,t.starty,t.stopx,t.starty),p(t.stopx,t.starty,t.stopx,t.stopy),p(t.startx,t.stopy,t.stopx,t.stopy),p(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(y){p(t.startx,y.y,t.stopx,y.y).style("stroke-dasharray","3, 3")});let m=Zg();m.text=r,m.x=t.startx,m.y=t.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=o||20,m.textMargin=s,m.class="labelText",yrt(d,m),m=brt(),m.text=t.title,m.x=t.startx+l/2+(t.stopx-t.startx)/2,m.y=t.starty+i+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=Tn(m.text)?await Dy(d,m,t):Fh(d,m);if(t.sectionTitles!==void 0){for(let[y,b]of Object.entries(t.sectionTitles))if(b.message){m.text=b.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[y].y+i+s,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=t.wrap,Tn(m.text)?(t.starty=t.sections[y].y,await Dy(d,m,t)):Fh(d,m);let k=Math.round(g.map(T=>(T._groups||T)[0][0].getBBox().height).reduce((T,_)=>T+_));t.sections[y].height+=k-(i+s)}}return t.height=Math.round(t.stopy-t.starty),d},"drawLoop"),xrt=a(function(e,t){M2(e,t)},"drawBackgroundRect"),mLt=a(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),gLt=a(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),yLt=a(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),xLt=a(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),bLt=a(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),kLt=a(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),TLt=a(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),brt=a(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),SLt=a(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),AD=function(){function e(s,o,l,u,h,f,d){let p=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(s);i(p,d)}a(e,"byText");function t(s,o,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[b,k]=mo(m),T=s.split(Rt.lineBreakRegex);for(let _=0;_{let o=$h(lt),l=s.actorKeys.reduce((f,d)=>f+=e.get(d).width+(e.get(d).margin||0),0);l-=2*lt.boxTextMargin,s.wrap&&(s.name=se.wrapLabel(s.name,l-2*lt.wrapPadding,o));let u=se.calculateTextDimensions(s.name,o);i=Rt.getMax(u.height,i);let h=Rt.getMax(l,u.width+2*lt.wrapPadding);if(s.margin=lt.boxTextMargin,ls.textMaxHeight=i),Rt.getMax(n,lt.height)}var lt,Ot,CLt,$h,km,LD,ELt,vLt,RD,Srt,_rt,d_,Trt,LLt,DLt,NLt,MLt,OLt,Crt,wrt=x(()=>{"use strict";$e();krt();zt();Fe();Jg();pe();tf();Ee();Gn();lt={},Ot={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:a(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:a(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:a(function(e){this.boxes.push(e)},"addBox"),addActor:a(function(e){this.actors.push(e)},"addActor"),addLoop:a(function(e){this.loops.push(e)},"addLoop"),addMessage:a(function(e){this.messages.push(e)},"addMessage"),addNote:a(function(e){this.notes.push(e)},"addNote"),lastActor:a(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:a(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:a(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:a(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:a(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,_rt(Y())},"init"),updateVal:a(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:a(function(e,t,r,n){let i=this,s=0;function o(l){return a(function(h){s++;let f=i.sequenceItems.length-s+1;i.updateVal(h,"starty",t-f*lt.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*lt.boxMargin,Math.max),i.updateVal(Ot.data,"startx",e-f*lt.boxMargin,Math.min),i.updateVal(Ot.data,"stopx",r+f*lt.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",e-f*lt.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*lt.boxMargin,Math.max),i.updateVal(Ot.data,"starty",t-f*lt.boxMargin,Math.min),i.updateVal(Ot.data,"stopy",n+f*lt.boxMargin,Math.max))},"updateItemBounds")}a(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:a(function(e,t,r,n){let i=Rt.getMin(e,r),s=Rt.getMax(e,r),o=Rt.getMin(t,n),l=Rt.getMax(t,n);this.updateVal(Ot.data,"startx",i,Math.min),this.updateVal(Ot.data,"starty",o,Math.min),this.updateVal(Ot.data,"stopx",s,Math.max),this.updateVal(Ot.data,"stopy",l,Math.max),this.updateBounds(i,o,s,l)},"insert"),newActivation:a(function(e,t,r){let n=r.get(e.from),i=d_(e.from).length||0,s=n.x+n.width/2+(i-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:e.from,anchored:hn.anchorElement(t)})},"newActivation"),endActivation:a(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:a(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:a(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:a(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Ot.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:a(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:a(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:a(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=Rt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:a(function(){return this.verticalPos},"getVerticalPos"),getBounds:a(function(){return{bounds:this.data,models:this.models}},"getBounds")},CLt=a(async function(e,t){Ot.bumpVerticalPos(lt.boxMargin),t.height=lt.boxMargin,t.starty=Ot.getVerticalPos();let r=Ia();r.x=t.startx,r.y=t.starty,r.width=t.width||lt.width,r.class="note";let n=e.append("g"),i=hn.drawRect(n,r),s=Zg();s.x=t.startx,s.y=t.starty,s.width=r.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";let o=Tn(s.text)?await Dy(n,s):Fh(n,s),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*lt.noteMargin),t.height+=l+2*lt.noteMargin,Ot.bumpVerticalPos(l+2*lt.noteMargin),t.stopy=t.starty+l+2*lt.noteMargin,t.stopx=t.startx+r.width,Ot.insert(t.startx,t.starty,t.stopx,t.stopy),Ot.models.addNote(t)},"drawNote"),$h=a(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),km=a(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),LD=a(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");a(wLt,"boundMessage");ELt=a(async function(e,t,r,n){let{startx:i,stopx:s,starty:o,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=t,d=se.calculateTextDimensions(l,$h(lt)),p=Zg();p.x=i,p.y=o+10,p.width=s-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,Tn(p.text)?await Dy(e,p,{startx:i,stopx:s,starty:r}):Fh(e,p);let m=d.width,g;i===s?lt.rightAngles?g=e.append("path").attr("d",`M ${i},${r} H ${i+Rt.getMax(lt.width/2,m/2)} V ${r+25} H ${i}`):g=e.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=e.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",s),g.attr("y2",r)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";lt.arrowMarkerAbsolute&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||lt.showSequenceNumbers)&&(g.attr("marker-start","url("+y+"#sequencenumber)"),e.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},"drawMessage"),vLt=a(function(e,t,r,n,i,s,o){let l=0,u=0,h,f=0;for(let d of n){let p=t.get(d),m=p.box;h&&h!=m&&(o||Ot.models.addBox(h),u+=lt.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||lt.width,p.height=Rt.getMax(p.height||lt.height,lt.height),p.margin=p.margin||lt.actorMargin,f=Rt.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Ot.getVerticalPos(),Ot.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Ot.models.addActor(p)}h&&!o&&Ot.models.addBox(h),Ot.bumpVerticalPos(f)},"addActorRenderingData"),RD=a(async function(e,t,r,n){if(n){let i=0;Ot.bumpVerticalPos(lt.boxMargin*2);for(let s of r){let o=t.get(s);o.stopy||(o.stopy=Ot.getVerticalPos());let l=await hn.drawActor(e,o,lt,!0);i=Rt.getMax(i,l)}Ot.bumpVerticalPos(i+lt.boxMargin)}else for(let i of r){let s=t.get(i);await hn.drawActor(e,s,lt,!1)}},"drawActors"),Srt=a(function(e,t,r,n){let i=0,s=0;for(let o of r){let l=t.get(o),u=DLt(l),h=hn.drawPopup(e,l,u,lt,lt.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>s&&(s=h.width+l.x)}return{maxHeight:i,maxWidth:s}},"drawActorsPopup"),_rt=a(function(e){Hr(lt,e),e.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=e.fontFamily),e.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=e.fontSize),e.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=e.fontWeight)},"setConf"),d_=a(function(e){return Ot.activations.filter(function(t){return t.actor===e})},"actorActivations"),Trt=a(function(e,t){let r=t.get(e),n=d_(e),i=n.reduce(function(o,l){return Rt.getMin(o,l.startx)},r.x+r.width/2-1),s=n.reduce(function(o,l){return Rt.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,s]},"activationBounds");a(qo,"adjustLoopHeightForWrap");a(ALt,"adjustCreatedDestroyedData");LLt=a(async function(e,t,r,n){let{securityLevel:i,sequence:s}=Y();lt=s;let o;i==="sandbox"&&(o=xt("#i"+t));let l=i==="sandbox"?xt(o.nodes()[0].contentDocument.body):xt("body"),u=i==="sandbox"?o.nodes()[0].contentDocument:document;Ot.init(),P.debug(n.db);let h=i==="sandbox"?l.select(`[id="${t}"]`):xt(`[id="${t}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),b=n.db.getDiagramTitle(),k=n.db.hasAtLeastOneBox(),T=n.db.hasAtLeastOneBoxWithTitle(),_=await RLt(f,y,n);if(lt.height=await ILt(f,_,m),hn.insertComputerIcon(h),hn.insertDatabaseIcon(h),hn.insertClockIcon(h),k&&(Ot.bumpVerticalPos(lt.boxMargin),T&&Ot.bumpVerticalPos(m[0].textMaxHeight)),lt.hideUnusedParticipants===!0){let N=new Set;y.forEach(E=>{N.add(E.from),N.add(E.to)}),g=g.filter(E=>N.has(E))}vLt(h,f,d,g,0,y,!1);let L=await OLt(y,f,_,n);hn.insertArrowHead(h),hn.insertArrowCrossHead(h),hn.insertArrowFilledHead(h),hn.insertSequenceNumber(h);function C(N,E){let V=Ot.endActivation(N);V.starty+18>E&&(V.starty=E-6,E+=12),hn.drawActivation(h,V,E,lt,d_(N.from).length),Ot.insert(V.startx,E-10,V.stopx,E)}a(C,"activeEnd");let D=1,$=1,w=[],A=[],F=0;for(let N of y){let E,V,G;switch(N.type){case n.db.LINETYPE.NOTE:Ot.resetVerticalPos(),V=N.noteModel,await CLt(h,V);break;case n.db.LINETYPE.ACTIVE_START:Ot.newActivation(N,h,f);break;case n.db.LINETYPE.ACTIVE_END:C(N,Ot.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:qo(L,N,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,J=>Ot.newLoop(J));break;case n.db.LINETYPE.LOOP_END:E=Ot.endLoop(),await hn.drawLoop(h,E,"loop",lt),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos()),Ot.models.addLoop(E);break;case n.db.LINETYPE.RECT_START:qo(L,N,lt.boxMargin,lt.boxMargin,J=>Ot.newLoop(void 0,J.message));break;case n.db.LINETYPE.RECT_END:E=Ot.endLoop(),A.push(E),Ot.models.addLoop(E),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos());break;case n.db.LINETYPE.OPT_START:qo(L,N,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,J=>Ot.newLoop(J));break;case n.db.LINETYPE.OPT_END:E=Ot.endLoop(),await hn.drawLoop(h,E,"opt",lt),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos()),Ot.models.addLoop(E);break;case n.db.LINETYPE.ALT_START:qo(L,N,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,J=>Ot.newLoop(J));break;case n.db.LINETYPE.ALT_ELSE:qo(L,N,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,J=>Ot.addSectionToLoop(J));break;case n.db.LINETYPE.ALT_END:E=Ot.endLoop(),await hn.drawLoop(h,E,"alt",lt),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos()),Ot.models.addLoop(E);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:qo(L,N,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,J=>Ot.newLoop(J)),Ot.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:qo(L,N,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,J=>Ot.addSectionToLoop(J));break;case n.db.LINETYPE.PAR_END:E=Ot.endLoop(),await hn.drawLoop(h,E,"par",lt),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos()),Ot.models.addLoop(E);break;case n.db.LINETYPE.AUTONUMBER:D=N.message.start||D,$=N.message.step||$,N.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:qo(L,N,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,J=>Ot.newLoop(J));break;case n.db.LINETYPE.CRITICAL_OPTION:qo(L,N,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,J=>Ot.addSectionToLoop(J));break;case n.db.LINETYPE.CRITICAL_END:E=Ot.endLoop(),await hn.drawLoop(h,E,"critical",lt),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos()),Ot.models.addLoop(E);break;case n.db.LINETYPE.BREAK_START:qo(L,N,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,J=>Ot.newLoop(J));break;case n.db.LINETYPE.BREAK_END:E=Ot.endLoop(),await hn.drawLoop(h,E,"break",lt),Ot.bumpVerticalPos(E.stopy-Ot.getVerticalPos()),Ot.models.addLoop(E);break;default:try{G=N.msgModel,G.starty=Ot.getVerticalPos(),G.sequenceIndex=D,G.sequenceVisible=n.db.showSequenceNumbers();let J=await wLt(h,G);ALt(N,G,J,F,f,d,p),w.push({messageModel:G,lineStartY:J}),Ot.models.addMessage(G)}catch(J){P.error("error while drawing message",J)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(N.type)&&(D=D+$),F++}P.debug("createdActors",d),P.debug("destroyedActors",p),await RD(h,f,g,!1);for(let N of w)await ELt(h,N.messageModel,N.lineStartY,n);lt.mirrorActors&&await RD(h,f,g,!0),A.forEach(N=>hn.drawBackgroundRect(h,N)),vD(h,f,g,lt);for(let N of Ot.models.boxes)N.height=Ot.getVerticalPos()-N.y,Ot.insert(N.x,N.y,N.x+N.width,N.height),N.startx=N.x,N.starty=N.y,N.stopx=N.startx+N.width,N.stopy=N.starty+N.height,N.stroke="rgb(0,0,0, 0.5)",hn.drawBox(h,N,lt);k&&Ot.bumpVerticalPos(lt.boxMargin);let S=Srt(h,f,g,u),{bounds:v}=Ot.getBounds();v.startx===void 0&&(v.startx=0),v.starty===void 0&&(v.starty=0),v.stopx===void 0&&(v.stopx=0),v.stopy===void 0&&(v.stopy=0);let R=v.stopy-v.starty;R2,d=a(y=>l?-y:y,"adjustValue");e.from===e.to?h=u:(e.activate&&!f&&(h+=d(lt.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(u-=d(3)));let p=[n,i,s,o],m=Math.abs(u-h);e.wrap&&e.message&&(e.message=se.wrapLabel(e.message,Rt.getMax(m+2*lt.wrapPadding,lt.width),$h(lt)));let g=se.calculateTextDimensions(e.message,$h(lt));return{width:Rt.getMax(e.wrap?0:g.width+2*lt.wrapPadding,m+2*lt.wrapPadding,lt.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),OLt=a(async function(e,t,r,n){let i={},s=[],o,l,u;for(let h of e){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(o=s.pop(),i[o.id]=o,i[h.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let d=t.get(h.from?h.from:h.to.actor),p=d_(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*lt.activationWidth/2,g={startx:m,stopx:m+lt.activationWidth,actor:h.from,enabled:!0};Ot.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let d=Ot.activations.map(p=>p.actor).lastIndexOf(h.from);Ot.activations.splice(d,1).splice(0,1)}break}h.placement!==void 0?(l=await NLt(h,t,n),h.noteModel=l,s.forEach(d=>{o=d,o.from=Rt.getMin(o.from,l.startx),o.to=Rt.getMax(o.to,l.startx+l.width),o.width=Rt.getMax(o.width,Math.abs(o.from-o.to))-lt.labelBoxWidth})):(u=MLt(h,t,n),h.msgModel=u,u.startx&&u.stopx&&s.length>0&&s.forEach(d=>{if(o=d,u.startx===u.stopx){let p=t.get(h.from),m=t.get(h.to);o.from=Rt.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=Rt.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=Rt.getMax(o.width,Math.abs(o.to-o.from))-lt.labelBoxWidth}else o.from=Rt.getMin(u.startx,o.from),o.to=Rt.getMax(u.stopx,o.to),o.width=Rt.getMax(o.width,u.width)-lt.labelBoxWidth}))}return Ot.activations=[],P.debug("Loop type widths:",i),i},"calculateLoopBounds"),Crt={bounds:Ot,drawActors:RD,drawActorsPopup:Srt,setConf:_rt,draw:LLt}});var Ert={};Be(Ert,{diagram:()=>PLt});var PLt,vrt=x(()=>{"use strict";urt();hrt();drt();pe();wrt();PLt={parser:crt,get db(){return new f_},renderer:Crt,styles:frt,init:a(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,eg({sequence:{wrap:e.wrap}}))},"init")}});var DD,p_,ID=x(()=>{"use strict";DD=function(){var e=a(function(It,yt,ht,wt){for(ht=ht||{},wt=It.length;wt--;ht[It[wt]]=yt);return ht},"o"),t=[1,18],r=[1,19],n=[1,20],i=[1,41],s=[1,42],o=[1,26],l=[1,24],u=[1,25],h=[1,32],f=[1,33],d=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],b=[1,38],k=[1,27],T=[1,28],_=[1,29],L=[1,30],C=[1,31],D=[1,44],$=[1,46],w=[1,43],A=[1,47],F=[1,9],S=[1,8,9],v=[1,58],R=[1,59],B=[1,60],I=[1,61],M=[1,62],O=[1,63],N=[1,64],E=[1,8,9,41],V=[1,76],G=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],J=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],rt=[13,58,84,99,101,102],nt=[13,58,71,72,84,99,101,102],ct=[13,58,66,67,68,69,70,84,99,101,102],pt=[1,98],Lt=[1,115],bt=[1,107],ut=[1,113],it=[1,108],st=[1,109],X=[1,110],H=[1,111],at=[1,112],W=[1,114],mt=[22,58,59,80,84,85,86,87,88,89],q=[1,8,9,39,41,44],Z=[1,8,9,22],ye=[1,143],ot=[1,8,9,59],Jt=[1,8,9,22,58,59,80,84,85,86,87,88,89],ve={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:a(function(yt,ht,wt,Q,Nt,z,$t){var U=z.length-1;switch(Nt){case 8:this.$=z[U-1];break;case 9:case 12:case 14:this.$=z[U];break;case 10:case 13:this.$=z[U-2]+"."+z[U];break;case 11:case 15:this.$=z[U-1]+z[U];break;case 16:case 17:this.$=z[U-1]+"~"+z[U]+"~";break;case 18:Q.addRelation(z[U]);break;case 19:z[U-1].title=Q.cleanupLabel(z[U]),Q.addRelation(z[U-1]);break;case 30:this.$=z[U].trim(),Q.setAccTitle(this.$);break;case 31:case 32:this.$=z[U].trim(),Q.setAccDescription(this.$);break;case 33:Q.addClassesToNamespace(z[U-3],z[U-1]);break;case 34:Q.addClassesToNamespace(z[U-4],z[U-1]);break;case 35:this.$=z[U],Q.addNamespace(z[U]);break;case 36:this.$=[z[U]];break;case 37:this.$=[z[U-1]];break;case 38:z[U].unshift(z[U-2]),this.$=z[U];break;case 40:Q.setCssClass(z[U-2],z[U]);break;case 41:Q.addMembers(z[U-3],z[U-1]);break;case 42:Q.setCssClass(z[U-5],z[U-3]),Q.addMembers(z[U-5],z[U-1]);break;case 43:this.$=z[U],Q.addClass(z[U]);break;case 44:this.$=z[U-1],Q.addClass(z[U-1]),Q.setClassLabel(z[U-1],z[U]);break;case 45:Q.addAnnotation(z[U],z[U-2]);break;case 46:case 59:this.$=[z[U]];break;case 47:z[U].push(z[U-1]),this.$=z[U];break;case 48:break;case 49:Q.addMember(z[U-1],Q.cleanupLabel(z[U]));break;case 50:break;case 51:break;case 52:this.$={id1:z[U-2],id2:z[U],relation:z[U-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:z[U-3],id2:z[U],relation:z[U-1],relationTitle1:z[U-2],relationTitle2:"none"};break;case 54:this.$={id1:z[U-3],id2:z[U],relation:z[U-2],relationTitle1:"none",relationTitle2:z[U-1]};break;case 55:this.$={id1:z[U-4],id2:z[U],relation:z[U-2],relationTitle1:z[U-3],relationTitle2:z[U-1]};break;case 56:Q.addNote(z[U],z[U-1]);break;case 57:Q.addNote(z[U]);break;case 58:this.$=z[U-2],Q.defineClass(z[U-1],z[U]);break;case 60:this.$=z[U-2].concat([z[U]]);break;case 61:Q.setDirection("TB");break;case 62:Q.setDirection("BT");break;case 63:Q.setDirection("RL");break;case 64:Q.setDirection("LR");break;case 65:this.$={type1:z[U-2],type2:z[U],lineType:z[U-1]};break;case 66:this.$={type1:"none",type2:z[U],lineType:z[U-1]};break;case 67:this.$={type1:z[U-1],type2:"none",lineType:z[U]};break;case 68:this.$={type1:"none",type2:"none",lineType:z[U]};break;case 69:this.$=Q.relationType.AGGREGATION;break;case 70:this.$=Q.relationType.EXTENSION;break;case 71:this.$=Q.relationType.COMPOSITION;break;case 72:this.$=Q.relationType.DEPENDENCY;break;case 73:this.$=Q.relationType.LOLLIPOP;break;case 74:this.$=Q.lineType.LINE;break;case 75:this.$=Q.lineType.DOTTED_LINE;break;case 76:case 82:this.$=z[U-2],Q.setClickEvent(z[U-1],z[U]);break;case 77:case 83:this.$=z[U-3],Q.setClickEvent(z[U-2],z[U-1]),Q.setTooltip(z[U-2],z[U]);break;case 78:this.$=z[U-2],Q.setLink(z[U-1],z[U]);break;case 79:this.$=z[U-3],Q.setLink(z[U-2],z[U-1],z[U]);break;case 80:this.$=z[U-3],Q.setLink(z[U-2],z[U-1]),Q.setTooltip(z[U-2],z[U]);break;case 81:this.$=z[U-4],Q.setLink(z[U-3],z[U-2],z[U]),Q.setTooltip(z[U-3],z[U-1]);break;case 84:this.$=z[U-3],Q.setClickEvent(z[U-2],z[U-1],z[U]);break;case 85:this.$=z[U-4],Q.setClickEvent(z[U-3],z[U-2],z[U-1]),Q.setTooltip(z[U-3],z[U]);break;case 86:this.$=z[U-3],Q.setLink(z[U-2],z[U]);break;case 87:this.$=z[U-4],Q.setLink(z[U-3],z[U-1],z[U]);break;case 88:this.$=z[U-4],Q.setLink(z[U-3],z[U-1]),Q.setTooltip(z[U-3],z[U]);break;case 89:this.$=z[U-5],Q.setLink(z[U-4],z[U-2],z[U]),Q.setTooltip(z[U-4],z[U-1]);break;case 90:this.$=z[U-2],Q.setCssStyle(z[U-1],z[U]);break;case 91:Q.setCssClass(z[U-1],z[U]);break;case 92:this.$=[z[U]];break;case 93:z[U-2].push(z[U]),this.$=z[U-2];break;case 95:this.$=z[U-1]+z[U];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:C,84:D,99:$,101:w,102:A},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(F,[2,5],{8:[1,48]}),{8:[1,49]},e(S,[2,18],{22:[1,50]}),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(S,[2,23]),e(S,[2,24]),e(S,[2,25]),e(S,[2,26]),e(S,[2,27]),e(S,[2,28]),e(S,[2,29]),{34:[1,51]},{36:[1,52]},e(S,[2,32]),e(S,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:v,67:R,68:B,69:I,70:M,71:O,72:N}),{39:[1,65]},e(E,[2,39],{39:[1,67],44:[1,66]}),e(S,[2,50]),e(S,[2,51]),{16:68,58:p,84:D,99:$,101:w},{16:39,18:69,19:40,58:p,84:D,99:$,101:w,102:A},{16:39,18:70,19:40,58:p,84:D,99:$,101:w,102:A},{16:39,18:71,19:40,58:p,84:D,99:$,101:w,102:A},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:p,84:D,99:$,101:w,102:A},{13:V,53:75},{56:77,58:[1,78]},e(S,[2,61]),e(S,[2,62]),e(S,[2,63]),e(S,[2,64]),e(G,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:p,84:D,99:$,101:w,102:A}),e(G,[2,14],{20:[1,82]}),{15:83,16:84,58:p,84:D,99:$,101:w},{16:39,18:85,19:40,58:p,84:D,99:$,101:w,102:A},e(J,[2,118]),e(J,[2,119]),e(J,[2,120]),e(J,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(F,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:t,35:r,37:n,42:i,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:C,84:D,99:$,101:w,102:A}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:r,37:n,38:22,42:i,43:23,46:s,47:o,49:l,50:u,52:h,54:f,55:d,58:p,60:m,61:g,62:y,63:b,73:k,74:T,76:_,80:L,81:C,84:D,99:$,101:w,102:A},e(S,[2,19]),e(S,[2,30]),e(S,[2,31]),{13:[1,89],16:39,18:88,19:40,58:p,84:D,99:$,101:w,102:A},{51:90,64:56,65:57,66:v,67:R,68:B,69:I,70:M,71:O,72:N},e(S,[2,49]),{65:91,71:O,72:N},e(rt,[2,68],{64:92,66:v,67:R,68:B,69:I,70:M}),e(nt,[2,69]),e(nt,[2,70]),e(nt,[2,71]),e(nt,[2,72]),e(nt,[2,73]),e(ct,[2,74]),e(ct,[2,75]),{8:[1,94],24:95,40:93,43:23,46:s},{16:96,58:p,84:D,99:$,101:w},{45:97,49:pt},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:Lt,57:104,58:bt,80:ut,82:105,83:106,84:it,85:st,86:X,87:H,88:at,89:W},{58:[1,116]},{13:V,53:117},e(S,[2,57]),e(S,[2,123]),{22:Lt,57:118,58:bt,59:[1,119],80:ut,82:105,83:106,84:it,85:st,86:X,87:H,88:at,89:W},e(mt,[2,59]),{16:39,18:120,19:40,58:p,84:D,99:$,101:w,102:A},e(G,[2,15]),e(G,[2,16]),e(G,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:p,84:D,99:$,101:w},e(q,[2,43],{11:123,12:[1,124]}),e(F,[2,7]),{9:[1,125]},e(Z,[2,52]),{16:39,18:126,19:40,58:p,84:D,99:$,101:w,102:A},{13:[1,128],16:39,18:127,19:40,58:p,84:D,99:$,101:w,102:A},e(rt,[2,67],{64:129,66:v,67:R,68:B,69:I,70:M}),e(rt,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},e(E,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:pt},{16:39,18:136,19:40,58:p,84:D,99:$,101:w,102:A},e(S,[2,76],{13:[1,137]}),e(S,[2,78],{13:[1,139],75:[1,138]}),e(S,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(S,[2,90],{59:ye}),e(ot,[2,92],{83:144,22:Lt,58:bt,80:ut,84:it,85:st,86:X,87:H,88:at,89:W}),e(Jt,[2,94]),e(Jt,[2,96]),e(Jt,[2,97]),e(Jt,[2,98]),e(Jt,[2,99]),e(Jt,[2,100]),e(Jt,[2,101]),e(Jt,[2,102]),e(Jt,[2,103]),e(Jt,[2,104]),e(S,[2,91]),e(S,[2,56]),e(S,[2,58],{59:ye}),{58:[1,145]},e(G,[2,13]),{15:146,16:84,58:p,84:D,99:$,101:w},{39:[2,11]},e(q,[2,44]),{13:[1,147]},{1:[2,4]},e(Z,[2,54]),e(Z,[2,53]),{16:39,18:148,19:40,58:p,84:D,99:$,101:w,102:A},e(rt,[2,65]),e(S,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:pt},e(E,[2,41]),{41:[2,47]},e(S,[2,45]),e(S,[2,77]),e(S,[2,79]),e(S,[2,80],{75:[1,152]}),e(S,[2,83]),e(S,[2,84],{13:[1,153]}),e(S,[2,86],{13:[1,155],75:[1,154]}),{22:Lt,58:bt,80:ut,82:156,83:106,84:it,85:st,86:X,87:H,88:at,89:W},e(Jt,[2,95]),e(mt,[2,60]),{39:[2,10]},{14:[1,157]},e(Z,[2,55]),e(S,[2,34]),{41:[2,38]},{41:[1,158]},e(S,[2,81]),e(S,[2,85]),e(S,[2,87]),e(S,[2,88],{75:[1,159]}),e(ot,[2,93],{83:144,22:Lt,58:bt,80:ut,84:it,85:st,86:X,87:H,88:at,89:W}),e(q,[2,8]),e(E,[2,42]),e(S,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:a(function(yt,ht){if(ht.recoverable)this.trace(yt);else{var wt=new Error(yt);throw wt.hash=ht,wt}},"parseError"),parse:a(function(yt){var ht=this,wt=[0],Q=[],Nt=[null],z=[],$t=this.table,U="",Tt=0,gt=0,Yt=0,Mt=2,kt=1,Ge=z.slice.call(arguments,1),Pt=Object.create(this.lexer),nr={yy:{}};for(var Ze in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ze)&&(nr.yy[Ze]=this.yy[Ze]);Pt.setInput(yt,nr.yy),nr.yy.lexer=Pt,nr.yy.parser=this,typeof Pt.yylloc>"u"&&(Pt.yylloc={});var yr=Pt.yylloc;z.push(yr);var Je=Pt.options&&Pt.options.ranges;typeof nr.yy.parseError=="function"?this.parseError=nr.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(ne){wt.length=wt.length-2*ne,Nt.length=Nt.length-ne,z.length=z.length-ne}a(ke,"popStack");function He(){var ne;return ne=Q.pop()||Pt.lex()||kt,typeof ne!="number"&&(ne instanceof Array&&(Q=ne,ne=Q.pop()),ne=ht.symbols_[ne]||ne),ne}a(He,"lex");for(var Te,ur,yn,we,Oe,Ae,xe={},he,ge,be,jt;;){if(yn=wt[wt.length-1],this.defaultActions[yn]?we=this.defaultActions[yn]:((Te===null||typeof Te>"u")&&(Te=He()),we=$t[yn]&&$t[yn][Te]),typeof we>"u"||!we.length||!we[0]){var An="";jt=[];for(he in $t[yn])this.terminals_[he]&&he>Mt&&jt.push("'"+this.terminals_[he]+"'");Pt.showPosition?An="Parse error on line "+(Tt+1)+`: +`+Pt.showPosition()+` +Expecting `+jt.join(", ")+", got '"+(this.terminals_[Te]||Te)+"'":An="Parse error on line "+(Tt+1)+": Unexpected "+(Te==kt?"end of input":"'"+(this.terminals_[Te]||Te)+"'"),this.parseError(An,{text:Pt.match,token:this.terminals_[Te]||Te,line:Pt.yylineno,loc:yr,expected:jt})}if(we[0]instanceof Array&&we.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yn+", token: "+Te);switch(we[0]){case 1:wt.push(Te),Nt.push(Pt.yytext),z.push(Pt.yylloc),wt.push(we[1]),Te=null,ur?(Te=ur,ur=null):(gt=Pt.yyleng,U=Pt.yytext,Tt=Pt.yylineno,yr=Pt.yylloc,Yt>0&&Yt--);break;case 2:if(ge=this.productions_[we[1]][1],xe.$=Nt[Nt.length-ge],xe._$={first_line:z[z.length-(ge||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(ge||1)].first_column,last_column:z[z.length-1].last_column},Je&&(xe._$.range=[z[z.length-(ge||1)].range[0],z[z.length-1].range[1]]),Ae=this.performAction.apply(xe,[U,gt,Tt,nr.yy,we[1],Nt,z].concat(Ge)),typeof Ae<"u")return Ae;ge&&(wt=wt.slice(0,-1*ge*2),Nt=Nt.slice(0,-1*ge),z=z.slice(0,-1*ge)),wt.push(this.productions_[we[1]][0]),Nt.push(xe.$),z.push(xe._$),be=$t[wt[wt.length-2]][wt[wt.length-1]],wt.push(be);break;case 3:return!0}}return!0},"parse")},te=function(){var It={EOF:1,parseError:a(function(ht,wt){if(this.yy.parser)this.yy.parser.parseError(ht,wt);else throw new Error(ht)},"parseError"),setInput:a(function(yt,ht){return this.yy=ht||this.yy||{},this._input=yt,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:a(function(){var yt=this._input[0];this.yytext+=yt,this.yyleng++,this.offset++,this.match+=yt,this.matched+=yt;var ht=yt.match(/(?:\r\n?|\n).*/g);return ht?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),yt},"input"),unput:a(function(yt){var ht=yt.length,wt=yt.split(/(?:\r\n?|\n)/g);this._input=yt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ht),this.offset-=ht;var Q=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),wt.length-1&&(this.yylineno-=wt.length-1);var Nt=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:wt?(wt.length===Q.length?this.yylloc.first_column:0)+Q[Q.length-wt.length].length-wt[0].length:this.yylloc.first_column-ht},this.options.ranges&&(this.yylloc.range=[Nt[0],Nt[0]+this.yyleng-ht]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(yt){this.unput(this.match.slice(yt))},"less"),pastInput:a(function(){var yt=this.matched.substr(0,this.matched.length-this.match.length);return(yt.length>20?"...":"")+yt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var yt=this.match;return yt.length<20&&(yt+=this._input.substr(0,20-yt.length)),(yt.substr(0,20)+(yt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var yt=this.pastInput(),ht=new Array(yt.length+1).join("-");return yt+this.upcomingInput()+` +`+ht+"^"},"showPosition"),test_match:a(function(yt,ht){var wt,Q,Nt;if(this.options.backtrack_lexer&&(Nt={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&&(Nt.yylloc.range=this.yylloc.range.slice(0))),Q=yt[0].match(/(?:\r\n?|\n).*/g),Q&&(this.yylineno+=Q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Q?Q[Q.length-1].length-Q[Q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+yt[0].length},this.yytext+=yt[0],this.match+=yt[0],this.matches=yt,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(yt[0].length),this.matched+=yt[0],wt=this.performAction.call(this,this.yy,this,ht,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),wt)return wt;if(this._backtrack){for(var z in Nt)this[z]=Nt[z];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var yt,ht,wt,Q;this._more||(this.yytext="",this.match="");for(var Nt=this._currentRules(),z=0;zht[0].length)){if(ht=wt,Q=z,this.options.backtrack_lexer){if(yt=this.test_match(wt,Nt[z]),yt!==!1)return yt;if(this._backtrack){ht=!1;continue}else return!1}else if(!this.options.flex)break}return ht?(yt=this.test_match(ht,Nt[Q]),yt!==!1?yt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var ht=this.next();return ht||this.lex()},"lex"),begin:a(function(ht){this.conditionStack.push(ht)},"begin"),popState:a(function(){var ht=this.conditionStack.length-1;return ht>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(ht){return ht=this.conditionStack.length-1-Math.abs(ht||0),ht>=0?this.conditionStack[ht]:"INITIAL"},"topState"),pushState:a(function(ht){this.begin(ht)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(ht,wt,Q,Nt){var z=Nt;switch(Q){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return It}();ve.lexer=te;function vt(){this.yy={}}return a(vt,"Parser"),vt.prototype=ve,ve.Parser=vt,new vt}();DD.parser=DD;p_=DD});var Rrt,Iy,Drt=x(()=>{"use strict";pe();Fe();Rrt=["#","+","~","-",""],Iy=class{static{a(this,"ClassMember")}constructor(t,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let n=er(t,Y());this.parseMember(n)}getDisplayDetails(){let t=this.visibility+eo(this.id);this.memberType==="method"&&(t+=`(${eo(this.parameters.trim())})`,this.returnType&&(t+=" : "+eo(this.returnType))),t=t.trim();let r=this.parseClassifier();return{displayText:t,cssStyle:r}}parseMember(t){let r="";if(this.memberType==="method"){let s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){let o=s[1]?s[1].trim():"";if(Rrt.includes(o)&&(this.visibility=o),this.id=s[2],this.parameters=s[3]?s[3].trim():"",r=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",r===""){let l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(r=l,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let i=t.length,s=t.substring(0,1),o=t.substring(i-1);Rrt.includes(s)&&(this.visibility=s),/[$*]/.exec(o)&&(r=o),this.id=t.substring(this.visibility===""?0:1,r===""?i:i-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let n=`${this.visibility?"\\"+this.visibility:""}${eo(this.id)}${this.memberType==="method"?`(${eo(this.parameters)})${this.returnType?" : "+eo(this.returnType):""}`:""}`;this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}});var m_,Irt,Gh,Tm,ND=x(()=>{"use strict";$e();zt();pe();Fe();Ee();Sn();Drt();m_="classId-",Irt=0,Gh=a(e=>Rt.sanitizeText(e,Y()),"sanitizeText"),Tm=class{constructor(){this.relations=[];this.classes=new Map;this.styleClasses=new Map;this.notes=[];this.interfaces=[];this.namespaces=new Map;this.namespaceCounter=0;this.functions=[];this.lineType={LINE:0,DOTTED_LINE:1};this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4};this.setupToolTips=a(t=>{let r=xt(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=xt("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),xt(t).select("svg").selectAll("g.node").on("mouseover",s=>{let o=xt(s.currentTarget);if(o.attr("title")===null)return;let u=this.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
    ")),o.classed("hover",!0)}).on("mouseout",s=>{r.transition().duration(500).style("opacity",0),xt(s.currentTarget).classed("hover",!1)})},"setupToolTips");this.direction="TB";this.setAccTitle=rr;this.getAccTitle=ir;this.setAccDescription=sr;this.getAccDescription=ar;this.setDiagramTitle=xr;this.getDiagramTitle=or;this.getConfig=a(()=>Y().class,"getConfig");this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{a(this,"ClassDB")}splitClassNameAndType(t){let r=Rt.sanitizeText(t,Y()),n="",i=r;if(r.indexOf("~")>0){let s=r.split("~");i=Gh(s[0]),n=Gh(s[1])}return{className:i,type:n}}setClassLabel(t,r){let n=Rt.sanitizeText(t,Y());r&&(r=Gh(r));let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=r,this.classes.get(i).text=`${r}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){let r=Rt.sanitizeText(t,Y()),{className:n,type:i}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let s=Rt.sanitizeText(n,Y());this.classes.set(s,{id:s,type:i,label:s,text:`${s}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:m_+s+"-"+Irt}),Irt++}addInterface(t,r){let n={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(n)}lookUpDomId(t){let r=Rt.sanitizeText(t,Y());if(this.classes.has(r))return this.classes.get(r).domId;throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",Ye()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){P.debug("Adding relation: "+JSON.stringify(t));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!r.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!r.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=Rt.sanitizeText(t.relationTitle1.trim(),Y()),t.relationTitle2=Rt.sanitizeText(t.relationTitle2.trim(),Y()),this.relations.push(t)}addAnnotation(t,r){let n=this.splitClassNameAndType(t).className;this.classes.get(n).annotations.push(r)}addMember(t,r){this.addClass(t);let n=this.splitClassNameAndType(t).className,i=this.classes.get(n);if(typeof r=="string"){let s=r.trim();s.startsWith("<<")&&s.endsWith(">>")?i.annotations.push(Gh(s.substring(2,s.length-2))):s.indexOf(")")>0?i.methods.push(new Iy(s,"method")):s&&i.members.push(new Iy(s,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(t,n)))}addNote(t,r){let n={id:`note${this.notes.length}`,class:r,text:t};this.notes.push(n)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),Gh(t.trim())}setCssClass(t,r){t.split(",").forEach(n=>{let i=n;/\d/.exec(n[0])&&(i=m_+i);let s=this.classes.get(i);s&&(s.cssClasses+=" "+r)})}defineClass(t,r){for(let n of t){let i=this.styleClasses.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,i)),r&&r.forEach(s=>{if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)}),this.classes.forEach(s=>{s.cssClasses.includes(n)&&s.styles.push(...r.flatMap(o=>o.split(",")))})}}setTooltip(t,r){t.split(",").forEach(n=>{r!==void 0&&(this.classes.get(n).tooltip=Gh(r))})}getTooltip(t,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,r,n){let i=Y();t.split(",").forEach(s=>{let o=s;/\d/.exec(s[0])&&(o=m_+o);let l=this.classes.get(o);l&&(l.link=se.formatUrl(r,i),i.securityLevel==="sandbox"?l.linkTarget="_top":typeof n=="string"?l.linkTarget=Gh(n):l.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFunc(i,r,n),this.classes.get(i).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,r,n){let i=Rt.sanitizeText(t,Y());if(Y().securityLevel!=="loose"||r===void 0)return;let o=i;if(this.classes.has(o)){let l=this.lookUpDomId(o),u=[];if(typeof n=="string"){u=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let h=0;h{let h=document.querySelector(`[id="${l}"]`);h!==null&&h.addEventListener("click",()=>{se.runFunc(r,...u)},!1)})}}bindFunctions(t){this.functions.forEach(r=>{r(t)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:m_+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r){if(this.namespaces.has(t))for(let n of r){let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).parent=t,this.namespaces.get(t).classes.set(i,this.classes.get(i))}}setCssStyle(t,r){let n=this.classes.get(t);if(!(!r||!n))for(let i of r)i.includes(",")?n.styles.push(...i.split(",")):n.styles.push(i)}getArrowMarker(t){let r;switch(t){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}getData(){let t=[],r=[],n=Y();for(let s of this.namespaces.keys()){let o=this.namespaces.get(s);if(o){let l={id:o.id,label:o.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:n.look};t.push(l)}}for(let s of this.classes.keys()){let o=this.classes.get(s);if(o){let l=o;l.parentId=o.parent,l.look=n.look,t.push(l)}}let i=0;for(let s of this.notes){i++;let o={id:s.id,label:s.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look};t.push(o);let l=this.classes.get(s.class)?.id??"";if(l){let u={id:`edgeNote${i}`,start:s.id,end:l,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(u)}}for(let s of this.interfaces){let o={id:s.id,label:s.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};t.push(o)}i=0;for(let s of this.relations){i++;let o={id:gc(s.id1,s.id2,{prefix:"id",counter:i}),start:s.id1,end:s.id2,type:"normal",label:s.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(s.relation.type1),arrowTypeEnd:this.getArrowMarker(s.relation.type2),startLabelRight:s.relationTitle1==="none"?"":s.relationTitle1,endLabelLeft:s.relationTitle2==="none"?"":s.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:s.style||"",pattern:s.relation.lineType==1?"dashed":"solid",look:n.look};r.push(o)}return{nodes:t,edges:r,other:{},config:n,direction:this.getDirection()}}}});var GLt,g_,MD=x(()=>{"use strict";GLt=a(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`,"getStyles"),g_=GLt});var VLt,zLt,WLt,y_,OD=x(()=>{"use strict";pe();zt();od();ih();Rd();Ee();VLt=a((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),zLt=a(function(e,t){return t.db.getClasses()},"getClasses"),WLt=a(async function(e,t,r,n){P.info("REF0:"),P.info("Drawing class diagram (v3)",t);let{securityLevel:i,state:s,layout:o}=Y(),l=n.db.getData(),u=ko(t,i);l.type=n.type,l.layoutAlgorithm=Mc(o),l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=["aggregation","extension","composition","dependency","lollipop"],l.diagramId=t,await Lo(l,u);let h=8;se.insertTitle(u,"classDiagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Ro(u,h,"classDiagram",s?.useMaxWidth??!0)},"draw"),y_={getClasses:zLt,draw:WLt,getDir:VLt}});var Nrt={};Be(Nrt,{diagram:()=>ULt});var ULt,Mrt=x(()=>{"use strict";ID();ND();MD();OD();ULt={parser:p_,get db(){return new Tm},renderer:y_,styles:g_,init:a(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var Brt={};Be(Brt,{diagram:()=>YLt});var YLt,Frt=x(()=>{"use strict";ID();ND();MD();OD();YLt={parser:p_,get db(){return new Tm},renderer:y_,styles:g_,init:a(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var PD,x_,BD=x(()=>{"use strict";PD=function(){var e=a(function(N,E,V,G){for(V=V||{},G=N.length;G--;V[N[G]]=E);return V},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],s=[1,9],o=[1,11],l=[1,16],u=[1,17],h=[1,18],f=[1,19],d=[1,32],p=[1,20],m=[1,21],g=[1,22],y=[1,23],b=[1,24],k=[1,26],T=[1,27],_=[1,28],L=[1,29],C=[1,30],D=[1,31],$=[1,34],w=[1,35],A=[1,36],F=[1,37],S=[1,33],v=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],R=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],B=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:a(function(E,V,G,J,rt,nt,ct){var pt=nt.length-1;switch(rt){case 3:return J.setRootDoc(nt[pt]),nt[pt];break;case 4:this.$=[];break;case 5:nt[pt]!="nl"&&(nt[pt-1].push(nt[pt]),this.$=nt[pt-1]);break;case 6:case 7:this.$=nt[pt];break;case 8:this.$="nl";break;case 12:this.$=nt[pt];break;case 13:let it=nt[pt-1];it.description=J.trimColon(nt[pt]),this.$=it;break;case 14:this.$={stmt:"relation",state1:nt[pt-2],state2:nt[pt]};break;case 15:let st=J.trimColon(nt[pt]);this.$={stmt:"relation",state1:nt[pt-3],state2:nt[pt-1],description:st};break;case 19:this.$={stmt:"state",id:nt[pt-3],type:"default",description:"",doc:nt[pt-1]};break;case 20:var Lt=nt[pt],bt=nt[pt-2].trim();if(nt[pt].match(":")){var ut=nt[pt].split(":");Lt=ut[0],bt=[bt,ut[1]]}this.$={stmt:"state",id:Lt,type:"default",description:bt};break;case 21:this.$={stmt:"state",id:nt[pt-3],type:"default",description:nt[pt-5],doc:nt[pt-1]};break;case 22:this.$={stmt:"state",id:nt[pt],type:"fork"};break;case 23:this.$={stmt:"state",id:nt[pt],type:"join"};break;case 24:this.$={stmt:"state",id:nt[pt],type:"choice"};break;case 25:this.$={stmt:"state",id:J.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:nt[pt-1].trim(),note:{position:nt[pt-2].trim(),text:nt[pt].trim()}};break;case 29:this.$=nt[pt].trim(),J.setAccTitle(this.$);break;case 30:case 31:this.$=nt[pt].trim(),J.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:nt[pt-1].trim(),classes:nt[pt].trim()};break;case 34:this.$={stmt:"style",id:nt[pt-1].trim(),styleClass:nt[pt].trim()};break;case 35:this.$={stmt:"applyClass",id:nt[pt-1].trim(),styleClass:nt[pt].trim()};break;case 36:J.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:J.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:J.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:J.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:nt[pt].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:nt[pt-2].trim(),classes:[nt[pt].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:nt[pt-2].trim(),classes:[nt[pt].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:b,32:25,33:k,35:T,37:_,38:L,42:C,45:D,48:$,49:w,50:A,51:F,54:S},e(v,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:b,32:25,33:k,35:T,37:_,38:L,42:C,45:D,48:$,49:w,50:A,51:F,54:S},e(v,[2,7]),e(v,[2,8]),e(v,[2,9]),e(v,[2,10]),e(v,[2,11]),e(v,[2,12],{14:[1,39],15:[1,40]}),e(v,[2,16]),{18:[1,41]},e(v,[2,18],{20:[1,42]}),{23:[1,43]},e(v,[2,22]),e(v,[2,23]),e(v,[2,24]),e(v,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},e(v,[2,28]),{34:[1,48]},{36:[1,49]},e(v,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},e(R,[2,42],{55:[1,54]}),e(R,[2,43],{55:[1,55]}),e(v,[2,36]),e(v,[2,37]),e(v,[2,38]),e(v,[2,39]),e(v,[2,6]),e(v,[2,13]),{13:56,24:d,54:S},e(v,[2,17]),e(B,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},e(v,[2,29]),e(v,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},e(v,[2,14],{14:[1,67]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,68],22:f,24:d,25:p,26:m,27:g,28:y,29:b,32:25,33:k,35:T,37:_,38:L,42:C,45:D,48:$,49:w,50:A,51:F,54:S},e(v,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},e(v,[2,32]),e(v,[2,33]),e(v,[2,34]),e(v,[2,35]),e(R,[2,44]),e(R,[2,45]),e(v,[2,15]),e(v,[2,19]),e(B,i,{7:72}),e(v,[2,26]),e(v,[2,27]),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,73],22:f,24:d,25:p,26:m,27:g,28:y,29:b,32:25,33:k,35:T,37:_,38:L,42:C,45:D,48:$,49:w,50:A,51:F,54:S},e(v,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:a(function(E,V){if(V.recoverable)this.trace(E);else{var G=new Error(E);throw G.hash=V,G}},"parseError"),parse:a(function(E){var V=this,G=[0],J=[],rt=[null],nt=[],ct=this.table,pt="",Lt=0,bt=0,ut=0,it=2,st=1,X=nt.slice.call(arguments,1),H=Object.create(this.lexer),at={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(at.yy[W]=this.yy[W]);H.setInput(E,at.yy),at.yy.lexer=H,at.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var mt=H.yylloc;nt.push(mt);var q=H.options&&H.options.ranges;typeof at.yy.parseError=="function"?this.parseError=at.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z($t){G.length=G.length-2*$t,rt.length=rt.length-$t,nt.length=nt.length-$t}a(Z,"popStack");function ye(){var $t;return $t=J.pop()||H.lex()||st,typeof $t!="number"&&($t instanceof Array&&(J=$t,$t=J.pop()),$t=V.symbols_[$t]||$t),$t}a(ye,"lex");for(var ot,Jt,ve,te,vt,It,yt={},ht,wt,Q,Nt;;){if(ve=G[G.length-1],this.defaultActions[ve]?te=this.defaultActions[ve]:((ot===null||typeof ot>"u")&&(ot=ye()),te=ct[ve]&&ct[ve][ot]),typeof te>"u"||!te.length||!te[0]){var z="";Nt=[];for(ht in ct[ve])this.terminals_[ht]&&ht>it&&Nt.push("'"+this.terminals_[ht]+"'");H.showPosition?z="Parse error on line "+(Lt+1)+`: +`+H.showPosition()+` +Expecting `+Nt.join(", ")+", got '"+(this.terminals_[ot]||ot)+"'":z="Parse error on line "+(Lt+1)+": Unexpected "+(ot==st?"end of input":"'"+(this.terminals_[ot]||ot)+"'"),this.parseError(z,{text:H.match,token:this.terminals_[ot]||ot,line:H.yylineno,loc:mt,expected:Nt})}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ve+", token: "+ot);switch(te[0]){case 1:G.push(ot),rt.push(H.yytext),nt.push(H.yylloc),G.push(te[1]),ot=null,Jt?(ot=Jt,Jt=null):(bt=H.yyleng,pt=H.yytext,Lt=H.yylineno,mt=H.yylloc,ut>0&&ut--);break;case 2:if(wt=this.productions_[te[1]][1],yt.$=rt[rt.length-wt],yt._$={first_line:nt[nt.length-(wt||1)].first_line,last_line:nt[nt.length-1].last_line,first_column:nt[nt.length-(wt||1)].first_column,last_column:nt[nt.length-1].last_column},q&&(yt._$.range=[nt[nt.length-(wt||1)].range[0],nt[nt.length-1].range[1]]),It=this.performAction.apply(yt,[pt,bt,Lt,at.yy,te[1],rt,nt].concat(X)),typeof It<"u")return It;wt&&(G=G.slice(0,-1*wt*2),rt=rt.slice(0,-1*wt),nt=nt.slice(0,-1*wt)),G.push(this.productions_[te[1]][0]),rt.push(yt.$),nt.push(yt._$),Q=ct[G[G.length-2]][G[G.length-1]],G.push(Q);break;case 3:return!0}}return!0},"parse")},M=function(){var N={EOF:1,parseError:a(function(V,G){if(this.yy.parser)this.yy.parser.parseError(V,G);else throw new Error(V)},"parseError"),setInput:a(function(E,V){return this.yy=V||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:a(function(){var E=this._input[0];this.yytext+=E,this.yyleng++,this.offset++,this.match+=E,this.matched+=E;var V=E.match(/(?:\r\n?|\n).*/g);return V?(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:a(function(E){var V=E.length,G=E.split(/(?:\r\n?|\n)/g);this._input=E+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var J=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),G.length-1&&(this.yylineno-=G.length-1);var rt=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:G?(G.length===J.length?this.yylloc.first_column:0)+J[J.length-G.length].length-G[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[rt[0],rt[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(E){this.unput(this.match.slice(E))},"less"),pastInput:a(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:a(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:a(function(){var E=this.pastInput(),V=new Array(E.length+1).join("-");return E+this.upcomingInput()+` +`+V+"^"},"showPosition"),test_match:a(function(E,V){var G,J,rt;if(this.options.backtrack_lexer&&(rt={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&&(rt.yylloc.range=this.yylloc.range.slice(0))),J=E[0].match(/(?:\r\n?|\n).*/g),J&&(this.yylineno+=J.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:J?J[J.length-1].length-J[J.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],G=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),G)return G;if(this._backtrack){for(var nt in rt)this[nt]=rt[nt];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var E,V,G,J;this._more||(this.yytext="",this.match="");for(var rt=this._currentRules(),nt=0;ntV[0].length)){if(V=G,J=nt,this.options.backtrack_lexer){if(E=this.test_match(G,rt[nt]),E!==!1)return E;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(E=this.test_match(V,rt[J]),E!==!1?E:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var V=this.next();return V||this.lex()},"lex"),begin:a(function(V){this.conditionStack.push(V)},"begin"),popState:a(function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},"topState"),pushState:a(function(V){this.begin(V)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(V,G,J,rt){var nt=rt;switch(J){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),G.yytext=G.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),G.yytext=G.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),G.yytext=G.yytext.substr(2).trim(),31;break;case 67:return this.popState(),G.yytext=G.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return G.yytext=G.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return N}();I.lexer=M;function O(){this.yy={}}return a(O,"Parser"),O.prototype=I,I.Parser=O,new O}();PD.parser=PD;x_=PD});var Vrt,b_,FD,Kc,Vh,Ny,zrt,Wrt,Urt,zh,k_,$D,GD,VD,zD,WD,T_,S_,jrt,qrt,UD,jD,Hrt,Yrt,Sm,ZLt,Xrt,qD,JLt,tRt,Krt,Qrt,eRt,Zrt,rRt,Jrt,HD,YD,tnt,__,ent,XD,C_=x(()=>{"use strict";Vrt="TB",b_="TB",FD="dir",Kc="state",Vh="root",Ny="relation",zrt="classDef",Wrt="style",Urt="applyClass",zh="default",k_="divider",$D="fill:none",GD="fill: #333",VD="c",zD="text",WD="normal",T_="rect",S_="rectWithTitle",jrt="stateStart",qrt="stateEnd",UD="divider",jD="roundedWithTitle",Hrt="note",Yrt="noteGroup",Sm="statediagram",ZLt="state",Xrt=`${Sm}-${ZLt}`,qD="transition",JLt="note",tRt="note-edge",Krt=`${qD} ${tRt}`,Qrt=`${Sm}-${JLt}`,eRt="cluster",Zrt=`${Sm}-${eRt}`,rRt="cluster-alt",Jrt=`${Sm}-${rRt}`,HD="parent",YD="note",tnt="state",__="----",ent=`${__}${YD}`,XD=`${__}${HD}`});function KD(e="",t=0,r="",n=__){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${tnt}-${e}${i}-${t}`}function w_(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{let s=r.get(i);s&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...s.styles])}));let n=e.find(i=>i.id===t.id);n?Object.assign(n,t):e.push(t)}function iRt(e){return e?.classes?.join(" ")??""}function sRt(e){return e?.styles??[]}var E_,Qc,nRt,rnt,_m,nnt,int=x(()=>{"use strict";pe();zt();Fe();C_();E_=new Map,Qc=0;a(KD,"stateDomId");nRt=a((e,t,r,n,i,s,o,l)=>{P.trace("items",t),t.forEach(u=>{switch(u.stmt){case Kc:_m(e,u,r,n,i,s,o,l);break;case zh:_m(e,u,r,n,i,s,o,l);break;case Ny:{_m(e,u.state1,r,n,i,s,o,l),_m(e,u.state2,r,n,i,s,o,l);let h={id:"edge"+Qc,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:$D,labelStyle:"",label:Rt.sanitizeText(u.description??"",Y()),arrowheadStyle:GD,labelpos:VD,labelType:zD,thickness:WD,classes:qD,look:o};i.push(h),Qc++}break}})},"setupDoc"),rnt=a((e,t=b_)=>{let r=t;if(e.doc)for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");a(w_,"insertOrUpdateNode");a(iRt,"getClassesFromDbInfo");a(sRt,"getStylesFromDbInfo");_m=a((e,t,r,n,i,s,o,l)=>{let u=t.id,h=r.get(u),f=iRt(h),d=sRt(h),p=Y();if(P.info("dataFetcher parsedItem",t,h,d),u!=="root"){let m=T_;t.start===!0?m=jrt:t.start===!1&&(m=qrt),t.type!==zh&&(m=t.type),E_.get(u)||E_.set(u,{id:u,shape:m,description:Rt.sanitizeText(u,p),cssClasses:`${f} ${Xrt}`,cssStyles:d});let g=E_.get(u);t.description&&(Array.isArray(g.description)?(g.shape=S_,g.description.push(t.description)):g.description?.length&&g.description.length>0?(g.shape=S_,g.description===u?g.description=[t.description]:g.description=[g.description,t.description]):(g.shape=T_,g.description=t.description),g.description=Rt.sanitizeTextOrArray(g.description,p)),g.description?.length===1&&g.shape===S_&&(g.type==="group"?g.shape=jD:g.shape=T_),!g.type&&t.doc&&(P.info("Setting cluster for XCX",u,rnt(t)),g.type="group",g.isGroup=!0,g.dir=rnt(t),g.shape=t.type===k_?UD:jD,g.cssClasses=`${g.cssClasses} ${Zrt} ${s?Jrt:""}`);let y={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:u,dir:g.dir,domId:KD(u,Qc),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:o};if(y.shape===UD&&(y.label=""),e&&e.id!=="root"&&(P.trace("Setting node ",u," to be child of its parent ",e.id),y.parentId=e.id),y.centerLabel=!0,t.note){let b={labelStyle:"",shape:Hrt,label:t.note.text,cssClasses:Qrt,cssStyles:[],cssCompiledStyles:[],id:u+ent+"-"+Qc,domId:KD(u,Qc,YD),type:g.type,isGroup:g.type==="group",padding:p.flowchart?.padding,look:o,position:t.note.position},k=u+XD,T={labelStyle:"",shape:Yrt,label:t.note.text,cssClasses:g.cssClasses,cssStyles:[],id:u+XD,domId:KD(u,Qc,HD),type:"group",isGroup:!0,padding:16,look:o,position:t.note.position};Qc++,T.id=k,b.parentId=k,w_(n,T,l),w_(n,b,l),w_(n,y,l);let _=u,L=b.id;t.note.position==="left of"&&(_=b.id,L=u),i.push({id:_+"-"+L,start:_,end:L,arrowhead:"none",arrowTypeEnd:"",style:$D,labelStyle:"",classes:Krt,arrowheadStyle:GD,labelpos:VD,labelType:zD,thickness:WD,look:o})}else w_(n,y,l)}t.doc&&(P.trace("Adding nodes children "),nRt(t,t.doc,r,n,i,!s,o,l))},"dataFetcher"),nnt=a(()=>{E_.clear(),Qc=0},"reset")});var QD,aRt,oRt,snt,ZD=x(()=>{"use strict";pe();zt();od();ih();Rd();Ee();C_();QD=a((e,t=b_)=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),aRt=a(function(e,t){return t.db.getClasses()},"getClasses"),oRt=a(async function(e,t,r,n){P.info("REF0:"),P.info("Drawing state diagram (v2)",t);let{securityLevel:i,state:s,layout:o}=Y();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=ko(t,i);l.type=n.type,l.layoutAlgorithm=o,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=["barb"],l.diagramId=t,await Lo(l,u);let h=8;se.insertTitle(u,"statediagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Ro(u,h,Sm,s?.useMaxWidth??!0)},"draw"),snt={getClasses:aRt,draw:oRt,getDir:QD}});var Hi,ant,ont,v_,fa,A_=x(()=>{"use strict";pe();zt();Ee();Fe();Sn();int();ZD();C_();Hi={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},ant=a(()=>new Map,"newClassesList"),ont=a(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),v_=a(e=>JSON.parse(JSON.stringify(e)),"clone"),fa=class{constructor(t){this.version=t;this.nodes=[];this.edges=[];this.rootDoc=[];this.classes=ant();this.documents={root:ont()};this.currentDocument=this.documents.root;this.startEndCount=0;this.dividerCnt=0;this.getAccTitle=ir;this.setAccTitle=rr;this.getAccDescription=ar;this.setAccDescription=sr;this.setDiagramTitle=xr;this.getDiagramTitle=or;this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{a(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let i of Array.isArray(t)?t:t.doc)switch(i.stmt){case Kc:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Ny:this.addRelation(i.state1,i.state2,i.description);break;case zrt:this.addStyleClass(i.id.trim(),i.classes);break;case Wrt:this.handleStyleDef(i);break;case Urt:this.setCssClass(i.id.trim(),i.styleClass);break}let r=this.getStates(),n=Y();nnt(),_m(void 0,this.getRootDocV2(),r,this.nodes,this.edges,!0,n.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){let r=t.id.trim().split(","),n=t.styleClass.split(",");for(let i of r){let s=this.getState(i);if(!s){let o=i.trim();this.addState(o),s=this.getState(o)}s&&(s.styles=n.map(o=>o.replace(/;/g,"")?.trim()))}}setRootDoc(t){P.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,r,n){if(r.stmt===Ny){this.docTranslator(t,r.state1,!0),this.docTranslator(t,r.state2,!1);return}if(r.stmt===Kc&&(r.id===Hi.START_NODE?(r.id=t.id+(n?"_start":"_end"),r.start=n):r.id=r.id.trim()),r.stmt!==Vh&&r.stmt!==Kc||!r.doc)return;let i=[],s=[];for(let o of r.doc)if(o.type===k_){let l=v_(o);l.doc=v_(s),i.push(l),s=[]}else s.push(o);if(i.length>0&&s.length>0){let o={stmt:Kc,id:Wv(),type:"divider",doc:v_(s)};i.push(v_(o)),r.doc=i}r.doc.forEach(o=>this.docTranslator(r,o,!0))}getRootDocV2(){return this.docTranslator({id:Vh,stmt:Vh},{id:Vh,stmt:Vh,doc:this.rootDoc},!0),{id:Vh,doc:this.rootDoc}}addState(t,r=zh,n=void 0,i=void 0,s=void 0,o=void 0,l=void 0,u=void 0){let h=t?.trim();if(!this.currentDocument.states.has(h))P.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:Kc,id:h,descriptions:[],type:r,doc:n,note:s,classes:[],styles:[],textStyles:[]});else{let f=this.currentDocument.states.get(h);if(!f)throw new Error(`State not found: ${h}`);f.doc||(f.doc=n),f.type||(f.type=r)}if(i&&(P.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(d=>this.addDescription(h,d.trim()))),s){let f=this.currentDocument.states.get(h);if(!f)throw new Error(`State not found: ${h}`);f.note=s,f.note.text=Rt.sanitizeText(f.note.text,Y())}o&&(P.info("Setting state classes",h,o),(Array.isArray(o)?o:[o]).forEach(d=>this.setCssClass(h,d.trim()))),l&&(P.info("Setting state styles",h,l),(Array.isArray(l)?l:[l]).forEach(d=>this.setStyle(h,d.trim()))),u&&(P.info("Setting state styles",h,l),(Array.isArray(u)?u:[u]).forEach(d=>this.setTextStyle(h,d.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:ont()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ant(),t||Ye()}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){P.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}startIdIfNeeded(t=""){return t===Hi.START_NODE?(this.startEndCount++,`${Hi.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",r=zh){return t===Hi.START_NODE?Hi.START_TYPE:r}endIdIfNeeded(t=""){return t===Hi.END_NODE?(this.startEndCount++,`${Hi.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",r=zh){return t===Hi.END_NODE?Hi.END_TYPE:r}addRelationObjs(t,r,n=""){let i=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(r.id.trim()),l=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(i,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,l,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:Rt.sanitizeText(n,Y())})}addRelation(t,r,n){if(typeof t=="object"&&typeof r=="object")this.addRelationObjs(t,r,n);else if(typeof t=="string"&&typeof r=="string"){let i=this.startIdIfNeeded(t.trim()),s=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(r.trim()),l=this.endTypeIfNeeded(r);this.addState(i,s),this.addState(o,l),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:n?Rt.sanitizeText(n,Y()):void 0})}}addDescription(t,r){let n=this.currentDocument.states.get(t),i=r.startsWith(":")?r.replace(":","").trim():r;n?.descriptions?.push(Rt.sanitizeText(i,Y()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,r=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let n=this.classes.get(t);r&&n&&r.split(Hi.STYLECLASS_SEP).forEach(i=>{let s=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Hi.COLOR_KEYWORD).exec(i)){let l=s.replace(Hi.FILL_KEYWORD,Hi.BG_FILL).replace(Hi.COLOR_KEYWORD,Hi.FILL_KEYWORD);n.textStyles.push(l)}n.styles.push(s)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(n=>{let i=this.getState(n);if(!i){let s=n.trim();this.addState(s),i=this.getState(s)}i?.classes?.push(r)})}setStyle(t,r){this.getState(t)?.styles?.push(r)}setTextStyle(t,r){this.getState(t)?.textStyles?.push(r)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===FD)}getDirection(){return this.getDirectionStatement()?.value??Vrt}setDirection(t){let r=this.getDirectionStatement();r?r.value=t:this.rootDoc.unshift({stmt:FD,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=Y();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:QD(this.getRootDocV2())}}getConfig(){return Y().state}}});var lRt,L_,JD=x(()=>{"use strict";lRt=a(e=>` +defs #statediagram-barbEnd { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`,"getStyles"),L_=lRt});var cRt,uRt,hRt,fRt,cnt,dRt,pRt,mRt,gRt,t8,lnt,unt,hnt=x(()=>{"use strict";$e();A_();Ee();Fe();pe();zt();cRt=a(e=>e.append("circle").attr("class","start-state").attr("r",Y().state.sizeUnit).attr("cx",Y().state.padding+Y().state.sizeUnit).attr("cy",Y().state.padding+Y().state.sizeUnit),"drawStartState"),uRt=a(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Y().state.textHeight).attr("class","divider").attr("x2",Y().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),hRt=a((e,t)=>{let r=e.append("text").attr("x",2*Y().state.padding).attr("y",Y().state.textHeight+2*Y().state.padding).attr("font-size",Y().state.fontSize).attr("class","state-title").text(t.id),n=r.node().getBBox();return e.insert("rect",":first-child").attr("x",Y().state.padding).attr("y",Y().state.padding).attr("width",n.width+2*Y().state.padding).attr("height",n.height+2*Y().state.padding).attr("rx",Y().state.radius),r},"drawSimpleState"),fRt=a((e,t)=>{let r=a(function(p,m,g){let y=p.append("tspan").attr("x",2*Y().state.padding).text(m);g||y.attr("dy",Y().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*Y().state.padding).attr("y",Y().state.textHeight+1.3*Y().state.padding).attr("font-size",Y().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),s=i.height,o=e.append("text").attr("x",Y().state.padding).attr("y",s+Y().state.padding*.4+Y().state.dividerMargin+Y().state.textHeight).attr("class","state-description"),l=!0,u=!0;t.descriptions.forEach(function(p){l||(r(o,p,u),u=!1),l=!1});let h=e.append("line").attr("x1",Y().state.padding).attr("y1",Y().state.padding+s+Y().state.dividerMargin/2).attr("y2",Y().state.padding+s+Y().state.dividerMargin/2).attr("class","descr-divider"),f=o.node().getBBox(),d=Math.max(f.width,i.width);return h.attr("x2",d+3*Y().state.padding),e.insert("rect",":first-child").attr("x",Y().state.padding).attr("y",Y().state.padding).attr("width",d+2*Y().state.padding).attr("height",f.height+s+2*Y().state.padding).attr("rx",Y().state.radius),e},"drawDescrState"),cnt=a((e,t,r)=>{let n=Y().state.padding,i=2*Y().state.padding,s=e.node().getBBox(),o=s.width,l=s.x,u=e.append("text").attr("x",0).attr("y",Y().state.titleShift).attr("font-size",Y().state.fontSize).attr("class","state-title").text(t.id),f=u.node().getBBox().width+i,d=Math.max(f,o);d===o&&(d=d+i);let p,m=e.node().getBBox();t.doc,p=l-n,f>o&&(p=(o-d)/2+n),Math.abs(l-m.x)o&&(p=l-(f-o)/2);let g=1-Y().state.textHeight;return e.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",m.height+Y().state.textHeight+Y().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),f<=o&&u.attr("x",l+(d-i)/2-f/2+n),e.insert("rect",":first-child").attr("x",p).attr("y",Y().state.titleShift-Y().state.textHeight-Y().state.padding).attr("width",d).attr("height",Y().state.textHeight*3).attr("rx",Y().state.radius),e.insert("rect",":first-child").attr("x",p).attr("y",Y().state.titleShift-Y().state.textHeight-Y().state.padding).attr("width",d).attr("height",m.height+3+2*Y().state.textHeight).attr("rx",Y().state.radius),e},"addTitleAndBox"),dRt=a(e=>(e.append("circle").attr("class","end-state-outer").attr("r",Y().state.sizeUnit+Y().state.miniPadding).attr("cx",Y().state.padding+Y().state.sizeUnit+Y().state.miniPadding).attr("cy",Y().state.padding+Y().state.sizeUnit+Y().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",Y().state.sizeUnit).attr("cx",Y().state.padding+Y().state.sizeUnit+2).attr("cy",Y().state.padding+Y().state.sizeUnit+2)),"drawEndState"),pRt=a((e,t)=>{let r=Y().state.forkWidth,n=Y().state.forkHeight;if(t.parentId){let i=r;r=n,n=i}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",Y().state.padding).attr("y",Y().state.padding)},"drawForkJoinState"),mRt=a((e,t,r,n)=>{let i=0,s=n.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let o=e.replace(/\r\n/g,"
    ");o=o.replace(/\n/g,"
    ");let l=o.split(Rt.lineBreakRegex),u=1.25*Y().state.noteMargin;for(let h of l){let f=h.trim();if(f.length>0){let d=s.append("tspan");if(d.text(f),u===0){let p=d.node().getBBox();u+=p.height}i+=u,d.attr("x",t+Y().state.noteMargin),d.attr("y",r+i+1.25*Y().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},"_drawLongText"),gRt=a((e,t)=>{t.attr("class","state-note");let r=t.append("rect").attr("x",0).attr("y",Y().state.padding),n=t.append("g"),{textWidth:i,textHeight:s}=mRt(e,0,0,n);return r.attr("height",s+2*Y().state.noteMargin),r.attr("width",i+Y().state.noteMargin*2),r},"drawNote"),t8=a(function(e,t){let r=t.id,n={id:r,label:t.id,width:0,height:0},i=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&cRt(i),t.type==="end"&&dRt(i),(t.type==="fork"||t.type==="join")&&pRt(i,t),t.type==="note"&&gRt(t.note.text,i),t.type==="divider"&&uRt(i),t.type==="default"&&t.descriptions.length===0&&hRt(i,t),t.type==="default"&&t.descriptions.length>0&&fRt(i,t);let s=i.node().getBBox();return n.width=s.width+2*Y().state.padding,n.height=s.height+2*Y().state.padding,n},"drawState"),lnt=0,unt=a(function(e,t,r){let n=a(function(u){switch(u){case fa.relationType.AGGREGATION:return"aggregation";case fa.relationType.EXTENSION:return"extension";case fa.relationType.COMPOSITION:return"composition";case fa.relationType.DEPENDENCY:return"dependency"}},"getRelationType");t.points=t.points.filter(u=>!Number.isNaN(u.y));let i=t.points,s=Da().x(function(u){return u.x}).y(function(u){return u.y}).curve(js),o=e.append("path").attr("d",s(i)).attr("id","edge"+lnt).attr("class","transition"),l="";if(Y().state.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),o.attr("marker-end","url("+l+"#"+n(fa.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=e.append("g").attr("class","stateLabel"),{x:h,y:f}=se.calcLabelPosition(t.points),d=Rt.getRows(r.title),p=0,m=[],g=0,y=0;for(let T=0;T<=d.length;T++){let _=u.append("text").attr("text-anchor","middle").text(d[T]).attr("x",h).attr("y",f+p),L=_.node().getBBox();g=Math.max(g,L.width),y=Math.min(y,L.x),P.info(L.x,h,f+p),p===0&&(p=_.node().getBBox().height,P.info("Title height",p,f)),m.push(_)}let b=p*d.length;if(d.length>1){let T=(d.length-1)*p*.5;m.forEach((_,L)=>_.attr("y",f+L*p-T)),b=p*d.length}let k=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-Y().state.padding/2).attr("y",f-b/2-Y().state.padding/2-3.5).attr("width",g+Y().state.padding).attr("height",b+Y().state.padding),P.info(k)}lnt++},"drawEdge")});var Os,e8,yRt,xRt,bRt,kRt,fnt,dnt,pnt=x(()=>{"use strict";$e();h5();na();zt();Fe();hnt();pe();Gn();e8={},yRt=a(function(){},"setConf"),xRt=a(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),bRt=a(function(e,t,r,n){Os=Y().state;let i=Y().securityLevel,s;i==="sandbox"&&(s=xt("#i"+t));let o=i==="sandbox"?xt(s.nodes()[0].contentDocument.body):xt("body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;P.debug("Rendering diagram "+e);let u=o.select(`[id='${t}']`);xRt(u);let h=n.db.getRootDoc();fnt(h,u,void 0,!1,o,l,n);let f=Os.padding,d=u.node().getBBox(),p=d.width+f*2,m=d.height+f*2,g=p*1.75;Rr(u,m,g,Os.useMaxWidth),u.attr("viewBox",`${d.x-Os.padding} ${d.y-Os.padding} `+p+" "+m)},"draw"),kRt=a(e=>e?e.length*Os.fontSizeFactor:1,"getLabelWidth"),fnt=a((e,t,r,n,i,s,o)=>{let l=new _r({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u{let C=L.parentElement,D=0,$=0;C&&(C.parentElement&&(D=C.parentElement.getBBox().width),$=parseInt(C.getAttribute("data-x-shift"),10),Number.isNaN($)&&($=0)),L.setAttribute("x1",0-$+8),L.setAttribute("x2",D-$-8)})):P.debug("No Node "+T+": "+JSON.stringify(l.node(T)))});let b=y.getBBox();l.edges().forEach(function(T){T!==void 0&&l.edge(T)!==void 0&&(P.debug("Edge "+T.v+" -> "+T.w+": "+JSON.stringify(l.edge(T))),unt(t,l.edge(T),l.edge(T).relation))}),b=y.getBBox();let k={id:r||"root",label:r||"root",width:0,height:0};return k.width=b.width+2*Os.padding,k.height=b.height+2*Os.padding,P.debug("Doc rendered",k,l),k},"renderDoc"),dnt={setConf:yRt,draw:bRt}});var mnt={};Be(mnt,{diagram:()=>TRt});var TRt,gnt=x(()=>{"use strict";BD();A_();JD();pnt();TRt={parser:x_,get db(){return new fa(1)},renderer:dnt,styles:L_,init:a(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var bnt={};Be(bnt,{diagram:()=>wRt});var wRt,knt=x(()=>{"use strict";BD();A_();JD();ZD();wRt={parser:x_,get db(){return new fa(2)},renderer:snt,styles:L_,init:a(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var r8,_nt,Cnt=x(()=>{"use strict";r8=function(){var e=a(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],s=[1,12],o=[1,13],l=[1,14],u={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:a(function(p,m,g,y,b,k,T){var _=k.length-1;switch(b){case 1:return k[_-1];case 2:this.$=[];break;case 3:k[_-1].push(k[_]),this.$=k[_-1];break;case 4:case 5:this.$=k[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(k[_].substr(6)),this.$=k[_].substr(6);break;case 9:this.$=k[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=k[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(k[_].substr(8)),this.$=k[_].substr(8);break;case 13:y.addTask(k[_-1],k[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:s,17:o,18:l},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:n,14:i,16:s,17:o,18:l},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:a(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:a(function(p){var m=this,g=[0],y=[],b=[null],k=[],T=this.table,_="",L=0,C=0,D=0,$=2,w=1,A=k.slice.call(arguments,1),F=Object.create(this.lexer),S={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(S.yy[v]=this.yy[v]);F.setInput(p,S.yy),S.yy.lexer=F,S.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var R=F.yylloc;k.push(R);var B=F.options&&F.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(ut){g.length=g.length-2*ut,b.length=b.length-ut,k.length=k.length-ut}a(I,"popStack");function M(){var ut;return ut=y.pop()||F.lex()||w,typeof ut!="number"&&(ut instanceof Array&&(y=ut,ut=y.pop()),ut=m.symbols_[ut]||ut),ut}a(M,"lex");for(var O,N,E,V,G,J,rt={},nt,ct,pt,Lt;;){if(E=g[g.length-1],this.defaultActions[E]?V=this.defaultActions[E]:((O===null||typeof O>"u")&&(O=M()),V=T[E]&&T[E][O]),typeof V>"u"||!V.length||!V[0]){var bt="";Lt=[];for(nt in T[E])this.terminals_[nt]&&nt>$&&Lt.push("'"+this.terminals_[nt]+"'");F.showPosition?bt="Parse error on line "+(L+1)+`: +`+F.showPosition()+` +Expecting `+Lt.join(", ")+", got '"+(this.terminals_[O]||O)+"'":bt="Parse error on line "+(L+1)+": Unexpected "+(O==w?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(bt,{text:F.match,token:this.terminals_[O]||O,line:F.yylineno,loc:R,expected:Lt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+O);switch(V[0]){case 1:g.push(O),b.push(F.yytext),k.push(F.yylloc),g.push(V[1]),O=null,N?(O=N,N=null):(C=F.yyleng,_=F.yytext,L=F.yylineno,R=F.yylloc,D>0&&D--);break;case 2:if(ct=this.productions_[V[1]][1],rt.$=b[b.length-ct],rt._$={first_line:k[k.length-(ct||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(ct||1)].first_column,last_column:k[k.length-1].last_column},B&&(rt._$.range=[k[k.length-(ct||1)].range[0],k[k.length-1].range[1]]),J=this.performAction.apply(rt,[_,C,L,S.yy,V[1],b,k].concat(A)),typeof J<"u")return J;ct&&(g=g.slice(0,-1*ct*2),b=b.slice(0,-1*ct),k=k.slice(0,-1*ct)),g.push(this.productions_[V[1]][0]),b.push(rt.$),k.push(rt._$),pt=T[g[g.length-2]][g[g.length-1]],g.push(pt);break;case 3:return!0}}return!0},"parse")},h=function(){var d={EOF:1,parseError:a(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:a(function(p,m){return this.yy=m||this.yy||{},this._input=p,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:a(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:a(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=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),g.length-1&&(this.yylineno-=g.length-1);var b=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:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(p){this.unput(this.match.slice(p))},"less"),pastInput:a(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:a(function(p,m){var g,y,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var k in b)this[k]=b[k];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),k=0;km[0].length)){if(m=g,y=k,this.options.backtrack_lexer){if(p=this.test_match(g,b[k]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,b[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var m=this.next();return m||this.lex()},"lex"),begin:a(function(m){this.conditionStack.push(m)},"begin"),popState:a(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:a(function(m){this.begin(m)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(m,g,y,b){var k=b;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return d}();u.lexer=h;function f(){this.yy={}}return a(f,"Parser"),f.prototype=u,u.Parser=f,new f}();r8.parser=r8;_nt=r8});var Cm,n8,My,Oy,LRt,RRt,DRt,IRt,NRt,MRt,ORt,wnt,PRt,i8,Ent=x(()=>{"use strict";pe();Sn();Cm="",n8=[],My=[],Oy=[],LRt=a(function(){n8.length=0,My.length=0,Cm="",Oy.length=0,Ye()},"clear"),RRt=a(function(e){Cm=e,n8.push(e)},"addSection"),DRt=a(function(){return n8},"getSections"),IRt=a(function(){let e=wnt(),t=100,r=0;for(;!e&&r{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},"updateActors"),MRt=a(function(e,t){let r=t.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let s=i.map(l=>l.trim()),o={section:Cm,type:Cm,people:s,task:e,score:n};Oy.push(o)},"addTask"),ORt=a(function(e){let t={section:Cm,type:Cm,description:e,task:e,classes:[]};My.push(t)},"addTaskOrg"),wnt=a(function(){let e=a(function(r){return Oy[r].processed},"compileTask"),t=!0;for(let[r,n]of Oy.entries())e(r),t=t&&n.processed;return t},"compileTasks"),PRt=a(function(){return NRt()},"getActors"),i8={getConfig:a(()=>Y().journey,"getConfig"),clear:LRt,setDiagramTitle:xr,getDiagramTitle:or,setAccTitle:rr,getAccTitle:ir,setAccDescription:sr,getAccDescription:ar,addSection:RRt,getSections:DRt,getTasks:IRt,addTask:MRt,addTaskOrg:ORt,getActors:PRt}});var BRt,vnt,Ant=x(()=>{"use strict";BRt=a(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${e.textColor} + } + + .legend { + fill: ${e.textColor}; + font-family: ${e.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${e.textColor} + } + + .face { + ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${e.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${e.fillType0?`fill: ${e.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${e.fillType0?`fill: ${e.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${e.fillType0?`fill: ${e.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${e.fillType0?`fill: ${e.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${e.fillType0?`fill: ${e.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${e.fillType0?`fill: ${e.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${e.fillType0?`fill: ${e.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${e.fillType0?`fill: ${e.fillType7}`:""}; + } + + .actor-0 { + ${e.actor0?`fill: ${e.actor0}`:""}; + } + .actor-1 { + ${e.actor1?`fill: ${e.actor1}`:""}; + } + .actor-2 { + ${e.actor2?`fill: ${e.actor2}`:""}; + } + .actor-3 { + ${e.actor3?`fill: ${e.actor3}`:""}; + } + .actor-4 { + ${e.actor4?`fill: ${e.actor4}`:""}; + } + .actor-5 { + ${e.actor5?`fill: ${e.actor5}`:""}; + } +`,"getStyles"),vnt=BRt});var s8,FRt,Rnt,Dnt,$Rt,GRt,Lnt,VRt,zRt,Int,WRt,wm,Nnt=x(()=>{"use strict";$e();Jg();s8=a(function(e,t){return Mu(e,t)},"drawRect"),FRt=a(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(u){let h=Ra().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}a(s,"smile");function o(u){let h=Ra().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}a(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a(l,"ambivalent"),t.score>3?s(i):t.score<3?o(i):l(i),n},"drawFace"),Rnt=a(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),Dnt=a(function(e,t){return I9(e,t)},"drawText"),$Rt=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,Dnt(e,t)},"drawLabel"),GRt=a(function(e,t,r){let n=e.append("g"),i=Ia();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,s8(n,i),Int(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),Lnt=-1,VRt=a(function(e,t,r){let n=t.x+r.width/2,i=e.append("g");Lnt++;let s=300+5*30;i.append("line").attr("id","task"+Lnt).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),FRt(i,{cx:n,cy:300+(5-t.score)*30,score:t.score});let o=Ia();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,s8(i,o);let l=t.x+14;t.people.forEach(u=>{let h=t.actors[u].color,f={cx:l,cy:t.y,r:7,fill:h,stroke:"#000",title:u,pos:t.actors[u].position};Rnt(i,f),l+=10}),Int(r)(t.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,t.colour)},"drawTask"),zRt=a(function(e,t){M2(e,t)},"drawBackgroundRect"),Int=function(){function e(i,s,o,l,u,h,f,d){let p=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}a(e,"byText");function t(i,s,o,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(//gi);for(let b=0;b{let s=Ol[i].color,o={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:Ol[i].position};wm.drawCircle(e,o);let l=e.append("text").attr("visibility","hidden").text(i),u=l.node().getBoundingClientRect().width;l.remove();let h=[];if(u<=r)h=[i];else{let f=i.split(" "),d="";l=e.append("text").attr("visibility","hidden"),f.forEach(p=>{let m=d?`${d} ${p}`:p;if(l.text(m),l.node().getBoundingClientRect().width>r){if(d&&h.push(d),d=p,l.text(p),l.node().getBoundingClientRect().width>r){let y="";for(let b of p)y+=b,l.text(y+"-"),l.node().getBoundingClientRect().width>r&&(h.push(y.slice(0,-1)+"-"),y=b);d=y}}else d=m}),d&&h.push(d),l.remove()}h.forEach((f,d)=>{let p={x:40,y:n+7+d*20,fill:"#666",text:f,textMargin:t.boxTextMargin??5},g=wm.drawText(e,p).node().getBoundingClientRect().width;g>R_&&g>t.leftMargin-g&&(R_=g)}),n+=Math.max(20,h.length*20)})}var URt,Ol,R_,Ka,Zc,qRt,da,a8,Mnt,HRt,o8,Ont=x(()=>{"use strict";$e();Nnt();pe();Gn();URt=a(function(e){Object.keys(e).forEach(function(r){Ka[r]=e[r]})},"setConf"),Ol={},R_=0;a(jRt,"drawActorLegend");Ka=Y().journey,Zc=0,qRt=a(function(e,t,r,n){let i=Y(),s=i.journey.titleColor,o=i.journey.titleFontSize,l=i.journey.titleFontFamily,u=i.securityLevel,h;u==="sandbox"&&(h=xt("#i"+t));let f=u==="sandbox"?xt(h.nodes()[0].contentDocument.body):xt("body");da.init();let d=f.select("#"+t);wm.initGraphics(d);let p=n.db.getTasks(),m=n.db.getDiagramTitle(),g=n.db.getActors();for(let L in Ol)delete Ol[L];let y=0;g.forEach(L=>{Ol[L]={color:Ka.actorColours[y%Ka.actorColours.length],position:y},y++}),jRt(d),Zc=Ka.leftMargin+R_,da.insert(0,0,Zc,Object.keys(Ol).length*50),HRt(d,p,0);let b=da.getBounds();m&&d.append("text").text(m).attr("x",Zc).attr("font-size",o).attr("font-weight","bold").attr("y",25).attr("fill",s).attr("font-family",l);let k=b.stopy-b.starty+2*Ka.diagramMarginY,T=Zc+b.stopx+2*Ka.diagramMarginX;Rr(d,k,T,Ka.useMaxWidth),d.append("line").attr("x1",Zc).attr("y1",Ka.height*4).attr("x2",T-Zc-4).attr("y2",Ka.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let _=m?70:0;d.attr("viewBox",`${b.startx} -25 ${T} ${k+_}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",k+_+25)},"draw"),da={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:a(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:a(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:a(function(e,t,r,n){let i=Y().journey,s=this,o=0;function l(u){return a(function(f){o++;let d=s.sequenceItems.length-o+1;s.updateVal(f,"starty",t-d*i.boxMargin,Math.min),s.updateVal(f,"stopy",n+d*i.boxMargin,Math.max),s.updateVal(da.data,"startx",e-d*i.boxMargin,Math.min),s.updateVal(da.data,"stopx",r+d*i.boxMargin,Math.max),u!=="activation"&&(s.updateVal(f,"startx",e-d*i.boxMargin,Math.min),s.updateVal(f,"stopx",r+d*i.boxMargin,Math.max),s.updateVal(da.data,"starty",t-d*i.boxMargin,Math.min),s.updateVal(da.data,"stopy",n+d*i.boxMargin,Math.max))},"updateItemBounds")}a(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:a(function(e,t,r,n){let i=Math.min(e,r),s=Math.max(e,r),o=Math.min(t,n),l=Math.max(t,n);this.updateVal(da.data,"startx",i,Math.min),this.updateVal(da.data,"starty",o,Math.min),this.updateVal(da.data,"stopx",s,Math.max),this.updateVal(da.data,"stopy",l,Math.max),this.updateBounds(i,o,s,l)},"insert"),bumpVerticalPos:a(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:a(function(){return this.verticalPos},"getVerticalPos"),getBounds:a(function(){return this.data},"getBounds")},a8=Ka.sectionFills,Mnt=Ka.sectionColours,HRt=a(function(e,t,r){let n=Y().journey,i="",s=n.height*2+n.diagramMarginY,o=r+s,l=0,u="#CCC",h="black",f=0;for(let[d,p]of t.entries()){if(i!==p.section){u=a8[l%a8.length],f=l%a8.length,h=Mnt[l%Mnt.length];let g=0,y=p.section;for(let k=d;k(Ol[y]&&(g[y]=Ol[y]),g),{});p.x=d*n.taskMargin+d*n.width+Zc,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=m,wm.drawTask(e,p,n),da.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30)}},"drawTasks"),o8={setConf:URt,draw:qRt}});var Pnt={};Be(Pnt,{diagram:()=>YRt});var YRt,Bnt=x(()=>{"use strict";Cnt();Ent();Ant();Ont();YRt={parser:_nt,db:i8,renderer:o8,styles:vnt,init:a(e=>{o8.setConf(e.journey),i8.clear()},"init")}});var c8,znt,Wnt=x(()=>{"use strict";c8=function(){var e=a(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g},"o"),t=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],s=[1,12],o=[1,13],l=[1,16],u=[1,17],h={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:a(function(m,g,y,b,k,T,_){var L=T.length-1;switch(k){case 1:return T[L-1];case 2:this.$=[];break;case 3:T[L-1].push(T[L]),this.$=T[L-1];break;case 4:case 5:this.$=T[L];break;case 6:case 7:this.$=[];break;case 8:b.getCommonDb().setDiagramTitle(T[L].substr(6)),this.$=T[L].substr(6);break;case 9:this.$=T[L].trim(),b.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=T[L].trim(),b.getCommonDb().setAccDescription(this.$);break;case 12:b.addSection(T[L].substr(8)),this.$=T[L].substr(8);break;case 15:b.addTask(T[L],0,""),this.$=T[L];break;case 16:b.addEvent(T[L].substr(2)),this.$=T[L];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:s,17:o,18:14,19:15,20:l,21:u},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:18,11:r,12:n,14:i,16:s,17:o,18:14,19:15,20:l,21:u},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,19]},{15:[1,20]},e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,4]),e(t,[2,9]),e(t,[2,10])],defaultActions:{},parseError:a(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:a(function(m){var g=this,y=[0],b=[],k=[null],T=[],_=this.table,L="",C=0,D=0,$=0,w=2,A=1,F=T.slice.call(arguments,1),S=Object.create(this.lexer),v={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(v.yy[R]=this.yy[R]);S.setInput(m,v.yy),v.yy.lexer=S,v.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var B=S.yylloc;T.push(B);var I=S.options&&S.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M(it){y.length=y.length-2*it,k.length=k.length-it,T.length=T.length-it}a(M,"popStack");function O(){var it;return it=b.pop()||S.lex()||A,typeof it!="number"&&(it instanceof Array&&(b=it,it=b.pop()),it=g.symbols_[it]||it),it}a(O,"lex");for(var N,E,V,G,J,rt,nt={},ct,pt,Lt,bt;;){if(V=y[y.length-1],this.defaultActions[V]?G=this.defaultActions[V]:((N===null||typeof N>"u")&&(N=O()),G=_[V]&&_[V][N]),typeof G>"u"||!G.length||!G[0]){var ut="";bt=[];for(ct in _[V])this.terminals_[ct]&&ct>w&&bt.push("'"+this.terminals_[ct]+"'");S.showPosition?ut="Parse error on line "+(C+1)+`: +`+S.showPosition()+` +Expecting `+bt.join(", ")+", got '"+(this.terminals_[N]||N)+"'":ut="Parse error on line "+(C+1)+": Unexpected "+(N==A?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(ut,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:B,expected:bt})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+N);switch(G[0]){case 1:y.push(N),k.push(S.yytext),T.push(S.yylloc),y.push(G[1]),N=null,E?(N=E,E=null):(D=S.yyleng,L=S.yytext,C=S.yylineno,B=S.yylloc,$>0&&$--);break;case 2:if(pt=this.productions_[G[1]][1],nt.$=k[k.length-pt],nt._$={first_line:T[T.length-(pt||1)].first_line,last_line:T[T.length-1].last_line,first_column:T[T.length-(pt||1)].first_column,last_column:T[T.length-1].last_column},I&&(nt._$.range=[T[T.length-(pt||1)].range[0],T[T.length-1].range[1]]),rt=this.performAction.apply(nt,[L,D,C,v.yy,G[1],k,T].concat(F)),typeof rt<"u")return rt;pt&&(y=y.slice(0,-1*pt*2),k=k.slice(0,-1*pt),T=T.slice(0,-1*pt)),y.push(this.productions_[G[1]][0]),k.push(nt.$),T.push(nt._$),Lt=_[y[y.length-2]][y[y.length-1]],y.push(Lt);break;case 3:return!0}}return!0},"parse")},f=function(){var p={EOF:1,parseError:a(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g)},"parseError"),setInput:a(function(m,g){return this.yy=g||this.yy||{},this._input=m,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:a(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:a(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var b=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),y.length-1&&(this.yylineno-=y.length-1);var k=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:y?(y.length===b.length?this.yylloc.first_column:0)+b[b.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(m){this.unput(this.match.slice(m))},"less"),pastInput:a(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:a(function(m,g){var y,b,k;if(this.options.backtrack_lexer&&(k={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&&(k.yylloc.range=this.yylloc.range.slice(0))),b=m[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var T in k)this[T]=k[T];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,b;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),T=0;Tg[0].length)){if(g=y,b=T,this.options.backtrack_lexer){if(m=this.test_match(y,k[T]),m!==!1)return m;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(m=this.test_match(g,k[b]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var g=this.next();return g||this.lex()},"lex"),begin:a(function(g){this.conditionStack.push(g)},"begin"),popState:a(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:a(function(g){this.begin(g)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(g,y,b,k){var T=k;switch(b){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return p}();h.lexer=f;function d(){this.yy={}}return a(d,"Parser"),d.prototype=h,h.Parser=d,new d}();c8.parser=c8;znt=c8});var h8={};Be(h8,{addEvent:()=>Znt,addSection:()=>Ynt,addTask:()=>Qnt,addTaskOrg:()=>Jnt,clear:()=>Hnt,default:()=>tDt,getCommonDb:()=>qnt,getSections:()=>Xnt,getTasks:()=>Knt});var Em,jnt,u8,D_,vm,qnt,Hnt,Ynt,Xnt,Knt,Qnt,Znt,Jnt,Unt,tDt,tit=x(()=>{"use strict";Sn();Em="",jnt=0,u8=[],D_=[],vm=[],qnt=a(()=>tg,"getCommonDb"),Hnt=a(function(){u8.length=0,D_.length=0,Em="",vm.length=0,Ye()},"clear"),Ynt=a(function(e){Em=e,u8.push(e)},"addSection"),Xnt=a(function(){return u8},"getSections"),Knt=a(function(){let e=Unt(),t=100,r=0;for(;!e&&rr.id===jnt-1).events.push(e)},"addEvent"),Jnt=a(function(e){let t={section:Em,type:Em,description:e,task:e,classes:[]};D_.push(t)},"addTaskOrg"),Unt=a(function(){let e=a(function(r){return vm[r].processed},"compileTask"),t=!0;for(let[r,n]of vm.entries())e(r),t=t&&n.processed;return t},"compileTasks"),tDt={clear:Hnt,getCommonDb:qnt,addSection:Ynt,getSections:Xnt,getTasks:Knt,addTask:Qnt,addTaskOrg:Jnt,addEvent:Znt}});function iit(e,t){e.each(function(){var r=xt(this),n=r.text().split(/(\s+|
    )/).reverse(),i,s=[],o=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let f=0;ft||i==="
    ")&&(s.pop(),h.text(s.join(" ").trim()),i==="
    "?s=[""]:s=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",o+"em").text(i))})}var eDt,I_,rDt,nDt,rit,iDt,sDt,eit,aDt,oDt,lDt,f8,nit,cDt,uDt,hDt,fDt,Jc,sit=x(()=>{"use strict";$e();eDt=12,I_=a(function(e,t){let r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.class!==void 0&&r.attr("class",t.class),r},"drawRect"),rDt=a(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(u){let h=Ra().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}a(s,"smile");function o(u){let h=Ra().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}a(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a(l,"ambivalent"),t.score>3?s(i):t.score<3?o(i):l(i),n},"drawFace"),nDt=a(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),rit=a(function(e,t){let r=t.text.replace(//gi," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class!==void 0&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),iDt=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,rit(e,t)},"drawLabel"),sDt=a(function(e,t,r){let n=e.append("g"),i=f8();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,I_(n,i),nit(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),eit=-1,aDt=a(function(e,t,r){let n=t.x+r.width/2,i=e.append("g");eit++;let s=300+5*30;i.append("line").attr("id","task"+eit).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),rDt(i,{cx:n,cy:300+(5-t.score)*30,score:t.score});let o=f8();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,I_(i,o),nit(r)(t.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,t.colour)},"drawTask"),oDt=a(function(e,t){I_(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),lDt=a(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),f8=a(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),nit=function(){function e(i,s,o,l,u,h,f,d){let p=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}a(e,"byText");function t(i,s,o,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(//gi);for(let b=0;b{"use strict";$e();sit();zt();pe();Gn();dDt=a(function(e,t,r,n){let i=Y(),s=i.leftMargin??50;P.debug("timeline",n.db);let o=i.securityLevel,l;o==="sandbox"&&(l=xt("#i"+t));let h=(o==="sandbox"?xt(l.nodes()[0].contentDocument.body):xt("body")).select("#"+t);h.append("g");let f=n.db.getTasks(),d=n.db.getCommonDb().getDiagramTitle();P.debug("task",f),Jc.initGraphics(h);let p=n.db.getSections();P.debug("sections",p);let m=0,g=0,y=0,b=0,k=50+s,T=50;b=50;let _=0,L=!0;p.forEach(function(A){let F={number:_,descr:A,section:_,width:150,padding:20,maxHeight:m},S=Jc.getVirtualNodeHeight(h,F,i);P.debug("sectionHeight before draw",S),m=Math.max(m,S+20)});let C=0,D=0;P.debug("tasks.length",f.length);for(let[A,F]of f.entries()){let S={number:A,descr:F,section:F.section,width:150,padding:20,maxHeight:g},v=Jc.getVirtualNodeHeight(h,S,i);P.debug("taskHeight before draw",v),g=Math.max(g,v+20),C=Math.max(C,F.events.length);let R=0;for(let B of F.events){let I={descr:B,section:F.section,number:F.section,width:150,padding:20,maxHeight:50};R+=Jc.getVirtualNodeHeight(h,I,i)}D=Math.max(D,R)}P.debug("maxSectionHeight before draw",m),P.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach(A=>{let F=f.filter(B=>B.section===A),S={number:_,descr:A,section:_,width:200*Math.max(F.length,1)-50,padding:20,maxHeight:m};P.debug("sectionNode",S);let v=h.append("g"),R=Jc.drawNode(v,S,_,i);P.debug("sectionNode output",R),v.attr("transform",`translate(${k}, ${b})`),T+=m+50,F.length>0&&ait(h,F,_,k,T,g,i,C,D,m,!1),k+=200*Math.max(F.length,1),T=b,_++}):(L=!1,ait(h,f,_,k,T,g,i,C,D,m,!0));let $=h.node().getBBox();P.debug("bounds",$),d&&h.append("text").text(d).attr("x",$.width/2-s).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=L?m+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",s).attr("y1",y).attr("x2",$.width+3*s).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),ql(void 0,h,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),ait=a(function(e,t,r,n,i,s,o,l,u,h,f){for(let d of t){let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:s};P.debug("taskNode",p);let m=e.append("g").attr("class","taskWrapper"),y=Jc.drawNode(m,p,r,o).height;if(P.debug("taskHeight after draw",y),m.attr("transform",`translate(${n}, ${i})`),s=Math.max(s,y),d.events){let b=e.append("g").attr("class","lineWrapper"),k=s;i+=100,k=k+pDt(e,d.events,r,n,i,o),i-=100,b.append("line").attr("x1",n+190/2).attr("y1",i+s).attr("x2",n+190/2).attr("y2",i+s+(f?s:h)+u+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,f&&!o.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),pDt=a(function(e,t,r,n,i,s){let o=0,l=i;i=i+100;for(let u of t){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};P.debug("eventNode",h);let f=e.append("g").attr("class","eventWrapper"),p=Jc.drawNode(f,h,r,s).height;o=o+p,f.attr("transform",`translate(${n}, ${i})`),i=i+10+p}return i=l,o},"drawEvents"),oit={setConf:a(()=>{},"setConf"),draw:dDt}});var mDt,gDt,cit,uit=x(()=>{"use strict";Gs();mDt=a(e=>{let t="";for(let r=0;r` + .edge { + stroke-width: 3; + } + ${mDt(e)} + .section-root rect, .section-root path, .section-root circle { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),cit=gDt});var hit={};Be(hit,{diagram:()=>yDt});var yDt,fit=x(()=>{"use strict";Wnt();tit();lit();uit();yDt={db:h8,renderer:oit,parser:znt,styles:cit}});var d8,mit,git=x(()=>{"use strict";d8=function(){var e=a(function($,w,A,F){for(A=A||{},F=$.length;F--;A[$[F]]=w);return A},"o"),t=[1,4],r=[1,13],n=[1,12],i=[1,15],s=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],f=[1,24],d=[1,25],p=[6,7,11],m=[1,31],g=[6,7,11,24],y=[1,6,13,16,17,20,23],b=[1,35],k=[1,36],T=[1,6,7,11,13,16,17,20,23],_=[1,38],L={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:a(function(w,A,F,S,v,R,B){var I=R.length-1;switch(v){case 6:case 7:return S;case 8:S.getLogger().trace("Stop NL ");break;case 9:S.getLogger().trace("Stop EOF ");break;case 11:S.getLogger().trace("Stop NL2 ");break;case 12:S.getLogger().trace("Stop EOF2 ");break;case 15:S.getLogger().info("Node: ",R[I-1].id),S.addNode(R[I-2].length,R[I-1].id,R[I-1].descr,R[I-1].type,R[I]);break;case 16:S.getLogger().info("Node: ",R[I].id),S.addNode(R[I-1].length,R[I].id,R[I].descr,R[I].type);break;case 17:S.getLogger().trace("Icon: ",R[I]),S.decorateNode({icon:R[I]});break;case 18:case 23:S.decorateNode({class:R[I]});break;case 19:S.getLogger().trace("SPACELIST");break;case 20:S.getLogger().trace("Node: ",R[I-1].id),S.addNode(0,R[I-1].id,R[I-1].descr,R[I-1].type,R[I]);break;case 21:S.getLogger().trace("Node: ",R[I].id),S.addNode(0,R[I].id,R[I].descr,R[I].type);break;case 22:S.decorateNode({icon:R[I]});break;case 27:S.getLogger().trace("node found ..",R[I-2]),this.$={id:R[I-1],descr:R[I-1],type:S.getType(R[I-2],R[I])};break;case 28:this.$={id:R[I],descr:R[I],type:0};break;case 29:S.getLogger().trace("node found ..",R[I-3]),this.$={id:R[I-3],descr:R[I-1],type:S.getType(R[I-2],R[I])};break;case 30:this.$=R[I-1]+R[I];break;case 31:this.$=R[I];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},{6:r,9:22,12:11,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},{6:h,7:f,10:23,11:d},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:f,10:34,11:d},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},e(y,[2,14],{7:b,11:k}),e(T,[2,8]),e(T,[2,9]),e(T,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:_}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(y,[2,13],{7:b,11:k}),e(T,[2,11]),e(T,[2,12]),e(p,[2,15],{24:_}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(w,A){if(A.recoverable)this.trace(w);else{var F=new Error(w);throw F.hash=A,F}},"parseError"),parse:a(function(w){var A=this,F=[0],S=[],v=[null],R=[],B=this.table,I="",M=0,O=0,N=0,E=2,V=1,G=R.slice.call(arguments,1),J=Object.create(this.lexer),rt={yy:{}};for(var nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nt)&&(rt.yy[nt]=this.yy[nt]);J.setInput(w,rt.yy),rt.yy.lexer=J,rt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var ct=J.yylloc;R.push(ct);var pt=J.options&&J.options.ranges;typeof rt.yy.parseError=="function"?this.parseError=rt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Lt(Jt){F.length=F.length-2*Jt,v.length=v.length-Jt,R.length=R.length-Jt}a(Lt,"popStack");function bt(){var Jt;return Jt=S.pop()||J.lex()||V,typeof Jt!="number"&&(Jt instanceof Array&&(S=Jt,Jt=S.pop()),Jt=A.symbols_[Jt]||Jt),Jt}a(bt,"lex");for(var ut,it,st,X,H,at,W={},mt,q,Z,ye;;){if(st=F[F.length-1],this.defaultActions[st]?X=this.defaultActions[st]:((ut===null||typeof ut>"u")&&(ut=bt()),X=B[st]&&B[st][ut]),typeof X>"u"||!X.length||!X[0]){var ot="";ye=[];for(mt in B[st])this.terminals_[mt]&&mt>E&&ye.push("'"+this.terminals_[mt]+"'");J.showPosition?ot="Parse error on line "+(M+1)+`: +`+J.showPosition()+` +Expecting `+ye.join(", ")+", got '"+(this.terminals_[ut]||ut)+"'":ot="Parse error on line "+(M+1)+": Unexpected "+(ut==V?"end of input":"'"+(this.terminals_[ut]||ut)+"'"),this.parseError(ot,{text:J.match,token:this.terminals_[ut]||ut,line:J.yylineno,loc:ct,expected:ye})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+st+", token: "+ut);switch(X[0]){case 1:F.push(ut),v.push(J.yytext),R.push(J.yylloc),F.push(X[1]),ut=null,it?(ut=it,it=null):(O=J.yyleng,I=J.yytext,M=J.yylineno,ct=J.yylloc,N>0&&N--);break;case 2:if(q=this.productions_[X[1]][1],W.$=v[v.length-q],W._$={first_line:R[R.length-(q||1)].first_line,last_line:R[R.length-1].last_line,first_column:R[R.length-(q||1)].first_column,last_column:R[R.length-1].last_column},pt&&(W._$.range=[R[R.length-(q||1)].range[0],R[R.length-1].range[1]]),at=this.performAction.apply(W,[I,O,M,rt.yy,X[1],v,R].concat(G)),typeof at<"u")return at;q&&(F=F.slice(0,-1*q*2),v=v.slice(0,-1*q),R=R.slice(0,-1*q)),F.push(this.productions_[X[1]][0]),v.push(W.$),R.push(W._$),Z=B[F[F.length-2]][F[F.length-1]],F.push(Z);break;case 3:return!0}}return!0},"parse")},C=function(){var $={EOF:1,parseError:a(function(A,F){if(this.yy.parser)this.yy.parser.parseError(A,F);else throw new Error(A)},"parseError"),setInput:a(function(w,A){return this.yy=A||this.yy||{},this._input=w,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:a(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var A=w.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:a(function(w){var A=w.length,F=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var S=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),F.length-1&&(this.yylineno-=F.length-1);var v=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:F?(F.length===S.length?this.yylloc.first_column:0)+S[S.length-F.length].length-F[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(w){this.unput(this.match.slice(w))},"less"),pastInput:a(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var w=this.pastInput(),A=new Array(w.length+1).join("-");return w+this.upcomingInput()+` +`+A+"^"},"showPosition"),test_match:a(function(w,A){var F,S,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),S=w[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],F=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),F)return F;if(this._backtrack){for(var R in v)this[R]=v[R];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,A,F,S;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),R=0;RA[0].length)){if(A=F,S=R,this.options.backtrack_lexer){if(w=this.test_match(F,v[R]),w!==!1)return w;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(w=this.test_match(A,v[S]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var A=this.next();return A||this.lex()},"lex"),begin:a(function(A){this.conditionStack.push(A)},"begin"),popState:a(function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},"topState"),pushState:a(function(A){this.begin(A)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(A,F,S,v){var R=v;switch(S){case 0:return this.pushState("shapeData"),F.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let B=/\n\s*/g;return F.yytext=F.yytext.replace(B,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return A.getLogger().trace("Found comment",F.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:A.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return A.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:A.getLogger().trace("end icon"),this.popState();break;case 16:return A.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return A.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return A.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return A.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:A.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return A.getLogger().trace("description:",F.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),A.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),A.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),A.getLogger().trace("node end ...",F.yytext),"NODE_DEND";break;case 36:return this.popState(),A.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),A.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),A.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),A.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),A.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return A.getLogger().trace("Long description:",F.yytext),21;break;case 42:return A.getLogger().trace("Long description:",F.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return $}();L.lexer=C;function D(){this.yy={}}return a(D,"Parser"),D.prototype=L,L.Parser=D,new D}();d8.parser=d8;mit=d8});var pa,m8,p8,g8,TDt,SDt,yit,_Dt,CDt,Bn,wDt,EDt,vDt,ADt,LDt,RDt,DDt,xit,bit=x(()=>{"use strict";pe();Fe();zt();zs();fb();pa=[],m8=[],p8=0,g8={},TDt=a(()=>{pa=[],m8=[],p8=0,g8={}},"clear"),SDt=a(e=>{if(pa.length===0)return null;let t=pa[0].level,r=null;for(let n=pa.length-1;n>=0;n--)if(pa[n].level===t&&!r&&(r=pa[n]),pa[n].levell.parentId===i.id);for(let l of o){let u={id:l.id,parentId:i.id,label:er(l.label??"",n),isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(u)}}return{nodes:t,edges:e,other:{},config:Y()}},"getData"),CDt=a((e,t,r,n,i)=>{let s=Y(),o=s.mindmap?.padding??We.mindmap.padding;switch(n){case Bn.ROUNDED_RECT:case Bn.RECT:case Bn.HEXAGON:o*=2}let l={id:er(t,s)||"kbn"+p8++,level:e,label:er(r,s),width:s.mindmap?.maxNodeWidth??We.mindmap.maxNodeWidth,padding:o,isGroup:!1};if(i!==void 0){let h;i.includes(` +`)?h=i+` +`:h=`{ +`+i+` +}`;let f=td(h,{schema:Jf});if(f.shape&&(f.shape!==f.shape.toLowerCase()||f.shape.includes("_")))throw new Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);f?.shape&&f.shape==="kanbanItem"&&(l.shape=f?.shape),f?.label&&(l.label=f?.label),f?.icon&&(l.icon=f?.icon.toString()),f?.assigned&&(l.assigned=f?.assigned.toString()),f?.ticket&&(l.ticket=f?.ticket.toString()),f?.priority&&(l.priority=f?.priority)}let u=SDt(e);u?l.parentId=u.id||"kbn"+p8++:m8.push(l),pa.push(l)},"addNode"),Bn={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},wDt=a((e,t)=>{switch(P.debug("In get type",e,t),e){case"[":return Bn.RECT;case"(":return t===")"?Bn.ROUNDED_RECT:Bn.CLOUD;case"((":return Bn.CIRCLE;case")":return Bn.CLOUD;case"))":return Bn.BANG;case"{{":return Bn.HEXAGON;default:return Bn.DEFAULT}},"getType"),EDt=a((e,t)=>{g8[e]=t},"setElementForId"),vDt=a(e=>{if(!e)return;let t=Y(),r=pa[pa.length-1];e.icon&&(r.icon=er(e.icon,t)),e.class&&(r.cssClasses=er(e.class,t))},"decorateNode"),ADt=a(e=>{switch(e){case Bn.DEFAULT:return"no-border";case Bn.RECT:return"rect";case Bn.ROUNDED_RECT:return"rounded-rect";case Bn.CIRCLE:return"circle";case Bn.CLOUD:return"cloud";case Bn.BANG:return"bang";case Bn.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),LDt=a(()=>P,"getLogger"),RDt=a(e=>g8[e],"getElementById"),DDt={clear:TDt,addNode:CDt,getSections:yit,getData:_Dt,nodeType:Bn,getType:wDt,setElementForId:EDt,decorateNode:vDt,type2Str:ADt,getLogger:LDt,getElementById:RDt},xit=DDt});var IDt,kit,Tit=x(()=>{"use strict";pe();zt();Yc();Gn();zs();Ib();zb();IDt=a(async(e,t,r,n)=>{P.debug(`Rendering kanban diagram +`+e);let s=n.db.getData(),o=Y();o.htmlLabels=!1;let l=ys(t),u=l.append("g");u.attr("class","sections");let h=l.append("g");h.attr("class","items");let f=s.nodes.filter(b=>b.isGroup),d=0,p=10,m=[],g=25;for(let b of f){let k=o?.kanban?.sectionWidth||200;d=d+1,b.x=k*d+(d-1)*p/2,b.width=k,b.y=0,b.height=k*3,b.rx=5,b.ry=5,b.cssClasses=b.cssClasses+" section-"+d;let T=await ld(u,b);g=Math.max(g,T?.labelBBox?.height),m.push(T)}let y=0;for(let b of f){let k=m[y];y=y+1;let T=o?.kanban?.sectionWidth||200,_=-T*3/2+g,L=_,C=s.nodes.filter(w=>w.parentId===b.id);for(let w of C){if(w.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");w.x=b.x,w.width=T-1.5*p;let F=(await cd(h,w,{config:o})).node().getBBox();w.y=L+F.height/2,await D0(w),L=w.y+F.height/2+p/2}let D=k.cluster.select("rect"),$=Math.max(L-_+3*p,50)+(g-25);D.attr("height",$)}ql(void 0,l,o.mindmap?.padding??We.kanban.padding,o.mindmap?.useMaxWidth??We.kanban.useMaxWidth)},"draw"),kit={draw:IDt}});var NDt,MDt,Sit,_it=x(()=>{"use strict";Gs();NDt=a(e=>{let t="";for(let n=0;ne.darkMode?ee(n,i):qt(n,i),"adjuster");for(let n=0;n` + .edge { + stroke-width: 3; + } + ${NDt(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${e.textColor}; + fill: ${e.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),Sit=MDt});var Cit={};Be(Cit,{diagram:()=>ODt});var ODt,wit=x(()=>{"use strict";git();bit();Tit();_it();ODt={db:xit,renderer:kit,parser:mit,styles:Sit}});var y8,Py,Ait=x(()=>{"use strict";y8=function(){var e=a(function(l,u,h,f){for(h=h||{},f=l.length;f--;h[l[f]]=u);return h},"o"),t=[1,9],r=[1,10],n=[1,5,10,12],i={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:a(function(u,h,f,d,p,m,g){var y=m.length-1;switch(p){case 7:let b=d.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),k=d.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),T=parseFloat(m[y].trim());d.addLink(b,k,T);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(n,[2,8]),e(n,[2,9]),{19:[1,16]},e(n,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:r},{15:18,16:7,17:8,18:t,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(n,[2,10]),{15:21,16:7,17:8,18:t,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:a(function(u,h){if(h.recoverable)this.trace(u);else{var f=new Error(u);throw f.hash=h,f}},"parseError"),parse:a(function(u){var h=this,f=[0],d=[],p=[null],m=[],g=this.table,y="",b=0,k=0,T=0,_=2,L=1,C=m.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&($.yy[w]=this.yy[w]);D.setInput(u,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var A=D.yylloc;m.push(A);var F=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function S(ct){f.length=f.length-2*ct,p.length=p.length-ct,m.length=m.length-ct}a(S,"popStack");function v(){var ct;return ct=d.pop()||D.lex()||L,typeof ct!="number"&&(ct instanceof Array&&(d=ct,ct=d.pop()),ct=h.symbols_[ct]||ct),ct}a(v,"lex");for(var R,B,I,M,O,N,E={},V,G,J,rt;;){if(I=f[f.length-1],this.defaultActions[I]?M=this.defaultActions[I]:((R===null||typeof R>"u")&&(R=v()),M=g[I]&&g[I][R]),typeof M>"u"||!M.length||!M[0]){var nt="";rt=[];for(V in g[I])this.terminals_[V]&&V>_&&rt.push("'"+this.terminals_[V]+"'");D.showPosition?nt="Parse error on line "+(b+1)+`: +`+D.showPosition()+` +Expecting `+rt.join(", ")+", got '"+(this.terminals_[R]||R)+"'":nt="Parse error on line "+(b+1)+": Unexpected "+(R==L?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(nt,{text:D.match,token:this.terminals_[R]||R,line:D.yylineno,loc:A,expected:rt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+R);switch(M[0]){case 1:f.push(R),p.push(D.yytext),m.push(D.yylloc),f.push(M[1]),R=null,B?(R=B,B=null):(k=D.yyleng,y=D.yytext,b=D.yylineno,A=D.yylloc,T>0&&T--);break;case 2:if(G=this.productions_[M[1]][1],E.$=p[p.length-G],E._$={first_line:m[m.length-(G||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(G||1)].first_column,last_column:m[m.length-1].last_column},F&&(E._$.range=[m[m.length-(G||1)].range[0],m[m.length-1].range[1]]),N=this.performAction.apply(E,[y,k,b,$.yy,M[1],p,m].concat(C)),typeof N<"u")return N;G&&(f=f.slice(0,-1*G*2),p=p.slice(0,-1*G),m=m.slice(0,-1*G)),f.push(this.productions_[M[1]][0]),p.push(E.$),m.push(E._$),J=g[f[f.length-2]][f[f.length-1]],f.push(J);break;case 3:return!0}}return!0},"parse")},s=function(){var l={EOF:1,parseError:a(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw new Error(h)},"parseError"),setInput:a(function(u,h){return this.yy=h||this.yy||{},this._input=u,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:a(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:a(function(u){var h=u.length,f=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=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),f.length-1&&(this.yylineno-=f.length-1);var p=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:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(u){this.unput(this.match.slice(u))},"less"),pastInput:a(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:a(function(u,h){var f,d,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),d=u[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],f=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var m in p)this[m]=p[m];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,f,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;mh[0].length)){if(h=f,d=m,this.options.backtrack_lexer){if(u=this.test_match(f,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[d]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var h=this.next();return h||this.lex()},"lex"),begin:a(function(h){this.conditionStack.push(h)},"begin"),popState:a(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:a(function(h){this.begin(h)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(h,f,d,p){var m=p;switch(d){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return l}();i.lexer=s;function o(){this.yy={}}return a(o,"Parser"),o.prototype=i,i.Parser=o,new o}();y8.parser=y8;Py=y8});var M_,O_,N_,$Dt,x8,GDt,b8,VDt,zDt,WDt,UDt,Lit,Rit=x(()=>{"use strict";pe();Fe();Sn();M_=[],O_=[],N_=new Map,$Dt=a(()=>{M_=[],O_=[],N_=new Map,Ye()},"clear"),x8=class{constructor(t,r,n=0){this.source=t;this.target=r;this.value=n}static{a(this,"SankeyLink")}},GDt=a((e,t,r)=>{M_.push(new x8(e,t,r))},"addLink"),b8=class{constructor(t){this.ID=t}static{a(this,"SankeyNode")}},VDt=a(e=>{e=Rt.sanitizeText(e,Y());let t=N_.get(e);return t===void 0&&(t=new b8(e),N_.set(e,t),O_.push(t)),t},"findOrCreateNode"),zDt=a(()=>O_,"getNodes"),WDt=a(()=>M_,"getLinks"),UDt=a(()=>({nodes:O_.map(e=>({id:e.ID})),links:M_.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),Lit={nodesMap:N_,getConfig:a(()=>Y().sankey,"getConfig"),getNodes:zDt,getLinks:WDt,getGraph:UDt,addLink:GDt,findOrCreateNode:VDt,getAccTitle:ir,setAccTitle:rr,getAccDescription:ar,setAccDescription:sr,getDiagramTitle:or,setDiagramTitle:xr,clear:$Dt}});function By(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var Dit=x(()=>{"use strict";a(By,"max")});function Am(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var Iit=x(()=>{"use strict";a(Am,"min")});function Lm(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}var Nit=x(()=>{"use strict";a(Lm,"sum")});var k8=x(()=>{"use strict";Dit();Iit();Nit()});function jDt(e){return e.target.depth}function T8(e){return e.depth}function S8(e,t){return t-1-e.height}function Fy(e,t){return e.sourceLinks.length?e.depth:t-1}function _8(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?Am(e.sourceLinks,jDt)-1:0}var C8=x(()=>{"use strict";k8();a(jDt,"targetDepth");a(T8,"left");a(S8,"right");a(Fy,"justify");a(_8,"center")});function Rm(e){return function(){return e}}var Mit=x(()=>{"use strict";a(Rm,"constant")});function Oit(e,t){return P_(e.source,t.source)||e.index-t.index}function Pit(e,t){return P_(e.target,t.target)||e.index-t.index}function P_(e,t){return e.y0-t.y0}function w8(e){return e.value}function qDt(e){return e.index}function HDt(e){return e.nodes}function YDt(e){return e.links}function Bit(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function Fit({nodes:e}){for(let t of e){let r=t.y0,n=r;for(let i of t.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of t.targetLinks)i.y1=n+i.width/2,n+=i.width}}function B_(){let e=0,t=0,r=1,n=1,i=24,s=8,o,l=qDt,u=Fy,h,f,d=HDt,p=YDt,m=6;function g(){let I={nodes:d.apply(null,arguments),links:p.apply(null,arguments)};return y(I),b(I),k(I),T(I),C(I),Fit(I),I}a(g,"sankey"),g.update=function(I){return Fit(I),I},g.nodeId=function(I){return arguments.length?(l=typeof I=="function"?I:Rm(I),g):l},g.nodeAlign=function(I){return arguments.length?(u=typeof I=="function"?I:Rm(I),g):u},g.nodeSort=function(I){return arguments.length?(h=I,g):h},g.nodeWidth=function(I){return arguments.length?(i=+I,g):i},g.nodePadding=function(I){return arguments.length?(s=o=+I,g):s},g.nodes=function(I){return arguments.length?(d=typeof I=="function"?I:Rm(I),g):d},g.links=function(I){return arguments.length?(p=typeof I=="function"?I:Rm(I),g):p},g.linkSort=function(I){return arguments.length?(f=I,g):f},g.size=function(I){return arguments.length?(e=t=0,r=+I[0],n=+I[1],g):[r-e,n-t]},g.extent=function(I){return arguments.length?(e=+I[0][0],r=+I[1][0],t=+I[0][1],n=+I[1][1],g):[[e,t],[r,n]]},g.iterations=function(I){return arguments.length?(m=+I,g):m};function y({nodes:I,links:M}){for(let[N,E]of I.entries())E.index=N,E.sourceLinks=[],E.targetLinks=[];let O=new Map(I.map((N,E)=>[l(N,E,I),N]));for(let[N,E]of M.entries()){E.index=N;let{source:V,target:G}=E;typeof V!="object"&&(V=E.source=Bit(O,V)),typeof G!="object"&&(G=E.target=Bit(O,G)),V.sourceLinks.push(E),G.targetLinks.push(E)}if(f!=null)for(let{sourceLinks:N,targetLinks:E}of I)N.sort(f),E.sort(f)}a(y,"computeNodeLinks");function b({nodes:I}){for(let M of I)M.value=M.fixedValue===void 0?Math.max(Lm(M.sourceLinks,w8),Lm(M.targetLinks,w8)):M.fixedValue}a(b,"computeNodeValues");function k({nodes:I}){let M=I.length,O=new Set(I),N=new Set,E=0;for(;O.size;){for(let V of O){V.depth=E;for(let{target:G}of V.sourceLinks)N.add(G)}if(++E>M)throw new Error("circular link");O=N,N=new Set}}a(k,"computeNodeDepths");function T({nodes:I}){let M=I.length,O=new Set(I),N=new Set,E=0;for(;O.size;){for(let V of O){V.height=E;for(let{source:G}of V.targetLinks)N.add(G)}if(++E>M)throw new Error("circular link");O=N,N=new Set}}a(T,"computeNodeHeights");function _({nodes:I}){let M=By(I,E=>E.depth)+1,O=(r-e-i)/(M-1),N=new Array(M);for(let E of I){let V=Math.max(0,Math.min(M-1,Math.floor(u.call(null,E,M))));E.layer=V,E.x0=e+V*O,E.x1=E.x0+i,N[V]?N[V].push(E):N[V]=[E]}if(h)for(let E of N)E.sort(h);return N}a(_,"computeNodeLayers");function L(I){let M=Am(I,O=>(n-t-(O.length-1)*o)/Lm(O,w8));for(let O of I){let N=t;for(let E of O){E.y0=N,E.y1=N+E.value*M,N=E.y1+o;for(let V of E.sourceLinks)V.width=V.value*M}N=(n-N+o)/(O.length+1);for(let E=0;EO.length)-1)),L(M);for(let O=0;O0))continue;let nt=(J/rt-G.y0)*M;G.y0+=nt,G.y1+=nt,S(G)}h===void 0&&V.sort(P_),w(V,O)}}a(D,"relaxLeftToRight");function $(I,M,O){for(let N=I.length,E=N-2;E>=0;--E){let V=I[E];for(let G of V){let J=0,rt=0;for(let{target:ct,value:pt}of G.sourceLinks){let Lt=pt*(ct.layer-G.layer);J+=B(G,ct)*Lt,rt+=Lt}if(!(rt>0))continue;let nt=(J/rt-G.y0)*M;G.y0+=nt,G.y1+=nt,S(G)}h===void 0&&V.sort(P_),w(V,O)}}a($,"relaxRightToLeft");function w(I,M){let O=I.length>>1,N=I[O];F(I,N.y0-o,O-1,M),A(I,N.y1+o,O+1,M),F(I,n,I.length-1,M),A(I,t,0,M)}a(w,"resolveCollisions");function A(I,M,O,N){for(;O1e-6&&(E.y0+=V,E.y1+=V),M=E.y1+o}}a(A,"resolveCollisionsTopToBottom");function F(I,M,O,N){for(;O>=0;--O){let E=I[O],V=(E.y1-M)*N;V>1e-6&&(E.y0-=V,E.y1-=V),M=E.y0-o}}a(F,"resolveCollisionsBottomToTop");function S({sourceLinks:I,targetLinks:M}){if(f===void 0){for(let{source:{sourceLinks:O}}of M)O.sort(Pit);for(let{target:{targetLinks:O}}of I)O.sort(Oit)}}a(S,"reorderNodeLinks");function v(I){if(f===void 0)for(let{sourceLinks:M,targetLinks:O}of I)M.sort(Pit),O.sort(Oit)}a(v,"reorderLinks");function R(I,M){let O=I.y0-(I.sourceLinks.length-1)*o/2;for(let{target:N,width:E}of I.sourceLinks){if(N===M)break;O+=E+o}for(let{source:N,width:E}of M.targetLinks){if(N===I)break;O-=E}return O}a(R,"targetTop");function B(I,M){let O=M.y0-(M.targetLinks.length-1)*o/2;for(let{source:N,width:E}of M.targetLinks){if(N===I)break;O+=E+o}for(let{target:N,width:E}of I.sourceLinks){if(N===M)break;O-=E}return O}return a(B,"sourceTop"),g}var $it=x(()=>{"use strict";k8();C8();Mit();a(Oit,"ascendingSourceBreadth");a(Pit,"ascendingTargetBreadth");a(P_,"ascendingBreadth");a(w8,"value");a(qDt,"defaultId");a(HDt,"defaultNodes");a(YDt,"defaultLinks");a(Bit,"find");a(Fit,"computeLinkBreadths");a(B_,"Sankey")});function A8(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Git(){return new A8}var E8,v8,Wh,XDt,L8,Vit=x(()=>{"use strict";E8=Math.PI,v8=2*E8,Wh=1e-6,XDt=v8-Wh;a(A8,"Path");a(Git,"path");A8.prototype=Git.prototype={constructor:A8,moveTo:a(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:a(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:a(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:a(function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:a(function(e,t,r,n,i,s){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+s)},"bezierCurveTo"),arcTo:a(function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var s=this._x1,o=this._y1,l=r-e,u=n-t,h=s-e,f=o-t,d=h*h+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>Wh)if(!(Math.abs(f*l-u*h)>Wh)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-s,m=n-o,g=l*l+u*u,y=p*p+m*m,b=Math.sqrt(g),k=Math.sqrt(d),T=i*Math.tan((E8-Math.acos((g+d-y)/(2*b*k)))/2),_=T/k,L=T/b;Math.abs(_-1)>Wh&&(this._+="L"+(e+_*h)+","+(t+_*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>h*m)+","+(this._x1=e+L*l)+","+(this._y1=t+L*u)}},"arcTo"),arc:a(function(e,t,r,n,i,s){e=+e,t=+t,r=+r,s=!!s;var o=r*Math.cos(n),l=r*Math.sin(n),u=e+o,h=t+l,f=1^s,d=s?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>Wh||Math.abs(this._y1-h)>Wh)&&(this._+="L"+u+","+h),r&&(d<0&&(d=d%v8+v8),d>XDt?this._+="A"+r+","+r+",0,1,"+f+","+(e-o)+","+(t-l)+"A"+r+","+r+",0,1,"+f+","+(this._x1=u)+","+(this._y1=h):d>Wh&&(this._+="A"+r+","+r+",0,"+ +(d>=E8)+","+f+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},"arc"),rect:a(function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:a(function(){return this._},"toString")};L8=Git});var zit=x(()=>{"use strict";Vit()});function F_(e){return a(function(){return e},"constant")}var Wit=x(()=>{"use strict";a(F_,"default")});function Uit(e){return e[0]}function jit(e){return e[1]}var qit=x(()=>{"use strict";a(Uit,"x");a(jit,"y")});var Hit,Yit=x(()=>{"use strict";Hit=Array.prototype.slice});function KDt(e){return e.source}function QDt(e){return e.target}function ZDt(e){var t=KDt,r=QDt,n=Uit,i=jit,s=null;function o(){var l,u=Hit.call(arguments),h=t.apply(this,u),f=r.apply(this,u);if(s||(s=l=L8()),e(s,+n.apply(this,(u[0]=h,u)),+i.apply(this,u),+n.apply(this,(u[0]=f,u)),+i.apply(this,u)),l)return s=null,l+""||null}return a(o,"link"),o.source=function(l){return arguments.length?(t=l,o):t},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:F_(+l),o):n},o.y=function(l){return arguments.length?(i=typeof l=="function"?l:F_(+l),o):i},o.context=function(l){return arguments.length?(s=l??null,o):s},o}function JDt(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function R8(){return ZDt(JDt)}var Xit=x(()=>{"use strict";zit();Yit();Wit();qit();a(KDt,"linkSource");a(QDt,"linkTarget");a(ZDt,"link");a(JDt,"curveHorizontal");a(R8,"linkHorizontal")});var Kit=x(()=>{"use strict";Xit()});function t8t(e){return[e.source.x1,e.y0]}function e8t(e){return[e.target.x0,e.y1]}function $_(){return R8().source(t8t).target(e8t)}var Qit=x(()=>{"use strict";Kit();a(t8t,"horizontalSource");a(e8t,"horizontalTarget");a($_,"default")});var Zit=x(()=>{"use strict";$it();C8();Qit()});var $y,Jit=x(()=>{"use strict";$y=class e{static{a(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}}});var r8t,n8t,tst,est=x(()=>{"use strict";pe();$e();Zit();Gn();Jit();r8t={left:T8,right:S8,center:_8,justify:Fy},n8t=a(function(e,t,r,n){let{securityLevel:i,sankey:s}=Y(),o=mx.sankey,l;i==="sandbox"&&(l=xt("#i"+t));let u=i==="sandbox"?xt(l.nodes()[0].contentDocument.body):xt("body"),h=i==="sandbox"?u.select(`[id="${t}"]`):xt(`[id="${t}"]`),f=s?.width??o.width,d=s?.height??o.width,p=s?.useMaxWidth??o.useMaxWidth,m=s?.nodeAlignment??o.nodeAlignment,g=s?.prefix??o.prefix,y=s?.suffix??o.suffix,b=s?.showValues??o.showValues,k=n.db.getGraph(),T=r8t[m];B_().nodeId(F=>F.id).nodeWidth(10).nodePadding(10+(b?15:0)).nodeAlign(T).extent([[0,0],[f,d]])(k);let C=rl(X3);h.append("g").attr("class","nodes").selectAll(".node").data(k.nodes).join("g").attr("class","node").attr("id",F=>(F.uid=$y.next("node-")).id).attr("transform",function(F){return"translate("+F.x0+","+F.y0+")"}).attr("x",F=>F.x0).attr("y",F=>F.y0).append("rect").attr("height",F=>F.y1-F.y0).attr("width",F=>F.x1-F.x0).attr("fill",F=>C(F.id));let D=a(({id:F,value:S})=>b?`${F} +${g}${Math.round(S*100)/100}${y}`:F,"getText");h.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(k.nodes).join("text").attr("x",F=>F.x0(F.y1+F.y0)/2).attr("dy",`${b?"0":"0.35"}em`).attr("text-anchor",F=>F.x0(S.uid=$y.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",S=>S.source.x1).attr("x2",S=>S.target.x0);F.append("stop").attr("offset","0%").attr("stop-color",S=>C(S.source.id)),F.append("stop").attr("offset","100%").attr("stop-color",S=>C(S.target.id))}let A;switch(w){case"gradient":A=a(F=>F.uid,"coloring");break;case"source":A=a(F=>C(F.source.id),"coloring");break;case"target":A=a(F=>C(F.target.id),"coloring");break;default:A=w}$.append("path").attr("d",$_()).attr("stroke",A).attr("stroke-width",F=>Math.max(1,F.width)),ql(void 0,h,0,p)},"draw"),tst={draw:n8t}});var rst,nst=x(()=>{"use strict";rst=a(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")});var i8t,ist,sst=x(()=>{"use strict";i8t=a(e=>`.label { + font-family: ${e.fontFamily}; + }`,"getStyles"),ist=i8t});var ast={};Be(ast,{diagram:()=>a8t});var s8t,a8t,ost=x(()=>{"use strict";Ait();Rit();est();nst();sst();s8t=Py.parse.bind(Py);Py.parse=e=>s8t(rst(e));a8t={styles:ist,parser:Py,db:Lit,renderer:tst}});var ust,D8,u8t,h8t,f8t,d8t,p8t,tu,I8=x(()=>{"use strict";$n();zs();Ee();Sn();ust={packet:[]},D8=structuredClone(ust),u8t=We.packet,h8t=a(()=>{let e=Nn({...u8t,...Re().packet});return e.showBits&&(e.paddingY+=10),e},"getConfig"),f8t=a(()=>D8.packet,"getPacket"),d8t=a(e=>{e.length>0&&D8.packet.push(e)},"pushWord"),p8t=a(()=>{Ye(),D8=structuredClone(ust)},"clear"),tu={pushWord:d8t,getPacket:f8t,getConfig:h8t,clear:p8t,setAccTitle:rr,getAccTitle:ir,setDiagramTitle:xr,getDiagramTitle:or,getAccDescription:ar,setAccDescription:sr}});var m8t,g8t,y8t,hst,fst=x(()=>{"use strict";dm();zt();Ty();I8();m8t=1e4,g8t=a(e=>{Uc(e,tu);let t=-1,r=[],n=1,{bitsPerRow:i}=tu.getConfig();for(let{start:s,end:o,label:l}of e.blocks){if(o&&o{if(e.end===void 0&&(e.end=e.start),e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);return e.end+1<=t*r?[e,void 0]:[{start:e.start,end:t*r-1,label:e.label},{start:t*r,end:e.end,label:e.label}]},"getNextFittingBlock"),hst={parse:a(async e=>{let t=await Xa("packet",e);P.debug(t),g8t(t)},"parse")}});var x8t,b8t,dst,pst=x(()=>{"use strict";Yc();Gn();x8t=a((e,t,r,n)=>{let i=n.db,s=i.getConfig(),{rowHeight:o,paddingY:l,bitWidth:u,bitsPerRow:h}=s,f=i.getPacket(),d=i.getDiagramTitle(),p=o+l,m=p*(f.length+1)-(d?0:o),g=u*h+2,y=ys(t);y.attr("viewbox",`0 0 ${g} ${m}`),Rr(y,m,g,s.useMaxWidth);for(let[b,k]of f.entries())b8t(y,k,b,s);y.append("text").text(d).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),b8t=a((e,t,r,{rowHeight:n,paddingX:i,paddingY:s,bitWidth:o,bitsPerRow:l,showBits:u})=>{let h=e.append("g"),f=r*(n+s)+s;for(let d of t){let p=d.start%l*o+1,m=(d.end-d.start+1)*o-i;if(h.append("rect").attr("x",p).attr("y",f).attr("width",m).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",f+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(d.label),!u)continue;let g=d.end===d.start,y=f-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(d.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(d.end)}},"drawWord"),dst={draw:x8t}});var k8t,mst,gst=x(()=>{"use strict";Ee();k8t={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},mst=a(({packet:e}={})=>{let t=Nn(k8t,e);return` + .packetByte { + font-size: ${t.byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `},"styles")});var yst={};Be(yst,{diagram:()=>T8t});var T8t,xst=x(()=>{"use strict";I8();fst();pst();gst();T8t={parser:hst,db:tu,renderer:dst,styles:mst}});var Dm,Tst,Uh,C8t,w8t,Sst,E8t,v8t,A8t,L8t,R8t,D8t,I8t,jh,N8=x(()=>{"use strict";$n();zs();Ee();Sn();Dm={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},Tst={axes:[],curves:[],options:Dm},Uh=structuredClone(Tst),C8t=We.radar,w8t=a(()=>Nn({...C8t,...Re().radar}),"getConfig"),Sst=a(()=>Uh.axes,"getAxes"),E8t=a(()=>Uh.curves,"getCurves"),v8t=a(()=>Uh.options,"getOptions"),A8t=a(e=>{Uh.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),L8t=a(e=>{Uh.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:R8t(t.entries)}))},"setCurves"),R8t=a(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=Sst();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let n=e.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),D8t=a(e=>{let t=e.reduce((r,n)=>(r[n.name]=n,r),{});Uh.options={showLegend:t.showLegend?.value??Dm.showLegend,ticks:t.ticks?.value??Dm.ticks,max:t.max?.value??Dm.max,min:t.min?.value??Dm.min,graticule:t.graticule?.value??Dm.graticule}},"setOptions"),I8t=a(()=>{Ye(),Uh=structuredClone(Tst)},"clear"),jh={getAxes:Sst,getCurves:E8t,getOptions:v8t,setAxes:A8t,setCurves:L8t,setOptions:D8t,getConfig:w8t,clear:I8t,setAccTitle:rr,getAccTitle:ir,setDiagramTitle:xr,getDiagramTitle:or,getAccDescription:ar,setAccDescription:sr}});var N8t,_st,Cst=x(()=>{"use strict";dm();zt();Ty();N8();N8t=a(e=>{Uc(e,jh);let{axes:t,curves:r,options:n}=e;jh.setAxes(t),jh.setCurves(r),jh.setOptions(n)},"populate"),_st={parse:a(async e=>{let t=await Xa("radar",e);P.debug(t),N8t(t)},"parse")}});function F8t(e,t,r,n,i,s,o){let l=t.length,u=Math.min(o.width,o.height)/2;r.forEach((h,f)=>{if(h.entries.length!==l)return;let d=h.entries.map((p,m)=>{let g=2*Math.PI*m/l-Math.PI/2,y=$8t(p,n,i,u),b=y*Math.cos(g),k=y*Math.sin(g);return{x:b,y:k}});s==="circle"?e.append("path").attr("d",G8t(d,o.curveTension)).attr("class",`radarCurve-${f}`):s==="polygon"&&e.append("polygon").attr("points",d.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${f}`)})}function $8t(e,t,r,n){let i=Math.min(Math.max(e,t),r);return n*(i-t)/(r-t)}function G8t(e,t){let r=e.length,n=`M${e[0].x},${e[0].y}`;for(let i=0;i{let h=e.append("g").attr("transform",`translate(${i}, ${s+u*o})`);h.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${u}`),h.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}var M8t,O8t,P8t,B8t,wst,Est=x(()=>{"use strict";Yc();M8t=a((e,t,r,n)=>{let i=n.db,s=i.getAxes(),o=i.getCurves(),l=i.getOptions(),u=i.getConfig(),h=i.getDiagramTitle(),f=ys(t),d=O8t(f,u),p=l.max??Math.max(...o.map(y=>Math.max(...y.entries))),m=l.min,g=Math.min(u.width,u.height)/2;P8t(d,s,g,l.ticks,l.graticule),B8t(d,s,g,u),F8t(d,s,o,m,p,l.graticule,u),V8t(d,o,l.showLegend,u),d.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-u.height/2-u.marginTop)},"draw"),O8t=a((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return e.attr("viewbox",`0 0 ${r} ${n}`).attr("width",r).attr("height",n),e.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),P8t=a((e,t,r,n,i)=>{if(i==="circle")for(let s=0;s{let d=2*f*Math.PI/s-Math.PI/2,p=l*Math.cos(d),m=l*Math.sin(d);return`${p},${m}`}).join(" ");e.append("polygon").attr("points",u).attr("class","radarGraticule")}}},"drawGraticule"),B8t=a((e,t,r,n)=>{let i=t.length;for(let s=0;s{"use strict";Ee();qm();$n();z8t=a((e,t)=>{let r="";for(let n=0;n{let t=zl(),r=Re(),n=Nn(t,r.themeVariables),i=Nn(n.radar,e);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),vst=a(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=W8t(e);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${r.axisColor}; + stroke-width: ${r.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${r.axisLabelFontSize}px; + color: ${r.axisColor}; + } + .radarGraticule { + fill: ${r.graticuleColor}; + fill-opacity: ${r.graticuleOpacity}; + stroke: ${r.graticuleColor}; + stroke-width: ${r.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${r.legendFontSize}px; + dominant-baseline: hanging; + } + ${z8t(t,r)} + `},"styles")});var Lst={};Be(Lst,{diagram:()=>U8t});var U8t,Rst=x(()=>{"use strict";N8();Cst();Est();Ast();U8t={parser:_st,db:jh,renderer:wst,styles:vst}});var M8,Nst,Mst=x(()=>{"use strict";M8=function(){var e=a(function(_,L,C,D){for(C=C||{},D=_.length;D--;C[_[D]]=L);return C},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],s=[1,19],o=[1,16],l=[1,17],u=[1,18],h=[8,30],f=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],g=[8,15,16,21,27,28,29,30,31,32,40,44,47],y=[1,49],b={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:a(function(L,C,D,$,w,A,F){var S=A.length-1;switch(w){case 4:$.getLogger().debug("Rule: separator (NL) ");break;case 5:$.getLogger().debug("Rule: separator (Space) ");break;case 6:$.getLogger().debug("Rule: separator (EOF) ");break;case 7:$.getLogger().debug("Rule: hierarchy: ",A[S-1]),$.setHierarchy(A[S-1]);break;case 8:$.getLogger().debug("Stop NL ");break;case 9:$.getLogger().debug("Stop EOF ");break;case 10:$.getLogger().debug("Stop NL2 ");break;case 11:$.getLogger().debug("Stop EOF2 ");break;case 12:$.getLogger().debug("Rule: statement: ",A[S]),typeof A[S].length=="number"?this.$=A[S]:this.$=[A[S]];break;case 13:$.getLogger().debug("Rule: statement #2: ",A[S-1]),this.$=[A[S-1]].concat(A[S]);break;case 14:$.getLogger().debug("Rule: link: ",A[S],L),this.$={edgeTypeStr:A[S],label:""};break;case 15:$.getLogger().debug("Rule: LABEL link: ",A[S-3],A[S-1],A[S]),this.$={edgeTypeStr:A[S],label:A[S-1]};break;case 18:let v=parseInt(A[S]),R=$.generateId();this.$={id:R,type:"space",label:"",width:v,children:[]};break;case 23:$.getLogger().debug("Rule: (nodeStatement link node) ",A[S-2],A[S-1],A[S]," typestr: ",A[S-1].edgeTypeStr);let B=$.edgeStrToEdgeData(A[S-1].edgeTypeStr);this.$=[{id:A[S-2].id,label:A[S-2].label,type:A[S-2].type,directions:A[S-2].directions},{id:A[S-2].id+"-"+A[S].id,start:A[S-2].id,end:A[S].id,label:A[S-1].label,type:"edge",directions:A[S].directions,arrowTypeEnd:B,arrowTypeStart:"arrow_open"},{id:A[S].id,label:A[S].label,type:$.typeStr2Type(A[S].typeStr),directions:A[S].directions}];break;case 24:$.getLogger().debug("Rule: nodeStatement (abc88 node size) ",A[S-1],A[S]),this.$={id:A[S-1].id,label:A[S-1].label,type:$.typeStr2Type(A[S-1].typeStr),directions:A[S-1].directions,widthInColumns:parseInt(A[S],10)};break;case 25:$.getLogger().debug("Rule: nodeStatement (node) ",A[S]),this.$={id:A[S].id,label:A[S].label,type:$.typeStr2Type(A[S].typeStr),directions:A[S].directions,widthInColumns:1};break;case 26:$.getLogger().debug("APA123",this?this:"na"),$.getLogger().debug("COLUMNS: ",A[S]),this.$={type:"column-setting",columns:A[S]==="auto"?-1:parseInt(A[S])};break;case 27:$.getLogger().debug("Rule: id-block statement : ",A[S-2],A[S-1]);let I=$.generateId();this.$={...A[S-2],type:"composite",children:A[S-1]};break;case 28:$.getLogger().debug("Rule: blockStatement : ",A[S-2],A[S-1],A[S]);let M=$.generateId();this.$={id:M,type:"composite",label:"",children:A[S-1]};break;case 29:$.getLogger().debug("Rule: node (NODE_ID separator): ",A[S]),this.$={id:A[S]};break;case 30:$.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",A[S-1],A[S]),this.$={id:A[S-1],label:A[S].label,typeStr:A[S].typeStr,directions:A[S].directions};break;case 31:$.getLogger().debug("Rule: dirList: ",A[S]),this.$=[A[S]];break;case 32:$.getLogger().debug("Rule: dirList: ",A[S-1],A[S]),this.$=[A[S-1]].concat(A[S]);break;case 33:$.getLogger().debug("Rule: nodeShapeNLabel: ",A[S-2],A[S-1],A[S]),this.$={typeStr:A[S-2]+A[S],label:A[S-1]};break;case 34:$.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",A[S-3],A[S-2]," #3:",A[S-1],A[S]),this.$={typeStr:A[S-3]+A[S],label:A[S-2],directions:A[S-1]};break;case 35:case 36:this.$={type:"classDef",id:A[S-1].trim(),css:A[S].trim()};break;case 37:this.$={type:"applyClass",id:A[S-1].trim(),styleClass:A[S].trim()};break;case 38:this.$={type:"applyStyles",id:A[S-1].trim(),stylesStr:A[S].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:o,44:l,47:u},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:s,40:o,44:l,47:u}),e(f,[2,16],{14:22,15:d,16:p}),e(f,[2,17]),e(f,[2,18]),e(f,[2,19]),e(f,[2,20]),e(f,[2,21]),e(f,[2,22]),e(m,[2,25],{27:[1,25]}),e(f,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:o,44:l,47:u},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(g,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:s,40:o,44:l,47:u},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(g,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(f,[2,28]),e(f,[2,35]),e(f,[2,36]),e(f,[2,37]),e(f,[2,38]),{37:[1,47]},{34:48,35:y},{15:[1,50]},e(f,[2,27]),e(g,[2,33]),{39:[1,51]},{34:52,35:y,39:[2,31]},{32:[2,15]},e(g,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:a(function(L,C){if(C.recoverable)this.trace(L);else{var D=new Error(L);throw D.hash=C,D}},"parseError"),parse:a(function(L){var C=this,D=[0],$=[],w=[null],A=[],F=this.table,S="",v=0,R=0,B=0,I=2,M=1,O=A.slice.call(arguments,1),N=Object.create(this.lexer),E={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(E.yy[V]=this.yy[V]);N.setInput(L,E.yy),E.yy.lexer=N,E.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var G=N.yylloc;A.push(G);var J=N.options&&N.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function rt(q){D.length=D.length-2*q,w.length=w.length-q,A.length=A.length-q}a(rt,"popStack");function nt(){var q;return q=$.pop()||N.lex()||M,typeof q!="number"&&(q instanceof Array&&($=q,q=$.pop()),q=C.symbols_[q]||q),q}a(nt,"lex");for(var ct,pt,Lt,bt,ut,it,st={},X,H,at,W;;){if(Lt=D[D.length-1],this.defaultActions[Lt]?bt=this.defaultActions[Lt]:((ct===null||typeof ct>"u")&&(ct=nt()),bt=F[Lt]&&F[Lt][ct]),typeof bt>"u"||!bt.length||!bt[0]){var mt="";W=[];for(X in F[Lt])this.terminals_[X]&&X>I&&W.push("'"+this.terminals_[X]+"'");N.showPosition?mt="Parse error on line "+(v+1)+`: +`+N.showPosition()+` +Expecting `+W.join(", ")+", got '"+(this.terminals_[ct]||ct)+"'":mt="Parse error on line "+(v+1)+": Unexpected "+(ct==M?"end of input":"'"+(this.terminals_[ct]||ct)+"'"),this.parseError(mt,{text:N.match,token:this.terminals_[ct]||ct,line:N.yylineno,loc:G,expected:W})}if(bt[0]instanceof Array&&bt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lt+", token: "+ct);switch(bt[0]){case 1:D.push(ct),w.push(N.yytext),A.push(N.yylloc),D.push(bt[1]),ct=null,pt?(ct=pt,pt=null):(R=N.yyleng,S=N.yytext,v=N.yylineno,G=N.yylloc,B>0&&B--);break;case 2:if(H=this.productions_[bt[1]][1],st.$=w[w.length-H],st._$={first_line:A[A.length-(H||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(H||1)].first_column,last_column:A[A.length-1].last_column},J&&(st._$.range=[A[A.length-(H||1)].range[0],A[A.length-1].range[1]]),it=this.performAction.apply(st,[S,R,v,E.yy,bt[1],w,A].concat(O)),typeof it<"u")return it;H&&(D=D.slice(0,-1*H*2),w=w.slice(0,-1*H),A=A.slice(0,-1*H)),D.push(this.productions_[bt[1]][0]),w.push(st.$),A.push(st._$),at=F[D[D.length-2]][D[D.length-1]],D.push(at);break;case 3:return!0}}return!0},"parse")},k=function(){var _={EOF:1,parseError:a(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:a(function(L,C){return this.yy=C||this.yy||{},this._input=L,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:a(function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var C=L.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),L},"input"),unput:a(function(L){var C=L.length,D=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var $=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),D.length-1&&(this.yylineno-=D.length-1);var w=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:D?(D.length===$.length?this.yylloc.first_column:0)+$[$.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(L){this.unput(this.match.slice(L))},"less"),pastInput:a(function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var L=this.pastInput(),C=new Array(L.length+1).join("-");return L+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:a(function(L,C){var D,$,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),$=L[0].match(/(?:\r\n?|\n).*/g),$&&(this.yylineno+=$.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:$?$[$.length-1].length-$[$.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+L[0].length},this.yytext+=L[0],this.match+=L[0],this.matches=L,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(L[0].length),this.matched+=L[0],D=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var A in w)this[A]=w[A];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var L,C,D,$;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),A=0;AC[0].length)){if(C=D,$=A,this.options.backtrack_lexer){if(L=this.test_match(D,w[A]),L!==!1)return L;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(L=this.test_match(C,w[$]),L!==!1?L:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var C=this.next();return C||this.lex()},"lex"),begin:a(function(C){this.conditionStack.push(C)},"begin"),popState:a(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:a(function(C){this.begin(C)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(C,D,$,w){var A=w;switch($){case 0:return 10;case 1:return C.getLogger().debug("Found space-block"),31;break;case 2:return C.getLogger().debug("Found nl-block"),31;break;case 3:return C.getLogger().debug("Found space-block"),29;break;case 4:C.getLogger().debug(".",D.yytext);break;case 5:C.getLogger().debug("_",D.yytext);break;case 6:return 5;case 7:return D.yytext=-1,28;break;case 8:return D.yytext=D.yytext.replace(/columns\s+/,""),C.getLogger().debug("COLUMNS (LEX)",D.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:C.getLogger().debug("LEX: POPPING STR:",D.yytext),this.popState();break;case 14:return C.getLogger().debug("LEX: STR end:",D.yytext),"STR";break;case 15:return D.yytext=D.yytext.replace(/space\:/,""),C.getLogger().debug("SPACE NUM (LEX)",D.yytext),21;break;case 16:return D.yytext="1",C.getLogger().debug("COLUMNS (LEX)",D.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),C.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),C.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),C.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),C.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),C.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),C.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),C.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),C.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),C.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),C.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),C.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),C.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return C.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return C.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return C.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return C.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return C.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return C.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return C.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),C.getLogger().debug("LEX ARR START"),38;break;case 75:return C.getLogger().debug("Lex: NODE_ID",D.yytext),32;break;case 76:return C.getLogger().debug("Lex: EOF",D.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:C.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:C.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return C.getLogger().debug("LEX: NODE_DESCR:",D.yytext),"NODE_DESCR";break;case 84:C.getLogger().debug("LEX POPPING"),this.popState();break;case 85:C.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return D.yytext=D.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (right): dir:",D.yytext),"DIR";break;case 87:return D.yytext=D.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (left):",D.yytext),"DIR";break;case 88:return D.yytext=D.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (x):",D.yytext),"DIR";break;case 89:return D.yytext=D.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (y):",D.yytext),"DIR";break;case 90:return D.yytext=D.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (up):",D.yytext),"DIR";break;case 91:return D.yytext=D.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (down):",D.yytext),"DIR";break;case 92:return D.yytext="]>",C.getLogger().debug("Lex (ARROW_DIR end):",D.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return C.getLogger().debug("Lex: LINK","#"+D.yytext+"#"),15;break;case 94:return C.getLogger().debug("Lex: LINK",D.yytext),15;break;case 95:return C.getLogger().debug("Lex: LINK",D.yytext),15;break;case 96:return C.getLogger().debug("Lex: LINK",D.yytext),15;break;case 97:return C.getLogger().debug("Lex: START_LINK",D.yytext),this.pushState("LLABEL"),16;break;case 98:return C.getLogger().debug("Lex: START_LINK",D.yytext),this.pushState("LLABEL"),16;break;case 99:return C.getLogger().debug("Lex: START_LINK",D.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return C.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),C.getLogger().debug("Lex: LINK","#"+D.yytext+"#"),15;break;case 103:return this.popState(),C.getLogger().debug("Lex: LINK",D.yytext),15;break;case 104:return this.popState(),C.getLogger().debug("Lex: LINK",D.yytext),15;break;case 105:return C.getLogger().debug("Lex: COLON",D.yytext),D.yytext=D.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return _}();b.lexer=k;function T(){this.yy={}}return a(T,"Parser"),T.prototype=b,b.Parser=T,new T}();M8.parser=M8;Nst=M8});function t7t(e){switch(P.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return P.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function e7t(e){switch(P.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function r7t(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var Qa,P8,O8,Ost,Pst,H8t,Fst,Y8t,G_,X8t,K8t,Q8t,Z8t,$st,B8,Gy,J8t,Bst,n7t,i7t,s7t,a7t,o7t,l7t,c7t,u7t,h7t,f7t,d7t,Gst,Vst=x(()=>{"use strict";hA();$n();pe();zt();Fe();Sn();Qa=new Map,P8=[],O8=new Map,Ost="color",Pst="fill",H8t="bgFill",Fst=",",Y8t=Y(),G_=new Map,X8t=a(e=>Rt.sanitizeText(e,Y8t),"sanitizeText"),K8t=a(function(e,t=""){let r=G_.get(e);r||(r={id:e,styles:[],textStyles:[]},G_.set(e,r)),t?.split(Fst).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ost).exec(n)){let o=i.replace(Pst,H8t).replace(Ost,Pst);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),Q8t=a(function(e,t=""){let r=Qa.get(e);t!=null&&(r.styles=t.split(Fst))},"addStyle2Node"),Z8t=a(function(e,t){e.split(",").forEach(function(r){let n=Qa.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Qa.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),$st=a((e,t)=>{let r=e.flat(),n=[];for(let i of r){if(i.label&&(i.label=X8t(i.label)),i.type==="classDef"){K8t(i.id,i.css);continue}if(i.type==="applyClass"){Z8t(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&Q8t(i.id,i?.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){let s=(O8.get(i.id)??0)+1;O8.set(i.id,s),i.id=s+"-"+i.id,P8.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let s=Qa.get(i.id);if(s===void 0?Qa.set(i.id,i):(i.type!=="na"&&(s.type=i.type),i.label!==i.id&&(s.label=i.label)),i.children&&$st(i.children,i),i.type==="space"){let o=i.width??1;for(let l=0;l{P.debug("Clear called"),Ye(),Gy={id:"root",type:"composite",children:[],columns:-1},Qa=new Map([["root",Gy]]),B8=[],G_=new Map,P8=[],O8=new Map},"clear");a(t7t,"typeStr2Type");a(e7t,"edgeTypeStr2Type");a(r7t,"edgeStrToEdgeData");Bst=0,n7t=a(()=>(Bst++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Bst),"generateId"),i7t=a(e=>{Gy.children=e,$st(e,Gy),B8=Gy.children},"setHierarchy"),s7t=a(e=>{let t=Qa.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),a7t=a(()=>[...Qa.values()],"getBlocksFlat"),o7t=a(()=>B8||[],"getBlocks"),l7t=a(()=>P8,"getEdges"),c7t=a(e=>Qa.get(e),"getBlock"),u7t=a(e=>{Qa.set(e.id,e)},"setBlock"),h7t=a(()=>console,"getLogger"),f7t=a(function(){return G_},"getClasses"),d7t={getConfig:a(()=>Re().block,"getConfig"),typeStr2Type:t7t,edgeTypeStr2Type:e7t,edgeStrToEdgeData:r7t,getLogger:h7t,getBlocksFlat:a7t,getBlocks:o7t,getEdges:l7t,setHierarchy:i7t,getBlock:c7t,setBlock:u7t,getColumns:s7t,getClasses:f7t,clear:J8t,generateId:n7t},Gst=d7t});var V_,p7t,zst,Wst=x(()=>{"use strict";Gs();V_=a((e,t)=>{let r=du,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Ci(n,i,s,t)},"fade"),p7t=a(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${V_(e.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${V_(e.mainBkg,.5)}; + fill: ${V_(e.clusterBkg,.5)}; + stroke: ${V_(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`,"getStyles"),zst=p7t});var m7t,g7t,y7t,x7t,b7t,k7t,T7t,S7t,_7t,C7t,w7t,Ust,jst=x(()=>{"use strict";zt();m7t=a((e,t,r,n)=>{t.forEach(i=>{w7t[i](e,r,n)})},"insertMarkers"),g7t=a((e,t,r)=>{P.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),y7t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),x7t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),b7t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),k7t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),T7t=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),S7t=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),_7t=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),C7t=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),w7t={extension:g7t,composition:y7t,aggregation:x7t,dependency:b7t,lollipop:k7t,point:T7t,circle:S7t,cross:_7t,barb:C7t},Ust=m7t});function E7t(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let r=t%e,n=Math.floor(t/e);return{px:r,py:n}}function F8(e,t,r=0,n=0){P.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:n,x:0,y:0});let i=0,s=0;if(e.children?.length>0){for(let m of e.children)F8(m,t);let o=v7t(e);i=o.width,s=o.height,P.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,s);for(let m of e.children)m.size&&(P.debug(`abc95 Setting size of children of ${e.id} id=${m.id} ${i} ${s} ${JSON.stringify(m.size)}`),m.size.width=i*(m.widthInColumns??1)+gn*((m.widthInColumns??1)-1),m.size.height=s,m.size.x=0,m.size.y=0,P.debug(`abc95 updating size of ${e.id} children child:${m.id} maxWidth:${i} maxHeight:${s}`));for(let m of e.children)F8(m,t,i,s);let l=e.columns??-1,u=0;for(let m of e.children)u+=m.widthInColumns??1;let h=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(m>0){let g=(d-m*gn-gn)/m;P.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,g);for(let y of e.children)y.size&&(y.size.width=g)}}e.size={width:d,height:p,x:0,y:0}}P.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function qst(e,t){P.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let r=e.columns??-1;if(P.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){let n=e?.children[0]?.size?.width??0,i=e.children.length*n+(e.children.length-1)*gn;P.debug("widthOfChildren 88",i,"posX");let s=0;P.debug("abc91 block?.size?.x",e.id,e?.size?.x);let o=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-gn,l=0;for(let u of e.children){let h=e;if(!u.size)continue;let{width:f,height:d}=u.size,{px:p,py:m}=E7t(r,s);if(m!=l&&(l=m,o=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-gn,P.debug("New row in layout for block",e.id," and child ",u.id,l)),P.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${s} (px, py) ${p},${m} (${h?.size?.x},${h?.size?.y}) parent: ${h.id} width: ${f}${gn}`),h.size){let g=f/2;u.size.x=o+gn+g,P.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${o} new startingPosX${u.size.x} ${g} padding=${gn} width=${f} halfWidth=${g} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(u?.widthInColumns??1)/2}`),o=u.size.x+g,u.size.y=h.size.y-h.size.height/2+m*(d+gn)+d/2+gn,P.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${o}${gn}${g}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${f*(u?.widthInColumns??1)/2}`)}u.children&&qst(u,t),s+=u?.widthInColumns??1,P.debug("abc88 columnsPos",u,s)}}P.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function Hst(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:s,y:o,width:l,height:u}=e.size;s-l/2n&&(n=s+l/2),o+u/2>i&&(i=o+u/2)}if(e.children)for(let s of e.children)({minX:t,minY:r,maxX:n,maxY:i}=Hst(s,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}function Yst(e){let t=e.getBlock("root");if(!t)return;F8(t,e,0,0),qst(t,e),P.debug("getBlocks",JSON.stringify(t,null,2));let{minX:r,minY:n,maxX:i,maxY:s}=Hst(t),o=s-n,l=i-r;return{x:r,y:n,width:l,height:o}}var gn,v7t,Xst=x(()=>{"use strict";zt();pe();gn=Y()?.block?.padding??8;a(E7t,"calculateBlockPosition");v7t=a(e=>{let t=0,r=0;for(let n of e.children){let{width:i,height:s,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};P.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",s,"x:",o,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),s>r&&(r=s))}return{width:t,height:r}},"getMaxChildSize");a(F8,"setBlockSizes");a(qst,"layoutBlocks");a(Hst,"findBounds");a(Yst,"layout")});function Kst(e,t){t&&e.attr("style",t)}function A7t(e){let t=xt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",s=r.append("span");return s.html(n),Kst(s,e.labelStyle),s.attr("class",i),Kst(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var L7t,Yi,z_=x(()=>{"use strict";$e();zt();pe();Fe();Ee();$a();a(Kst,"applyStyle");a(A7t,"addHtmlLabel");L7t=a((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Ne(Y().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),P.debug("vertexText"+i);let s={isNode:n,label:C4(Yn(i)),labelStyle:t.replace("fill:","color:")};return A7t(s)}else{let s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(let l of o){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),s.appendChild(u)}return s}},"createLabel"),Yi=L7t});var Zst,R7t,Qst,Jst=x(()=>{"use strict";zt();Zst=a((e,t,r,n,i)=>{t.arrowTypeStart&&Qst(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Qst(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),R7t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Qst=a((e,t,r,n,i,s)=>{let o=R7t[r];if(!o){P.warn(`Unknown arrow type: ${r}`);return}let l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${s}-${o}${l})`)},"addEdgeMarker")});function W_(e,t){Y().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}var $8,Ti,eat,rat,D7t,I7t,tat,nat,iat=x(()=>{"use strict";zt();z_();$a();$e();pe();Ee();Fe();Y4();L0();Jst();$8={},Ti={},eat=a((e,t)=>{let r=Y(),n=Ne(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Xn(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Yi(t.label,t.labelStyle),s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label");o.node().appendChild(i);let l=i.getBBox();if(n){let h=i.children[0],f=xt(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),$8[t.id]=s,t.width=l.width,t.height=l.height;let u;if(t.startLabelLeft){let h=Yi(t.startLabelLeft,t.labelStyle),f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Ti[t.id]||(Ti[t.id]={}),Ti[t.id].startLeft=f,W_(u,t.startLabelLeft)}if(t.startLabelRight){let h=Yi(t.startLabelRight,t.labelStyle),f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Ti[t.id]||(Ti[t.id]={}),Ti[t.id].startRight=f,W_(u,t.startLabelRight)}if(t.endLabelLeft){let h=Yi(t.endLabelLeft,t.labelStyle),f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Ti[t.id]||(Ti[t.id]={}),Ti[t.id].endLeft=f,W_(u,t.endLabelLeft)}if(t.endLabelRight){let h=Yi(t.endLabelRight,t.labelStyle),f=e.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Ti[t.id]||(Ti[t.id]={}),Ti[t.id].endRight=f,W_(u,t.endLabelRight)}return i},"insertEdgeLabel");a(W_,"setTerminalWidth");rat=a((e,t)=>{P.debug("Moving label abc88 ",e.id,e.label,$8[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,n=Y(),{subGraphTitleTotalMargin:i}=yl(n);if(e.label){let s=$8[e.id],o=e.x,l=e.y;if(r){let u=se.calcLabelPosition(r);P.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(o=u.x,l=u.y)}s.attr("transform",`translate(${o}, ${l+i/2})`)}if(e.startLabelLeft){let s=Ti[e.id].startLeft,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let s=Ti[e.id].startRight,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let s=Ti[e.id].endLeft,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let s=Ti[e.id].endRight,o=e.x,l=e.y;if(r){let u=se.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),D7t=a((e,t)=>{let r=e.x,n=e.y,i=Math.abs(t.x-r),s=Math.abs(t.y-n),o=e.width/2,l=e.height/2;return i>=o||s>=l},"outsideNode"),I7t=a((e,t,r)=>{P.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,i=e.y,s=Math.abs(n-r.x),o=e.width/2,l=r.xMath.abs(n-t.x)*u){let d=r.y{P.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(s=>{if(!D7t(t,s)&&!i){let o=I7t(t,n,s),l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)||r.push(o),i=!0}else n=s,i||r.push(s)}),r},"cutPathAtIntersect"),nat=a(function(e,t,r,n,i,s,o){let l=r.points;P.debug("abc88 InsertEdge: edge=",r,"e=",t);let u=!1,h=s.node(t.v);var f=s.node(t.w);f?.intersect&&h?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),l.push(f.intersect(l[l.length-1]))),r.toCluster&&(P.debug("to cluster abc88",n[r.toCluster]),l=tat(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(P.debug("from cluster abc88",n[r.fromCluster]),l=tat(l.reverse(),n[r.fromCluster].node).reverse(),u=!0);let d=l.filter(L=>!Number.isNaN(L.y)),p=js;r.curve&&(i==="graph"||i==="flowchart")&&(p=r.curve);let{x:m,y:g}=Mb(r),y=Da().x(m).y(g).curve(p),b;switch(r.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-thick";break;default:b=""}switch(r.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break}let k=e.append("path").attr("d",y(d)).attr("id",r.id).attr("class"," "+b+(r.classes?" "+r.classes:"")).attr("style",r.style),T="";(Y().flowchart.arrowMarkerAbsolute||Y().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\("),T=T.replace(/\)/g,"\\)")),Zst(k,r,T,o,i);let _={};return u&&(_.updatedPath=l),_.originalPath=r.points,_},"insertEdge")});var N7t,sat,aat=x(()=>{"use strict";N7t=a(e=>{let t=new Set;for(let r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),sat=a((e,t,r)=>{let n=N7t(e),i=2,s=t.height+2*r.padding,o=s/i,l=t.width+2*o+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:l/2,y:2*u},{x:l-o,y:0},{x:l,y:0},{x:l,y:-s/3},{x:l+2*u,y:-s/2},{x:l,y:-2*s/3},{x:l,y:-s},{x:l-o,y:-s},{x:l/2,y:-s-2*u},{x:o,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*u,y:-s/2},{x:0,y:-s/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:l-o,y:-s},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-o},{x:l,y:-s+o},{x:0,y:-s}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-o},{x:0,y:-s+o},{x:l,y:-s}]:n.has("right")&&n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:l-o,y:-s+u},{x:o,y:-s+u},{x:o,y:-s},{x:0,y:-s/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-s+u},{x:0,y:-s+u},{x:l/2,y:-s},{x:l,y:-s+u},{x:l-o,y:-s+u},{x:l-o,y:-u},{x:l,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-o},{x:0,y:-s}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-s}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-o},{x:l,y:-s}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-s}]:n.has("right")?[{x:o,y:-u},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:l-o,y:-s+u},{x:o,y:-s+u},{x:o,y:-s+u}]:n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:-s+u},{x:o,y:-s+u},{x:o,y:-s},{x:0,y:-s/2}]:n.has("up")?[{x:o,y:-u},{x:o,y:-s+u},{x:0,y:-s+u},{x:l/2,y:-s},{x:l,y:-s+u},{x:l-o,y:-s+u},{x:l-o,y:-u}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-s+u},{x:l-o,y:-s+u},{x:l-o,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints")});function M7t(e,t){return e.intersect(t)}var oat,lat=x(()=>{"use strict";a(M7t,"intersectNode");oat=M7t});function O7t(e,t,r,n){var i=e.x,s=e.y,o=i-n.x,l=s-n.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);n.x{"use strict";a(O7t,"intersectEllipse");U_=O7t});function P7t(e,t,r){return U_(e,t,t,r)}var cat,uat=x(()=>{"use strict";G8();a(P7t,"intersectCircle");cat=P7t});function B7t(e,t,r,n){var i,s,o,l,u,h,f,d,p,m,g,y,b,k,T;if(i=t.y-e.y,o=e.x-t.x,u=t.x*e.y-e.x*t.y,p=i*r.x+o*r.y+u,m=i*n.x+o*n.y+u,!(p!==0&&m!==0&&hat(p,m))&&(s=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=s*e.x+l*e.y+h,d=s*t.x+l*t.y+h,!(f!==0&&d!==0&&hat(f,d))&&(g=i*l-s*o,g!==0)))return y=Math.abs(g/2),b=o*h-l*u,k=b<0?(b-y)/g:(b+y)/g,b=s*u-i*h,T=b<0?(b-y)/g:(b+y)/g,{x:k,y:T}}function hat(e,t){return e*t>0}var fat,dat=x(()=>{"use strict";a(B7t,"intersectLine");a(hat,"sameSign");fat=B7t});function F7t(e,t,r){var n=e.x,i=e.y,s=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(g){o=Math.min(o,g.x),l=Math.min(l,g.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));for(var u=n-e.width/2-o,h=i-e.height/2-l,f=0;f1&&s.sort(function(g,y){var b=g.x-r.x,k=g.y-r.y,T=Math.sqrt(b*b+k*k),_=y.x-r.x,L=y.y-r.y,C=Math.sqrt(_*_+L*L);return T{"use strict";dat();pat=F7t;a(F7t,"intersectPolygon")});var $7t,gat,yat=x(()=>{"use strict";$7t=a((e,t)=>{var r=e.x,n=e.y,i=t.x-r,s=t.y-n,o=e.width/2,l=e.height/2,u,h;return Math.abs(s)*o>Math.abs(i)*l?(s<0&&(l=-l),u=s===0?0:l*i/s,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*s/i),{x:r+u,y:n+h}},"intersectRect"),gat=$7t});var zr,V8=x(()=>{"use strict";lat();uat();G8();mat();yat();zr={node:oat,circle:cat,ellipse:U_,polygon:pat,rect:gat}});function Za(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var En,en,z8=x(()=>{"use strict";z_();$a();pe();$e();Fe();Ee();En=a(async(e,t,r,n)=>{let i=Y(),s,o=t.useHtmlLabels||Ne(i.flowchart.htmlLabels);r?s=r:s="node default";let l=e.insert("g").attr("class",s).attr("id",t.domId||t.id),u=l.insert("g").attr("class","label").attr("style",t.labelStyle),h;t.labelText===void 0?h="":h=typeof t.labelText=="string"?t.labelText:t.labelText[0];let f=u.node(),d;t.labelType==="markdown"?d=Xn(u,er(Yn(h),i),{useHtmlLabels:o,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):d=f.appendChild(Yi(er(Yn(h),i),t.labelStyle,!1,n));let p=d.getBBox(),m=t.padding/2;if(Ne(i.flowchart.htmlLabels)){let g=d.children[0],y=xt(d),b=g.getElementsByTagName("img");if(b){let k=h.replace(/]*>/g,"").trim()==="";await Promise.all([...b].map(T=>new Promise(_=>{function L(){if(T.style.display="flex",T.style.flexDirection="column",k){let C=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,$=parseInt(C,10)*5+"px";T.style.minWidth=$,T.style.maxWidth=$}else T.style.width="100%";_(T)}a(L,"setupImage"),setTimeout(()=>{T.complete&&L()}),T.addEventListener("error",L),T.addEventListener("load",L)})))}p=g.getBoundingClientRect(),y.attr("width",p.width),y.attr("height",p.height)}return o?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:m,label:u}},"labelHelper"),en=a((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");a(Za,"insertPolygonShape")});var G7t,xat,bat=x(()=>{"use strict";z8();zt();pe();V8();G7t=a(async(e,t)=>{t.useHtmlLabels||Y().flowchart.htmlLabels||(t.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:s}=await En(e,t,"node "+t.classes,!0);P.info("Classes = ",t.classes);let o=n.insert("rect",":first-child");return o.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-s).attr("y",-i.height/2-s).attr("width",i.width+t.padding).attr("height",i.height+t.padding),en(t,o),t.intersect=function(l){return zr.rect(t,l)},n},"note"),xat=G7t});function W8(e,t,r,n){let i=[],s=a(l=>{i.push(l,0)},"addBorder"),o=a(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(P.debug("add top border"),s(r)):o(r),t.includes("r")?(P.debug("add right border"),s(n)):o(n),t.includes("b")?(P.debug("add bottom border"),s(r)):o(r),t.includes("l")?(P.debug("add left border"),s(n)):o(n),e.attr("stroke-dasharray",i.join(" "))}var kat,Ps,Tat,V7t,z7t,W7t,U7t,j7t,q7t,H7t,Y7t,X7t,K7t,Q7t,Z7t,J7t,tIt,eIt,rIt,nIt,iIt,sIt,Sat,aIt,oIt,_at,j_,U8,Cat,wat=x(()=>{"use strict";$e();pe();Fe();zt();aat();z_();V8();bat();z8();kat=a(e=>e?" "+e:"","formatClass"),Ps=a((e,t)=>`${t||"node default"}${kat(e.classes)} ${kat(e.class)}`,"getClassesFromNode"),Tat=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=i+s,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];P.info("Question main (Circle)");let u=Za(r,o,o,l);return u.attr("style",t.style),en(t,u),t.intersect=function(h){return P.warn("Intersect called"),zr.polygon(t,l,h)},r},"question"),V7t=a((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(o){return zr.circle(t,14,o)},r},"choice"),z7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=4,s=n.height+t.padding,o=s/i,l=n.width+2*o+t.padding,u=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h=Za(r,l,s,u);return h.attr("style",t.style),en(t,h),t.intersect=function(f){return zr.polygon(t,u,f)},r},"hexagon"),W7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,void 0,!0),i=2,s=n.height+2*t.padding,o=s/i,l=n.width+2*o+t.padding,u=sat(t.directions,n,t),h=Za(r,l,s,u);return h.attr("style",t.style),en(t,h),t.intersect=function(f){return zr.polygon(t,u,f)},r},"block_arrow"),U7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Za(r,i,s,o).attr("style",t.style),t.width=i+s,t.height=s,t.intersect=function(u){return zr.polygon(t,o,u)},r},"rect_left_inv_arrow"),j7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],l=Za(r,i,s,o);return l.attr("style",t.style),en(t,l),t.intersect=function(u){return zr.polygon(t,o,u)},r},"lean_right"),q7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],l=Za(r,i,s,o);return l.attr("style",t.style),en(t,l),t.intersect=function(u){return zr.polygon(t,o,u)},r},"lean_left"),H7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],l=Za(r,i,s,o);return l.attr("style",t.style),en(t,l),t.intersect=function(u){return zr.polygon(t,o,u)},r},"trapezoid"),Y7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=Za(r,i,s,o);return l.attr("style",t.style),en(t,l),t.intersect=function(u){return zr.polygon(t,o,u)},r},"inv_trapezoid"),X7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],l=Za(r,i,s,o);return l.attr("style",t.style),en(t,l),t.intersect=function(u){return zr.polygon(t,o,u)},r},"rect_right_inv_arrow"),K7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=i/2,o=s/(2.5+i/50),l=n.height+o+t.padding,u="M 0,"+o+" a "+s+","+o+" 0,0,0 "+i+" 0 a "+s+","+o+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+s+","+o+" 0,0,0 "+i+" 0 l 0,"+-l,h=r.attr("label-offset-y",o).insert("path",":first-child").attr("style",t.style).attr("d",u).attr("transform","translate("+-i/2+","+-(l/2+o)+")");return en(t,h),t.intersect=function(f){let d=zr.rect(t,f),p=d.x-t.x;if(s!=0&&(Math.abs(p)t.height/2-o)){let m=o*o*(1-p*p/(s*s));m!=0&&(m=Math.sqrt(m)),m=o-m,f.y-t.y>0&&(m=-m),d.y+=m}return d},r},"cylinder"),Q7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await En(e,t,"node "+t.classes+" "+t.class,!0),s=r.insert("rect",":first-child"),o=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,u=t.positioned?-o/2:-n.width/2-i,h=t.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",u).attr("y",h).attr("width",o).attr("height",l),t.props){let f=new Set(Object.keys(t.props));t.props.borders&&(W8(s,t.props.borders,o,l),f.delete("borders")),f.forEach(d=>{P.warn(`Unknown node property ${d}`)})}return en(t,s),t.intersect=function(f){return zr.rect(t,f)},r},"rect"),Z7t=a(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await En(e,t,"node "+t.classes,!0),s=r.insert("rect",":first-child"),o=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,u=t.positioned?-o/2:-n.width/2-i,h=t.positioned?-l/2:-n.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",u).attr("y",h).attr("width",o).attr("height",l),t.props){let f=new Set(Object.keys(t.props));t.props.borders&&(W8(s,t.props.borders,o,l),f.delete("borders")),f.forEach(d=>{P.warn(`Unknown node property ${d}`)})}return en(t,s),t.intersect=function(f){return zr.rect(t,f)},r},"composite"),J7t=a(async(e,t)=>{let{shapeSvg:r}=await En(e,t,"label",!0);P.trace("Classes = ",t.class);let n=r.insert("rect",":first-child"),i=0,s=0;if(n.attr("width",i).attr("height",s),r.attr("class","label edgeLabel"),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(W8(n,t.props.borders,i,s),o.delete("borders")),o.forEach(l=>{P.warn(`Unknown node property ${l}`)})}return en(t,n),t.intersect=function(o){return zr.rect(t,o)},r},"labelRect");a(W8,"applyNodePropertyBorders");tIt=a((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";let n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),s=n.insert("line"),o=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText,u="";typeof l=="object"?u=l[0]:u=l,P.info("Label text abc79",u,l,typeof l=="object");let h=o.node().appendChild(Yi(u,t.labelStyle,!0,!0)),f={width:0,height:0};if(Ne(Y().flowchart.htmlLabels)){let y=h.children[0],b=xt(h);f=y.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}P.info("Text 2",l);let d=l.slice(1,l.length),p=h.getBBox(),m=o.node().appendChild(Yi(d.join?d.join("
    "):d,t.labelStyle,!0,!0));if(Ne(Y().flowchart.htmlLabels)){let y=m.children[0],b=xt(m);f=y.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}let g=t.padding/2;return xt(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+g+5)+")"),xt(h).attr("transform","translate( "+(f.width{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.height+t.padding,s=n.width+i/4+t.padding,o=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return en(t,o),t.intersect=function(l){return zr.rect(t,l)},r},"stadium"),rIt=a(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await En(e,t,Ps(t,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),P.info("Circle main"),en(t,s),t.intersect=function(o){return P.info("Circle intersect",t,n.width/2+i,o),zr.circle(t,n.width/2+i,o)},r},"circle"),nIt=a(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await En(e,t,Ps(t,void 0),!0),s=5,o=r.insert("g",":first-child"),l=o.insert("circle"),u=o.insert("circle");return o.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+s).attr("width",n.width+t.padding+s*2).attr("height",n.height+t.padding+s*2),u.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),P.info("DoubleCircle main"),en(t,l),t.intersect=function(h){return P.info("DoubleCircle intersect",t,n.width/2+i+s,h),zr.circle(t,n.width/2+i+s,h)},r},"doublecircle"),iIt=a(async(e,t)=>{let{shapeSvg:r,bbox:n}=await En(e,t,Ps(t,void 0),!0),i=n.width+t.padding,s=n.height+t.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=Za(r,i,s,o);return l.attr("style",t.style),en(t,l),t.intersect=function(u){return zr.polygon(t,o,u)},r},"subroutine"),sIt=a((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),en(t,n),t.intersect=function(i){return zr.circle(t,7,i)},r},"start"),Sat=a((e,t,r)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=70,s=10;r==="LR"&&(i=10,s=70);let o=n.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return en(t,o),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return zr.rect(t,l)},n},"forkJoin"),aIt=a((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),en(t,i),t.intersect=function(s){return zr.circle(t,7,s)},r},"end"),oIt=a((e,t)=>{let r=t.padding/2,n=4,i=8,s;t.classes?s="node "+t.classes:s="node default";let o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),l=o.insert("rect",":first-child"),u=o.insert("line"),h=o.insert("line"),f=0,d=n,p=o.insert("g").attr("class","label"),m=0,g=t.classData.annotations?.[0],y=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",b=p.node().appendChild(Yi(y,t.labelStyle,!0,!0)),k=b.getBBox();if(Ne(Y().flowchart.htmlLabels)){let w=b.children[0],A=xt(b);k=w.getBoundingClientRect(),A.attr("width",k.width),A.attr("height",k.height)}t.classData.annotations[0]&&(d+=k.height+n,f+=k.width);let T=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(Y().flowchart.htmlLabels?T+="<"+t.classData.type+">":T+="<"+t.classData.type+">");let _=p.node().appendChild(Yi(T,t.labelStyle,!0,!0));xt(_).attr("class","classTitle");let L=_.getBBox();if(Ne(Y().flowchart.htmlLabels)){let w=_.children[0],A=xt(_);L=w.getBoundingClientRect(),A.attr("width",L.width),A.attr("height",L.height)}d+=L.height+n,L.width>f&&(f=L.width);let C=[];t.classData.members.forEach(w=>{let A=w.getDisplayDetails(),F=A.displayText;Y().flowchart.htmlLabels&&(F=F.replace(//g,">"));let S=p.node().appendChild(Yi(F,A.cssStyle?A.cssStyle:t.labelStyle,!0,!0)),v=S.getBBox();if(Ne(Y().flowchart.htmlLabels)){let R=S.children[0],B=xt(S);v=R.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}v.width>f&&(f=v.width),d+=v.height+n,C.push(S)}),d+=i;let D=[];if(t.classData.methods.forEach(w=>{let A=w.getDisplayDetails(),F=A.displayText;Y().flowchart.htmlLabels&&(F=F.replace(//g,">"));let S=p.node().appendChild(Yi(F,A.cssStyle?A.cssStyle:t.labelStyle,!0,!0)),v=S.getBBox();if(Ne(Y().flowchart.htmlLabels)){let R=S.children[0],B=xt(S);v=R.getBoundingClientRect(),B.attr("width",v.width),B.attr("height",v.height)}v.width>f&&(f=v.width),d+=v.height+n,D.push(S)}),d+=i,g){let w=(f-k.width)/2;xt(b).attr("transform","translate( "+(-1*f/2+w)+", "+-1*d/2+")"),m=k.height+n}let $=(f-L.width)/2;return xt(_).attr("transform","translate( "+(-1*f/2+$)+", "+(-1*d/2+m)+")"),m+=L.height+n,u.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,C.forEach(w=>{xt(w).attr("transform","translate( "+-f/2+", "+(-1*d/2+m+i/2)+")");let A=w?.getBBox();m+=(A?.height??0)+n}),m+=i,h.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,D.forEach(w=>{xt(w).attr("transform","translate( "+-f/2+", "+(-1*d/2+m)+")");let A=w?.getBBox();m+=(A?.height??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-f/2-r).attr("y",-(d/2)-r).attr("width",f+t.padding).attr("height",d+t.padding),en(t,l),t.intersect=function(w){return zr.rect(t,w)},o},"class_box"),_at={rhombus:Tat,composite:Z7t,question:Tat,rect:Q7t,labelRect:J7t,rectWithTitle:tIt,choice:V7t,circle:rIt,doublecircle:nIt,stadium:eIt,hexagon:z7t,block_arrow:W7t,rect_left_inv_arrow:U7t,lean_right:j7t,lean_left:q7t,trapezoid:H7t,inv_trapezoid:Y7t,rect_right_inv_arrow:X7t,cylinder:K7t,start:sIt,end:aIt,note:xat,subroutine:iIt,fork:Sat,join:Sat,class_box:oIt},j_={},U8=a(async(e,t,r)=>{let n,i;if(t.link){let s;Y().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s),i=await _at[t.shape](n,t,r)}else i=await _at[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),j_[t.id]=n,t.haveCallback&&j_[t.id].attr("class",j_[t.id].attr("class")+" clickable"),n},"insertNode"),Cat=a(e=>{let t=j_[e.id];P.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});function Eat(e,t,r=!1){let n=e,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let s=0,o="",l;switch(n.type){case"round":s=5,o="rect";break;case"composite":s=0,o="composite",l=0;break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}let u=zv(n?.styles??[]),h=n.label,f=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:u.labelStyle,shape:o,labelText:h,rx:s,ry:s,class:i,style:u.style,id:n.id,directions:n.directions,width:f.width,height:f.height,x:f.x,y:f.y,positioned:r,intersect:void 0,type:n.type,padding:l??Re()?.block?.padding??0}}async function lIt(e,t,r){let n=Eat(t,r,!1);if(n.type==="group")return;let i=Re(),s=await U8(e,n,{config:i}),o=s.node().getBBox(),l=r.getBlock(n.id);l.size={width:o.width,height:o.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}async function cIt(e,t,r){let n=Eat(t,r,!0);if(r.getBlock(n.id).type!=="space"){let s=Re();await U8(e,n,{config:s}),t.intersect=n?.intersect,Cat(n)}}async function j8(e,t,r,n){for(let i of t)await n(e,i,r),i.children&&await j8(e,i.children,r,n)}async function vat(e,t,r){await j8(e,t,r,lIt)}async function Aat(e,t,r){await j8(e,t,r,cIt)}async function Lat(e,t,r,n,i){let s=new _r({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let o of r)o.size&&s.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(let o of t)if(o.start&&o.end){let l=n.getBlock(o.start),u=n.getBlock(o.end);if(l?.size&&u?.size){let h=l.size,f=u.size,d=[{x:h.x,y:h.y},{x:h.x+(f.x-h.x)/2,y:h.y+(f.y-h.y)/2},{x:f.x,y:f.y}];nat(e,{v:o.start,w:o.end,name:o.id},{...o,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,i),o.label&&(await eat(e,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),rat({...o,x:d[1].x,y:d[1].y},{originalPath:d}))}}}var Rat=x(()=>{"use strict";na();$n();iat();wat();Ee();a(Eat,"getNodeFromBlock");a(lIt,"calculateBlockSize");a(cIt,"insertBlockPositioned");a(j8,"performOperations");a(vat,"calculateBlockSizes");a(Aat,"insertBlocks");a(Lat,"insertEdges")});var uIt,hIt,Dat,Iat=x(()=>{"use strict";$e();$n();jst();zt();Gn();Xst();Rat();uIt=a(function(e,t){return t.db.getClasses()},"getClasses"),hIt=a(async function(e,t,r,n){let{securityLevel:i,block:s}=Re(),o=n.db,l;i==="sandbox"&&(l=xt("#i"+t));let u=i==="sandbox"?xt(l.nodes()[0].contentDocument.body):xt("body"),h=i==="sandbox"?u.select(`[id="${t}"]`):xt(`[id="${t}"]`);Ust(h,["point","circle","cross"],n.type,t);let d=o.getBlocks(),p=o.getBlocksFlat(),m=o.getEdges(),g=h.insert("g").attr("class","block");await vat(g,d,o);let y=Yst(o);if(await Aat(g,d,o),await Lat(g,m,p,o,t),y){let b=y,k=Math.max(1,Math.round(.125*(b.width/b.height))),T=b.height+k+10,_=b.width+10,{useMaxWidth:L}=s;Rr(h,T,_,!!L),P.debug("Here Bounds",y,b),h.attr("viewBox",`${b.x-5} ${b.y-5} ${b.width+10} ${b.height+10}`)}},"draw"),Dat={draw:hIt,getClasses:uIt}});var Nat={};Be(Nat,{diagram:()=>fIt});var fIt,Mat=x(()=>{"use strict";Mst();Vst();Wst();Iat();fIt={parser:Nst,db:Gst,renderer:Dat,styles:zst}});var ZIt={};Be(ZIt,{default:()=>QIt});Qh();bC();hu();var HF="c4",I0t=a(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),N0t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(qF(),jF));return{id:HF,diagram:e}},"loader"),M0t={id:HF,detector:I0t,loader:N0t},YF=M0t;var YY="flowchart",mEt=a((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),gEt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(y5(),g5));return{id:YY,diagram:e}},"loader"),yEt={id:YY,detector:mEt,loader:gEt},XY=yEt;var KY="flowchart-v2",xEt=a((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),bEt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(y5(),g5));return{id:KY,diagram:e}},"loader"),kEt={id:KY,detector:xEt,loader:bEt},QY=kEt;var aX="er",wEt=a(e=>/^\s*erDiagram/.test(e),"detector"),EEt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(sX(),iX));return{id:aX,diagram:e}},"loader"),vEt={id:aX,detector:wEt,loader:EEt},oX=vEt;var ctt="gitGraph",QAt=a(e=>/^\s*gitGraph/.test(e),"detector"),ZAt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ltt(),ott));return{id:ctt,diagram:e}},"loader"),JAt={id:ctt,detector:QAt,loader:ZAt},utt=JAt;var Gtt="gantt",G5t=a(e=>/^\s*gantt/.test(e),"detector"),V5t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>($tt(),Ftt));return{id:Gtt,diagram:e}},"loader"),z5t={id:Gtt,detector:G5t,loader:V5t},Vtt=z5t;var Ktt="info",Y5t=a(e=>/^\s*info/.test(e),"detector"),X5t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Xtt(),Ytt));return{id:Ktt,diagram:e}},"loader"),Qtt={id:Ktt,detector:Y5t,loader:X5t};var oet="pie",l6t=a(e=>/^\s*pie/.test(e),"detector"),c6t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(aet(),set));return{id:oet,diagram:e}},"loader"),cet={id:oet,detector:l6t,loader:c6t};var _et="quadrantChart",v6t=a(e=>/^\s*quadrantChart/.test(e),"detector"),A6t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Tet(),ket));return{id:_et,diagram:e}},"loader"),L6t={id:_et,detector:v6t,loader:A6t},Cet=L6t;var Qet="xychart",q6t=a(e=>/^\s*xychart-beta/.test(e),"detector"),H6t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Ket(),Xet));return{id:Qet,diagram:e}},"loader"),Y6t={id:Qet,detector:q6t,loader:H6t},Zet=Y6t;var ort="requirement",Z6t=a(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),J6t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(art(),srt));return{id:ort,diagram:e}},"loader"),tLt={id:ort,detector:Z6t,loader:J6t},lrt=tLt;var Art="sequence",BLt=a(e=>/^\s*sequenceDiagram/.test(e),"detector"),FLt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(vrt(),Ert));return{id:Art,diagram:e}},"loader"),$Lt={id:Art,detector:BLt,loader:FLt},Lrt=$Lt;var Ort="class",jLt=a((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),qLt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Mrt(),Nrt));return{id:Ort,diagram:e}},"loader"),HLt={id:Ort,detector:jLt,loader:qLt},Prt=HLt;var $rt="classDiagram",XLt=a((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),KLt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Frt(),Brt));return{id:$rt,diagram:e}},"loader"),QLt={id:$rt,detector:XLt,loader:KLt},Grt=QLt;var ynt="state",SRt=a((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),_Rt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(gnt(),mnt));return{id:ynt,diagram:e}},"loader"),CRt={id:ynt,detector:SRt,loader:_Rt},xnt=CRt;var Tnt="stateDiagram",ERt=a((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),vRt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(knt(),bnt));return{id:Tnt,diagram:e}},"loader"),ARt={id:Tnt,detector:ERt,loader:vRt},Snt=ARt;var Fnt="journey",XRt=a(e=>/^\s*journey/.test(e),"detector"),KRt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Bnt(),Pnt));return{id:Fnt,diagram:e}},"loader"),QRt={id:Fnt,detector:XRt,loader:KRt},$nt=QRt;zt();Yc();Gn();var ZRt=a((e,t,r)=>{P.debug(`rendering svg for syntax error +`);let n=ys(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Rr(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),l8={draw:ZRt},Gnt=l8;var JRt={db:{},renderer:l8,parser:{parse:a(()=>{},"parse")}},Vnt=JRt;var dit="timeline",xDt=a(e=>/^\s*timeline/.test(e),"detector"),bDt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(fit(),hit));return{id:dit,diagram:e}},"loader"),kDt={id:dit,detector:xDt,loader:bDt},pit=kDt;var Eit="kanban",PDt=a(e=>/^\s*kanban/.test(e),"detector"),BDt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wit(),Cit));return{id:Eit,diagram:e}},"loader"),FDt={id:Eit,detector:PDt,loader:BDt},vit=FDt;var lst="sankey",o8t=a(e=>/^\s*sankey-beta/.test(e),"detector"),l8t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ost(),ast));return{id:lst,diagram:e}},"loader"),c8t={id:lst,detector:o8t,loader:l8t},cst=c8t;var bst="packet",S8t=a(e=>/^\s*packet-beta/.test(e),"detector"),_8t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(xst(),yst));return{id:bst,diagram:e}},"loader"),kst={id:bst,detector:S8t,loader:_8t};var Dst="radar",j8t=a(e=>/^\s*radar-beta/.test(e),"detector"),q8t=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Rst(),Lst));return{id:Dst,diagram:e}},"loader"),Ist={id:Dst,detector:j8t,loader:q8t};var Oat="block",dIt=a(e=>/^\s*block-beta/.test(e),"detector"),pIt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Mat(),Nat));return{id:Oat,diagram:e}},"loader"),mIt={id:Oat,detector:dIt,loader:pIt},Pat=mIt;hu();pe();var Bat=!1,Im=a(()=>{Bat||(Bat=!0,gu("error",Vnt,e=>e.toLowerCase().trim()==="error"),gu("---",{db:{clear:a(()=>{},"clear")},styles:{},renderer:{draw:a(()=>{},"draw")},parser:{parse:a(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:a(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ex(YF,vit,Grt,Prt,oX,Vtt,Qtt,cet,lrt,Lrt,QY,XY,pit,utt,Snt,xnt,$nt,Cet,cst,kst,Zet,Pat,Ist))},"addDiagrams");zt();hu();pe();var Fat=a(async()=>{P.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(uu).map(async([r,{detector:n,loader:i}])=>{if(i)try{ng(r)}catch{try{let{diagram:s,id:o}=await i();gu(o,s,n)}catch(s){throw P.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete uu[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){P.error(`Failed to load ${t.length} external diagrams`);for(let r of t)P.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");zt();$e();var q_="comm",H_="rule",Y_="decl";var $at="@import";var Gat="@namespace",Vat="@keyframes";var zat="@layer";var q8=Math.abs,Vy=String.fromCharCode;function X_(e){return e.trim()}a(X_,"trim");function zy(e,t,r){return e.replace(t,r)}a(zy,"replace");function Wat(e,t,r){return e.indexOf(t,r)}a(Wat,"indexof");function eu(e,t){return e.charCodeAt(t)|0}a(eu,"charat");function ru(e,t,r){return e.slice(t,r)}a(ru,"substr");function Bs(e){return e.length}a(Bs,"strlen");function Uat(e){return e.length}a(Uat,"sizeof");function Nm(e,t){return t.push(e),e}a(Nm,"append");var K_=1,Mm=1,jat=0,ma=0,vn=0,Pm="";function Q_(e,t,r,n,i,s,o,l){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:K_,column:Mm,length:o,return:"",siblings:l}}a(Q_,"node");function qat(){return vn}a(qat,"char");function Hat(){return vn=ma>0?eu(Pm,--ma):0,Mm--,vn===10&&(Mm=1,K_--),vn}a(Hat,"prev");function ga(){return vn=ma2||Om(vn)>3?"":" "}a(Kat,"whitespace");function Qat(e,t){for(;--t&&ga()&&!(vn<48||vn>102||vn>57&&vn<65||vn>70&&vn<97););return Z_(e,Wy()+(t<6&&Pl()==32&&ga()==32))}a(Qat,"escaping");function H8(e){for(;ga();)switch(vn){case e:return ma;case 34:case 39:e!==34&&e!==39&&H8(vn);break;case 40:e===41&&H8(e);break;case 92:ga();break}return ma}a(H8,"delimiter");function Zat(e,t){for(;ga()&&e+vn!==57;)if(e+vn===84&&Pl()===47)break;return"/*"+Z_(t,ma-1)+"*"+Vy(e===47?e:ga())}a(Zat,"commenter");function Jat(e){for(;!Om(Pl());)ga();return Z_(e,ma)}a(Jat,"identifier");function rot(e){return Xat(tC("",null,null,null,[""],e=Yat(e),0,[0],e))}a(rot,"compile");function tC(e,t,r,n,i,s,o,l,u){for(var h=0,f=0,d=o,p=0,m=0,g=0,y=1,b=1,k=1,T=0,_="",L=i,C=s,D=n,$=_;b;)switch(g=T,T=ga()){case 40:if(g!=108&&eu($,d-1)==58){Wat($+=zy(J_(T),"&","&\f"),"&\f",q8(h?l[h-1]:0))!=-1&&(k=-1);break}case 34:case 39:case 91:$+=J_(T);break;case 9:case 10:case 13:case 32:$+=Kat(g);break;case 92:$+=Qat(Wy()-1,7);continue;case 47:switch(Pl()){case 42:case 47:Nm(gIt(Zat(ga(),Wy()),t,r,u),u),(Om(g||1)==5||Om(Pl()||1)==5)&&Bs($)&&ru($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*y:l[h++]=Bs($)*k;case 125*y:case 59:case 0:switch(T){case 0:case 125:b=0;case 59+f:k==-1&&($=zy($,/\f/g,"")),m>0&&(Bs($)-d||y===0&&g===47)&&Nm(m>32?eot($+";",n,r,d-1,u):eot(zy($," ","")+";",n,r,d-2,u),u);break;case 59:$+=";";default:if(Nm(D=tot($,t,r,h,f,i,l,_,L=[],C=[],d,s),s),T===123)if(f===0)tC($,t,D,D,L,s,d,l,C);else{switch(p){case 99:if(eu($,3)===110)break;case 108:if(eu($,2)===97)break;default:f=0;case 100:case 109:case 115:}f?tC(e,D,D,n&&Nm(tot(e,D,D,0,0,i,l,_,i,L=[],d,C),C),i,C,d,l,n?L:C):tC($,D,D,D,[""],C,0,l,C)}}h=f=m=0,y=k=1,_=$="",d=o;break;case 58:d=1+Bs($),m=g;default:if(y<1){if(T==123)--y;else if(T==125&&y++==0&&Hat()==125)continue}switch($+=Vy(T),T*y){case 38:k=f>0?1:($+="\f",-1);break;case 44:l[h++]=(Bs($)-1)*k,k=1;break;case 64:Pl()===45&&($+=J_(ga())),p=Pl(),f=d=Bs(_=$+=Jat(Wy())),T++;break;case 45:g===45&&Bs($)==2&&(y=0)}}return s}a(tC,"parse");function tot(e,t,r,n,i,s,o,l,u,h,f,d){for(var p=i-1,m=i===0?s:[""],g=Uat(m),y=0,b=0,k=0;y0?m[T]+" "+_:zy(_,/&\f/g,m[T])))&&(u[k++]=L);return Q_(e,t,r,i===0?H_:l,u,h,f,d)}a(tot,"ruleset");function gIt(e,t,r,n){return Q_(e,t,r,q_,Vy(qat()),ru(e,2,-2),0,n)}a(gIt,"comment");function eot(e,t,r,n,i){return Q_(e,t,r,Y_,ru(e,0,n),ru(e,n+1,-1),n,i)}a(eot,"declaration");function eC(e,t){for(var r="",n=0;n{aot.forEach(e=>{e()}),aot=[]},"attachFunctions");zt();var lot=a(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");tx();fb();function cot(e){let t=e.match(Jy);if(!t)return{text:e,metadata:{}};let r=td(t[1],{schema:Jf})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:e.slice(t[0].length),metadata:n}}a(cot,"extractFrontMatter");Ee();var xIt=a(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),bIt=a(e=>{let{text:t,metadata:r}=cot(e),{displayMode:n,title:i,config:s={}}=r;return n&&(s.gantt||(s.gantt={}),s.gantt.displayMode=n),{title:i,config:s,text:t}},"processFrontmatter"),kIt=a(e=>{let t=se.detectInit(e)??{},r=se.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:MF(e),directive:t}},"processDirectives");function Y8(e){let t=xIt(e),r=bIt(t),n=kIt(r.text),i=Nn(r.config,n.directive);return e=lot(n.text),{code:e,title:r.title,config:i}}a(Y8,"preprocessDiagram");KC();ox();Ee();function uot(e){let t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}a(uot,"toBase64");var TIt=5e4,SIt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",_It="sandbox",CIt="loose",wIt="http://www.w3.org/2000/svg",EIt="http://www.w3.org/1999/xlink",vIt="http://www.w3.org/1999/xhtml",AIt="100%",LIt="100%",RIt="border:0;margin:0;",DIt="margin:0",IIt="allow-top-navigation-by-user-activation allow-popups",NIt='The "iframe" tag is not supported by your browser.',MIt=["foreignobject"],OIt=["dominant-baseline"];function pot(e){let t=Y8(e);return Ym(),kI(t.config??{}),t}a(pot,"processAndSetConfigs");async function PIt(e,t){Im();try{let{code:r,config:n}=pot(e);return{diagramType:(await mot(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}a(PIt,"parse");var hot=a((e,t,r=[])=>` +.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),BIt=a((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=` +${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let o=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{De(l.styles)||o.forEach(u=>{r+=hot(l.id,u,l.styles)}),De(l.textStyles)||(r+=hot(l.id,"tspan",(l?.textStyles||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),FIt=a((e,t,r,n)=>{let i=BIt(e,r),s=GI(t,i,e.themeVariables);return eC(rot(`${n}{${s}}`),not)},"createUserStyles"),$It=a((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Yn(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),GIt=a((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":LIt,n=uot(`${e}`);return``},"putIntoIFrame"),fot=a((e,t,r,n,i)=>{let s=e.append("div");s.attr("id",r),n&&s.attr("style",n);let o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",wIt);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function dot(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}a(dot,"sandboxedIframe");var VIt=a((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),zIt=a(async function(e,t,r){Im();let n=pot(t);t=n.code;let i=Re();P.debug(i),t.length>(i?.maxTextSize??TIt)&&(t=SIt);let s="#"+e,o="i"+e,l="#"+o,u="d"+e,h="#"+u,f=a(()=>{let R=xt(p?l:h).node();R&&"remove"in R&&R.remove()},"removeTempElements"),d=xt("body"),p=i.securityLevel===_It,m=i.securityLevel===CIt,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let v=dot(xt(r),o);d=xt(v.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=xt(r);fot(d,e,u,`font-family: ${g}`,EIt)}else{if(VIt(document,e,u,o),p){let v=dot(xt("body"),o);d=xt(v.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=xt("body");fot(d,e,u)}let y,b;try{y=await Bm.fromText(t,{title:n.title})}catch(v){if(i.suppressErrorRendering)throw f(),v;y=await Bm.fromText("error"),b=v}let k=d.select(h).node(),T=y.type,_=k.firstChild,L=_.firstChild,C=y.renderer.getClasses?.(t,y),D=FIt(i,T,C,s),$=document.createElement("style");$.innerHTML=D,_.insertBefore($,L);try{await y.renderer.draw(t,e,vy.version,y)}catch(v){throw i.suppressErrorRendering?f():Gnt.draw(t,e,vy.version),v}let w=d.select(`${h} svg`),A=y.db.getAccTitle?.(),F=y.db.getAccDescription?.();UIt(T,w,A,F),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",vIt);let S=d.select(h).node().innerHTML;if(P.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),S=$It(S,p,Ne(i.arrowMarkerAbsolute)),p){let v=d.select(h+" svg").node();S=GIt(S,v)}else m||(S=Ul.sanitize(S,{ADD_TAGS:MIt,ADD_ATTR:OIt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(oot(),b)throw b;return f(),{diagramType:T,svg:S,bindFunctions:y.db.bindFunctions}},"render");function WIt(e={}){let t=Hr({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),yI(t),t?.theme&&t.theme in Vs?t.themeVariables=Vs[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Vs.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?FC(t):$C();$m(r.logLevel),Im()}a(WIt,"initialize");var mot=a((e,t={})=>{let{code:r}=Y8(e);return Bm.fromText(r,t)},"getDiagramFromText");function UIt(e,t,r,n){iot(t,e),sot(t,r,n,t.attr("id"))}a(UIt,"addA11yInfo");var nu=Object.freeze({render:zIt,parse:PIt,getDiagramFromText:mot,initialize:WIt,getConfig:Re,setConfig:cx,getSiteConfig:$C,updateSiteConfig:xI,reset:a(()=>{Ym()},"reset"),globalReset:a(()=>{Ym(Wl)},"globalReset"),defaultConfig:Wl});$m(Re().logLevel);Ym(Re());ih();Ee();var jIt=a((e,t,r)=>{P.warn(e),Hv(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),got=a(async function(e={querySelector:".mermaid"}){try{await qIt(e)}catch(t){if(Hv(t)&&P.error(t.str),Bl.parseError&&Bl.parseError(t),!e.suppressErrors)throw P.error("Use the suppressErrors option to suppress these errors"),t}},"run"),qIt=a(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=nu.getConfig();P.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");P.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(P.debug("Start On Load: "+n?.startOnLoad),nu.updateSiteConfig({startOnLoad:n?.startOnLoad}));let s=new se.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){P.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${s.next()}`;o=u.innerHTML,o=Zy(se.entityDecode(o)).trim().replace(//gi,"
    ");let f=se.detectInit(o);f&&P.debug("Detected early reinit: ",f);try{let{svg:d,bindFunctions:p}=await kot(h,o,u);u.innerHTML=d,e&&await e(h),p&&p(u)}catch(d){jIt(d,l,Bl.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),yot=a(function(e){nu.initialize(e)},"initialize"),HIt=a(async function(e,t,r){P.warn("mermaid.init is deprecated. Please use run instead."),e&&yot(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await got(n)},"init"),YIt=a(async(e,{lazyLoad:t=!0}={})=>{Im(),ex(...e),t===!1&&await Fat()},"registerExternalDiagrams"),xot=a(function(){if(Bl.startOnLoad){let{startOnLoad:e}=nu.getConfig();e&&Bl.run().catch(t=>P.error("Mermaid failed to initialize",t))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",xot,!1)}var XIt=a(function(e){Bl.parseError=e},"setParseErrorHandler"),rC=[],X8=!1,bot=a(async()=>{if(!X8){for(X8=!0;rC.length>0;){let e=rC.shift();if(e)try{await e()}catch(t){P.error("Error executing queue",t)}}X8=!1}},"executeQueue"),KIt=a(async(e,t)=>new Promise((r,n)=>{let i=a(()=>new Promise((s,o)=>{nu.parse(e,t).then(l=>{s(l),r(l)},l=>{P.error("Error parsing",l),Bl.parseError?.(l),o(l),n(l)})}),"performCall");rC.push(i),bot().catch(n)}),"parse"),kot=a((e,t,r)=>new Promise((n,i)=>{let s=a(()=>new Promise((o,l)=>{nu.render(e,t,r).then(u=>{o(u),n(u)},u=>{P.error("Error parsing",u),Bl.parseError?.(u),l(u),i(u)})}),"performCall");rC.push(s),bot().catch(i)}),"render"),Bl={startOnLoad:!0,mermaidAPI:nu,parse:KIt,render:kot,init:HIt,run:got,registerExternalDiagrams:YIt,registerLayoutLoaders:d5,initialize:yot,parseError:void 0,contentLoaded:xot,setParseErrorHandler:XIt,detectType:Jh,registerIconPacks:w7},QIt=Bl;return Rot(ZIt);})(); +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ +/*! Bundled license information: + +dompurify/dist/purify.es.mjs: + (*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE *) + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) +*/ +globalThis["mermaid"] = globalThis.__esbuild_esm_mermaid_nm["mermaid"].default; diff --git a/src/Elastic.Markdown/eslint.config.mjs b/src/Elastic.Markdown/eslint.config.mjs index 58def8d78..d07dbd5d3 100644 --- a/src/Elastic.Markdown/eslint.config.mjs +++ b/src/Elastic.Markdown/eslint.config.mjs @@ -4,7 +4,13 @@ import globals from 'globals' import tseslint from 'typescript-eslint' export default defineConfig([ - globalIgnores(['_static/main.js']), + globalIgnores([ + '_static/main.js', + '_static/mermaid.tiny.js', + '_static/mermaid.js', + 'Assets/mermaid.tiny.js', + 'Assets/mermaid.js', + ]), { files: ['**/*.{js,mjs,cjs,ts}'] }, { files: ['**/*.{js,mjs,cjs,ts}'], diff --git a/src/Elastic.Markdown/package-lock.json b/src/Elastic.Markdown/package-lock.json index b50e57497..7ae61fa1d 100644 --- a/src/Elastic.Markdown/package-lock.json +++ b/src/Elastic.Markdown/package-lock.json @@ -8,6 +8,7 @@ "name": "elastic-markdown", "version": "1.0.0", "dependencies": { + "@mermaid-js/tiny": "11.6.1", "clipboard": "2.0.11", "highlight.js": "11.11.1", "htmx-ext-head-support": "2.0.4", @@ -28,6 +29,7 @@ "postcss-import": "16.1.0", "prettier": "3.5.3", "prettier-plugin-tailwindcss": "0.6.12", + "process": "^0.11.10", "typescript-eslint": "8.33.0" } }, @@ -571,6 +573,12 @@ "win32" ] }, + "node_modules/@mermaid-js/tiny": { + "version": "11.6.1", + "resolved": "https://registry.npmjs.org/@mermaid-js/tiny/-/tiny-11.6.1.tgz", + "integrity": "sha512-36tmsQLQyIMd61hD030X4piblmgevYF42tz0kr+Ux3v7pJzafgNIMgNOHzvaTWKQpq5PEFMFuX95gzoN3Q3D6g==", + "license": "MIT" + }, "node_modules/@mischnic/json-sourcemap": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@mischnic/json-sourcemap/-/json-sourcemap-0.1.1.tgz", @@ -5431,6 +5439,16 @@ } } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/src/Elastic.Markdown/package.json b/src/Elastic.Markdown/package.json index 8f27610f3..e147d00db 100644 --- a/src/Elastic.Markdown/package.json +++ b/src/Elastic.Markdown/package.json @@ -16,6 +16,10 @@ "distDir": "_static", "source": "Assets/main.ts" }, + "js2": { + "distDir": "_static", + "source": "Assets/mermaid.js" + }, "css": { "distDir": "_static", "source": "Assets/styles.css" @@ -37,6 +41,7 @@ "postcss-import": "16.1.0", "prettier": "3.5.3", "prettier-plugin-tailwindcss": "0.6.12", + "process": "^0.11.10", "typescript-eslint": "8.33.0" }, "browserslist": [ @@ -48,6 +53,7 @@ "htmx-ext-head-support": "2.0.4", "htmx-ext-preload": "2.1.1", "htmx.org": "2.0.4", + "@mermaid-js/tiny": "11.6.1", "select-dom": "9.3.1", "tailwindcss": "4.1.8", "ua-parser-js": "2.0.3" diff --git a/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs b/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs index cf4a70c13..7c609300a 100644 --- a/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs +++ b/tests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cs @@ -118,21 +118,17 @@ public void ParsesMagicCallOuts() => Block!.CallOuts [Fact] public void RendersExpectedHtml() => - Html.ReplaceLineEndings().Should().Contain(""" -
    -
    -
    var x = 1;
    -		                      var y = x - 2;
    -		                      var z = y - 2;
    -		                      
    -
    -
    -

    OUTPUT:

    -
      -
    1. Marking the first callout
    2. -
    3. Marking the second callout
    4. -
    - """.ReplaceLineEndings()); + + Html.ReplaceLineEndings() + .Should().Contain( + // language=html + """ +

    OUTPUT:

    +
      +
    1. Marking the first callout
    2. +
    3. Marking the second callout
    4. +
    + """.ReplaceLineEndings()); [Fact] diff --git a/tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs b/tests/Elastic.Markdown.Tests/CodeBlocks/MermaidTests.cs similarity index 68% rename from tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs rename to tests/Elastic.Markdown.Tests/CodeBlocks/MermaidTests.cs index 0b807fe7d..c0b136a7c 100644 --- a/tests/Elastic.Markdown.Tests/Directives/MermaidTests.cs +++ b/tests/Elastic.Markdown.Tests/CodeBlocks/MermaidTests.cs @@ -1,14 +1,17 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information + +using Elastic.Markdown.Myst.CodeBlocks; using Elastic.Markdown.Myst.Directives; +using Elastic.Markdown.Tests.Inline; using FluentAssertions; -namespace Elastic.Markdown.Tests.Directives; +namespace Elastic.Markdown.Tests.CodeBlocks; -public class MermaidBlockTests(ITestOutputHelper output) : DirectiveTest(output, +public class MermaidBlockTests(ITestOutputHelper output) : BlockTest(output, """ -:::{mermaid} as +```mermaid flowchart LR A[Jupyter Notebook] --> C B[MyST Markdown] --> C @@ -19,14 +22,14 @@ B[MyST Markdown] --> C D --> H[React] D --> I[HTML] D <--> J[JATS] -::: +``` """ ) { [Fact] public void ParsesBlock() => Block.Should().NotBeNull(); - // should still attempt to render contents as markdown + // should still attempt to render contents as Markdown [Fact] public void IncludesRawFlowChart() => Html.Should().Contain("D --> I[HTML]"); diff --git a/tests/authoring/Applicability/AppliesToDirective.fs b/tests/authoring/Applicability/AppliesToDirective.fs index c062ed584..3ae725691 100644 --- a/tests/authoring/Applicability/AppliesToDirective.fs +++ b/tests/authoring/Applicability/AppliesToDirective.fs @@ -24,7 +24,7 @@ serverless: [] let ``parses to AppliesDirective`` () = - let directives = markdown |> converts "index.md" |> parses + let directives = markdown |> converts "index.md" |> parses test <@ directives.Length = 1 @> directives |> appliesToDirective (ApplicableTo( @@ -47,7 +47,7 @@ serverless: [] let ``parses to AppliesDirective`` () = - let directives = markdown |> converts "index.md" |> parses + let directives = markdown |> converts "index.md" |> parses test <@ directives.Length = 1 @> directives |> appliesToDirective (ApplicableTo(