From cc6120a3559581dc2a1524748020a2d9de7acb2a Mon Sep 17 00:00:00 2001 From: Daniil Karpenko <5775112073+techno_boggart@users.noreply.github.com> Date: Fri, 22 May 2026 18:38:50 +0400 Subject: [PATCH 1/3] Prototype mermaid embeds in markdown preview --- .github/workflows/build-mermaid-apk.yml | 50 +++++++++++ .../ui/Components/MarkdownParser.java | 88 +++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 .github/workflows/build-mermaid-apk.yml diff --git a/.github/workflows/build-mermaid-apk.yml b/.github/workflows/build-mermaid-apk.yml new file mode 100644 index 00000000000..ff239aa7d94 --- /dev/null +++ b/.github/workflows/build-mermaid-apk.yml @@ -0,0 +1,50 @@ +name: Build Mermaid APK + +on: + workflow_dispatch: + push: + branches: + - prototype/markdown-mermaid-embed-android + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 120 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '17' + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Install Android packages + run: | + yes | sdkmanager --licenses + sdkmanager \ + "platform-tools" \ + "platforms;android-35" \ + "build-tools;35.0.0" \ + "cmake;3.10.2.4988404" \ + "ndk;27.2.12479018" + + - name: Build standalone debug APK + env: + ANDROID_HOME: ${{ env.ANDROID_SDK_ROOT }} + ANDROID_SDK_ROOT: ${{ env.ANDROID_SDK_ROOT }} + run: | + chmod +x gradlew + ./gradlew --stacktrace :TMessagesProj_AppStandalone:assembleAfatDebug + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: telegram-mermaid-apk + path: TMessagesProj_AppStandalone/build/outputs/apk/**/app.apk + if-no-files-found: error diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java index 3d075bb3514..4ee56651b38 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java @@ -73,6 +73,8 @@ public class MarkdownParser { private static final int MAX_RICH_TEXT_LEN = 8192; private static final int MAX_FILE_SIZE = 64 * 1024; + private static final int MERMAID_EMBED_WIDTH = 720; + private static final int MERMAID_EMBED_HEIGHT = 240; public static boolean isMarkdown(MessageObject msg) { if (msg == null) return false; @@ -900,6 +902,10 @@ public void visit(ThematicBreak thematicBreak) { @Override public void visit(FencedCodeBlock fencedCodeBlock) { + if (isMermaidFence(fencedCodeBlock.getInfo())) { + emit(buildMermaidBlock(fencedCodeBlock.getLiteral())); + return; + } final TLRPC.TL_pageBlockPreformatted b = new TLRPC.TL_pageBlockPreformatted(); b.text = first(plain(fencedCodeBlock.getLiteral())); b.language = fencedCodeBlock.getInfo() == null ? "" : fencedCodeBlock.getInfo(); @@ -1051,6 +1057,88 @@ private TLRPC.TL_pageTableCell buildTableCell(TableCell cell, boolean header) { } } + private static boolean isMermaidFence(String info) { + if (TextUtils.isEmpty(info)) { + return false; + } + final String trimmed = info.trim(); + if (trimmed.isEmpty()) { + return false; + } + final int space = trimmed.indexOf(' '); + final String language = (space >= 0 ? trimmed.substring(0, space) : trimmed).trim(); + return "mermaid".equalsIgnoreCase(language); + } + + private static TLRPC.TL_pageBlockEmbed buildMermaidBlock(String literal) { + final TLRPC.TL_pageBlockEmbed block = new TLRPC.TL_pageBlockEmbed(); + block.html = buildMermaidHtml(literal == null ? "" : literal); + block.flags |= TLObject.FLAG_2; + block.w = MERMAID_EMBED_WIDTH; + block.h = MERMAID_EMBED_HEIGHT; + block.flags |= TLObject.FLAG_5; + block.allow_scrolling = false; + block.full_width = false; + block.caption = emptyCaption(); + return block; + } + + private static TLRPC.TL_pageCaption emptyCaption() { + final TLRPC.TL_pageCaption caption = new TLRPC.TL_pageCaption(); + caption.text = new TLRPC.TL_textEmpty(); + caption.credit = new TLRPC.TL_textEmpty(); + return caption; + } + + private static String buildMermaidHtml(String source) { + final StringBuilder html = new StringBuilder(source.length() + 2048); + html.append(""); + html.append(""); + html.append(""); + html.append("
"); + html.append("
");
+        appendEscapedHtml(html, source);
+        html.append("
"); + html.append(""); + html.append(""); + return html.toString(); + } + + private static void appendEscapedHtml(StringBuilder out, String source) { + for (int i = 0; i < source.length(); i++) { + final char ch = source.charAt(i); + switch (ch) { + case '&': + out.append("&"); + break; + case '<': + out.append("<"); + break; + case '>': + out.append(">"); + break; + default: + out.append(ch); + break; + } + } + } + public static class RichTextParser extends AbstractVisitor { private static final int MAX_BLOCK_DEPTH = 64; From 3c0f8063572a3b7fa22bc7768efe49bf1e887392 Mon Sep 17 00:00:00 2001 From: Daniil Karpenko <5775112073+techno_boggart@users.noreply.github.com> Date: Fri, 22 May 2026 18:50:05 +0400 Subject: [PATCH 2/3] Speed up test APK builds to arm64 --- .github/workflows/build-mermaid-apk.yml | 1 + TMessagesProj_AppStandalone/build.gradle | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-mermaid-apk.yml b/.github/workflows/build-mermaid-apk.yml index ff239aa7d94..ce92713b3e3 100644 --- a/.github/workflows/build-mermaid-apk.yml +++ b/.github/workflows/build-mermaid-apk.yml @@ -38,6 +38,7 @@ jobs: env: ANDROID_HOME: ${{ env.ANDROID_SDK_ROOT }} ANDROID_SDK_ROOT: ${{ env.ANDROID_SDK_ROOT }} + TELEGRAM_TEST_ABI_ONLY_ARM64: "1" run: | chmod +x gradlew ./gradlew --stacktrace :TMessagesProj_AppStandalone:assembleAfatDebug diff --git a/TMessagesProj_AppStandalone/build.gradle b/TMessagesProj_AppStandalone/build.gradle index 21cfc7f690f..b84a7f184f9 100644 --- a/TMessagesProj_AppStandalone/build.gradle +++ b/TMessagesProj_AppStandalone/build.gradle @@ -1,5 +1,7 @@ apply plugin: 'com.android.application' +def testArm64Only = "1".equals(System.getenv("TELEGRAM_TEST_ABI_ONLY_ARM64")) + repositories { mavenCentral() google() @@ -94,7 +96,11 @@ android { productFlavors { afat { ndk { - abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + if (testArm64Only) { + abiFilters "arm64-v8a" + } else { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } } ext { abiVersionCode = 9 From a141d3c362aed6bab95d28e8b22bb6bc2741fb99 Mon Sep 17 00:00:00 2001 From: Daniil Karpenko <5775112073+techno_boggart@users.noreply.github.com> Date: Sat, 23 May 2026 21:47:24 +0400 Subject: [PATCH 3/3] Fix Mermaid Android embed rendering --- .../chunks/mermaid.esm.min/chunk-2T2R6R2M.mjs | 3 + .../chunks/mermaid.esm.min/chunk-2UTLFMKG.mjs | 1 + .../chunks/mermaid.esm.min/chunk-4R4BOZG6.mjs | 172 +++++++++++ .../chunks/mermaid.esm.min/chunk-5IMINLNL.mjs | 1 + .../chunks/mermaid.esm.min/chunk-5VCL7Z4A.mjs | 1 + .../chunks/mermaid.esm.min/chunk-6764PJDD.mjs | 1 + .../chunks/mermaid.esm.min/chunk-67TQ5CYL.mjs | 128 ++++++++ .../chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs | 37 +++ .../chunks/mermaid.esm.min/chunk-7J6CGLKN.mjs | 10 + .../chunks/mermaid.esm.min/chunk-7W6UQGC5.mjs | 1 + .../chunks/mermaid.esm.min/chunk-AQ6EADP3.mjs | 1 + .../chunks/mermaid.esm.min/chunk-AZZRMDJM.mjs | 15 + .../chunks/mermaid.esm.min/chunk-C62D2QBJ.mjs | 1 + .../chunks/mermaid.esm.min/chunk-CEXFNPSA.mjs | 1 + .../chunks/mermaid.esm.min/chunk-INKRHTLW.mjs | 70 +++++ .../chunks/mermaid.esm.min/chunk-J5EP6P6S.mjs | 1 + .../chunks/mermaid.esm.min/chunk-JQRUD6KW.mjs | 1 + .../chunks/mermaid.esm.min/chunk-KGFNY3KK.mjs | 62 ++++ .../chunks/mermaid.esm.min/chunk-KGYTTC2M.mjs | 1 + .../chunks/mermaid.esm.min/chunk-KNLZD3CH.mjs | 1 + .../chunks/mermaid.esm.min/chunk-KRXBNO2N.mjs | 1 + .../chunks/mermaid.esm.min/chunk-LCXTWHL2.mjs | 231 ++++++++++++++ .../chunks/mermaid.esm.min/chunk-LII3EMHJ.mjs | 1 + .../chunks/mermaid.esm.min/chunk-LRIF4GLE.mjs | 1 + .../chunks/mermaid.esm.min/chunk-QA3QBVWF.mjs | 2 + .../chunks/mermaid.esm.min/chunk-RERM46MO.mjs | 1 + .../chunks/mermaid.esm.min/chunk-RG4AUYOV.mjs | 206 ++++++++++++ .../chunks/mermaid.esm.min/chunk-RKZBBQEN.mjs | 1 + .../chunks/mermaid.esm.min/chunk-RLI5ZMPA.mjs | 1 + .../chunks/mermaid.esm.min/chunk-T2UQINTJ.mjs | 1 + .../chunks/mermaid.esm.min/chunk-T5OCTHI4.mjs | 1 + .../chunks/mermaid.esm.min/chunk-UP6H54XL.mjs | 1 + .../chunks/mermaid.esm.min/chunk-UXSXWOXI.mjs | 1 + .../chunks/mermaid.esm.min/chunk-UY5QBCOK.mjs | 1 + .../chunks/mermaid.esm.min/chunk-VU6ZFW4Y.mjs | 1 + .../chunks/mermaid.esm.min/chunk-W44A43WB.mjs | 14 + .../chunks/mermaid.esm.min/chunk-ZXARS5L4.mjs | 1 + .../mermaid.esm.min/classDiagram-KGZ6W3CR.mjs | 1 + .../classDiagram-v2-72OJOZXJ.mjs | 1 + .../mermaid.esm.min/cose-bilkent-UX7MHV2Q.mjs | 1 + .../chunks/mermaid.esm.min/dagre-ND4H6XIP.mjs | 4 + .../mermaid.esm.min/erDiagram-L5TCEMPS.mjs | 85 +++++ .../mermaid.esm.min/flowDiagram-H6V6AXG4.mjs | 162 ++++++++++ .../mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs | 292 ++++++++++++++++++ .../gitGraphDiagram-S2ZK5IYY.mjs | 106 +++++++ .../journeyDiagram-M6C3CM3L.mjs | 139 +++++++++ .../chunks/mermaid.esm.min/katex-K3KEBU37.mjs | 261 ++++++++++++++++ .../mindmap-definition-2TDM6QVE.mjs | 96 ++++++ .../mermaid.esm.min/pieDiagram-CU6KROY3.mjs | 30 ++ .../quadrantDiagram-VICAPDV7.mjs | 7 + .../requirementDiagram-JXO7QTGE.mjs | 84 +++++ .../sequenceDiagram-VS2MUI6T.mjs | 162 ++++++++++ .../mermaid.esm.min/stateDiagram-7D4R322I.mjs | 1 + .../stateDiagram-v2-36443NZ5.mjs | 1 + .../timeline-definition-O6YCAMPW.mjs | 120 +++++++ .../xychartDiagram-N2JHSOCM.mjs | 7 + .../src/main/assets/mermaid/manifest.json | 24 ++ .../main/assets/mermaid/mermaid.esm.min.mjs | 12 + .../java/org/telegram/ui/ArticleViewer.java | 25 ++ .../ui/Components/MarkdownParser.java | 56 +++- 60 files changed, 2647 insertions(+), 5 deletions(-) create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2T2R6R2M.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2UTLFMKG.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-4R4BOZG6.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5IMINLNL.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5VCL7Z4A.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-6764PJDD.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-67TQ5CYL.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7J6CGLKN.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7W6UQGC5.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-AQ6EADP3.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-AZZRMDJM.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-C62D2QBJ.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-CEXFNPSA.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-INKRHTLW.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-J5EP6P6S.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-JQRUD6KW.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGFNY3KK.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGYTTC2M.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KNLZD3CH.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KRXBNO2N.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LCXTWHL2.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LII3EMHJ.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LRIF4GLE.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-QA3QBVWF.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RERM46MO.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RG4AUYOV.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RKZBBQEN.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RLI5ZMPA.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T2UQINTJ.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T5OCTHI4.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UP6H54XL.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UXSXWOXI.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UY5QBCOK.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-VU6ZFW4Y.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-W44A43WB.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-ZXARS5L4.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-KGZ6W3CR.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-v2-72OJOZXJ.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/cose-bilkent-UX7MHV2Q.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/dagre-ND4H6XIP.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/erDiagram-L5TCEMPS.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/gitGraphDiagram-S2ZK5IYY.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/journeyDiagram-M6C3CM3L.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/katex-K3KEBU37.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/mindmap-definition-2TDM6QVE.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/pieDiagram-CU6KROY3.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/quadrantDiagram-VICAPDV7.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/requirementDiagram-JXO7QTGE.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/sequenceDiagram-VS2MUI6T.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-7D4R322I.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-v2-36443NZ5.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/timeline-definition-O6YCAMPW.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/xychartDiagram-N2JHSOCM.mjs create mode 100644 TMessagesProj/src/main/assets/mermaid/manifest.json create mode 100644 TMessagesProj/src/main/assets/mermaid/mermaid.esm.min.mjs diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2T2R6R2M.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2T2R6R2M.mjs new file mode 100644 index 00000000000..3a7cb6304ed --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2T2R6R2M.mjs @@ -0,0 +1,3 @@ +import{a as t}from"./chunk-4R4BOZG6.mjs";import{a as c}from"./chunk-AQ6EADP3.mjs";var i={},m={info:t(async()=>{let{createInfoServices:e}=await import("./info-J43DQDTF-KCYPFFUO.mjs"),r=e().Info.parser.LangiumParser;i.info=r},"info"),packet:t(async()=>{let{createPacketServices:e}=await import("./packet-YPE3B663-LP52Z2RK.mjs"),r=e().Packet.parser.LangiumParser;i.packet=r},"packet"),pie:t(async()=>{let{createPieServices:e}=await import("./pie-LRSECV5Y-TCRJHUBD.mjs"),r=e().Pie.parser.LangiumParser;i.pie=r},"pie"),treeView:t(async()=>{let{createTreeViewServices:e}=await import("./treeView-BLDUP644-QA4HXRO3.mjs"),r=e().TreeView.parser.LangiumParser;i.treeView=r},"treeView"),architecture:t(async()=>{let{createArchitectureServices:e}=await import("./architecture-7EHR7CIX-6QZW5X65.mjs"),r=e().Architecture.parser.LangiumParser;i.architecture=r},"architecture"),gitGraph:t(async()=>{let{createGitGraphServices:e}=await import("./gitGraph-WXDBUCRP-R675I2BI.mjs"),r=e().GitGraph.parser.LangiumParser;i.gitGraph=r},"gitGraph"),eventmodeling:t(async()=>{let{createEventModelingServices:e}=await import("./eventmodeling-FCH6USID-MREXMVOE.mjs"),r=e().EventModel.parser.LangiumParser;i.eventmodeling=r},"eventmodeling"),radar:t(async()=>{let{createRadarServices:e}=await import("./radar-GUYGQ44K-RDLRG3WG.mjs"),r=e().Radar.parser.LangiumParser;i.radar=r},"radar"),treemap:t(async()=>{let{createTreemapServices:e}=await import("./treemap-LRROVOQU-LLAWBHMP.mjs"),r=e().Treemap.parser.LangiumParser;i.treemap=r},"treemap"),wardley:t(async()=>{let{createWardleyServices:e}=await import("./wardley-L42UT6IY-5TKZOOLJ.mjs"),r=e().Wardley.parser.LangiumParser;i.wardley=r},"wardley")};async function d(e,r){let s=m[e];if(!s)throw new Error(`Unknown diagram type: ${e}`);i[e]||await s();let o=i[e].parse(r);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new l(o);return o.value}c(d,"parse");t(d,"parse");var l=class extends Error{static{c(this,"MermaidParseError")}constructor(e){let r=e.lexerErrors.map(a=>{let o=a.line!==void 0&&!isNaN(a.line)?a.line:"?",n=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${o}, column ${n}: ${a.message}`}).join(` +`),s=e.parserErrors.map(a=>{let o=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",n=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${o}, column ${n}: ${a.message}`}).join(` +`);super(`Parsing failed: ${r} ${s}`),this.result=e}static{t(this,"MermaidParseError")}};export{d as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2UTLFMKG.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2UTLFMKG.mjs new file mode 100644 index 00000000000..0b9d8bd9617 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-2UTLFMKG.mjs @@ -0,0 +1 @@ +import{a as e,b as o,c as n,d as t,e as i,g as u,n as l,s,t as c}from"./chunk-4R4BOZG6.mjs";import{a}from"./chunk-AQ6EADP3.mjs";var v=class extends c{static{a(this,"RadarTokenBuilder")}static{e(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},R={parser:{TokenBuilder:e(()=>new v,"TokenBuilder"),ValueConverter:e(()=>new s,"ValueConverter")}};function M(m=i){let r=t(n(m),u),d=t(o({shared:r}),l,R);return r.ServiceRegistry.register(d),{shared:r,Radar:d}}a(M,"createRadarServices");e(M,"createRadarServices");export{R as a,M as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-4R4BOZG6.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-4R4BOZG6.mjs new file mode 100644 index 00000000000..b482d667534 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-4R4BOZG6.mjs @@ -0,0 +1,172 @@ +import{a as i}from"./chunk-AQ6EADP3.mjs";var $S=Object.create,gs=Object.defineProperty,AS=Object.getOwnPropertyDescriptor,Bf=Object.getOwnPropertyNames,ES=Object.getPrototypeOf,_S=Object.prototype.hasOwnProperty,o=i((e,t)=>gs(e,"name",{value:t,configurable:!0}),"__name"),CS=i((e,t)=>i(function(){return e&&(t=(0,e[Bf(e)[0]])(e=0)),t},"__init"),"__esm"),Y=i((e,t)=>i(function(){return t||(0,e[Bf(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),xr=i((e,t)=>{for(var r in t)gs(e,r,{get:t[r],enumerable:!0})},"__export"),bo=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Bf(t))!_S.call(e,a)&&a!==r&&gs(e,a,{get:i(()=>t[a],"get"),enumerable:!(n=AS(t,a))||n.enumerable});return e},"__copyProps"),ml=i((e,t,r)=>(bo(e,t,"default"),r&&bo(r,t,"default")),"__reExport"),Kf=i((e,t,r)=>(r=e!=null?$S(ES(e)):{},bo(t||!e||!e.__esModule?gs(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),qf=i(e=>bo(gs({},"__esModule",{value:!0}),e),"__toCommonJS"),gl={};xr(gl,{AnnotatedTextEdit:i(()=>ar,"AnnotatedTextEdit"),ChangeAnnotation:i(()=>Hr,"ChangeAnnotation"),ChangeAnnotationIdentifier:i(()=>Be,"ChangeAnnotationIdentifier"),CodeAction:i(()=>bc,"CodeAction"),CodeActionContext:i(()=>Cc,"CodeActionContext"),CodeActionKind:i(()=>_c,"CodeActionKind"),CodeActionTriggerKind:i(()=>ki,"CodeActionTriggerKind"),CodeDescription:i(()=>rc,"CodeDescription"),CodeLens:i(()=>Sc,"CodeLens"),Color:i(()=>no,"Color"),ColorInformation:i(()=>Xu,"ColorInformation"),ColorPresentation:i(()=>Ju,"ColorPresentation"),Command:i(()=>Vr,"Command"),CompletionItem:i(()=>dc,"CompletionItem"),CompletionItemKind:i(()=>sc,"CompletionItemKind"),CompletionItemLabelDetails:i(()=>fc,"CompletionItemLabelDetails"),CompletionItemTag:i(()=>lc,"CompletionItemTag"),CompletionList:i(()=>pc,"CompletionList"),CreateFile:i(()=>na,"CreateFile"),DeleteFile:i(()=>ia,"DeleteFile"),Diagnostic:i(()=>Si,"Diagnostic"),DiagnosticRelatedInformation:i(()=>ao,"DiagnosticRelatedInformation"),DiagnosticSeverity:i(()=>ec,"DiagnosticSeverity"),DiagnosticTag:i(()=>tc,"DiagnosticTag"),DocumentHighlight:i(()=>vc,"DocumentHighlight"),DocumentHighlightKind:i(()=>yc,"DocumentHighlightKind"),DocumentLink:i(()=>Ic,"DocumentLink"),DocumentSymbol:i(()=>Ec,"DocumentSymbol"),DocumentUri:i(()=>Vu,"DocumentUri"),EOL:i(()=>yg,"EOL"),FoldingRange:i(()=>Qu,"FoldingRange"),FoldingRangeKind:i(()=>Zu,"FoldingRangeKind"),FormattingOptions:i(()=>wc,"FormattingOptions"),Hover:i(()=>hc,"Hover"),InlayHint:i(()=>Fc,"InlayHint"),InlayHintKind:i(()=>oo,"InlayHintKind"),InlayHintLabelPart:i(()=>lo,"InlayHintLabelPart"),InlineCompletionContext:i(()=>Kc,"InlineCompletionContext"),InlineCompletionItem:i(()=>jc,"InlineCompletionItem"),InlineCompletionList:i(()=>Uc,"InlineCompletionList"),InlineCompletionTriggerKind:i(()=>zc,"InlineCompletionTriggerKind"),InlineValueContext:i(()=>xc,"InlineValueContext"),InlineValueEvaluatableExpression:i(()=>Mc,"InlineValueEvaluatableExpression"),InlineValueText:i(()=>Lc,"InlineValueText"),InlineValueVariableLookup:i(()=>Dc,"InlineValueVariableLookup"),InsertReplaceEdit:i(()=>uc,"InsertReplaceEdit"),InsertTextFormat:i(()=>oc,"InsertTextFormat"),InsertTextMode:i(()=>cc,"InsertTextMode"),Location:i(()=>bi,"Location"),LocationLink:i(()=>Yu,"LocationLink"),MarkedString:i(()=>Ni,"MarkedString"),MarkupContent:i(()=>sa,"MarkupContent"),MarkupKind:i(()=>so,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:i(()=>Ii,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:i(()=>mc,"ParameterInformation"),Position:i(()=>ae,"Position"),Range:i(()=>Q,"Range"),RenameFile:i(()=>aa,"RenameFile"),SelectedCompletionInfo:i(()=>Bc,"SelectedCompletionInfo"),SelectionRange:i(()=>Nc,"SelectionRange"),SemanticTokenModifiers:i(()=>Pc,"SemanticTokenModifiers"),SemanticTokenTypes:i(()=>kc,"SemanticTokenTypes"),SemanticTokens:i(()=>Oc,"SemanticTokens"),SignatureInformation:i(()=>gc,"SignatureInformation"),StringValue:i(()=>Gc,"StringValue"),SymbolInformation:i(()=>$c,"SymbolInformation"),SymbolKind:i(()=>Tc,"SymbolKind"),SymbolTag:i(()=>Rc,"SymbolTag"),TextDocument:i(()=>Wc,"TextDocument"),TextDocumentEdit:i(()=>wi,"TextDocumentEdit"),TextDocumentIdentifier:i(()=>nc,"TextDocumentIdentifier"),TextDocumentItem:i(()=>ic,"TextDocumentItem"),TextEdit:i(()=>zt,"TextEdit"),URI:i(()=>ro,"URI"),VersionedTextDocumentIdentifier:i(()=>ac,"VersionedTextDocumentIdentifier"),WorkspaceChange:i(()=>gg,"WorkspaceChange"),WorkspaceEdit:i(()=>io,"WorkspaceEdit"),WorkspaceFolder:i(()=>qc,"WorkspaceFolder"),WorkspaceSymbol:i(()=>Ac,"WorkspaceSymbol"),integer:i(()=>Hu,"integer"),uinteger:i(()=>Ci,"uinteger")});var Vu,ro,Hu,Ci,ae,Q,bi,Yu,no,Xu,Ju,Zu,Qu,ao,ec,tc,rc,Si,Vr,zt,Hr,Be,ar,wi,na,aa,ia,io,mi,Cu,gg,nc,ac,Ii,ic,so,sa,sc,oc,lc,uc,cc,fc,dc,pc,Ni,hc,mc,gc,yc,vc,Tc,Rc,$c,Ac,Ec,_c,ki,Cc,bc,Sc,wc,Ic,Nc,kc,Pc,Oc,Lc,Dc,Mc,xc,oo,lo,Fc,Gc,jc,Uc,zc,Bc,Kc,qc,yg,Wc,Nh,A,ys=CS({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(r){return typeof r=="string"}i(t,"is"),o(t,"is"),e.is=t})(Vu||(Vu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),o(t,"is"),e.is=t})(ro||(ro={})),(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}i(t,"is"),o(t,"is"),e.is=t})(Hu||(Hu={})),(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}i(t,"is"),o(t,"is"),e.is=t})(Ci||(Ci={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ci.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ci.MAX_VALUE),{line:n,character:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),o(r,"is"),e.is=r})(ae||(ae={})),(function(e){function t(n,a,s,l){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(l))return{start:ae.create(n,a),end:ae.create(s,l)};if(ae.is(n)&&ae.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${l}]`)}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ae.is(a.start)&&ae.is(a.end)}i(r,"is"),o(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),o(r,"is"),e.is=r})(bi||(bi={})),(function(e){function t(n,a,s,l){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:l}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),o(r,"is"),e.is=r})(Yu||(Yu={})),(function(e){function t(n,a,s,l){return{red:n,green:a,blue:s,alpha:l}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),o(r,"is"),e.is=r})(no||(no={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&no.is(a.color)}i(r,"is"),o(r,"is"),e.is=r})(Xu||(Xu={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||zt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,zt.is))}i(r,"is"),o(r,"is"),e.is=r})(Ju||(Ju={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Zu||(Zu={})),(function(e){function t(n,a,s,l,u,c){let f={startLine:n,endLine:a};return A.defined(s)&&(f.startCharacter=s),A.defined(l)&&(f.endCharacter=l),A.defined(u)&&(f.kind=u),A.defined(c)&&(f.collapsedText=c),f}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),o(r,"is"),e.is=r})(Qu||(Qu={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&bi.is(a.location)&&A.string(a.message)}i(r,"is"),o(r,"is"),e.is=r})(ao||(ao={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ec||(ec={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(tc||(tc={})),(function(e){function t(r){let n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),o(t,"is"),e.is=t})(rc||(rc={})),(function(e){function t(n,a,s,l,u,c){let f={range:n,message:a};return A.defined(s)&&(f.severity=s),A.defined(l)&&(f.code=l),A.defined(u)&&(f.source=u),A.defined(c)&&(f.relatedInformation=c),f}i(t,"create"),o(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,ao.is))}i(r,"is"),o(r,"is"),e.is=r})(Si||(Si={})),(function(e){function t(n,a,...s){let l={title:n,command:a};return A.defined(s)&&s.length>0&&(l.arguments=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),o(r,"is"),e.is=r})(Vr||(Vr={})),(function(e){function t(s,l){return{range:s,newText:l}}i(t,"replace"),o(t,"replace"),e.replace=t;function r(s,l){return{range:{start:s,end:s},newText:l}}i(r,"insert"),o(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),o(n,"del"),e.del=n;function a(s){let l=s;return A.objectLiteral(l)&&A.string(l.newText)&&Q.is(l.range)}i(a,"is"),o(a,"is"),e.is=a})(zt||(zt={})),(function(e){function t(n,a,s){let l={label:n};return a!==void 0&&(l.needsConfirmation=a),s!==void 0&&(l.description=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),o(r,"is"),e.is=r})(Hr||(Hr={})),(function(e){function t(r){let n=r;return A.string(n)}i(t,"is"),o(t,"is"),e.is=t})(Be||(Be={})),(function(e){function t(s,l,u){return{range:s,newText:l,annotationId:u}}i(t,"replace"),o(t,"replace"),e.replace=t;function r(s,l,u){return{range:{start:s,end:s},newText:l,annotationId:u}}i(r,"insert"),o(r,"insert"),e.insert=r;function n(s,l){return{range:s,newText:"",annotationId:l}}i(n,"del"),o(n,"del"),e.del=n;function a(s){let l=s;return zt.is(l)&&(Hr.is(l.annotationId)||Be.is(l.annotationId))}i(a,"is"),o(a,"is"),e.is=a})(ar||(ar={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Ii.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),o(r,"is"),e.is=r})(wi||(wi={})),(function(e){function t(n,a,s){let l={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),s!==void 0&&(l.annotationId=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Be.is(a.annotationId))}i(r,"is"),o(r,"is"),e.is=r})(na||(na={})),(function(e){function t(n,a,s,l){let u={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(u.options=s),l!==void 0&&(u.annotationId=l),u}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Be.is(a.annotationId))}i(r,"is"),o(r,"is"),e.is=r})(aa||(aa={})),(function(e){function t(n,a,s){let l={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(l.options=a),s!==void 0&&(l.annotationId=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Be.is(a.annotationId))}i(r,"is"),o(r,"is"),e.is=r})(ia||(ia={})),(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(a=>A.string(a.kind)?na.is(a)||aa.is(a)||ia.is(a):wi.is(a)))}i(t,"is"),o(t,"is"),e.is=t})(io||(io={})),mi=class{static{i(this,"TextEditChangeImpl")}static{o(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=zt.insert(e,t):Be.is(r)?(a=r,n=ar.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=ar.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=zt.replace(e,t):Be.is(r)?(a=r,n=ar.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=ar.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=zt.del(e):Be.is(t)?(n=t,r=ar.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=ar.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Cu=class{static{i(this,"ChangeAnnotations")}static{o(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Be.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},gg=class{static{i(this,"WorkspaceChange")}static{o(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Cu(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(wi.is(t)){let r=new mi(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new mi(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Ii.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new mi(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new mi(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Cu,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Hr.is(t)||Be.is(t)?n=t:r=t;let a,s;if(n===void 0?a=na.create(e,r):(s=Be.is(n)?n:this._changeAnnotations.manage(n),a=na.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;Hr.is(r)||Be.is(r)?a=r:n=r;let s,l;if(a===void 0?s=aa.create(e,t,n):(l=Be.is(a)?a:this._changeAnnotations.manage(a),s=aa.create(e,t,n,l)),this._workspaceEdit.documentChanges.push(s),l!==void 0)return l}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Hr.is(t)||Be.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ia.create(e,r):(s=Be.is(n)?n:this._changeAnnotations.manage(n),a=ia.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),o(r,"is"),e.is=r})(nc||(nc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),o(r,"is"),e.is=r})(ac||(ac={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),o(r,"is"),e.is=r})(Ii||(Ii={})),(function(e){function t(n,a,s,l){return{uri:n,languageId:a,version:s,text:l}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),o(r,"is"),e.is=r})(ic||(ic={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),o(t,"is"),e.is=t})(so||(so={})),(function(e){function t(r){let n=r;return A.objectLiteral(r)&&so.is(n.kind)&&A.string(n.value)}i(t,"is"),o(t,"is"),e.is=t})(sa||(sa={})),(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})(sc||(sc={})),(function(e){e.PlainText=1,e.Snippet=2})(oc||(oc={})),(function(e){e.Deprecated=1})(lc||(lc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),o(r,"is"),e.is=r})(uc||(uc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(cc||(cc={})),(function(e){function t(r){let n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),o(t,"is"),e.is=t})(fc||(fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),o(t,"create"),e.create=t})(dc||(dc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),o(t,"create"),e.create=t})(pc||(pc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),o(t,"fromPlainText"),e.fromPlainText=t;function r(n){let a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),o(r,"is"),e.is=r})(Ni||(Ni={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(sa.is(n.contents)||Ni.is(n.contents)||A.typedArray(n.contents,Ni.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),o(t,"is"),e.is=t})(hc||(hc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),o(t,"create"),e.create=t})(mc||(mc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),o(t,"create"),e.create=t})(gc||(gc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(yc||(yc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),o(t,"create"),e.create=t})(vc||(vc={})),(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})(Tc||(Tc={})),(function(e){e.Deprecated=1})(Rc||(Rc={})),(function(e){function t(r,n,a,s,l){let u={name:r,kind:n,location:{uri:s,range:a}};return l&&(u.containerName=l),u}i(t,"create"),o(t,"create"),e.create=t})($c||($c={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),o(t,"create"),e.create=t})(Ac||(Ac={})),(function(e){function t(n,a,s,l,u,c){let f={name:n,detail:a,kind:s,range:l,selectionRange:u};return c!==void 0&&(f.children=c),f}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),o(r,"is"),e.is=r})(Ec||(Ec={})),(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"})(_c||(_c={})),(function(e){e.Invoked=1,e.Automatic=2})(ki||(ki={})),(function(e){function t(n,a,s){let l={diagnostics:n};return a!=null&&(l.only=a),s!=null&&(l.triggerKind=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Si.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===ki.Invoked||a.triggerKind===ki.Automatic)}i(r,"is"),o(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){let l={title:n},u=!0;return typeof a=="string"?(u=!1,l.kind=a):Vr.is(a)?l.command=a:l.edit=a,u&&s!==void 0&&(l.kind=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Si.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||Vr.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||io.is(a.edit))}i(r,"is"),o(r,"is"),e.is=r})(bc||(bc={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||Vr.is(a.command))}i(r,"is"),o(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),o(r,"is"),e.is=r})(wc||(wc={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),o(r,"is"),e.is=r})(Ic||(Ic={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),o(r,"is"),e.is=r})(Nc||(Nc={})),(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"})(kc||(kc={})),(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"})(Pc||(Pc={})),(function(e){function t(r){let n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),o(t,"is"),e.is=t})(Oc||(Oc={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),o(r,"is"),e.is=r})(Lc||(Lc={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),o(r,"is"),e.is=r})(Dc||(Dc={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),o(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),o(r,"is"),e.is=r})(xc||(xc={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),o(t,"is"),e.is=t})(oo||(oo={})),(function(e){function t(n){return{value:n}}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||sa.is(a.tooltip))&&(a.location===void 0||bi.is(a.location))&&(a.command===void 0||Vr.is(a.command))}i(r,"is"),o(r,"is"),e.is=r})(lo||(lo={})),(function(e){function t(n,a,s){let l={position:n,label:a};return s!==void 0&&(l.kind=s),l}i(t,"create"),o(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ae.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,lo.is))&&(a.kind===void 0||oo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,zt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||sa.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),o(r,"is"),e.is=r})(Fc||(Fc={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),o(t,"createSnippet"),e.createSnippet=t})(Gc||(Gc={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),o(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(r){return{items:r}}i(t,"create"),o(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){e.Invoked=0,e.Automatic=1})(zc||(zc={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),o(t,"create"),e.create=t})(Bc||(Bc={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),o(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){function t(r){let n=r;return A.objectLiteral(n)&&ro.is(n.uri)&&A.string(n.name)}i(t,"is"),o(t,"is"),e.is=t})(qc||(qc={})),yg=[` +`,`\r +`,"\r"],(function(e){function t(s,l,u,c){return new Nh(s,l,u,c)}i(t,"create"),o(t,"create"),e.create=t;function r(s){let l=s;return!!(A.defined(l)&&A.string(l.uri)&&(A.undefined(l.languageId)||A.string(l.languageId))&&A.uinteger(l.lineCount)&&A.func(l.getText)&&A.func(l.positionAt)&&A.func(l.offsetAt))}i(r,"is"),o(r,"is"),e.is=r;function n(s,l){let u=s.getText(),c=a(l,(d,p)=>{let m=d.range.start.line-p.range.start.line;return m===0?d.range.start.character-p.range.start.character:m}),f=u.length;for(let d=c.length-1;d>=0;d--){let p=c[d],m=s.offsetAt(p.range.start),v=s.offsetAt(p.range.end);if(v<=f)u=u.substring(0,m)+p.newText+u.substring(v,u.length);else throw new Error("Overlapping edit");f=m}return u}i(n,"applyEdits"),o(n,"applyEdits"),e.applyEdits=n;function a(s,l){if(s.length<=1)return s;let u=s.length/2|0,c=s.slice(0,u),f=s.slice(u);a(c,l),a(f,l);let d=0,p=0,m=0;for(;d0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(n===0)return ae.create(0,e);for(;re?n=s:r=s+1}let a=r-1;return ae.create(a,e-t[a])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1"u"}i(n,"undefined2"),o(n,"undefined"),e.undefined=n;function a(v){return v===!0||v===!1}i(a,"boolean"),o(a,"boolean"),e.boolean=a;function s(v){return t.call(v)==="[object String]"}i(s,"string"),o(s,"string"),e.string=s;function l(v){return t.call(v)==="[object Number]"}i(l,"number"),o(l,"number"),e.number=l;function u(v,T,w){return t.call(v)==="[object Number]"&&T<=v&&v<=w}i(u,"numberRange"),o(u,"numberRange"),e.numberRange=u;function c(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}i(c,"integer2"),o(c,"integer"),e.integer=c;function f(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}i(f,"uinteger2"),o(f,"uinteger"),e.uinteger=f;function d(v){return t.call(v)==="[object Function]"}i(d,"func"),o(d,"func"),e.func=d;function p(v){return v!==null&&typeof v=="object"}i(p,"objectLiteral"),o(p,"objectLiteral"),e.objectLiteral=p;function m(v,T){return Array.isArray(v)&&v.every(T)}i(m,"typedArray"),o(m,"typedArray"),e.typedArray=m})(A||(A={}))}}),_n=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}i(r,"RAL"),o(r,"RAL"),(function(n){function a(s){if(s===void 0)throw new Error("No runtime abstraction layer provided");t=s}i(a,"install"),o(a,"install"),n.install=a})(r||(r={})),e.default=r}}),vs=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(c){return c===!0||c===!1}i(t,"boolean"),o(t,"boolean"),e.boolean=t;function r(c){return typeof c=="string"||c instanceof String}i(r,"string"),o(r,"string"),e.string=r;function n(c){return typeof c=="number"||c instanceof Number}i(n,"number"),o(n,"number"),e.number=n;function a(c){return c instanceof Error}i(a,"error"),o(a,"error"),e.error=a;function s(c){return typeof c=="function"}i(s,"func"),o(s,"func"),e.func=s;function l(c){return Array.isArray(c)}i(l,"array"),o(l,"array"),e.array=l;function u(c){return l(c)&&c.every(f=>r(f))}i(u,"stringArray"),o(u,"stringArray"),e.stringArray=u}}),Fa=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=_n(),r;(function(s){let l={dispose(){}};s.None=function(){return l}})(r||(e.Event=r={}));var n=class{static{i(this,"CallbackList")}static{o(this,"CallbackList")}add(s,l=null,u){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(l),Array.isArray(u)&&u.push({dispose:o(()=>this.remove(s,l),"dispose")})}remove(s,l=null){if(!this._callbacks)return;let u=!1;for(let c=0,f=this._callbacks.length;c{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,u);let f={dispose:o(()=>{this._callbacks&&(this._callbacks.remove(l,u),f.dispose=vg._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(c)&&c.push(f),f}),this._event}fire(l){this._callbacks&&this._callbacks.invoke.call(this._callbacks,l)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=a,a._noop=function(){}}}),yl=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=_n(),r=vs(),n=Fa(),a;(function(c){c.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),c.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function f(d){let p=d;return p&&(p===c.None||p===c.Cancelled||r.boolean(p.isCancellationRequested)&&!!p.onCancellationRequested)}i(f,"is"),o(f,"is"),c.is=f})(a||(e.CancellationToken=a={}));var s=Object.freeze(function(c,f){let d=(0,t.default)().timer.setTimeout(c.bind(f),0);return{dispose(){d.dispose()}}}),l=class{static{i(this,"MutableToken")}static{o(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?s:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},u=class{static{i(this,"CancellationTokenSource3")}static{o(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=a.None}};e.CancellationTokenSource=u}}),Tg=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=vs(),r;(function(y){y.ParseError=-32700,y.InvalidRequest=-32600,y.MethodNotFound=-32601,y.InvalidParams=-32602,y.InternalError=-32603,y.jsonrpcReservedErrorRangeStart=-32099,y.serverErrorStart=-32099,y.MessageWriteError=-32099,y.MessageReadError=-32098,y.PendingResponseRejected=-32097,y.ConnectionInactive=-32096,y.ServerNotInitialized=-32002,y.UnknownErrorCode=-32001,y.jsonrpcReservedErrorRangeEnd=-32e3,y.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var n=class Rg extends Error{static{i(this,"_ResponseError")}static{o(this,"ResponseError")}constructor(E,R,$){super(R),this.code=t.number(E)?E:r.UnknownErrorCode,this.data=$,Object.setPrototypeOf(this,Rg.prototype)}toJson(){let E={code:this.code,message:this.message};return this.data!==void 0&&(E.data=this.data),E}};e.ResponseError=n;var a=class uo{static{i(this,"_ParameterStructures")}static{o(this,"ParameterStructures")}constructor(E){this.kind=E}static is(E){return E===uo.auto||E===uo.byName||E===uo.byPosition}toString(){return this.kind}};e.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var s=class{static{i(this,"AbstractMessageSignature")}static{o(this,"AbstractMessageSignature")}constructor(y,E){this.method=y,this.numberOfParams=E}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s;var l=class extends s{static{i(this,"RequestType0")}static{o(this,"RequestType0")}constructor(y){super(y,0)}};e.RequestType0=l;var u=class extends s{static{i(this,"RequestType")}static{o(this,"RequestType")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType=u;var c=class extends s{static{i(this,"RequestType1")}static{o(this,"RequestType1")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType1=c;var f=class extends s{static{i(this,"RequestType2")}static{o(this,"RequestType2")}constructor(y){super(y,2)}};e.RequestType2=f;var d=class extends s{static{i(this,"RequestType3")}static{o(this,"RequestType3")}constructor(y){super(y,3)}};e.RequestType3=d;var p=class extends s{static{i(this,"RequestType4")}static{o(this,"RequestType4")}constructor(y){super(y,4)}};e.RequestType4=p;var m=class extends s{static{i(this,"RequestType5")}static{o(this,"RequestType5")}constructor(y){super(y,5)}};e.RequestType5=m;var v=class extends s{static{i(this,"RequestType6")}static{o(this,"RequestType6")}constructor(y){super(y,6)}};e.RequestType6=v;var T=class extends s{static{i(this,"RequestType7")}static{o(this,"RequestType7")}constructor(y){super(y,7)}};e.RequestType7=T;var w=class extends s{static{i(this,"RequestType8")}static{o(this,"RequestType8")}constructor(y){super(y,8)}};e.RequestType8=w;var N=class extends s{static{i(this,"RequestType9")}static{o(this,"RequestType9")}constructor(y){super(y,9)}};e.RequestType9=N;var I=class extends s{static{i(this,"NotificationType")}static{o(this,"NotificationType")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType=I;var S=class extends s{static{i(this,"NotificationType0")}static{o(this,"NotificationType0")}constructor(y){super(y,0)}};e.NotificationType0=S;var _=class extends s{static{i(this,"NotificationType1")}static{o(this,"NotificationType1")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=_;var P=class extends s{static{i(this,"NotificationType2")}static{o(this,"NotificationType2")}constructor(y){super(y,2)}};e.NotificationType2=P;var j=class extends s{static{i(this,"NotificationType3")}static{o(this,"NotificationType3")}constructor(y){super(y,3)}};e.NotificationType3=j;var ee=class extends s{static{i(this,"NotificationType4")}static{o(this,"NotificationType4")}constructor(y){super(y,4)}};e.NotificationType4=ee;var X=class extends s{static{i(this,"NotificationType5")}static{o(this,"NotificationType5")}constructor(y){super(y,5)}};e.NotificationType5=X;var ce=class extends s{static{i(this,"NotificationType6")}static{o(this,"NotificationType6")}constructor(y){super(y,6)}};e.NotificationType6=ce;var me=class extends s{static{i(this,"NotificationType7")}static{o(this,"NotificationType7")}constructor(y){super(y,7)}};e.NotificationType7=me;var Re=class extends s{static{i(this,"NotificationType8")}static{o(this,"NotificationType8")}constructor(y){super(y,8)}};e.NotificationType8=Re;var O=class extends s{static{i(this,"NotificationType9")}static{o(this,"NotificationType9")}constructor(y){super(y,9)}};e.NotificationType9=O;var C;(function(y){function E(b){let L=b;return L&&t.string(L.method)&&(t.string(L.id)||t.number(L.id))}i(E,"isRequest"),o(E,"isRequest"),y.isRequest=E;function R(b){let L=b;return L&&t.string(L.method)&&b.id===void 0}i(R,"isNotification"),o(R,"isNotification"),y.isNotification=R;function $(b){let L=b;return L&&(L.result!==void 0||!!L.error)&&(t.string(L.id)||t.number(L.id)||L.id===null)}i($,"isResponse"),o($,"isResponse"),y.isResponse=$})(C||(e.Message=C={}))}}),$g=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var r;(function(s){s.None=0,s.First=1,s.AsOld=s.First,s.Last=2,s.AsNew=s.Last})(r||(e.Touch=r={}));var n=class{static{i(this,"LinkedMap")}static{o(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(s){return this._map.has(s)}get(s,l=r.None){let u=this._map.get(s);if(u)return l!==r.None&&this.touch(u,l),u.value}set(s,l,u=r.None){let c=this._map.get(s);if(c)c.value=l,u!==r.None&&this.touch(c,u);else{switch(c={key:s,value:l,next:void 0,previous:void 0},u){case r.None:this.addItemLast(c);break;case r.First:this.addItemFirst(c);break;case r.Last:this.addItemLast(c);break;default:this.addItemLast(c);break}this._map.set(s,c),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){let l=this._map.get(s);if(l)return this._map.delete(s),this.removeItem(l),this._size--,l.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,l){let u=this._state,c=this._head;for(;c;){if(l?s.bind(l)(c.value,c.key,this):s(c.value,c.key,this),this._state!==u)throw new Error("LinkedMap got modified during iteration.");c=c.next}}keys(){let s=this._state,l=this._head,u={[Symbol.iterator]:()=>u,next:o(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(l){let c={value:l.key,done:!1};return l=l.next,c}else return{value:void 0,done:!0}},"next")};return u}values(){let s=this._state,l=this._head,u={[Symbol.iterator]:()=>u,next:o(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(l){let c={value:l.value,done:!1};return l=l.next,c}else return{value:void 0,done:!0}},"next")};return u}entries(){let s=this._state,l=this._head,u={[Symbol.iterator]:()=>u,next:o(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(l){let c={value:[l.key,l.value],done:!1};return l=l.next,c}else return{value:void 0,done:!0}},"next")};return u}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let l=this._head,u=this.size;for(;l&&u>s;)this._map.delete(l.key),l=l.next,u--;this._head=l,this._size=u,l&&(l.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{let l=s.next,u=s.previous;if(!l||!u)throw new Error("Invalid list");l.previous=u,u.next=l}s.next=void 0,s.previous=void 0,this._state++}touch(s,l){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(l!==r.First&&l!==r.Last)){if(l===r.First){if(s===this._head)return;let u=s.next,c=s.previous;s===this._tail?(c.next=void 0,this._tail=c):(u.previous=c,c.next=u),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(l===r.Last){if(s===this._tail)return;let u=s.next,c=s.previous;s===this._head?(u.previous=void 0,this._head=u):(u.previous=c,c.next=u),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){let s=[];return this.forEach((l,u)=>{s.push([u,l])}),s}fromJSON(s){this.clear();for(let[l,u]of s)this.set(l,u)}};e.LinkedMap=n;var a=class extends n{static{i(this,"LRUCache")}static{o(this,"LRUCache")}constructor(s,l=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,l),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,l=r.AsNew){return super.get(s,l)}peek(s){return super.get(s,r.None)}set(s,l){return super.set(s,l,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=a}}),bS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),o(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),SS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=yl(),r;(function(u){u.Continue=0,u.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}static{o(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(u){if(u.id===null)return;let c=new SharedArrayBuffer(4),f=new Int32Array(c,0,1);f[0]=r.Continue,this.buffers.set(u.id,c),u.$cancellationData=c}async sendCancellation(u,c){let f=this.buffers.get(c);if(f===void 0)return;let d=new Int32Array(f,0,1);Atomics.store(d,0,r.Cancelled)}cleanup(u){this.buffers.delete(u)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}static{o(this,"SharedArrayBufferCancellationToken")}constructor(u){this.data=new Int32Array(u,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}static{o(this,"SharedArrayBufferCancellationTokenSource")}constructor(u){this.token=new a(u)}cancel(){}dispose(){}},l=class{static{i(this,"SharedArrayReceiverStrategy")}static{o(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(u){let c=u.$cancellationData;return c===void 0?new t.CancellationTokenSource:new s(c)}};e.SharedArrayReceiverStrategy=l}}),Ag=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=_n(),r=class{static{i(this,"Semaphore")}static{o(this,"Semaphore")}constructor(n=1){if(n<=0)throw new Error("Capacity must be greater than 0");this._capacity=n,this._active=0,this._waiting=[]}lock(n){return new Promise((a,s)=>{this._waiting.push({thunk:n,resolve:a,reject:s}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let a=n.thunk();a instanceof Promise?a.then(s=>{this._active--,n.resolve(s),this.runNext()},s=>{this._active--,n.reject(s),this.runNext()}):(this._active--,n.resolve(a),this.runNext())}catch(a){this._active--,n.reject(a),this.runNext()}}};e.Semaphore=r}}),wS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=_n(),r=vs(),n=Fa(),a=Ag(),s;(function(f){function d(p){let m=p;return m&&r.func(m.listen)&&r.func(m.dispose)&&r.func(m.onError)&&r.func(m.onClose)&&r.func(m.onPartialMessage)}i(d,"is"),o(d,"is"),f.is=d})(s||(e.MessageReader=s={}));var l=class{static{i(this,"AbstractMessageReader")}static{o(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f){this.errorEmitter.fire(this.asError(f))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(f){this.partialMessageEmitter.fire(f)}asError(f){return f instanceof Error?f:new Error(`Reader received error. Reason: ${r.string(f.message)?f.message:"unknown"}`)}};e.AbstractMessageReader=l;var u;(function(f){function d(p){let m,v,T,w=new Map,N,I=new Map;if(p===void 0||typeof p=="string")m=p??"utf-8";else{if(m=p.charset??"utf-8",p.contentDecoder!==void 0&&(T=p.contentDecoder,w.set(T.name,T)),p.contentDecoders!==void 0)for(let S of p.contentDecoders)w.set(S.name,S);if(p.contentTypeDecoder!==void 0&&(N=p.contentTypeDecoder,I.set(N.name,N)),p.contentTypeDecoders!==void 0)for(let S of p.contentTypeDecoders)I.set(S.name,S)}return N===void 0&&(N=(0,t.default)().applicationJson.decoder,I.set(N.name,N)),{charset:m,contentDecoder:T,contentDecoders:w,contentTypeDecoder:N,contentTypeDecoders:I}}i(d,"fromOptions"),o(d,"fromOptions"),f.fromOptions=d})(u||(u={}));var c=class extends l{static{i(this,"ReadableStreamMessageReader")}static{o(this,"ReadableStreamMessageReader")}constructor(f,d){super(),this.readable=f,this.options=u.fromOptions(d),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(f){this._partialMessageTimeout=f}get partialMessageTimeout(){return this._partialMessageTimeout}listen(f){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=f;let d=this.readable.onData(p=>{this.onData(p)});return this.readable.onError(p=>this.fireError(p)),this.readable.onClose(()=>this.fireClose()),d}onData(f){try{for(this.buffer.append(f);;){if(this.nextMessageLength===-1){let p=this.buffer.tryReadHeaders(!0);if(!p)return;let m=p.get("content-length");if(!m){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(p))}`));return}let v=parseInt(m);if(isNaN(v)){this.fireError(new Error(`Content-Length value must be a number. Got ${m}`));return}this.nextMessageLength=v}let d=this.buffer.tryReadBody(this.nextMessageLength);if(d===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let p=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(d):d,m=await this.options.contentTypeDecoder.decode(p,this.options);this.callback(m)}).catch(p=>{this.fireError(p)})}}catch(d){this.fireError(d)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((f,d)=>{this.partialMessageTimer=void 0,f===this.messageToken&&(this.firePartialMessage({messageToken:f,waitingTime:d}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=c}}),IS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=_n(),r=vs(),n=Ag(),a=Fa(),s="Content-Length: ",l=`\r +`,u;(function(p){function m(v){let T=v;return T&&r.func(T.dispose)&&r.func(T.onClose)&&r.func(T.onError)&&r.func(T.write)}i(m,"is"),o(m,"is"),p.is=m})(u||(e.MessageWriter=u={}));var c=class{static{i(this,"AbstractMessageWriter")}static{o(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p,m,v){this.errorEmitter.fire([this.asError(p),m,v])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(p){return p instanceof Error?p:new Error(`Writer received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}};e.AbstractMessageWriter=c;var f;(function(p){function m(v){return v===void 0||typeof v=="string"?{charset:v??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:v.charset??"utf-8",contentEncoder:v.contentEncoder,contentTypeEncoder:v.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}i(m,"fromOptions"),o(m,"fromOptions"),p.fromOptions=m})(f||(f={}));var d=class extends c{static{i(this,"WriteableStreamMessageWriter")}static{o(this,"WriteableStreamMessageWriter")}constructor(p,m){super(),this.writable=p,this.options=f.fromOptions(m),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(v=>this.fireError(v)),this.writable.onClose(()=>this.fireClose())}async write(p){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(p,this.options).then(v=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(v):v).then(v=>{let T=[];return T.push(s,v.byteLength.toString(),l),T.push(l),this.doWrite(p,T,v)},v=>{throw this.fireError(v),v}))}async doWrite(p,m,v){try{return await this.writable.write(m.join(""),"ascii"),this.writable.write(v)}catch(T){return this.handleError(T,p),Promise.reject(T)}}handleError(p,m){this.errorCount++,this.fireError(p,m,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=d}}),NS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r +`,a=class{static{i(this,"AbstractMessageBuffer")}static{o(this,"AbstractMessageBuffer")}constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let l=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(l),this._totalLength+=l.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let l=0,u=0,c=0,f=0;e:for(;uthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){let f=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(f)}if(this._chunks[0].byteLength>s){let f=this._chunks[0],d=this.asNative(f,s);return this._chunks[0]=f.slice(s),this._totalLength-=s,d}let l=this.allocNative(s),u=0,c=0;for(;s>0;){let f=this._chunks[c];if(f.byteLength>s){let d=f.slice(0,s);l.set(d,u),u+=s,this._chunks[c]=f.slice(s),this._totalLength-=s,s-=s}else l.set(f,u),u+=f.byteLength,this._chunks.shift(),this._totalLength-=f.byteLength,s-=f.byteLength}return l}};e.AbstractMessageBuffer=a}}),kS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=_n(),r=vs(),n=Tg(),a=$g(),s=Fa(),l=yl(),u;(function(y){y.type=new n.NotificationType("$/cancelRequest")})(u||(u={}));var c;(function(y){function E(R){return typeof R=="string"||typeof R=="number"}i(E,"is"),o(E,"is"),y.is=E})(c||(e.ProgressToken=c={}));var f;(function(y){y.type=new n.NotificationType("$/progress")})(f||(f={}));var d=class{static{i(this,"ProgressType")}static{o(this,"ProgressType")}constructor(){}};e.ProgressType=d;var p;(function(y){function E(R){return r.func(R)}i(E,"is"),o(E,"is"),y.is=E})(p||(p={})),e.NullLogger=Object.freeze({error:o(()=>{},"error"),warn:o(()=>{},"warn"),info:o(()=>{},"info"),log:o(()=>{},"log")});var m;(function(y){y[y.Off=0]="Off",y[y.Messages=1]="Messages",y[y.Compact=2]="Compact",y[y.Verbose=3]="Verbose"})(m||(e.Trace=m={}));var v;(function(y){y.Off="off",y.Messages="messages",y.Compact="compact",y.Verbose="verbose"})(v||(e.TraceValues=v={})),(function(y){function E($){if(!r.string($))return y.Off;switch($=$.toLowerCase(),$){case"off":return y.Off;case"messages":return y.Messages;case"compact":return y.Compact;case"verbose":return y.Verbose;default:return y.Off}}i(E,"fromString"),o(E,"fromString"),y.fromString=E;function R($){switch($){case y.Off:return"off";case y.Messages:return"messages";case y.Compact:return"compact";case y.Verbose:return"verbose";default:return"off"}}i(R,"toString4"),o(R,"toString"),y.toString=R})(m||(e.Trace=m={}));var T;(function(y){y.Text="text",y.JSON="json"})(T||(e.TraceFormat=T={})),(function(y){function E(R){return r.string(R)?(R=R.toLowerCase(),R==="json"?y.JSON:y.Text):y.Text}i(E,"fromString"),o(E,"fromString"),y.fromString=E})(T||(e.TraceFormat=T={}));var w;(function(y){y.type=new n.NotificationType("$/setTrace")})(w||(e.SetTraceNotification=w={}));var N;(function(y){y.type=new n.NotificationType("$/logTrace")})(N||(e.LogTraceNotification=N={}));var I;(function(y){y[y.Closed=1]="Closed",y[y.Disposed=2]="Disposed",y[y.AlreadyListening=3]="AlreadyListening"})(I||(e.ConnectionErrors=I={}));var S=class Eg extends Error{static{i(this,"_ConnectionError")}static{o(this,"ConnectionError")}constructor(E,R){super(R),this.code=E,Object.setPrototypeOf(this,Eg.prototype)}};e.ConnectionError=S;var _;(function(y){function E(R){let $=R;return $&&r.func($.cancelUndispatched)}i(E,"is"),o(E,"is"),y.is=E})(_||(e.ConnectionStrategy=_={}));var P;(function(y){function E(R){let $=R;return $&&($.kind===void 0||$.kind==="id")&&r.func($.createCancellationTokenSource)&&($.dispose===void 0||r.func($.dispose))}i(E,"is"),o(E,"is"),y.is=E})(P||(e.IdCancellationReceiverStrategy=P={}));var j;(function(y){function E(R){let $=R;return $&&$.kind==="request"&&r.func($.createCancellationTokenSource)&&($.dispose===void 0||r.func($.dispose))}i(E,"is"),o(E,"is"),y.is=E})(j||(e.RequestCancellationReceiverStrategy=j={}));var ee;(function(y){y.Message=Object.freeze({createCancellationTokenSource(R){return new l.CancellationTokenSource}});function E(R){return P.is(R)||j.is(R)}i(E,"is"),o(E,"is"),y.is=E})(ee||(e.CancellationReceiverStrategy=ee={}));var X;(function(y){y.Message=Object.freeze({sendCancellation(R,$){return R.sendNotification(u.type,{id:$})},cleanup(R){}});function E(R){let $=R;return $&&r.func($.sendCancellation)&&r.func($.cleanup)}i(E,"is"),o(E,"is"),y.is=E})(X||(e.CancellationSenderStrategy=X={}));var ce;(function(y){y.Message=Object.freeze({receiver:ee.Message,sender:X.Message});function E(R){let $=R;return $&&ee.is($.receiver)&&X.is($.sender)}i(E,"is"),o(E,"is"),y.is=E})(ce||(e.CancellationStrategy=ce={}));var me;(function(y){function E(R){let $=R;return $&&r.func($.handleMessage)}i(E,"is"),o(E,"is"),y.is=E})(me||(e.MessageStrategy=me={}));var Re;(function(y){function E(R){let $=R;return $&&(ce.is($.cancellationStrategy)||_.is($.connectionStrategy)||me.is($.messageStrategy))}i(E,"is"),o(E,"is"),y.is=E})(Re||(e.ConnectionOptions=Re={}));var O;(function(y){y[y.New=1]="New",y[y.Listening=2]="Listening",y[y.Closed=3]="Closed",y[y.Disposed=4]="Disposed"})(O||(O={}));function C(y,E,R,$){let b=R!==void 0?R:e.NullLogger,L=0,x=0,M=0,U="2.0",W,le=new Map,H,Oe=new Map,ie=new Map,Le,Ue=new a.LinkedMap,$e=new Map,ze=new Set,Ie=new Map,J=m.Off,Ge=T.Text,fe,at=O.New,qn=new s.Emitter,Ha=new s.Emitter,Ya=new s.Emitter,Xa=new s.Emitter,Ja=new s.Emitter,St=$&&$.cancellationStrategy?$.cancellationStrategy:ce.Message;function Wn(g){if(g===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+g.toString()}i(Wn,"createRequestQueueKey"),o(Wn,"createRequestQueueKey");function Za(g){return g===null?"res-unknown-"+(++M).toString():"res-"+g.toString()}i(Za,"createResponseQueueKey"),o(Za,"createResponseQueueKey");function Qa(){return"not-"+(++x).toString()}i(Qa,"createNotificationQueueKey"),o(Qa,"createNotificationQueueKey");function ei(g,k){n.Message.isRequest(k)?g.set(Wn(k.id),k):n.Message.isResponse(k)?g.set(Za(k.id),k):g.set(Qa(),k)}i(ei,"addMessageToQueue"),o(ei,"addMessageToQueue");function ti(g){}i(ti,"cancelUndispatched"),o(ti,"cancelUndispatched");function Vn(){return at===O.Listening}i(Vn,"isListening"),o(Vn,"isListening");function Hn(){return at===O.Closed}i(Hn,"isClosed"),o(Hn,"isClosed");function Ft(){return at===O.Disposed}i(Ft,"isDisposed"),o(Ft,"isDisposed");function Yn(){(at===O.New||at===O.Listening)&&(at=O.Closed,Ha.fire(void 0))}i(Yn,"closeHandler"),o(Yn,"closeHandler");function ri(g){qn.fire([g,void 0,void 0])}i(ri,"readErrorHandler"),o(ri,"readErrorHandler");function ni(g){qn.fire(g)}i(ni,"writeErrorHandler"),o(ni,"writeErrorHandler"),y.onClose(Yn),y.onError(ri),E.onClose(Yn),E.onError(ni);function Xn(){Le||Ue.size===0||(Le=(0,t.default)().timer.setImmediate(()=>{Le=void 0,ai()}))}i(Xn,"triggerMessageQueue"),o(Xn,"triggerMessageQueue");function Jn(g){n.Message.isRequest(g)?ii(g):n.Message.isNotification(g)?oi(g):n.Message.isResponse(g)?si(g):li(g)}i(Jn,"handleMessage"),o(Jn,"handleMessage");function ai(){if(Ue.size===0)return;let g=Ue.shift();try{let k=$?.messageStrategy;me.is(k)?k.handleMessage(g,Jn):Jn(g)}finally{Xn()}}i(ai,"processMessageQueue"),o(ai,"processMessageQueue");let xs=o(g=>{try{if(n.Message.isNotification(g)&&g.method===u.type.method){let k=g.params.id,D=Wn(k),F=Ue.get(D);if(n.Message.isRequest(F)){let ue=$?.connectionStrategy,be=ue&&ue.cancelUndispatched?ue.cancelUndispatched(F,ti):void 0;if(be&&(be.error!==void 0||be.result!==void 0)){Ue.delete(D),Ie.delete(k),be.id=F.id,Cr(be,g.method,Date.now()),E.write(be).catch(()=>b.error("Sending response for canceled message failed."));return}}let ge=Ie.get(k);if(ge!==void 0){ge.cancel(),zr(g);return}else ze.add(k)}ei(Ue,g)}finally{Xn()}},"callback");function ii(g){if(Ft())return;function k(te,Ee,se){let De={jsonrpc:U,id:g.id};te instanceof n.ResponseError?De.error=te.toJson():De.result=te===void 0?null:te,Cr(De,Ee,se),E.write(De).catch(()=>b.error("Sending response failed."))}i(k,"reply"),o(k,"reply");function D(te,Ee,se){let De={jsonrpc:U,id:g.id,error:te.toJson()};Cr(De,Ee,se),E.write(De).catch(()=>b.error("Sending response failed."))}i(D,"replyError"),o(D,"replyError");function F(te,Ee,se){te===void 0&&(te=null);let De={jsonrpc:U,id:g.id,result:te};Cr(De,Ee,se),E.write(De).catch(()=>b.error("Sending response failed."))}i(F,"replySuccess"),o(F,"replySuccess"),fi(g);let ge=le.get(g.method),ue,be;ge&&(ue=ge.type,be=ge.handler);let Ne=Date.now();if(be||W){let te=g.id??String(Date.now()),Ee=P.is(St.receiver)?St.receiver.createCancellationTokenSource(te):St.receiver.createCancellationTokenSource(g);g.id!==null&&ze.has(g.id)&&Ee.cancel(),g.id!==null&&Ie.set(te,Ee);try{let se;if(be)if(g.params===void 0){if(ue!==void 0&&ue.numberOfParams!==0){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${g.method} defines ${ue.numberOfParams} params but received none.`),g.method,Ne);return}se=be(Ee.token)}else if(Array.isArray(g.params)){if(ue!==void 0&&ue.parameterStructures===n.ParameterStructures.byName){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${g.method} defines parameters by name but received parameters by position`),g.method,Ne);return}se=be(...g.params,Ee.token)}else{if(ue!==void 0&&ue.parameterStructures===n.ParameterStructures.byPosition){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${g.method} defines parameters by position but received parameters by name`),g.method,Ne);return}se=be(g.params,Ee.token)}else W&&(se=W(g.method,g.params,Ee.token));let De=se;se?De.then?De.then(He=>{Ie.delete(te),k(He,g.method,Ne)},He=>{Ie.delete(te),He instanceof n.ResponseError?D(He,g.method,Ne):He&&r.string(He.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed with message: ${He.message}`),g.method,Ne):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed unexpectedly without providing any details.`),g.method,Ne)}):(Ie.delete(te),k(se,g.method,Ne)):(Ie.delete(te),F(se,g.method,Ne))}catch(se){Ie.delete(te),se instanceof n.ResponseError?k(se,g.method,Ne):se&&r.string(se.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed with message: ${se.message}`),g.method,Ne):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${g.method} failed unexpectedly without providing any details.`),g.method,Ne)}}else D(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${g.method}`),g.method,Ne)}i(ii,"handleRequest"),o(ii,"handleRequest");function si(g){if(!Ft())if(g.id===null)g.error?b.error(`Received response message without id: Error is: +${JSON.stringify(g.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{let k=g.id,D=$e.get(k);if(di(g,D),D!==void 0){$e.delete(k);try{if(g.error){let F=g.error;D.reject(new n.ResponseError(F.code,F.message,F.data))}else if(g.result!==void 0)D.resolve(g.result);else throw new Error("Should never happen.")}catch(F){F.message?b.error(`Response handler '${D.method}' failed with message: ${F.message}`):b.error(`Response handler '${D.method}' failed unexpectedly.`)}}}}i(si,"handleResponse"),o(si,"handleResponse");function oi(g){if(Ft())return;let k,D;if(g.method===u.type.method){let F=g.params.id;ze.delete(F),zr(g);return}else{let F=Oe.get(g.method);F&&(D=F.handler,k=F.type)}if(D||H)try{if(zr(g),D)if(g.params===void 0)k!==void 0&&k.numberOfParams!==0&&k.parameterStructures!==n.ParameterStructures.byName&&b.error(`Notification ${g.method} defines ${k.numberOfParams} params but received none.`),D();else if(Array.isArray(g.params)){let F=g.params;g.method===f.type.method&&F.length===2&&c.is(F[0])?D({token:F[0],value:F[1]}):(k!==void 0&&(k.parameterStructures===n.ParameterStructures.byName&&b.error(`Notification ${g.method} defines parameters by name but received parameters by position`),k.numberOfParams!==g.params.length&&b.error(`Notification ${g.method} defines ${k.numberOfParams} params but received ${F.length} arguments`)),D(...F))}else k!==void 0&&k.parameterStructures===n.ParameterStructures.byPosition&&b.error(`Notification ${g.method} defines parameters by position but received parameters by name`),D(g.params);else H&&H(g.method,g.params)}catch(F){F.message?b.error(`Notification handler '${g.method}' failed with message: ${F.message}`):b.error(`Notification handler '${g.method}' failed unexpectedly.`)}else Ya.fire(g)}i(oi,"handleNotification"),o(oi,"handleNotification");function li(g){if(!g){b.error("Received empty message.");return}b.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(g,null,4)}`);let k=g;if(r.string(k.id)||r.number(k.id)){let D=k.id,F=$e.get(D);F&&F.reject(new Error("The received response has neither a result nor an error property."))}}i(li,"handleInvalidMessage"),o(li,"handleInvalidMessage");function Rt(g){if(g!=null)switch(J){case m.Verbose:return JSON.stringify(g,null,4);case m.Compact:return JSON.stringify(g);default:return}}i(Rt,"stringifyTrace"),o(Rt,"stringifyTrace");function ui(g){if(!(J===m.Off||!fe))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&g.params&&(k=`Params: ${Rt(g.params)} + +`),fe.log(`Sending request '${g.method} - (${g.id})'.`,k)}else Gt("send-request",g)}i(ui,"traceSendingRequest"),o(ui,"traceSendingRequest");function ci(g){if(!(J===m.Off||!fe))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&(g.params?k=`Params: ${Rt(g.params)} + +`:k=`No parameters provided. + +`),fe.log(`Sending notification '${g.method}'.`,k)}else Gt("send-notification",g)}i(ci,"traceSendingNotification"),o(ci,"traceSendingNotification");function Cr(g,k,D){if(!(J===m.Off||!fe))if(Ge===T.Text){let F;(J===m.Verbose||J===m.Compact)&&(g.error&&g.error.data?F=`Error data: ${Rt(g.error.data)} + +`:g.result?F=`Result: ${Rt(g.result)} + +`:g.error===void 0&&(F=`No result returned. + +`)),fe.log(`Sending response '${k} - (${g.id})'. Processing request took ${Date.now()-D}ms`,F)}else Gt("send-response",g)}i(Cr,"traceSendingResponse"),o(Cr,"traceSendingResponse");function fi(g){if(!(J===m.Off||!fe))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&g.params&&(k=`Params: ${Rt(g.params)} + +`),fe.log(`Received request '${g.method} - (${g.id})'.`,k)}else Gt("receive-request",g)}i(fi,"traceReceivedRequest"),o(fi,"traceReceivedRequest");function zr(g){if(!(J===m.Off||!fe||g.method===N.type.method))if(Ge===T.Text){let k;(J===m.Verbose||J===m.Compact)&&(g.params?k=`Params: ${Rt(g.params)} + +`:k=`No parameters provided. + +`),fe.log(`Received notification '${g.method}'.`,k)}else Gt("receive-notification",g)}i(zr,"traceReceivedNotification"),o(zr,"traceReceivedNotification");function di(g,k){if(!(J===m.Off||!fe))if(Ge===T.Text){let D;if((J===m.Verbose||J===m.Compact)&&(g.error&&g.error.data?D=`Error data: ${Rt(g.error.data)} + +`:g.result?D=`Result: ${Rt(g.result)} + +`:g.error===void 0&&(D=`No result returned. + +`)),k){let F=g.error?` Request failed: ${g.error.message} (${g.error.code}).`:"";fe.log(`Received response '${k.method} - (${g.id})' in ${Date.now()-k.timerStart}ms.${F}`,D)}else fe.log(`Received response ${g.id} without active response promise.`,D)}else Gt("receive-response",g)}i(di,"traceReceivedResponse"),o(di,"traceReceivedResponse");function Gt(g,k){if(!fe||J===m.Off)return;let D={isLSPMessage:!0,type:g,message:k,timestamp:Date.now()};fe.log(D)}i(Gt,"logLSPMessage"),o(Gt,"logLSPMessage");function tr(){if(Hn())throw new S(I.Closed,"Connection is closed.");if(Ft())throw new S(I.Disposed,"Connection is disposed.")}i(tr,"throwIfClosedOrDisposed"),o(tr,"throwIfClosedOrDisposed");function pi(){if(Vn())throw new S(I.AlreadyListening,"Connection is already listening")}i(pi,"throwIfListening"),o(pi,"throwIfListening");function hi(){if(!Vn())throw new Error("Call listen() first.")}i(hi,"throwIfNotListening"),o(hi,"throwIfNotListening");function rr(g){return g===void 0?null:g}i(rr,"undefinedToNull"),o(rr,"undefinedToNull");function Zn(g){if(g!==null)return g}i(Zn,"nullToUndefined"),o(Zn,"nullToUndefined");function h(g){return g!=null&&!Array.isArray(g)&&typeof g=="object"}i(h,"isNamedParam"),o(h,"isNamedParam");function ne(g,k){switch(g){case n.ParameterStructures.auto:return h(k)?Zn(k):[rr(k)];case n.ParameterStructures.byName:if(!h(k))throw new Error("Received parameters by name but param is not an object literal.");return Zn(k);case n.ParameterStructures.byPosition:return[rr(k)];default:throw new Error(`Unknown parameter structure ${g.toString()}`)}}i(ne,"computeSingleParam"),o(ne,"computeSingleParam");function Ae(g,k){let D,F=g.numberOfParams;switch(F){case 0:D=void 0;break;case 1:D=ne(g.parameterStructures,k[0]);break;default:D=[];for(let ge=0;ge{tr();let D,F;if(r.string(g)){D=g;let ue=k[0],be=0,Ne=n.ParameterStructures.auto;n.ParameterStructures.is(ue)&&(be=1,Ne=ue);let te=k.length,Ee=te-be;switch(Ee){case 0:F=void 0;break;case 1:F=ne(Ne,k[be]);break;default:if(Ne===n.ParameterStructures.byName)throw new Error(`Received ${Ee} parameters for 'by Name' notification parameter structure.`);F=k.slice(be,te).map(se=>rr(se));break}}else{let ue=k;D=g.method,F=Ae(g,ue)}let ge={jsonrpc:U,method:D,params:F};return ci(ge),E.write(ge).catch(ue=>{throw b.error("Sending notification failed."),ue})},"sendNotification"),onNotification:o((g,k)=>{tr();let D;return r.func(g)?H=g:k&&(r.string(g)?(D=g,Oe.set(g,{type:void 0,handler:k})):(D=g.method,Oe.set(g.method,{type:g,handler:k}))),{dispose:o(()=>{D!==void 0?Oe.delete(D):H=void 0},"dispose")}},"onNotification"),onProgress:o((g,k,D)=>{if(ie.has(k))throw new Error(`Progress handler for token ${k} already registered`);return ie.set(k,D),{dispose:o(()=>{ie.delete(k)},"dispose")}},"onProgress"),sendProgress:o((g,k,D)=>V.sendNotification(f.type,{token:k,value:D}),"sendProgress"),onUnhandledProgress:Xa.event,sendRequest:o((g,...k)=>{tr(),hi();let D,F,ge;if(r.string(g)){D=g;let te=k[0],Ee=k[k.length-1],se=0,De=n.ParameterStructures.auto;n.ParameterStructures.is(te)&&(se=1,De=te);let He=k.length;l.CancellationToken.is(Ee)&&(He=He-1,ge=Ee);let jt=He-se;switch(jt){case 0:F=void 0;break;case 1:F=ne(De,k[se]);break;default:if(De===n.ParameterStructures.byName)throw new Error(`Received ${jt} parameters for 'by Name' request parameter structure.`);F=k.slice(se,He).map(RS=>rr(RS));break}}else{let te=k;D=g.method,F=Ae(g,te);let Ee=g.numberOfParams;ge=l.CancellationToken.is(te[Ee])?te[Ee]:void 0}let ue=L++,be;ge&&(be=ge.onCancellationRequested(()=>{let te=St.sender.sendCancellation(V,ue);return te===void 0?(b.log(`Received no promise from cancellation strategy when cancelling id ${ue}`),Promise.resolve()):te.catch(()=>{b.log(`Sending cancellation messages for id ${ue} failed`)})}));let Ne={jsonrpc:U,id:ue,method:D,params:F};return ui(Ne),typeof St.sender.enableCancellation=="function"&&St.sender.enableCancellation(Ne),new Promise(async(te,Ee)=>{let se=o(jt=>{te(jt),St.sender.cleanup(ue),be?.dispose()},"resolveWithCleanup"),De=o(jt=>{Ee(jt),St.sender.cleanup(ue),be?.dispose()},"rejectWithCleanup"),He={method:D,timerStart:Date.now(),resolve:se,reject:De};try{await E.write(Ne),$e.set(ue,He)}catch(jt){throw b.error("Sending request failed."),He.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,jt.message?jt.message:"Unknown reason")),jt}})},"sendRequest"),onRequest:o((g,k)=>{tr();let D=null;return p.is(g)?(D=void 0,W=g):r.string(g)?(D=null,k!==void 0&&(D=g,le.set(g,{handler:k,type:void 0}))):k!==void 0&&(D=g.method,le.set(g.method,{type:g,handler:k})),{dispose:o(()=>{D!==null&&(D!==void 0?le.delete(D):W=void 0)},"dispose")}},"onRequest"),hasPendingResponse:o(()=>$e.size>0,"hasPendingResponse"),trace:o(async(g,k,D)=>{let F=!1,ge=T.Text;D!==void 0&&(r.boolean(D)?F=D:(F=D.sendNotification||!1,ge=D.traceFormat||T.Text)),J=g,Ge=ge,J===m.Off?fe=void 0:fe=k,F&&!Hn()&&!Ft()&&await V.sendNotification(w.type,{value:m.toString(g)})},"trace"),onError:qn.event,onClose:Ha.event,onUnhandledNotification:Ya.event,onDispose:Ja.event,end:o(()=>{E.end()},"end"),dispose:o(()=>{if(Ft())return;at=O.Disposed,Ja.fire(void 0);let g=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let k of $e.values())k.reject(g);$e=new Map,Ie=new Map,ze=new Set,Ue=new a.LinkedMap,r.func(E.dispose)&&E.dispose(),r.func(y.dispose)&&y.dispose()},"dispose"),listen:o(()=>{tr(),pi(),at=O.Listening,y.listen(xs)},"listen"),inspect:o(()=>{(0,t.default)().console.log("inspect")},"inspect")};return V.onNotification(N.type,g=>{if(J===m.Off||!fe)return;let k=J===m.Verbose||J===m.Compact;fe.log(g.message,k?g.verbose:void 0)}),V.onNotification(f.type,g=>{let k=ie.get(g.token);k?k(g.value):Xa.fire(g)}),V}i(C,"createMessageConnection"),o(C,"createMessageConnection"),e.createMessageConnection=C}}),Vc=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=Tg();Object.defineProperty(e,"Message",{enumerable:!0,get:o(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:o(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:o(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:o(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:o(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:o(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:o(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:o(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:o(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:o(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:o(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:o(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:o(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:o(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:o(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:o(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:o(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:o(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:o(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:o(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:o(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:o(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:o(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:o(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:o(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:o(function(){return t.ParameterStructures},"get")});var r=$g();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:o(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:o(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:o(function(){return r.Touch},"get")});var n=bS();Object.defineProperty(e,"Disposable",{enumerable:!0,get:o(function(){return n.Disposable},"get")});var a=Fa();Object.defineProperty(e,"Event",{enumerable:!0,get:o(function(){return a.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:o(function(){return a.Emitter},"get")});var s=yl();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:o(function(){return s.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:o(function(){return s.CancellationToken},"get")});var l=SS();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:o(function(){return l.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:o(function(){return l.SharedArrayReceiverStrategy},"get")});var u=wS();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:o(function(){return u.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:o(function(){return u.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:o(function(){return u.ReadableStreamMessageReader},"get")});var c=IS();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:o(function(){return c.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:o(function(){return c.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:o(function(){return c.WriteableStreamMessageWriter},"get")});var f=NS();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:o(function(){return f.AbstractMessageBuffer},"get")});var d=kS();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:o(function(){return d.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:o(function(){return d.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:o(function(){return d.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:o(function(){return d.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:o(function(){return d.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:o(function(){return d.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:o(function(){return d.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:o(function(){return d.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:o(function(){return d.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:o(function(){return d.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:o(function(){return d.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:o(function(){return d.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:o(function(){return d.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:o(function(){return d.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:o(function(){return d.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:o(function(){return d.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:o(function(){return d.MessageStrategy},"get")});var p=_n();e.RAL=p.default}}),PS=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vc(),r=class _g extends t.AbstractMessageBuffer{static{i(this,"_MessageBuffer")}static{o(this,"MessageBuffer")}constructor(f="utf-8"){super(f),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return _g.emptyBuffer}fromString(f,d){return new TextEncoder().encode(f)}toString(f,d){return d==="ascii"?this.asciiDecoder.decode(f):new TextDecoder(d).decode(f)}asNative(f,d){return d===void 0?f:f.slice(0,d)}allocNative(f){return new Uint8Array(f)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{i(this,"ReadableStreamWrapper")}static{o(this,"ReadableStreamWrapper")}constructor(c){this.socket=c,this._onData=new t.Emitter,this._messageListener=f=>{f.data.arrayBuffer().then(p=>{this._onData.fire(new Uint8Array(p))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}onData(c){return this._onData.event(c)}},a=class{static{i(this,"WritableStreamWrapper")}static{o(this,"WritableStreamWrapper")}constructor(c){this.socket=c}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}write(c,f){if(typeof c=="string"){if(f!==void 0&&f!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${f}`);this.socket.send(c)}else this.socket.send(c);return Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,l=Object.freeze({messageBuffer:Object.freeze({create:o(c=>new r(c),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:o((c,f)=>{if(f.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${f.charset}`);return Promise.resolve(s.encode(JSON.stringify(c,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:o((c,f)=>{if(!(c instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(f.charset).decode(c)))},"decode")})}),stream:Object.freeze({asReadableStream:o(c=>new n(c),"asReadableStream"),asWritableStream:o(c=>new a(c),"asWritableStream")}),console,timer:Object.freeze({setTimeout(c,f,...d){let p=setTimeout(c,f,...d);return{dispose:o(()=>clearTimeout(p),"dispose")}},setImmediate(c,...f){let d=setTimeout(c,0,...f);return{dispose:o(()=>clearTimeout(d),"dispose")}},setInterval(c,f,...d){let p=setInterval(c,f,...d);return{dispose:o(()=>clearInterval(p),"dispose")}}})});function u(){return l}i(u,"RIL"),o(u,"RIL"),(function(c){function f(){t.RAL.install(l)}i(f,"install"),o(f,"install"),c.install=f})(u||(u={})),e.default=u}}),Ga=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(c,f,d,p){p===void 0&&(p=d);var m=Object.getOwnPropertyDescriptor(f,d);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:o(function(){return f[d]},"get")}),Object.defineProperty(c,p,m)}):(function(c,f,d,p){p===void 0&&(p=d),c[p]=f[d]})),r=e&&e.__exportStar||function(c,f){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(f,d)&&t(f,c,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var n=PS();n.default.install();var a=Vc();r(Vc(),e);var s=class extends a.AbstractMessageReader{static{i(this,"BrowserMessageReader")}static{o(this,"BrowserMessageReader")}constructor(c){super(),this._onData=new a.Emitter,this._messageListener=f=>{this._onData.fire(f.data)},c.addEventListener("error",f=>this.fireError(f)),c.onmessage=this._messageListener}listen(c){return this._onData.event(c)}};e.BrowserMessageReader=s;var l=class extends a.AbstractMessageWriter{static{i(this,"BrowserMessageWriter")}static{o(this,"BrowserMessageWriter")}constructor(c){super(),this.port=c,this.errorCount=0,c.addEventListener("error",f=>this.fireError(f))}write(c){try{return this.port.postMessage(c),Promise.resolve()}catch(f){return this.handleError(f,c),Promise.reject(f)}}handleError(c,f){this.errorCount++,this.fireError(c,f,this.errorCount)}end(){}};e.BrowserMessageWriter=l;function u(c,f,d,p){return d===void 0&&(d=a.NullLogger),a.ConnectionStrategy.is(p)&&(p={connectionStrategy:p}),(0,a.createMessageConnection)(c,f,d,p)}i(u,"createMessageConnection"),o(u,"createMessageConnection"),e.createMessageConnection=u}}),kh=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=Ga()}}),Ce=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Ga(),r;(function(c){c.clientToServer="clientToServer",c.serverToClient="serverToClient",c.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{i(this,"RegistrationType")}static{o(this,"RegistrationType")}constructor(c){this.method=c}};e.RegistrationType=n;var a=class extends t.RequestType0{static{i(this,"ProtocolRequestType0")}static{o(this,"ProtocolRequestType0")}constructor(c){super(c)}};e.ProtocolRequestType0=a;var s=class extends t.RequestType{static{i(this,"ProtocolRequestType")}static{o(this,"ProtocolRequestType")}constructor(c){super(c,t.ParameterStructures.byName)}};e.ProtocolRequestType=s;var l=class extends t.NotificationType0{static{i(this,"ProtocolNotificationType0")}static{o(this,"ProtocolNotificationType0")}constructor(c){super(c)}};e.ProtocolNotificationType0=l;var u=class extends t.NotificationType{static{i(this,"ProtocolNotificationType")}static{o(this,"ProtocolNotificationType")}constructor(c){super(c,t.ParameterStructures.byName)}};e.ProtocolNotificationType=u}}),Wf=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(d){return d===!0||d===!1}i(t,"boolean"),o(t,"boolean"),e.boolean=t;function r(d){return typeof d=="string"||d instanceof String}i(r,"string"),o(r,"string"),e.string=r;function n(d){return typeof d=="number"||d instanceof Number}i(n,"number"),o(n,"number"),e.number=n;function a(d){return d instanceof Error}i(a,"error"),o(a,"error"),e.error=a;function s(d){return typeof d=="function"}i(s,"func"),o(s,"func"),e.func=s;function l(d){return Array.isArray(d)}i(l,"array"),o(l,"array"),e.array=l;function u(d){return l(d)&&d.every(p=>r(p))}i(u,"stringArray"),o(u,"stringArray"),e.stringArray=u;function c(d,p){return Array.isArray(d)&&d.every(p)}i(c,"typedArray"),o(c,"typedArray"),e.typedArray=c;function f(d){return d!==null&&typeof d=="object"}i(f,"objectLiteral"),o(f,"objectLiteral"),e.objectLiteral=f}}),OS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),LS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),DS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=Ce(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(r||(e.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolNotificationType(a.method)})(n||(e.DidChangeWorkspaceFoldersNotification=n={}))}}),MS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=Ce(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),xS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=Ce(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.ColorPresentationRequest=n={}))}}),FS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=Ce(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.FoldingRangeRefreshRequest=n={}))}}),GS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),jS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),US=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Ga(),r=Ce(),n;(function(l){l.type=new t.ProgressType;function u(c){return c===l.type}i(u,"is"),o(u,"is"),l.is=u})(n||(e.WorkDoneProgress=n={}));var a;(function(l){l.method="window/workDoneProgress/create",l.messageDirection=r.MessageDirection.serverToClient,l.type=new r.ProtocolRequestType(l.method)})(a||(e.WorkDoneProgressCreateRequest=a={}));var s;(function(l){l.method="window/workDoneProgress/cancel",l.messageDirection=r.MessageDirection.clientToServer,l.type=new r.ProtocolNotificationType(l.method)})(s||(e.WorkDoneProgressCancelNotification=s={}))}}),zS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=Ce(),r;(function(s){s.method="textDocument/prepareCallHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var n;(function(s){s.method="callHierarchy/incomingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.CallHierarchyIncomingCallsRequest=n={}));var a;(function(s){s.method="callHierarchy/outgoingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.CallHierarchyOutgoingCallsRequest=a={}))}}),BS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=Ce(),r;(function(c){c.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(c){c.method="textDocument/semanticTokens",c.type=new t.RegistrationType(c.method)})(n||(e.SemanticTokensRegistrationType=n={}));var a;(function(c){c.method="textDocument/semanticTokens/full",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(a||(e.SemanticTokensRequest=a={}));var s;(function(c){c.method="textDocument/semanticTokens/full/delta",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(s||(e.SemanticTokensDeltaRequest=s={}));var l;(function(c){c.method="textDocument/semanticTokens/range",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(l||(e.SemanticTokensRangeRequest=l={}));var u;(function(c){c.method="workspace/semanticTokens/refresh",c.messageDirection=t.MessageDirection.serverToClient,c.type=new t.ProtocolRequestType0(c.method)})(u||(e.SemanticTokensRefreshRequest=u={}))}}),KS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=Ce(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),qS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Ce(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),WS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=Ce(),r;(function(f){f.file="file",f.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(f){f.method="workspace/willCreateFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolRequestType(f.method)})(n||(e.WillCreateFilesRequest=n={}));var a;(function(f){f.method="workspace/didCreateFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolNotificationType(f.method)})(a||(e.DidCreateFilesNotification=a={}));var s;(function(f){f.method="workspace/willRenameFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolRequestType(f.method)})(s||(e.WillRenameFilesRequest=s={}));var l;(function(f){f.method="workspace/didRenameFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolNotificationType(f.method)})(l||(e.DidRenameFilesNotification=l={}));var u;(function(f){f.method="workspace/didDeleteFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolNotificationType(f.method)})(u||(e.DidDeleteFilesNotification=u={}));var c;(function(f){f.method="workspace/willDeleteFiles",f.messageDirection=t.MessageDirection.clientToServer,f.type=new t.ProtocolRequestType(f.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),VS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Ce(),r;(function(s){s.document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global"})(r||(e.UniquenessLevel=r={}));var n;(function(s){s.$import="import",s.$export="export",s.local="local"})(n||(e.MonikerKind=n={}));var a;(function(s){s.method="textDocument/moniker",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.MonikerRequest=a={}))}}),HS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Ce(),r;(function(s){s.method="textDocument/prepareTypeHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var n;(function(s){s.method="typeHierarchy/supertypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.TypeHierarchySupertypesRequest=n={}));var a;(function(s){s.method="typeHierarchy/subtypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.TypeHierarchySubtypesRequest=a={}))}}),YS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=Ce(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.InlineValueRefreshRequest=n={}))}}),XS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=Ce(),r;(function(s){s.method="textDocument/inlayHint",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.InlayHintRequest=r={}));var n;(function(s){s.method="inlayHint/resolve",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.InlayHintResolveRequest=n={}));var a;(function(s){s.method="workspace/inlayHint/refresh",s.messageDirection=t.MessageDirection.serverToClient,s.type=new t.ProtocolRequestType0(s.method)})(a||(e.InlayHintRefreshRequest=a={}))}}),JS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Ga(),r=Wf(),n=Ce(),a;(function(f){function d(p){let m=p;return m&&r.boolean(m.retriggerRequest)}i(d,"is"),o(d,"is"),f.is=d})(a||(e.DiagnosticServerCancellationData=a={}));var s;(function(f){f.Full="full",f.Unchanged="unchanged"})(s||(e.DocumentDiagnosticReportKind=s={}));var l;(function(f){f.method="textDocument/diagnostic",f.messageDirection=n.MessageDirection.clientToServer,f.type=new n.ProtocolRequestType(f.method),f.partialResult=new t.ProgressType})(l||(e.DocumentDiagnosticRequest=l={}));var u;(function(f){f.method="workspace/diagnostic",f.messageDirection=n.MessageDirection.clientToServer,f.type=new n.ProtocolRequestType(f.method),f.partialResult=new t.ProgressType})(u||(e.WorkspaceDiagnosticRequest=u={}));var c;(function(f){f.method="workspace/diagnostic/refresh",f.messageDirection=n.MessageDirection.serverToClient,f.type=new n.ProtocolRequestType0(f.method)})(c||(e.DiagnosticRefreshRequest=c={}))}}),ZS=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(ys(),qf(gl)),r=Wf(),n=Ce(),a;(function(T){T.Markup=1,T.Code=2;function w(N){return N===1||N===2}i(w,"is"),o(w,"is"),T.is=w})(a||(e.NotebookCellKind=a={}));var s;(function(T){function w(S,_){let P={executionOrder:S};return(_===!0||_===!1)&&(P.success=_),P}i(w,"create"),o(w,"create"),T.create=w;function N(S){let _=S;return r.objectLiteral(_)&&t.uinteger.is(_.executionOrder)&&(_.success===void 0||r.boolean(_.success))}i(N,"is"),o(N,"is"),T.is=N;function I(S,_){return S===_?!0:S==null||_===null||_===void 0?!1:S.executionOrder===_.executionOrder&&S.success===_.success}i(I,"equals"),o(I,"equals"),T.equals=I})(s||(e.ExecutionSummary=s={}));var l;(function(T){function w(_,P){return{kind:_,document:P}}i(w,"create"),o(w,"create"),T.create=w;function N(_){let P=_;return r.objectLiteral(P)&&a.is(P.kind)&&t.DocumentUri.is(P.document)&&(P.metadata===void 0||r.objectLiteral(P.metadata))}i(N,"is"),o(N,"is"),T.is=N;function I(_,P){let j=new Set;return _.document!==P.document&&j.add("document"),_.kind!==P.kind&&j.add("kind"),_.executionSummary!==P.executionSummary&&j.add("executionSummary"),(_.metadata!==void 0||P.metadata!==void 0)&&!S(_.metadata,P.metadata)&&j.add("metadata"),(_.executionSummary!==void 0||P.executionSummary!==void 0)&&!s.equals(_.executionSummary,P.executionSummary)&&j.add("executionSummary"),j}i(I,"diff"),o(I,"diff"),T.diff=I;function S(_,P){if(_===P)return!0;if(_==null||P===null||P===void 0||typeof _!=typeof P||typeof _!="object")return!1;let j=Array.isArray(_),ee=Array.isArray(P);if(j!==ee)return!1;if(j&&ee){if(_.length!==P.length)return!1;for(let X=0;X<_.length;X++)if(!S(_[X],P[X]))return!1}if(r.objectLiteral(_)&&r.objectLiteral(P)){let X=Object.keys(_),ce=Object.keys(P);if(X.length!==ce.length||(X.sort(),ce.sort(),!S(X,ce)))return!1;for(let me=0;me0}i(ne,"hasId"),o(ne,"hasId"),h.hasId=ne})(L||(e.StaticRegistrationOptions=L={}));var x;(function(h){function ne(Ae){let V=Ae;return V&&(V.documentSelector===null||C.is(V.documentSelector))}i(ne,"is"),o(ne,"is"),h.is=ne})(x||(e.TextDocumentRegistrationOptions=x={}));var M;(function(h){function ne(V){let g=V;return n.objectLiteral(g)&&(g.workDoneProgress===void 0||n.boolean(g.workDoneProgress))}i(ne,"is"),o(ne,"is"),h.is=ne;function Ae(V){let g=V;return g&&n.boolean(g.workDoneProgress)}i(Ae,"hasWorkDoneProgress"),o(Ae,"hasWorkDoneProgress"),h.hasWorkDoneProgress=Ae})(M||(e.WorkDoneProgressOptions=M={}));var U;(function(h){h.method="initialize",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(U||(e.InitializeRequest=U={}));var W;(function(h){h.unknownProtocolVersion=1})(W||(e.InitializeErrorCodes=W={}));var le;(function(h){h.method="initialized",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(le||(e.InitializedNotification=le={}));var H;(function(h){h.method="shutdown",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType0(h.method)})(H||(e.ShutdownRequest=H={}));var Oe;(function(h){h.method="exit",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType0(h.method)})(Oe||(e.ExitNotification=Oe={}));var ie;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(ie||(e.DidChangeConfigurationNotification=ie={}));var Le;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Le||(e.MessageType=Le={}));var Ue;(function(h){h.method="window/showMessage",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(Ue||(e.ShowMessageNotification=Ue={}));var $e;(function(h){h.method="window/showMessageRequest",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType(h.method)})($e||(e.ShowMessageRequest=$e={}));var ze;(function(h){h.method="window/logMessage",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(ze||(e.LogMessageNotification=ze={}));var Ie;(function(h){h.method="telemetry/event",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(Ie||(e.TelemetryEventNotification=Ie={}));var J;(function(h){h.None=0,h.Full=1,h.Incremental=2})(J||(e.TextDocumentSyncKind=J={}));var Ge;(function(h){h.method="textDocument/didOpen",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(Ge||(e.DidOpenTextDocumentNotification=Ge={}));var fe;(function(h){function ne(V){let g=V;return g!=null&&typeof g.text=="string"&&g.range!==void 0&&(g.rangeLength===void 0||typeof g.rangeLength=="number")}i(ne,"isIncremental"),o(ne,"isIncremental"),h.isIncremental=ne;function Ae(V){let g=V;return g!=null&&typeof g.text=="string"&&g.range===void 0&&g.rangeLength===void 0}i(Ae,"isFull"),o(Ae,"isFull"),h.isFull=Ae})(fe||(e.TextDocumentContentChangeEvent=fe={}));var at;(function(h){h.method="textDocument/didChange",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(at||(e.DidChangeTextDocumentNotification=at={}));var qn;(function(h){h.method="textDocument/didClose",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(qn||(e.DidCloseTextDocumentNotification=qn={}));var Ha;(function(h){h.method="textDocument/didSave",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(Ha||(e.DidSaveTextDocumentNotification=Ha={}));var Ya;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(Ya||(e.TextDocumentSaveReason=Ya={}));var Xa;(function(h){h.method="textDocument/willSave",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(Xa||(e.WillSaveTextDocumentNotification=Xa={}));var Ja;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Ja||(e.WillSaveTextDocumentWaitUntilRequest=Ja={}));var St;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(St||(e.DidChangeWatchedFilesNotification=St={}));var Wn;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(Wn||(e.FileChangeType=Wn={}));var Za;(function(h){function ne(Ae){let V=Ae;return n.objectLiteral(V)&&(r.URI.is(V.baseUri)||r.WorkspaceFolder.is(V.baseUri))&&n.string(V.pattern)}i(ne,"is"),o(ne,"is"),h.is=ne})(Za||(e.RelativePattern=Za={}));var Qa;(function(h){h.Create=1,h.Change=2,h.Delete=4})(Qa||(e.WatchKind=Qa={}));var ei;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolNotificationType(h.method)})(ei||(e.PublishDiagnosticsNotification=ei={}));var ti;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(ti||(e.CompletionTriggerKind=ti={}));var Vn;(function(h){h.method="textDocument/completion",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Vn||(e.CompletionRequest=Vn={}));var Hn;(function(h){h.method="completionItem/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Hn||(e.CompletionResolveRequest=Hn={}));var Ft;(function(h){h.method="textDocument/hover",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Ft||(e.HoverRequest=Ft={}));var Yn;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(Yn||(e.SignatureHelpTriggerKind=Yn={}));var ri;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ri||(e.SignatureHelpRequest=ri={}));var ni;(function(h){h.method="textDocument/definition",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ni||(e.DefinitionRequest=ni={}));var Xn;(function(h){h.method="textDocument/references",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Xn||(e.ReferencesRequest=Xn={}));var Jn;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Jn||(e.DocumentHighlightRequest=Jn={}));var ai;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ai||(e.DocumentSymbolRequest=ai={}));var xs;(function(h){h.method="textDocument/codeAction",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(xs||(e.CodeActionRequest=xs={}));var ii;(function(h){h.method="codeAction/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ii||(e.CodeActionResolveRequest=ii={}));var si;(function(h){h.method="workspace/symbol",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(si||(e.WorkspaceSymbolRequest=si={}));var oi;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(oi||(e.WorkspaceSymbolResolveRequest=oi={}));var li;(function(h){h.method="textDocument/codeLens",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(li||(e.CodeLensRequest=li={}));var Rt;(function(h){h.method="codeLens/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Rt||(e.CodeLensResolveRequest=Rt={}));var ui;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType0(h.method)})(ui||(e.CodeLensRefreshRequest=ui={}));var ci;(function(h){h.method="textDocument/documentLink",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(ci||(e.DocumentLinkRequest=ci={}));var Cr;(function(h){h.method="documentLink/resolve",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Cr||(e.DocumentLinkResolveRequest=Cr={}));var fi;(function(h){h.method="textDocument/formatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(fi||(e.DocumentFormattingRequest=fi={}));var zr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(zr||(e.DocumentRangeFormattingRequest=zr={}));var di;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(di||(e.DocumentRangesFormattingRequest=di={}));var Gt;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(Gt||(e.DocumentOnTypeFormattingRequest=Gt={}));var tr;(function(h){h.Identifier=1})(tr||(e.PrepareSupportDefaultBehavior=tr={}));var pi;(function(h){h.method="textDocument/rename",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(pi||(e.RenameRequest=pi={}));var hi;(function(h){h.method="textDocument/prepareRename",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(hi||(e.PrepareRenameRequest=hi={}));var rr;(function(h){h.method="workspace/executeCommand",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(rr||(e.ExecuteCommandRequest=rr={}));var Zn;(function(h){h.method="workspace/applyEdit",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType("workspace/applyEdit")})(Zn||(e.ApplyWorkspaceEditRequest=Zn={}))}}),tw=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=Ga();function r(n,a,s,l){return t.ConnectionStrategy.is(l)&&(l={connectionStrategy:l}),(0,t.createMessageConnection)(n,a,s,l)}i(r,"createProtocolConnection"),o(r,"createProtocolConnection"),e.createProtocolConnection=r}}),rw=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(s,l,u,c){c===void 0&&(c=u);var f=Object.getOwnPropertyDescriptor(l,u);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:o(function(){return l[u]},"get")}),Object.defineProperty(s,c,f)}):(function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]})),r=e&&e.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(Ga(),e),r((ys(),qf(gl)),e),r(Ce(),e),r(ew(),e);var n=tw();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:o(function(){return n.createProtocolConnection},"get")});var a;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(a||(e.LSPErrorCodes=a={}))}}),nw=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(s,l,u,c){c===void 0&&(c=u);var f=Object.getOwnPropertyDescriptor(l,u);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:o(function(){return l[u]},"get")}),Object.defineProperty(s,c,f)}):(function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]})),r=e&&e.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&t(l,s,u)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=kh();r(kh(),e),r(rw(),e);function a(s,l,u,c){return(0,n.createMessageConnection)(s,l,u,c)}i(a,"createProtocolConnection"),o(a,"createProtocolConnection"),e.createProtocolConnection=a}}),Cg={};xr(Cg,{AbstractAstReflection:i(()=>Yf,"AbstractAstReflection"),AbstractCstNode:i(()=>Jp,"AbstractCstNode"),AbstractLangiumParser:i(()=>Qp,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:i(()=>hb,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:i(()=>P1,"AbstractThreadedAsyncParser"),AstUtils:i(()=>Xf,"AstUtils"),BiMap:i(()=>cl,"BiMap"),Cancellation:i(()=>pe,"Cancellation"),CompositeCstNodeImpl:i(()=>pu,"CompositeCstNodeImpl"),ContextCache:i(()=>Ru,"ContextCache"),CstNodeBuilder:i(()=>cb,"CstNodeBuilder"),CstUtils:i(()=>Vf,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:i(()=>yh,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:i(()=>Ye,"DONE_RESULT"),DatatypeSymbol:i(()=>sl,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:i(()=>Kb,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:i(()=>Wb,"DefaultAstNodeLocator"),DefaultAsyncParser:i(()=>cS,"DefaultAsyncParser"),DefaultCommentProvider:i(()=>uS,"DefaultCommentProvider"),DefaultConfigurationProvider:i(()=>Vb,"DefaultConfigurationProvider"),DefaultDocumentBuilder:i(()=>Hb,"DefaultDocumentBuilder"),DefaultDocumentValidator:i(()=>Bb,"DefaultDocumentValidator"),DefaultHydrator:i(()=>dS,"DefaultHydrator"),DefaultIndexManager:i(()=>Yb,"DefaultIndexManager"),DefaultJsonSerializer:i(()=>Gb,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:i(()=>Nb,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:i(()=>kb,"DefaultLangiumDocuments"),DefaultLangiumProfiler:i(()=>x1,"DefaultLangiumProfiler"),DefaultLexer:i(()=>vh,"DefaultLexer"),DefaultLexerErrorMessageProvider:i(()=>Jb,"DefaultLexerErrorMessageProvider"),DefaultLinker:i(()=>Pb,"DefaultLinker"),DefaultNameProvider:i(()=>Ob,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:i(()=>qb,"DefaultReferenceDescriptionProvider"),DefaultReferences:i(()=>Lb,"DefaultReferences"),DefaultScopeComputation:i(()=>Db,"DefaultScopeComputation"),DefaultScopeProvider:i(()=>Fb,"DefaultScopeProvider"),DefaultServiceRegistry:i(()=>jb,"DefaultServiceRegistry"),DefaultTokenBuilder:i(()=>gu,"DefaultTokenBuilder"),DefaultValueConverter:i(()=>sh,"DefaultValueConverter"),DefaultWorkspaceLock:i(()=>fS,"DefaultWorkspaceLock"),DefaultWorkspaceManager:i(()=>Xb,"DefaultWorkspaceManager"),Deferred:i(()=>Tr,"Deferred"),Disposable:i(()=>Tn,"Disposable"),DisposableCache:i(()=>Tu,"DisposableCache"),DocumentCache:i(()=>xb,"DocumentCache"),DocumentState:i(()=>Z,"DocumentState"),DocumentValidator:i(()=>$t,"DocumentValidator"),EMPTY_SCOPE:i(()=>w1,"EMPTY_SCOPE"),EMPTY_STREAM:i(()=>ba,"EMPTY_STREAM"),EmptyFileSystem:i(()=>gS,"EmptyFileSystem"),EmptyFileSystemProvider:i(()=>mS,"EmptyFileSystemProvider"),ErrorWithLocation:i(()=>bl,"ErrorWithLocation"),GrammarAST:i(()=>wg,"GrammarAST"),GrammarUtils:i(()=>bd,"GrammarUtils"),IndentationAwareLexer:i(()=>L1,"IndentationAwareLexer"),IndentationAwareTokenBuilder:i(()=>hS,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:i(()=>lS,"JSDocDocumentationProvider"),LangiumCompletionParser:i(()=>mb,"LangiumCompletionParser"),LangiumParser:i(()=>pb,"LangiumParser"),LangiumParserErrorMessageProvider:i(()=>eh,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:i(()=>il,"LeafCstNodeImpl"),LexingMode:i(()=>yn,"LexingMode"),MapScope:i(()=>S1,"MapScope"),Module:i(()=>Nf,"Module"),MultiMap:i(()=>Rr,"MultiMap"),MultiMapScope:i(()=>Mb,"MultiMapScope"),OperationCancelled:i(()=>Vt,"OperationCancelled"),ParserWorker:i(()=>O1,"ParserWorker"),ProfilingTask:i(()=>vS,"ProfilingTask"),Reduction:i(()=>es,"Reduction"),RefResolving:i(()=>Zr,"RefResolving"),RegExpUtils:i(()=>wd,"RegExpUtils"),RootCstNodeImpl:i(()=>Zp,"RootCstNodeImpl"),SimpleCache:i(()=>dh,"SimpleCache"),StreamImpl:i(()=>Wt,"StreamImpl"),StreamScope:i(()=>bf,"StreamScope"),TextDocument:i(()=>ll,"TextDocument"),TreeStreamImpl:i(()=>Sa,"TreeStreamImpl"),URI:i(()=>dt,"URI"),UriTrie:i(()=>ch,"UriTrie"),UriUtils:i(()=>Je,"UriUtils"),VALIDATE_EACH_NODE:i(()=>zb,"VALIDATE_EACH_NODE"),ValidationCategory:i(()=>fl,"ValidationCategory"),ValidationRegistry:i(()=>Ub,"ValidationRegistry"),ValueConverter:i(()=>Kt,"ValueConverter"),WorkspaceCache:i(()=>ph,"WorkspaceCache"),assertCondition:i(()=>Sd,"assertCondition"),assertUnreachable:i(()=>Fr,"assertUnreachable"),createCompletionParser:i(()=>nh,"createCompletionParser"),createDefaultCoreModule:i(()=>Ch,"createDefaultCoreModule"),createDefaultSharedCoreModule:i(()=>bh,"createDefaultSharedCoreModule"),createGrammarConfig:i(()=>Wd,"createGrammarConfig"),createLangiumParser:i(()=>ah,"createLangiumParser"),createParser:i(()=>hu,"createParser"),delayNextTick:i(()=>yu,"delayNextTick"),diagnosticData:i(()=>gn,"diagnosticData"),eagerLoad:i(()=>Sh,"eagerLoad"),getDiagnosticRange:i(()=>mh,"getDiagnosticRange"),indentationBuilderDefaultOptions:i(()=>Pf,"indentationBuilderDefaultOptions"),inject:i(()=>hl,"inject"),interruptAndCheck:i(()=>je,"interruptAndCheck"),isAstNode:i(()=>Pe,"isAstNode"),isAstNodeDescription:i(()=>Hf,"isAstNodeDescription"),isAstNodeWithComment:i(()=>hh,"isAstNodeWithComment"),isCompositeCstNode:i(()=>fr,"isCompositeCstNode"),isIMultiModeLexerDefinition:i(()=>Eu,"isIMultiModeLexerDefinition"),isJSDoc:i(()=>Rh,"isJSDoc"),isLeafCstNode:i(()=>Cn,"isLeafCstNode"),isLinkingError:i(()=>tn,"isLinkingError"),isMultiReference:i(()=>Ht,"isMultiReference"),isNamed:i(()=>fh,"isNamed"),isOperationCancelled:i(()=>Kn,"isOperationCancelled"),isReference:i(()=>Xe,"isReference"),isRootCstNode:i(()=>vl,"isRootCstNode"),isTokenTypeArray:i(()=>Au,"isTokenTypeArray"),isTokenTypeDictionary:i(()=>dl,"isTokenTypeDictionary"),loadGrammarFromJson:i(()=>vt,"loadGrammarFromJson"),parseJSDoc:i(()=>Th,"parseJSDoc"),prepareLangiumParser:i(()=>ih,"prepareLangiumParser"),setInterruptionPeriod:i(()=>oh,"setInterruptionPeriod"),startCancelableOperation:i(()=>vu,"startCancelableOperation"),stream:i(()=>oe,"stream"),toDiagnosticData:i(()=>gh,"toDiagnosticData"),toDiagnosticSeverity:i(()=>Zi,"toDiagnosticSeverity")});var Vf={};xr(Vf,{DefaultNameRegexp:i(()=>$d,"DefaultNameRegexp"),RangeComparison:i(()=>qt,"RangeComparison"),compareRange:i(()=>Td,"compareRange"),findCommentNode:i(()=>Ad,"findCommentNode"),findDeclarationNodeAtOffset:i(()=>Vg,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:i(()=>Cl,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:i(()=>Ed,"findLeafNodeBeforeOffset"),flattenCst:i(()=>Wg,"flattenCst"),getDatatypeNode:i(()=>qg,"getDatatypeNode"),getInteriorNodes:i(()=>Xg,"getInteriorNodes"),getNextNode:i(()=>Hg,"getNextNode"),getPreviousNode:i(()=>Cd,"getPreviousNode"),getStartlineNode:i(()=>Yg,"getStartlineNode"),inRange:i(()=>Rd,"inRange"),isChildNode:i(()=>vd,"isChildNode"),isCommentNode:i(()=>Bo,"isCommentNode"),streamCst:i(()=>ka,"streamCst"),toDocumentSegment:i(()=>Pa,"toDocumentSegment"),tokenToRange:i(()=>ts,"tokenToRange")});function Pe(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}i(Pe,"isAstNode");o(Pe,"isAstNode");function Xe(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}i(Xe,"isReference");o(Xe,"isReference");function Ht(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}i(Ht,"isMultiReference");o(Ht,"isMultiReference");function Hf(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}i(Hf,"isAstNodeDescription");o(Hf,"isAstNodeDescription");function tn(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}i(tn,"isLinkingError");o(tn,"isLinkingError");var Yf=class{static{i(this,"AbstractAstReflection")}static{o(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);let r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){let t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Pe(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});let n=r[t];if(n!==void 0)return n;{let a=this.types[e],s=a?a.superTypes.some(l=>this.isSubtype(l,t)):!1;return r[t]=s,s}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let r=this.getAllTypes(),n=[];for(let a of r)this.isSubtype(a,e)&&n.push(a);return this.allSubtypes[e]=n,n}}};function fr(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}i(fr,"isCompositeCstNode");o(fr,"isCompositeCstNode");function Cn(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}i(Cn,"isLeafCstNode");o(Cn,"isLeafCstNode");function vl(e){return fr(e)&&typeof e.fullText=="string"}i(vl,"isRootCstNode");o(vl,"isRootCstNode");var Wt=class ir{static{i(this,"_StreamImpl")}static{o(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:o(()=>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(a=>[t?t(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(t){return new ir(()=>({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 Ye})}join(t=","){let r=this.iterator(),n="",a,s=!1;do a=r.next(),a.done||(s&&(n+=t),n+=bg(a.value)),s=!0;while(!a.done);return n}indexOf(t,r=0){let n=this.iterator(),a=0,s=n.next();for(;!s.done;){if(a>=r&&s.value===t)return a;s=n.next(),a++}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,a=r.next();for(;!a.done;)t(a.value,n),a=r.next(),n++}map(t){return new ir(this.startFn,r=>{let{done:n,value:a}=this.nextFn(r);return n?Ye:{done:!1,value:t(a)}})}filter(t){return new ir(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return Ye})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let n=this.iterator(),a=r,s=n.next();for(;!s.done;)a===void 0?a=s.value:a=t(a,s.value),s=n.next();return a}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let a=t.next();if(a.done)return n;let s=this.recursiveReduce(t,r,n);return s===void 0?a.value:r(s,a.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,a=r.next();for(;!a.done;){if(t(a.value))return n;a=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 ir(()=>({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:a}=this.nextFn(r.this);if(!n){let s=t(a);if(Qi(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return Ye})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new ir(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let l=n.iterator.next();if(l.done)n.iterator=void 0;else return l}let{done:a,value:s}=r.nextFn(n.this);if(!a)if(Qi(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return Ye})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new ir(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?Ye:this.nextFn(r.state)))}distinct(t){return new ir(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let a=t?t(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return Ye})}exclude(t,r){let n=new Set;for(let a of t){let s=r?r(a):a;n.add(s)}return this.filter(a=>{let s=r?r(a):a;return!n.has(s)})}};function bg(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}i(bg,"toString");o(bg,"toString");function Qi(e){return!!e&&typeof e[Symbol.iterator]=="function"}i(Qi,"isIterable");o(Qi,"isIterable");var ba=new Wt(()=>{},()=>Ye),Ye=Object.freeze({done:!0,value:void 0});function oe(...e){if(e.length===1){let t=e[0];if(t instanceof Wt)return t;if(Qi(t))return new Wt(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new Wt(()=>({index:0}),r=>r.index1?new Wt(()=>({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({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),n=>{for(n.pruned&&(n.iterators.pop(),n.pruned=!1);n.iterators.length>0;){let s=n.iterators[n.iterators.length-1].next();if(s.done)n.iterators.pop();else return n.iterators.push(t(s.value)[Symbol.iterator]()),s}return Ye})}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),"next"),prune:o(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},es;(function(e){function t(s){return s.reduce((l,u)=>l+u,0)}i(t,"sum"),o(t,"sum"),e.sum=t;function r(s){return s.reduce((l,u)=>l*u,0)}i(r,"product"),o(r,"product"),e.product=r;function n(s){return s.reduce((l,u)=>Math.min(l,u))}i(n,"min2"),o(n,"min"),e.min=n;function a(s){return s.reduce((l,u)=>Math.max(l,u))}i(a,"max"),o(a,"max"),e.max=a})(es||(es={}));var Xf={};xr(Xf,{assignMandatoryProperties:i(()=>Jf,"assignMandatoryProperties"),copyAstNode:i(()=>Io,"copyAstNode"),findRootNode:i(()=>Aa,"findRootNode"),getContainerOfType:i(()=>bn,"getContainerOfType"),getDocument:i(()=>kt,"getDocument"),getReferenceNodes:i(()=>So,"getReferenceNodes"),hasContainerOfType:i(()=>Sg,"hasContainerOfType"),linkContentToContainer:i(()=>wa,"linkContentToContainer"),streamAllContents:i(()=>$r,"streamAllContents"),streamAst:i(()=>Pt,"streamAst"),streamContents:i(()=>Ts,"streamContents"),streamReferences:i(()=>Ia,"streamReferences")});function wa(e,t={}){for(let[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,s)=>{Pe(a)&&(a.$container=e,a.$containerProperty=r,a.$containerIndex=s,t.deep&&wa(a,t))}):Pe(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&wa(n,t)))}i(wa,"linkContentToContainer");o(wa,"linkContentToContainer");function bn(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}i(bn,"getContainerOfType");o(bn,"getContainerOfType");function Sg(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}i(Sg,"hasContainerOfType");o(Sg,"hasContainerOfType");function kt(e){let r=Aa(e).$document;if(!r)throw new Error("AST node has no document.");return r}i(kt,"getDocument");o(kt,"getDocument");function Aa(e){for(;e.$container;)e=e.$container;return e}i(Aa,"findRootNode");o(Aa,"findRootNode");function So(e){return Xe(e)?e.ref?[e.ref]:[]:Ht(e)?e.items.map(t=>t.ref):[]}i(So,"getReferenceNodes");o(So,"getReferenceNodes");function Ts(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new Wt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexTs(r,t))}i($r,"streamAllContents");o($r,"streamAllContents");function Pt(e,t){if(e){if(t?.range&&!wo(e,t.range))return new Sa(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new Sa(e,r=>Ts(r,t),{includeRoot:!0})}i(Pt,"streamAst");o(Pt,"streamAst");function wo(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?Rd(r,t):!1}i(wo,"isAstNodeInRange");o(wo,"isAstNodeInRange");function Ia(e){return new Wt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexit,"AbstractElement"),AbstractParserRule:i(()=>Fi,"AbstractParserRule"),AbstractRule:i(()=>ha,"AbstractRule"),AbstractType:i(()=>ft,"AbstractType"),Action:i(()=>Sr,"Action"),Alternatives:i(()=>Gi,"Alternatives"),ArrayLiteral:i(()=>No,"ArrayLiteral"),ArrayType:i(()=>ko,"ArrayType"),Assignment:i(()=>wr,"Assignment"),BooleanLiteral:i(()=>Po,"BooleanLiteral"),CharacterRange:i(()=>Ir,"CharacterRange"),Condition:i(()=>Nr,"Condition"),Conjunction:i(()=>ji,"Conjunction"),CrossReference:i(()=>kr,"CrossReference"),Disjunction:i(()=>Ui,"Disjunction"),EndOfFile:i(()=>Oo,"EndOfFile"),Grammar:i(()=>lr,"Grammar"),GrammarImport:i(()=>Lo,"GrammarImport"),Group:i(()=>rn,"Group"),InferredType:i(()=>Do,"InferredType"),InfixRule:i(()=>Bt,"InfixRule"),InfixRuleOperatorList:i(()=>zi,"InfixRuleOperatorList"),InfixRuleOperators:i(()=>Mo,"InfixRuleOperators"),Interface:i(()=>ma,"Interface"),Keyword:i(()=>ga,"Keyword"),LangiumGrammarAstReflection:i(()=>yd,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:i(()=>aw,"LangiumGrammarTerminals"),NamedArgument:i(()=>ya,"NamedArgument"),NegatedToken:i(()=>nn,"NegatedToken"),Negation:i(()=>xo,"Negation"),NumberLiteral:i(()=>Fo,"NumberLiteral"),Parameter:i(()=>va,"Parameter"),ParameterReference:i(()=>Go,"ParameterReference"),ParserRule:i(()=>wt,"ParserRule"),ReferenceType:i(()=>Bi,"ReferenceType"),RegexToken:i(()=>an,"RegexToken"),ReturnType:i(()=>jo,"ReturnType"),RuleCall:i(()=>sn,"RuleCall"),SimpleType:i(()=>Ta,"SimpleType"),StringLiteral:i(()=>Uo,"StringLiteral"),TerminalAlternatives:i(()=>on,"TerminalAlternatives"),TerminalElement:i(()=>st,"TerminalElement"),TerminalGroup:i(()=>ln,"TerminalGroup"),TerminalRule:i(()=>ur,"TerminalRule"),TerminalRuleCall:i(()=>un,"TerminalRuleCall"),Type:i(()=>Ki,"Type"),TypeAttribute:i(()=>cn,"TypeAttribute"),TypeDefinition:i(()=>fn,"TypeDefinition"),UnionType:i(()=>zo,"UnionType"),UnorderedGroup:i(()=>qi,"UnorderedGroup"),UntilToken:i(()=>dn,"UntilToken"),ValueLiteral:i(()=>pn,"ValueLiteral"),Wildcard:i(()=>Ra,"Wildcard"),isAbstractElement:i(()=>Tl,"isAbstractElement"),isAbstractParserRule:i(()=>Sn,"isAbstractParserRule"),isAbstractRule:i(()=>Ig,"isAbstractRule"),isAbstractType:i(()=>Ng,"isAbstractType"),isAction:i(()=>Pr,"isAction"),isAlternatives:i(()=>Rl,"isAlternatives"),isArrayLiteral:i(()=>kg,"isArrayLiteral"),isArrayType:i(()=>Qf,"isArrayType"),isAssignment:i(()=>dr,"isAssignment"),isBooleanLiteral:i(()=>ed,"isBooleanLiteral"),isCharacterRange:i(()=>td,"isCharacterRange"),isCondition:i(()=>Pg,"isCondition"),isConjunction:i(()=>rd,"isConjunction"),isCrossReference:i(()=>wn,"isCrossReference"),isDisjunction:i(()=>nd,"isDisjunction"),isEndOfFile:i(()=>ad,"isEndOfFile"),isGrammar:i(()=>Og,"isGrammar"),isGrammarImport:i(()=>Lg,"isGrammarImport"),isGroup:i(()=>In,"isGroup"),isInferredType:i(()=>Rs,"isInferredType"),isInfixRule:i(()=>Na,"isInfixRule"),isInfixRuleOperatorList:i(()=>Dg,"isInfixRuleOperatorList"),isInfixRuleOperators:i(()=>Mg,"isInfixRuleOperators"),isInterface:i(()=>id,"isInterface"),isKeyword:i(()=>pr,"isKeyword"),isNamedArgument:i(()=>xg,"isNamedArgument"),isNegatedToken:i(()=>sd,"isNegatedToken"),isNegation:i(()=>od,"isNegation"),isNumberLiteral:i(()=>Fg,"isNumberLiteral"),isParameter:i(()=>Gg,"isParameter"),isParameterReference:i(()=>ld,"isParameterReference"),isParserRule:i(()=>Qe,"isParserRule"),isReferenceType:i(()=>ud,"isReferenceType"),isRegexToken:i(()=>cd,"isRegexToken"),isReturnType:i(()=>fd,"isReturnType"),isRuleCall:i(()=>hr,"isRuleCall"),isSimpleType:i(()=>$l,"isSimpleType"),isStringLiteral:i(()=>jg,"isStringLiteral"),isTerminalAlternatives:i(()=>dd,"isTerminalAlternatives"),isTerminalElement:i(()=>Ug,"isTerminalElement"),isTerminalGroup:i(()=>pd,"isTerminalGroup"),isTerminalRule:i(()=>Ct,"isTerminalRule"),isTerminalRuleCall:i(()=>Al,"isTerminalRuleCall"),isType:i(()=>El,"isType"),isTypeAttribute:i(()=>zg,"isTypeAttribute"),isTypeDefinition:i(()=>Bg,"isTypeDefinition"),isUnionType:i(()=>hd,"isUnionType"),isUnorderedGroup:i(()=>_l,"isUnorderedGroup"),isUntilToken:i(()=>md,"isUntilToken"),isValueLiteral:i(()=>Kg,"isValueLiteral"),isWildcard:i(()=>gd,"isWildcard"),reflection:i(()=>z,"reflection")});var aw={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]*/},it={$type:"AbstractElement",cardinality:"cardinality"};function Tl(e){return z.isInstance(e,it.$type)}i(Tl,"isAbstractElement");o(Tl,"isAbstractElement");var Fi={$type:"AbstractParserRule"};function Sn(e){return z.isInstance(e,Fi.$type)}i(Sn,"isAbstractParserRule");o(Sn,"isAbstractParserRule");var ha={$type:"AbstractRule"};function Ig(e){return z.isInstance(e,ha.$type)}i(Ig,"isAbstractRule");o(Ig,"isAbstractRule");var ft={$type:"AbstractType"};function Ng(e){return z.isInstance(e,ft.$type)}i(Ng,"isAbstractType");o(Ng,"isAbstractType");var Sr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Pr(e){return z.isInstance(e,Sr.$type)}i(Pr,"isAction");o(Pr,"isAction");var Gi={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Rl(e){return z.isInstance(e,Gi.$type)}i(Rl,"isAlternatives");o(Rl,"isAlternatives");var No={$type:"ArrayLiteral",elements:"elements"};function kg(e){return z.isInstance(e,No.$type)}i(kg,"isArrayLiteral");o(kg,"isArrayLiteral");var ko={$type:"ArrayType",elementType:"elementType"};function Qf(e){return z.isInstance(e,ko.$type)}i(Qf,"isArrayType");o(Qf,"isArrayType");var wr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function dr(e){return z.isInstance(e,wr.$type)}i(dr,"isAssignment");o(dr,"isAssignment");var Po={$type:"BooleanLiteral",true:"true"};function ed(e){return z.isInstance(e,Po.$type)}i(ed,"isBooleanLiteral");o(ed,"isBooleanLiteral");var Ir={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function td(e){return z.isInstance(e,Ir.$type)}i(td,"isCharacterRange");o(td,"isCharacterRange");var Nr={$type:"Condition"};function Pg(e){return z.isInstance(e,Nr.$type)}i(Pg,"isCondition");o(Pg,"isCondition");var ji={$type:"Conjunction",left:"left",right:"right"};function rd(e){return z.isInstance(e,ji.$type)}i(rd,"isConjunction");o(rd,"isConjunction");var kr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function wn(e){return z.isInstance(e,kr.$type)}i(wn,"isCrossReference");o(wn,"isCrossReference");var Ui={$type:"Disjunction",left:"left",right:"right"};function nd(e){return z.isInstance(e,Ui.$type)}i(nd,"isDisjunction");o(nd,"isDisjunction");var Oo={$type:"EndOfFile",cardinality:"cardinality"};function ad(e){return z.isInstance(e,Oo.$type)}i(ad,"isEndOfFile");o(ad,"isEndOfFile");var lr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function Og(e){return z.isInstance(e,lr.$type)}i(Og,"isGrammar");o(Og,"isGrammar");var Lo={$type:"GrammarImport",path:"path"};function Lg(e){return z.isInstance(e,Lo.$type)}i(Lg,"isGrammarImport");o(Lg,"isGrammarImport");var rn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function In(e){return z.isInstance(e,rn.$type)}i(In,"isGroup");o(In,"isGroup");var Do={$type:"InferredType",name:"name"};function Rs(e){return z.isInstance(e,Do.$type)}i(Rs,"isInferredType");o(Rs,"isInferredType");var Bt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Na(e){return z.isInstance(e,Bt.$type)}i(Na,"isInfixRule");o(Na,"isInfixRule");var zi={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function Dg(e){return z.isInstance(e,zi.$type)}i(Dg,"isInfixRuleOperatorList");o(Dg,"isInfixRuleOperatorList");var Mo={$type:"InfixRuleOperators",precedences:"precedences"};function Mg(e){return z.isInstance(e,Mo.$type)}i(Mg,"isInfixRuleOperators");o(Mg,"isInfixRuleOperators");var ma={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function id(e){return z.isInstance(e,ma.$type)}i(id,"isInterface");o(id,"isInterface");var ga={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function pr(e){return z.isInstance(e,ga.$type)}i(pr,"isKeyword");o(pr,"isKeyword");var ya={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function xg(e){return z.isInstance(e,ya.$type)}i(xg,"isNamedArgument");o(xg,"isNamedArgument");var nn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function sd(e){return z.isInstance(e,nn.$type)}i(sd,"isNegatedToken");o(sd,"isNegatedToken");var xo={$type:"Negation",value:"value"};function od(e){return z.isInstance(e,xo.$type)}i(od,"isNegation");o(od,"isNegation");var Fo={$type:"NumberLiteral",value:"value"};function Fg(e){return z.isInstance(e,Fo.$type)}i(Fg,"isNumberLiteral");o(Fg,"isNumberLiteral");var va={$type:"Parameter",name:"name"};function Gg(e){return z.isInstance(e,va.$type)}i(Gg,"isParameter");o(Gg,"isParameter");var Go={$type:"ParameterReference",parameter:"parameter"};function ld(e){return z.isInstance(e,Go.$type)}i(ld,"isParameterReference");o(ld,"isParameterReference");var wt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Qe(e){return z.isInstance(e,wt.$type)}i(Qe,"isParserRule");o(Qe,"isParserRule");var Bi={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function ud(e){return z.isInstance(e,Bi.$type)}i(ud,"isReferenceType");o(ud,"isReferenceType");var an={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function cd(e){return z.isInstance(e,an.$type)}i(cd,"isRegexToken");o(cd,"isRegexToken");var jo={$type:"ReturnType",name:"name"};function fd(e){return z.isInstance(e,jo.$type)}i(fd,"isReturnType");o(fd,"isReturnType");var sn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function hr(e){return z.isInstance(e,sn.$type)}i(hr,"isRuleCall");o(hr,"isRuleCall");var Ta={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function $l(e){return z.isInstance(e,Ta.$type)}i($l,"isSimpleType");o($l,"isSimpleType");var Uo={$type:"StringLiteral",value:"value"};function jg(e){return z.isInstance(e,Uo.$type)}i(jg,"isStringLiteral");o(jg,"isStringLiteral");var on={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function dd(e){return z.isInstance(e,on.$type)}i(dd,"isTerminalAlternatives");o(dd,"isTerminalAlternatives");var st={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Ug(e){return z.isInstance(e,st.$type)}i(Ug,"isTerminalElement");o(Ug,"isTerminalElement");var ln={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function pd(e){return z.isInstance(e,ln.$type)}i(pd,"isTerminalGroup");o(pd,"isTerminalGroup");var ur={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Ct(e){return z.isInstance(e,ur.$type)}i(Ct,"isTerminalRule");o(Ct,"isTerminalRule");var un={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Al(e){return z.isInstance(e,un.$type)}i(Al,"isTerminalRuleCall");o(Al,"isTerminalRuleCall");var Ki={$type:"Type",name:"name",type:"type"};function El(e){return z.isInstance(e,Ki.$type)}i(El,"isType");o(El,"isType");var cn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function zg(e){return z.isInstance(e,cn.$type)}i(zg,"isTypeAttribute");o(zg,"isTypeAttribute");var fn={$type:"TypeDefinition"};function Bg(e){return z.isInstance(e,fn.$type)}i(Bg,"isTypeDefinition");o(Bg,"isTypeDefinition");var zo={$type:"UnionType",types:"types"};function hd(e){return z.isInstance(e,zo.$type)}i(hd,"isUnionType");o(hd,"isUnionType");var qi={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function _l(e){return z.isInstance(e,qi.$type)}i(_l,"isUnorderedGroup");o(_l,"isUnorderedGroup");var dn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function md(e){return z.isInstance(e,dn.$type)}i(md,"isUntilToken");o(md,"isUntilToken");var pn={$type:"ValueLiteral"};function Kg(e){return z.isInstance(e,pn.$type)}i(Kg,"isValueLiteral");o(Kg,"isValueLiteral");var Ra={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function gd(e){return z.isInstance(e,Ra.$type)}i(gd,"isWildcard");o(gd,"isWildcard");var yd=class extends Yf{static{i(this,"LangiumGrammarAstReflection")}static{o(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:it.$type,properties:{cardinality:{name:it.cardinality}},superTypes:[]},AbstractParserRule:{name:Fi.$type,properties:{},superTypes:[ha.$type,ft.$type]},AbstractRule:{name:ha.$type,properties:{},superTypes:[]},AbstractType:{name:ft.$type,properties:{},superTypes:[]},Action:{name:Sr.$type,properties:{cardinality:{name:Sr.cardinality},feature:{name:Sr.feature},inferredType:{name:Sr.inferredType},operator:{name:Sr.operator},type:{name:Sr.type,referenceType:ft.$type}},superTypes:[it.$type]},Alternatives:{name:Gi.$type,properties:{cardinality:{name:Gi.cardinality},elements:{name:Gi.elements,defaultValue:[]}},superTypes:[it.$type]},ArrayLiteral:{name:No.$type,properties:{elements:{name:No.elements,defaultValue:[]}},superTypes:[pn.$type]},ArrayType:{name:ko.$type,properties:{elementType:{name:ko.elementType}},superTypes:[fn.$type]},Assignment:{name:wr.$type,properties:{cardinality:{name:wr.cardinality},feature:{name:wr.feature},operator:{name:wr.operator},predicate:{name:wr.predicate},terminal:{name:wr.terminal}},superTypes:[it.$type]},BooleanLiteral:{name:Po.$type,properties:{true:{name:Po.true,defaultValue:!1}},superTypes:[Nr.$type,pn.$type]},CharacterRange:{name:Ir.$type,properties:{cardinality:{name:Ir.cardinality},left:{name:Ir.left},lookahead:{name:Ir.lookahead},parenthesized:{name:Ir.parenthesized,defaultValue:!1},right:{name:Ir.right}},superTypes:[st.$type]},Condition:{name:Nr.$type,properties:{},superTypes:[]},Conjunction:{name:ji.$type,properties:{left:{name:ji.left},right:{name:ji.right}},superTypes:[Nr.$type]},CrossReference:{name:kr.$type,properties:{cardinality:{name:kr.cardinality},deprecatedSyntax:{name:kr.deprecatedSyntax,defaultValue:!1},isMulti:{name:kr.isMulti,defaultValue:!1},terminal:{name:kr.terminal},type:{name:kr.type,referenceType:ft.$type}},superTypes:[it.$type]},Disjunction:{name:Ui.$type,properties:{left:{name:Ui.left},right:{name:Ui.right}},superTypes:[Nr.$type]},EndOfFile:{name:Oo.$type,properties:{cardinality:{name:Oo.cardinality}},superTypes:[it.$type]},Grammar:{name:lr.$type,properties:{imports:{name:lr.imports,defaultValue:[]},interfaces:{name:lr.interfaces,defaultValue:[]},isDeclared:{name:lr.isDeclared,defaultValue:!1},name:{name:lr.name},rules:{name:lr.rules,defaultValue:[]},types:{name:lr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Lo.$type,properties:{path:{name:Lo.path}},superTypes:[]},Group:{name:rn.$type,properties:{cardinality:{name:rn.cardinality},elements:{name:rn.elements,defaultValue:[]},guardCondition:{name:rn.guardCondition},predicate:{name:rn.predicate}},superTypes:[it.$type]},InferredType:{name:Do.$type,properties:{name:{name:Do.name}},superTypes:[ft.$type]},InfixRule:{name:Bt.$type,properties:{call:{name:Bt.call},dataType:{name:Bt.dataType},inferredType:{name:Bt.inferredType},name:{name:Bt.name},operators:{name:Bt.operators},parameters:{name:Bt.parameters,defaultValue:[]},returnType:{name:Bt.returnType,referenceType:ft.$type}},superTypes:[Fi.$type]},InfixRuleOperatorList:{name:zi.$type,properties:{associativity:{name:zi.associativity},operators:{name:zi.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Mo.$type,properties:{precedences:{name:Mo.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ma.$type,properties:{attributes:{name:ma.attributes,defaultValue:[]},name:{name:ma.name},superTypes:{name:ma.superTypes,defaultValue:[],referenceType:ft.$type}},superTypes:[ft.$type]},Keyword:{name:ga.$type,properties:{cardinality:{name:ga.cardinality},predicate:{name:ga.predicate},value:{name:ga.value}},superTypes:[it.$type]},NamedArgument:{name:ya.$type,properties:{calledByName:{name:ya.calledByName,defaultValue:!1},parameter:{name:ya.parameter,referenceType:va.$type},value:{name:ya.value}},superTypes:[]},NegatedToken:{name:nn.$type,properties:{cardinality:{name:nn.cardinality},lookahead:{name:nn.lookahead},parenthesized:{name:nn.parenthesized,defaultValue:!1},terminal:{name:nn.terminal}},superTypes:[st.$type]},Negation:{name:xo.$type,properties:{value:{name:xo.value}},superTypes:[Nr.$type]},NumberLiteral:{name:Fo.$type,properties:{value:{name:Fo.value}},superTypes:[pn.$type]},Parameter:{name:va.$type,properties:{name:{name:va.name}},superTypes:[]},ParameterReference:{name:Go.$type,properties:{parameter:{name:Go.parameter,referenceType:va.$type}},superTypes:[Nr.$type]},ParserRule:{name:wt.$type,properties:{dataType:{name:wt.dataType},definition:{name:wt.definition},entry:{name:wt.entry,defaultValue:!1},fragment:{name:wt.fragment,defaultValue:!1},inferredType:{name:wt.inferredType},name:{name:wt.name},parameters:{name:wt.parameters,defaultValue:[]},returnType:{name:wt.returnType,referenceType:ft.$type}},superTypes:[Fi.$type]},ReferenceType:{name:Bi.$type,properties:{isMulti:{name:Bi.isMulti,defaultValue:!1},referenceType:{name:Bi.referenceType}},superTypes:[fn.$type]},RegexToken:{name:an.$type,properties:{cardinality:{name:an.cardinality},lookahead:{name:an.lookahead},parenthesized:{name:an.parenthesized,defaultValue:!1},regex:{name:an.regex}},superTypes:[st.$type]},ReturnType:{name:jo.$type,properties:{name:{name:jo.name}},superTypes:[]},RuleCall:{name:sn.$type,properties:{arguments:{name:sn.arguments,defaultValue:[]},cardinality:{name:sn.cardinality},predicate:{name:sn.predicate},rule:{name:sn.rule,referenceType:ha.$type}},superTypes:[it.$type]},SimpleType:{name:Ta.$type,properties:{primitiveType:{name:Ta.primitiveType},stringType:{name:Ta.stringType},typeRef:{name:Ta.typeRef,referenceType:ft.$type}},superTypes:[fn.$type]},StringLiteral:{name:Uo.$type,properties:{value:{name:Uo.value}},superTypes:[pn.$type]},TerminalAlternatives:{name:on.$type,properties:{cardinality:{name:on.cardinality},elements:{name:on.elements,defaultValue:[]},lookahead:{name:on.lookahead},parenthesized:{name:on.parenthesized,defaultValue:!1}},superTypes:[st.$type]},TerminalElement:{name:st.$type,properties:{cardinality:{name:st.cardinality},lookahead:{name:st.lookahead},parenthesized:{name:st.parenthesized,defaultValue:!1}},superTypes:[it.$type]},TerminalGroup:{name:ln.$type,properties:{cardinality:{name:ln.cardinality},elements:{name:ln.elements,defaultValue:[]},lookahead:{name:ln.lookahead},parenthesized:{name:ln.parenthesized,defaultValue:!1}},superTypes:[st.$type]},TerminalRule:{name:ur.$type,properties:{definition:{name:ur.definition},fragment:{name:ur.fragment,defaultValue:!1},hidden:{name:ur.hidden,defaultValue:!1},name:{name:ur.name},type:{name:ur.type}},superTypes:[ha.$type]},TerminalRuleCall:{name:un.$type,properties:{cardinality:{name:un.cardinality},lookahead:{name:un.lookahead},parenthesized:{name:un.parenthesized,defaultValue:!1},rule:{name:un.rule,referenceType:ur.$type}},superTypes:[st.$type]},Type:{name:Ki.$type,properties:{name:{name:Ki.name},type:{name:Ki.type}},superTypes:[ft.$type]},TypeAttribute:{name:cn.$type,properties:{defaultValue:{name:cn.defaultValue},isOptional:{name:cn.isOptional,defaultValue:!1},name:{name:cn.name},type:{name:cn.type}},superTypes:[]},TypeDefinition:{name:fn.$type,properties:{},superTypes:[]},UnionType:{name:zo.$type,properties:{types:{name:zo.types,defaultValue:[]}},superTypes:[fn.$type]},UnorderedGroup:{name:qi.$type,properties:{cardinality:{name:qi.cardinality},elements:{name:qi.elements,defaultValue:[]}},superTypes:[it.$type]},UntilToken:{name:dn.$type,properties:{cardinality:{name:dn.cardinality},lookahead:{name:dn.lookahead},parenthesized:{name:dn.parenthesized,defaultValue:!1},terminal:{name:dn.terminal}},superTypes:[st.$type]},ValueLiteral:{name:pn.$type,properties:{},superTypes:[]},Wildcard:{name:Ra.$type,properties:{cardinality:{name:Ra.cardinality},lookahead:{name:Ra.lookahead},parenthesized:{name:Ra.parenthesized,defaultValue:!1}},superTypes:[st.$type]}}}},z=new yd;function qg(e){let t=e,r=!1;for(;t;){let n=bn(t.grammarSource,Qe);if(n&&n.dataType)t=t.container,r=!0;else return r?t:void 0}}i(qg,"getDatatypeNode");o(qg,"getDatatypeNode");function ka(e){return new Sa(e,t=>fr(t)?t.content:[],{includeRoot:!0})}i(ka,"streamCst");o(ka,"streamCst");function Wg(e){return ka(e).filter(Cn)}i(Wg,"flattenCst");o(Wg,"flattenCst");function vd(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}i(vd,"isChildNode");o(vd,"isChildNode");function ts(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}i(ts,"tokenToRange");o(ts,"tokenToRange");function Pa(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}i(Pa,"toDocumentSegment");o(Pa,"toDocumentSegment");var qt;(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"})(qt||(qt={}));function Td(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return qt.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.lineqt.After}i(Rd,"inRange");o(Rd,"inRange");var $d=/^[\w\p{L}]$/u;function Vg(e,t,r=$d){if(e){if(t>0){let n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return Cl(e,t)}}i(Vg,"findDeclarationNodeAtOffset");o(Vg,"findDeclarationNodeAtOffset");function Ad(e,t){if(e){let r=Cd(e,!0);if(r&&Bo(r,t))return r;if(vl(e)){let n=e.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){let s=e.content[a];if(Bo(s,t))return s}}}}i(Ad,"findCommentNode");o(Ad,"findCommentNode");function Bo(e,t){return Cn(e)&&t.includes(e.tokenType.name)}i(Bo,"isCommentNode");o(Bo,"isCommentNode");function Cl(e,t){if(Cn(e))return e;if(fr(e)){let r=_d(e,t,!1);if(r)return Cl(r,t)}}i(Cl,"findLeafNodeAtOffset");o(Cl,"findLeafNodeAtOffset");function Ed(e,t){if(Cn(e))return e;if(fr(e)){let r=_d(e,t,!0);if(r)return Ed(r,t)}}i(Ed,"findLeafNodeBeforeOffset");o(Ed,"findLeafNodeBeforeOffset");function _d(e,t,r){let n=0,a=e.content.length-1,s;for(;n<=a;){let l=Math.floor((n+a)/2),u=e.content[l];if(u.offset<=t&&u.end>t)return u;u.end<=t?(s=r?u:void 0,n=l+1):a=l-1}return s}i(_d,"binarySearch");o(_d,"binarySearch");function Cd(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e);for(;n>0;){n--;let a=r.content[n];if(t||!a.hidden)return a}e=r}}i(Cd,"getPreviousNode");o(Cd,"getPreviousNode");function Hg(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e),a=r.content.length-1;for(;nGd,"findAssignment"),findNameAssignment:i(()=>Ol,"findNameAssignment"),findNodeForKeyword:i(()=>Fd,"findNodeForKeyword"),findNodeForProperty:i(()=>Nl,"findNodeForProperty"),findNodesForKeyword:i(()=>ay,"findNodesForKeyword"),findNodesForKeywordInternal:i(()=>Pl,"findNodesForKeywordInternal"),findNodesForProperty:i(()=>xd,"findNodesForProperty"),getActionAtElement:i(()=>Ud,"getActionAtElement"),getActionType:i(()=>Bd,"getActionType"),getAllReachableRules:i(()=>Il,"getAllReachableRules"),getAllRulesUsedForCrossReferences:i(()=>ny,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:i(()=>Dd,"getCrossReferenceTerminal"),getEntryRule:i(()=>Pd,"getEntryRule"),getExplicitRuleType:i(()=>As,"getExplicitRuleType"),getHiddenRules:i(()=>Od,"getHiddenRules"),getRuleType:i(()=>Kd,"getRuleType"),getRuleTypeName:i(()=>uy,"getRuleTypeName"),getTypeName:i(()=>Rn,"getTypeName"),isArrayCardinality:i(()=>sy,"isArrayCardinality"),isArrayOperator:i(()=>oy,"isArrayOperator"),isCommentTerminal:i(()=>Md,"isCommentTerminal"),isDataType:i(()=>ly,"isDataType"),isDataTypeRule:i(()=>$s,"isDataTypeRule"),isOptionalCardinality:i(()=>iy,"isOptionalCardinality"),terminalRegex:i(()=>Es,"terminalRegex")});var bl=class extends Error{static{i(this,"ErrorWithLocation")}static{o(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Fr(e,t="Error: Got unexpected value."){throw new Error(t)}i(Fr,"assertUnreachable");o(Fr,"assertUnreachable");function Sd(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}i(Sd,"assertCondition");o(Sd,"assertCondition");var wd={};xr(wd,{NEWLINE_REGEXP:i(()=>Qg,"NEWLINE_REGEXP"),escapeRegExp:i(()=>ja,"escapeRegExp"),getTerminalParts:i(()=>ty,"getTerminalParts"),isMultilineComment:i(()=>Id,"isMultilineComment"),isWhitespace:i(()=>wl,"isWhitespace"),partialMatches:i(()=>Nd,"partialMatches"),partialRegExp:i(()=>kd,"partialRegExp"),whitespaceCharacters:i(()=>ry,"whitespaceCharacters")});function K(e){return e.charCodeAt(0)}i(K,"cc");o(K,"cc");function co(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}i(co,"insertToSet");o(co,"insertToSet");function oa(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}i(oa,"addFlag");o(oa,"addFlag");function Yr(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}i(Yr,"ASSERT_EXISTS");o(Yr,"ASSERT_EXISTS");function Pi(){throw Error("Internal Error - Should never get here!")}i(Pi,"ASSERT_NEVER_REACH_HERE");o(Pi,"ASSERT_NEVER_REACH_HERE");function Yc(e){return e.type==="Character"}i(Yc,"isCharacter");o(Yc,"isCharacter");var Ko=[];for(let e=K("0");e<=K("9");e++)Ko.push(e);var qo=[K("_")].concat(Ko);for(let e=K("a");e<=K("z");e++)qo.push(e);for(let e=K("A");e<=K("Z");e++)qo.push(e);var Ph=[K(" "),K("\f"),K(` +`),K("\r"),K(" "),K("\v"),K(" "),K("\xA0"),K("\u1680"),K("\u2000"),K("\u2001"),K("\u2002"),K("\u2003"),K("\u2004"),K("\u2005"),K("\u2006"),K("\u2007"),K("\u2008"),K("\u2009"),K("\u200A"),K("\u2028"),K("\u2029"),K("\u202F"),K("\u205F"),K("\u3000"),K("\uFEFF")],iw=/[0-9a-fA-F]/,Fs=/[0-9]/,sw=/[1-9]/,Zg=class{static{i(this,"RegExpParser")}static{o(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":oa(r,"global");break;case"i":oa(r,"ignoreCase");break;case"m":oa(r,"multiLine");break;case"u":oa(r,"unicode");break;case"y":oa(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Yr(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Pi()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:n,atMost:a}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Yr(t);break}if(!(e===!0&&t===void 0)&&Yr(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Yr(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Pi()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[K(` +`),K("\r"),K("\u2028"),K("\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 e,t=!1;switch(this.popChar()){case"d":e=Ko;break;case"D":e=Ko,t=!0;break;case"s":e=Ph;break;case"S":e=Ph,t=!0;break;case"w":e=qo;break;case"W":e=qo,t=!0;break}return Yr(e)?{type:"Set",value:e,complement:t}:Pi()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=K("\f");break;case"n":e=K(` +`);break;case"r":e=K("\r");break;case"t":e=K(" ");break;case"v":e=K("\v");break}return Yr(e)?{type:"Character",value:e}:Pi()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:K("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:K(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:K(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let r=this.classAtom(),n=r.type==="Character";if(Yc(r)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(Yc(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},Sl=class{static{i(this,"BaseRegExpVisitor")}static{o(this,"BaseRegExpVisitor")}visitChildren(e){for(let t in e){let r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(n=>{this.visit(n)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},Qg=/\r?\n/gm,ey=new Zg,ow=class extends Sl{static{i(this,"TerminalRegExpVisitor")}static{o(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=ja(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},hn=new ow;function ty(e){try{typeof e!="string"&&(e=e.source),e=`/${e}/`;let t=ey.pattern(e),r=[];for(let n of t.value.value)hn.reset(e),hn.visit(n),r.push({start:hn.startRegexp,end:hn.endRegex});return r}catch{return[]}}i(ty,"getTerminalParts");o(ty,"getTerminalParts");function Id(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),hn.reset(e),hn.visit(ey.pattern(e)),hn.multiline}catch{return!1}}i(Id,"isMultilineComment");o(Id,"isMultilineComment");var ry=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");function wl(e){let t=typeof e=="string"?new RegExp(e):e;return ry.some(r=>t.test(r))}i(wl,"isWhitespace");o(wl,"isWhitespace");function ja(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ja,"escapeRegExp");o(ja,"escapeRegExp");function Nd(e,t){let r=kd(e),n=t.match(r);return!!n&&n[0].length>0}i(Nd,"partialMatches");o(Nd,"partialMatches");function kd(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,n=0;function a(){let s="",l;function u(f){s+=r.substr(n,f),n+=f}i(u,"appendRaw"),o(u,"appendRaw");function c(f){s+="(?:"+r.substr(n,f)+"|$)",n+=f}for(i(c,"appendOptional"),o(c,"appendOptional");n",n)-n+1);break;default:c(2);break}break;case"[":l=/\[(?:\\.|.)*?\]/g,l.lastIndex=n,l=l.exec(r)||[],c(l[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":u(1);break;case"{":l=/\{\d+,?\d*\}/g,l.lastIndex=n,l=l.exec(r),l?u(l[0].length):c(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":s+="(?:",n+=3,s+=a()+"|$)";break;case"=":s+="(?=",n+=3,s+=a()+")";break;case"!":l=n,n+=3,a(),s+=r.substr(l,n-l);break;case"<":switch(r[n+3]){case"=":case"!":l=n,n+=4,a(),s+=r.substr(l,n-l);break;default:u(r.indexOf(">",n)-n+1),s+=a()+"|$)";break}break}else u(1),s+=a()+"|$)";break;case")":return++n,s;default:c(1);break}return s}return i(a,"process2"),o(a,"process"),new RegExp(a(),e.flags)}i(kd,"partialRegExp");o(kd,"partialRegExp");function Pd(e){return e.rules.find(t=>Qe(t)&&t.entry)}i(Pd,"getEntryRule");o(Pd,"getEntryRule");function Od(e){return e.rules.filter(t=>Ct(t)&&t.hidden)}i(Od,"getHiddenRules");o(Od,"getHiddenRules");function Il(e,t){let r=new Set,n=Pd(e);if(!n)return new Set(e.rules);let a=[n].concat(Od(e));for(let l of a)Ld(l,r,t);let s=new Set;for(let l of e.rules)(r.has(l.name)||Ct(l)&&l.hidden)&&s.add(l);return s}i(Il,"getAllReachableRules");o(Il,"getAllReachableRules");function Ld(e,t,r){t.add(e.name),$r(e).forEach(n=>{if(hr(n)||r&&Al(n)){let a=n.rule.ref;a&&!t.has(a.name)&&Ld(a,t,r)}})}i(Ld,"ruleDfs");o(Ld,"ruleDfs");function ny(e){let t=new Set;return $r(e).forEach(r=>{wn(r)&&(Qe(r.type.ref)&&t.add(r.type.ref),Rs(r.type.ref)&&Qe(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}i(ny,"getAllRulesUsedForCrossReferences");o(ny,"getAllRulesUsedForCrossReferences");function Dd(e){if(e.terminal)return e.terminal;if(e.type.ref)return Ol(e.type.ref)?.terminal}i(Dd,"getCrossReferenceTerminal");o(Dd,"getCrossReferenceTerminal");function Md(e){return e.hidden&&!wl(Es(e))}i(Md,"isCommentTerminal");o(Md,"isCommentTerminal");function xd(e,t){return!e||!t?[]:kl(e,t,e.astNode,!0)}i(xd,"findNodesForProperty");o(xd,"findNodesForProperty");function Nl(e,t,r){if(!e||!t)return;let n=kl(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]}i(Nl,"findNodeForProperty");o(Nl,"findNodeForProperty");function kl(e,t,r,n){if(!n){let a=bn(e.grammarSource,dr);if(a&&a.feature===t)return[e]}return fr(e)&&e.astNode===r?e.content.flatMap(a=>kl(a,t,r,!1)):[]}i(kl,"findNodesForPropertyInternal");o(kl,"findNodesForPropertyInternal");function ay(e,t){return e?Pl(e,t,e?.astNode):[]}i(ay,"findNodesForKeyword");o(ay,"findNodesForKeyword");function Fd(e,t,r){if(!e)return;let n=Pl(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]}i(Fd,"findNodeForKeyword");o(Fd,"findNodeForKeyword");function Pl(e,t,r){if(e.astNode!==r)return[];if(pr(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=ka(e).iterator(),a,s=[];do if(a=n.next(),!a.done){let l=a.value;l.astNode===r?pr(l.grammarSource)&&l.grammarSource.value===t&&s.push(l):n.prune()}while(!a.done);return s}i(Pl,"findNodesForKeywordInternal");o(Pl,"findNodesForKeywordInternal");function Gd(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=bn(e.grammarSource,dr);if(r)return r;e=e.container}}i(Gd,"findAssignment");o(Gd,"findAssignment");function Ol(e){let t=e;return Rs(t)&&(Pr(t.$container)?t=t.$container.$container:Sn(t.$container)?t=t.$container:Fr(t.$container)),jd(e,t,new Map)}i(Ol,"findNameAssignment");o(Ol,"findNameAssignment");function jd(e,t,r){function n(a,s){let l;return bn(a,dr)||(l=jd(s,s,r)),r.set(e,l),l}if(i(n,"go"),o(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let a of $r(t)){if(dr(a)&&a.feature.toLowerCase()==="name")return r.set(e,a),a;if(hr(a)&&Qe(a.rule.ref))return n(a,a.rule.ref);if($l(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref)}}i(jd,"findNameAssignmentInternal");o(jd,"findNameAssignmentInternal");function Ud(e){let t=e.$container;if(In(t)){let r=t.elements,n=r.indexOf(e);for(let a=n-1;a>=0;a--){let s=r[a];if(Pr(s))return s;{let l=$r(r[a]).find(Pr);if(l)return l}}}if(Tl(t))return Ud(t)}i(Ud,"getActionAtElement");o(Ud,"getActionAtElement");function iy(e,t){return e==="?"||e==="*"||In(t)&&!!t.guardCondition}i(iy,"isOptionalCardinality");o(iy,"isOptionalCardinality");function sy(e){return e==="*"||e==="+"}i(sy,"isArrayCardinality");o(sy,"isArrayCardinality");function oy(e){return e==="+="}i(oy,"isArrayOperator");o(oy,"isArrayOperator");function $s(e){return zd(e,new Set)}i($s,"isDataTypeRule");o($s,"isDataTypeRule");function zd(e,t){if(t.has(e))return!0;t.add(e);for(let r of $r(e))if(hr(r)){if(!r.rule.ref||Qe(r.rule.ref)&&!zd(r.rule.ref,t)||Na(r.rule.ref))return!1}else{if(dr(r))return!1;if(Pr(r))return!1}return!!e.definition}i(zd,"isDataTypeRuleInternal");o(zd,"isDataTypeRuleInternal");function ly(e){return Wo(e.type,new Set)}i(ly,"isDataType");o(ly,"isDataType");function Wo(e,t){if(t.has(e))return!0;if(t.add(e),Qf(e))return!1;if(ud(e))return!1;if(hd(e))return e.types.every(r=>Wo(r,t));if($l(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 El(r)?Wo(r.type,t):!1}else return!1}else return!1}i(Wo,"isDataTypeInternal");o(Wo,"isDataTypeInternal");function As(e){if(!Ct(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}i(As,"getExplicitRuleType");o(As,"getExplicitRuleType");function Rn(e){if(Sn(e))return Qe(e)&&$s(e)?e.name:As(e)??e.name;if(id(e)||El(e)||fd(e))return e.name;if(Pr(e)){let t=Bd(e);if(t)return t}else if(Rs(e))return e.name;throw new Error("Cannot get name of Unknown Type")}i(Rn,"getTypeName");o(Rn,"getTypeName");function Bd(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return Rn(e.type.ref)}i(Bd,"getActionType");o(Bd,"getActionType");function uy(e){return Ct(e)?e.type?.name??"string":Qe(e)&&$s(e)?e.name:As(e)??e.name}i(uy,"getRuleTypeName");o(uy,"getRuleTypeName");function Kd(e){return Ct(e)?e.type?.name??"string":As(e)??e.name}i(Kd,"getRuleType");o(Kd,"getRuleType");function Es(e){let t={s:!1,i:!1,u:!1},r=Nn(e.definition,t),n=Object.entries(t).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}i(Es,"terminalRegex");o(Es,"terminalRegex");var qd=/[\s\S]/.source;function Nn(e,t){if(dd(e))return cy(e);if(pd(e))return fy(e);if(td(e))return hy(e);if(Al(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return Yt(Nn(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(sd(e))return py(e);if(md(e))return dy(e);if(cd(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),a=e.regex.substring(r+1);return t&&(t.i=a.includes("i"),t.s=a.includes("s"),t.u=a.includes("u")),Yt(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(gd(e))return Yt(qd,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}i(Nn,"abstractElementToRegex");o(Nn,"abstractElementToRegex");function cy(e){return Yt(e.elements.map(t=>Nn(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(cy,"terminalAlternativesToRegex");o(cy,"terminalAlternativesToRegex");function fy(e){return Yt(e.elements.map(t=>Nn(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(fy,"terminalGroupToRegex");o(fy,"terminalGroupToRegex");function dy(e){return Yt(`${qd}*?${Nn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(dy,"untilTokenToRegex");o(dy,"untilTokenToRegex");function py(e){return Yt(`(?!${Nn(e.terminal)})${qd}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(py,"negateTokenToRegex");o(py,"negateTokenToRegex");function hy(e){return e.right?Yt(`[${fo(e.left)}-${fo(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Yt(fo(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(hy,"characterRangeToRegex");o(hy,"characterRangeToRegex");function fo(e){return ja(e.value)}i(fo,"keywordToRegex");o(fo,"keywordToRegex");function Yt(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}i(Yt,"withCardinality");o(Yt,"withCardinality");function Wd(e){let t=[],r=e.Grammar;for(let n of r.rules)Ct(n)&&Md(n)&&Id(Es(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:$d}}i(Wd,"createGrammarConfig");o(Wd,"createGrammarConfig");var lw=typeof global=="object"&&global&&global.Object===Object&&global,my=lw,uw=typeof self=="object"&&self&&self.Object===Object&&self,cw=my||uw||Function("return this")(),Jt=cw,fw=Jt.Symbol,Et=fw,gy=Object.prototype,dw=gy.hasOwnProperty,pw=gy.toString,gi=Et?Et.toStringTag:void 0;function yy(e){var t=dw.call(e,gi),r=e[gi];try{e[gi]=void 0;var n=!0}catch{}var a=pw.call(e);return n&&(t?e[gi]=r:delete e[gi]),a}i(yy,"getRawTag");o(yy,"getRawTag");var hw=yy,mw=Object.prototype,gw=mw.toString;function vy(e){return gw.call(e)}i(vy,"objectToString");o(vy,"objectToString");var yw=vy,vw="[object Null]",Tw="[object Undefined]",Oh=Et?Et.toStringTag:void 0;function Ty(e){return e==null?e===void 0?Tw:vw:Oh&&Oh in Object(e)?hw(e):yw(e)}i(Ty,"baseGetTag");o(Ty,"baseGetTag");var Gr=Ty;function Ry(e){return e!=null&&typeof e=="object"}i(Ry,"isObjectLike");o(Ry,"isObjectLike");var Dt=Ry,Rw="[object Symbol]";function $y(e){return typeof e=="symbol"||Dt(e)&&Gr(e)==Rw}i($y,"isSymbol");o($y,"isSymbol");var Ll=$y;function Ay(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r0){if(++t>=nI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}i(Gy,"shortOut");o(Gy,"shortOut");var sI=Gy;function jy(e){return function(){return e}}i(jy,"constant");o(jy,"constant");var oI=jy,lI=(function(){try{var e=Pn(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Vo=lI,uI=Vo?function(e,t){return Vo(e,"toString",{configurable:!0,enumerable:!1,value:oI(t),writable:!0})}:Oa,cI=uI,fI=sI(cI),dI=fI;function Uy(e,t){for(var r=-1,n=e==null?0:e.length;++r-1}i(Hy,"arrayIncludes");o(Hy,"arrayIncludes");var Yy=Hy,mI=9007199254740991,gI=/^(?:0|[1-9]\d*)$/;function Xy(e,t){var r=typeof e;return t=t??mI,!!t&&(r=="number"||r!="symbol"&&gI.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=RI}i(nv,"isLength");o(nv,"isLength");var Jd=nv;function av(e){return e!=null&&Jd(e.length)&&!Ar(e)}i(av,"isArrayLike");o(av,"isArrayLike");var Zt=av;function iv(e,t,r){if(!_t(r))return!1;var n=typeof t;return(n=="number"?Zt(r)&&Dl(t,r.length):n=="string"&&t in r)?bs(r[t],e):!1}i(iv,"isIterateeCall");o(iv,"isIterateeCall");var xl=iv;function sv(e){return Xd(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:void 0,l=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,l&&xl(r[0],r[1],l)&&(s=a<3?void 0:s,a=1),t=Object(t);++n-1}i(Mv,"listCacheHas");o(Mv,"listCacheHas");var FN=Mv;function xv(e,t){var r=this.__data__,n=jl(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(xv,"listCacheSet");o(xv,"listCacheSet");var GN=xv;function Ln(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(u)?t>1?rp(u,t-1,r,n,a):tp(a,u):n||(a[a.length]=u)}return a}i(rp,"baseFlatten");o(rp,"baseFlatten");var np=rp;function Qv(e){var t=e==null?0:e.length;return t?np(e,1):[]}i(Qv,"flatten");o(Qv,"flatten");var Ot=Qv,ik=Tv(Object.getPrototypeOf,Object),eT=ik;function tT(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(a);++nu))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,v=r&YP?new op:void 0;for(s.set(e,t),s.set(t,e);++p2?t[2]:void 0;for(a&&xl(t[0],t[1],a)&&(n=1);++r=z0&&(s=lp,l=!1,t=new op(t));e:for(;++a-1?a[s?t[l]:l]:void 0}}i(MR,"createFind");o(MR,"createFind");var H0=MR,Y0=Math.max;function xR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Cs(r);return a<0&&(a=Y0(n+a,0)),Ky(e,Qt(t,3),a)}i(xR,"findIndex");o(xR,"findIndex");var X0=xR,J0=H0(X0),Da=J0;function FR(e){return e&&e.length?e[0]:void 0}i(FR,"head");o(FR,"head");var Mt=FR;function GR(e,t){var r=-1,n=Zt(e)?Array(e.length):[];return xn(e,function(a,s,l){n[++r]=t(a,s,l)}),n}i(GR,"baseMap");o(GR,"baseMap");var Z0=GR;function jR(e,t){var r=re(e)?_s:Z0;return r(e,Qt(t,3))}i(jR,"map");o(jR,"map");var G=jR;function UR(e,t){return np(G(e,t),1)}i(UR,"flatMap");o(UR,"flatMap");var At=UR,Q0=Object.prototype,eO=Q0.hasOwnProperty,tO=G0(function(e,t,r){eO.call(e,r)?e[r].push(t):Yd(e,r,[t])}),rO=tO,nO=Object.prototype,aO=nO.hasOwnProperty;function zR(e,t){return e!=null&&aO.call(e,t)}i(zR,"baseHas");o(zR,"baseHas");var iO=zR;function BR(e,t){return e!=null&&oR(e,t,iO)}i(BR,"has");o(BR,"has");var B=BR,sO="[object String]";function KR(e){return typeof e=="string"||!re(e)&&Dt(e)&&Gr(e)==sO}i(KR,"isString");o(KR,"isString");var ot=KR;function qR(e,t){return _s(t,function(r){return e[r]})}i(qR,"baseValues");o(qR,"baseValues");var oO=qR;function WR(e){return e==null?[]:oO(e,pt(e))}i(WR,"values");o(WR,"values");var xe=WR,lO=Math.max;function VR(e,t,r,n){e=Zt(e)?e:xe(e),r=r&&!n?Cs(r):0;var a=e.length;return r<0&&(r=lO(a+r,0)),ot(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&Hd(e,t,r)>-1}i(VR,"includes");o(VR,"includes");var nt=VR,uO=Math.max;function HR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Cs(r);return a<0&&(a=uO(n+a,0)),Hd(e,t,a)}i(HR,"indexOf");o(HR,"indexOf");var fm=HR,cO="[object Map]",fO="[object Set]",dO=Object.prototype,pO=dO.hasOwnProperty;function YR(e){if(e==null)return!0;if(Zt(e)&&(re(e)||typeof e=="string"||typeof e.splice=="function"||rs(e)||Zd(e)||Fl(e)))return!e.length;var t=La(e);if(t==cO||t==fO)return!e.size;if(ws(e))return!$v(e).length;for(var r in e)if(pO.call(e,r))return!1;return!0}i(YR,"isEmpty");o(YR,"isEmpty");var he=YR,hO="[object RegExp]";function XR(e){return Dt(e)&&Gr(e)==hO}i(XR,"baseIsRegExp");o(XR,"baseIsRegExp");var mO=XR,dm=Or&&Or.isRegExp,gO=dm?Is(dm):mO,mr=gO;function JR(e){return e===void 0}i(JR,"isUndefined");o(JR,"isUndefined");var gr=JR,yO="Expected a function";function ZR(e){if(typeof e!="function")throw new TypeError(yO);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)}}i(ZR,"negate");o(ZR,"negate");var vO=ZR;function QR(e,t,r,n){if(!_t(e))return e;t=ql(t,e);for(var a=-1,s=t.length,l=s-1,u=e;u!=null&&++a=bO){var f=t?null:CO(e);if(f)return up(f);l=!1,a=lp,c=new op}else c=t?[]:u;e:for(;++n{t.accept(e)})}},et=class extends er{static{i(this,"NonTerminal")}static{o(this,"NonTerminal")}constructor(e){super([]),this.idx=1,ht(this,xt(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ua=class extends er{static{i(this,"Rule")}static{o(this,"Rule")}constructor(e){super(e.definition),this.orgText="",ht(this,xt(e,t=>t!==void 0))}},lt=class extends er{static{i(this,"Alternative")}static{o(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,ht(this,xt(e,t=>t!==void 0))}},We=class extends er{static{i(this,"Option")}static{o(this,"Option")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},gt=class extends er{static{i(this,"RepetitionMandatory")}static{o(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},yt=class extends er{static{i(this,"RepetitionMandatoryWithSeparator")}static{o(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},Se=class extends er{static{i(this,"Repetition")}static{o(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},ut=class extends er{static{i(this,"RepetitionWithSeparator")}static{o(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,ht(this,xt(e,t=>t!==void 0))}},ct=class extends er{static{i(this,"Alternation")}static{o(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,ht(this,xt(e,t=>t!==void 0))}},Te=class{static{i(this,"Terminal")}static{o(this,"Terminal")}constructor(e){this.idx=1,ht(this,xt(e,t=>t!==void 0))}accept(e){e.visit(this)}};function d$(e){return G(e,Yi)}i(d$,"serializeGrammar");o(d$,"serializeGrammar");function Yi(e){function t(r){return G(r,Yi)}if(i(t,"convertDefinition"),o(t,"convertDefinition"),e instanceof et){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return ot(e.label)&&(r.label=e.label),r}else{if(e instanceof lt)return{type:"Alternative",definition:t(e.definition)};if(e instanceof We)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof gt)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof yt)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Yi(new Te({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ut)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Yi(new Te({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Se)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof ct)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Te){let r={type:"Terminal",name:e.terminalType.name,label:c$(e.terminalType),idx:e.idx};ot(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=mr(n)?n.source:n),r}else{if(e instanceof Ua)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}i(Yi,"serializeProduction");o(Yi,"serializeProduction");var za=class{static{i(this,"GAstVisitor")}static{o(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case et:return this.visitNonTerminal(t);case lt:return this.visitAlternative(t);case We:return this.visitOption(t);case gt:return this.visitRepetitionMandatory(t);case yt:return this.visitRepetitionMandatoryWithSeparator(t);case ut:return this.visitRepetitionWithSeparator(t);case Se:return this.visitRepetition(t);case ct:return this.visitAlternation(t);case Te:return this.visitTerminal(t);case Ua:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function p$(e){return e instanceof lt||e instanceof We||e instanceof Se||e instanceof gt||e instanceof yt||e instanceof ut||e instanceof Te||e instanceof Ua}i(p$,"isSequenceProd");o(p$,"isSequenceProd");function os(e,t=[]){return e instanceof We||e instanceof Se||e instanceof ut?!0:e instanceof ct?o$(e.definition,n=>os(n,t)):e instanceof et&&nt(t,e)?!1:e instanceof er?(e instanceof et&&t.push(e),Lt(e.definition,n=>os(n,t))):!1}i(os,"isOptionalProd");o(os,"isOptionalProd");function h$(e){return e instanceof ct}i(h$,"isBranchingProd");o(h$,"isBranchingProd");function It(e){if(e instanceof et)return"SUBRULE";if(e instanceof We)return"OPTION";if(e instanceof ct)return"OR";if(e instanceof gt)return"AT_LEAST_ONE";if(e instanceof yt)return"AT_LEAST_ONE_SEP";if(e instanceof ut)return"MANY_SEP";if(e instanceof Se)return"MANY";if(e instanceof Te)return"CONSUME";throw Error("non exhaustive match")}i(It,"getProductionDslName");o(It,"getProductionDslName");var Hl=class{static{i(this,"RestWalker")}static{o(this,"RestWalker")}walk(e,t=[]){q(e.definition,(r,n)=>{let a=qe(e.definition,n+1);if(r instanceof et)this.walkProdRef(r,a,t);else if(r instanceof Te)this.walkTerminal(r,a,t);else if(r instanceof lt)this.walkFlat(r,a,t);else if(r instanceof We)this.walkOption(r,a,t);else if(r instanceof gt)this.walkAtLeastOne(r,a,t);else if(r instanceof yt)this.walkAtLeastOneSep(r,a,t);else if(r instanceof ut)this.walkManySep(r,a,t);else if(r instanceof Se)this.walkMany(r,a,t);else if(r instanceof ct)this.walkOr(r,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){let n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){let n=[new We({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=ef(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new We({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=ef(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);q(e.definition,a=>{let s=new lt({definition:[a]});this.walk(s,n)})}};function ef(e,t,r){return[new We({definition:[new Te({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}i(ef,"restForRepetitionWithSeparator");o(ef,"restForRepetitionWithSeparator");function Ba(e){if(e instanceof et)return Ba(e.referencedRule);if(e instanceof Te)return y$(e);if(p$(e))return m$(e);if(h$(e))return g$(e);throw Error("non exhaustive match")}i(Ba,"first");o(Ba,"first");function m$(e){let t=[],r=e.definition,n=0,a=r.length>n,s,l=!0;for(;a&&l;)s=r[n],l=os(s),t=t.concat(Ba(s)),n=n+1,a=r.length>n;return dp(t)}i(m$,"firstForSequence");o(m$,"firstForSequence");function g$(e){let t=G(e.definition,r=>Ba(r));return dp(Ot(t))}i(g$,"firstForBranching");o(g$,"firstForBranching");function y$(e){return[e.terminalType]}i(y$,"firstForTerminal");o(y$,"firstForTerminal");var v$="_~IN~_",wO=class extends Hl{static{i(this,"ResyncFollowsWalker")}static{o(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let n=R$(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),s=new lt({definition:a}),l=Ba(s);this.follows[n]=l}};function T$(e){let t={};return q(e,r=>{let n=new wO(r).startWalking();ht(t,n)}),t}i(T$,"computeAllProdsFollows");o(T$,"computeAllProdsFollows");function R$(e,t){return e.name+t+v$}i(R$,"buildBetweenProdsFollowPrefix");o(R$,"buildBetweenProdsFollowPrefix");var po={},IO=new Zg;function Ps(e){let t=e.toString();if(po.hasOwnProperty(t))return po[t];{let r=IO.pattern(t);return po[t]=r,r}}i(Ps,"getRegExpAst");o(Ps,"getRegExpAst");function $$(){po={}}i($$,"clearRegExpParserCache");o($$,"clearRegExpParserCache");var A$="Complement Sets are not supported for first char optimization",Xo=`Unable to use "first char" lexer optimizations: +`;function E$(e,t=!1){try{let r=Ps(e);return Jo(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===A$)t&&pp(`${Xo} 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.`),Yo(`${Xo} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}i(E$,"getOptimizedStartCodesIndices");o(E$,"getOptimizedStartCodesIndices");function Jo(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a{if(typeof c=="number")Oi(c,t,r);else{let f=c;if(r===!0)for(let d=f.from;d<=f.to;d++)Oi(d,t,r);else{for(let d=f.from;d<=f.to&&d=Di){let d=f.from>=Di?f.from:Di,p=f.to,m=yr(d),v=yr(p);for(let T=m;T<=v;T++)t[T]=T}}}});break;case"Group":Jo(l.value,t,r);break;default:throw Error("Non Exhaustive Match")}let u=l.quantifier!==void 0&&l.quantifier.atLeast===0;if(l.type==="Group"&&Zo(l)===!1||l.type!=="Group"&&u===!1)break}break;default:throw Error("non exhaustive match!")}return xe(t)}i(Jo,"firstCharOptimizedIndices");o(Jo,"firstCharOptimizedIndices");function Oi(e,t,r){let n=yr(e);t[n]=n,r===!0&&_$(e,t)}i(Oi,"addOptimizedIdxToResult");o(Oi,"addOptimizedIdxToResult");function _$(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let a=yr(n.charCodeAt(0));t[a]=a}else{let a=r.toLowerCase();if(a!==r){let s=yr(a.charCodeAt(0));t[s]=s}}}i(_$,"handleIgnoreCase");o(_$,"handleIgnoreCase");function tf(e,t){return Da(e.value,r=>{if(typeof r=="number")return nt(t,r);{let n=r;return Da(t,a=>n.from<=a&&a<=n.to)!==void 0}})}i(tf,"findCode");o(tf,"findCode");function Zo(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?re(e.value)?Lt(e.value,Zo):Zo(e.value):!1}i(Zo,"isWholeOptional");o(Zo,"isWholeOptional");var NO=class extends Sl{static{i(this,"CharCodeFinder")}static{o(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){nt(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?tf(e,this.targetCharCodes)===void 0&&(this.found=!0):tf(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Yl(e,t){if(t instanceof RegExp){let r=Ps(t),n=new NO(e);return n.visit(r),n.found}else return Da(t,r=>nt(e,r.charCodeAt(0)))!==void 0}i(Yl,"canMatchCharCode");o(Yl,"canMatchCharCode");var An="PATTERN",Li="defaultMode",js="modes",C$=typeof new RegExp("(?:)").sticky=="boolean";function b$(e,t){t=fp(t,{useSticky:C$,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:o((S,_)=>_(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{V$()});let n;r("Reject Lexer.NA",()=>{n=Vl(e,S=>S[An]===Ze.NA)});let a=!1,s;r("Transform Patterns",()=>{a=!1,s=G(n,S=>{let _=S[An];if(mr(_)){let P=_.source;return P.length===1&&P!=="^"&&P!=="$"&&P!=="."&&!_.ignoreCase?P:P.length===2&&P[0]==="\\"&&!nt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],P[1])?P[1]:t.useSticky?nf(_):rf(_)}else{if(Ar(_))return a=!0,{exec:_};if(typeof _=="object")return a=!0,_;if(typeof _=="string"){if(_.length===1)return _;{let P=_.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(P);return t.useSticky?nf(j):rf(j)}}else throw Error("non exhaustive match")}})});let l,u,c,f,d;r("misc mapping",()=>{l=G(n,S=>S.tokenTypeIdx),u=G(n,S=>{let _=S.GROUP;if(_!==Ze.SKIPPED){if(ot(_))return _;if(gr(_))return!1;throw Error("non exhaustive match")}}),c=G(n,S=>{let _=S.LONGER_ALT;if(_)return re(_)?G(_,j=>fm(n,j)):[fm(n,_)]}),f=G(n,S=>S.PUSH_MODE),d=G(n,S=>B(S,"POP_MODE"))});let p;r("Line Terminator Handling",()=>{let S=vp(t.lineTerminatorCharacters);p=G(n,_=>!1),t.positionTracking!=="onlyOffset"&&(p=G(n,_=>B(_,"LINE_BREAKS")?!!_.LINE_BREAKS:yp(_,S)===!1&&Yl(S,_.PATTERN)))});let m,v,T,w;r("Misc Mapping #2",()=>{m=G(n,gp),v=G(s,q$),T=mt(n,(S,_)=>{let P=_.GROUP;return ot(P)&&P!==Ze.SKIPPED&&(S[P]=[]),S},{}),w=G(s,(S,_)=>({pattern:s[_],longerAlt:c[_],canLineTerminator:p[_],isCustom:m[_],short:v[_],group:u[_],push:f[_],pop:d[_],tokenTypeIdx:l[_],tokenType:n[_]}))});let N=!0,I=[];return t.safeMode||r("First Char Optimization",()=>{I=mt(n,(S,_,P)=>{if(typeof _.PATTERN=="string"){let j=_.PATTERN.charCodeAt(0),ee=yr(j);ho(S,ee,w[P])}else if(re(_.START_CHARS_HINT)){let j;q(_.START_CHARS_HINT,ee=>{let X=typeof ee=="string"?ee.charCodeAt(0):ee,ce=yr(X);j!==ce&&(j=ce,ho(S,ce,w[P]))})}else if(mr(_.PATTERN))if(_.PATTERN.unicode)N=!1,t.ensureOptimizations&&Yo(`${Xo} 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 j=E$(_.PATTERN,t.ensureOptimizations);he(j)&&(N=!1),q(j,ee=>{ho(S,ee,w[P])})}else t.ensureOptimizations&&Yo(`${Xo} 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`),N=!1;return S},[])}),{emptyGroups:T,patternIdxToConfig:w,charCodeToPatternIdxToConfig:I,hasCustom:a,canBeOptimized:N}}i(b$,"analyzeTokenTypes");o(b$,"analyzeTokenTypes");function S$(e,t){let r=[],n=I$(e);r=r.concat(n.errors);let a=N$(n.valid),s=a.valid;return r=r.concat(a.errors),r=r.concat(w$(s)),r=r.concat(M$(s)),r=r.concat(x$(s,t)),r=r.concat(F$(s)),r}i(S$,"validatePatterns");o(S$,"validatePatterns");function w$(e){let t=[],r=bt(e,n=>mr(n[An]));return t=t.concat(k$(r)),t=t.concat(O$(r)),t=t.concat(L$(r)),t=t.concat(D$(r)),t=t.concat(P$(r)),t}i(w$,"validateRegExpPattern");o(w$,"validateRegExpPattern");function I$(e){let t=bt(e,a=>!B(a,An)),r=G(t,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:we.MISSING_PATTERN,tokenTypes:[a]})),n=Wl(e,t);return{errors:r,valid:n}}i(I$,"findMissingPatterns");o(I$,"findMissingPatterns");function N$(e){let t=bt(e,a=>{let s=a[An];return!mr(s)&&!Ar(s)&&!B(s,"exec")&&!ot(s)}),r=G(t,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:we.INVALID_PATTERN,tokenTypes:[a]})),n=Wl(e,t);return{errors:r,valid:n}}i(N$,"findInvalidPatterns");o(N$,"findInvalidPatterns");var kO=/[^\\][$]/;function k$(e){class t extends Sl{static{i(this,"EndAnchorFinder")}static{o(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}let r=bt(e,a=>{let s=a.PATTERN;try{let l=Ps(s),u=new t;return u.visit(l),u.found}catch{return kO.test(s.source)}});return G(r,a=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:we.EOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(k$,"findEndOfInputAnchor");o(k$,"findEndOfInputAnchor");function P$(e){let t=bt(e,n=>n.PATTERN.test(""));return G(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:we.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}i(P$,"findEmptyMatchRegExps");o(P$,"findEmptyMatchRegExps");var PO=/[^\\[][\^]|^\^/;function O$(e){class t extends Sl{static{i(this,"StartAnchorFinder")}static{o(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}let r=bt(e,a=>{let s=a.PATTERN;try{let l=Ps(s),u=new t;return u.visit(l),u.found}catch{return PO.test(s.source)}});return G(r,a=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:we.SOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(O$,"findStartOfInputAnchor");o(O$,"findStartOfInputAnchor");function L$(e){let t=bt(e,n=>{let a=n[An];return a instanceof RegExp&&(a.multiline||a.global)});return G(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:we.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}i(L$,"findUnsupportedFlags");o(L$,"findUnsupportedFlags");function D$(e){let t=[],r=G(e,s=>mt(e,(l,u)=>(s.PATTERN.source===u.PATTERN.source&&!nt(t,u)&&u.PATTERN!==Ze.NA&&(t.push(u),l.push(u)),l),[]));r=ks(r);let n=bt(r,s=>s.length>1);return G(n,s=>{let l=G(s,c=>c.name);return{message:`The same RegExp pattern ->${Mt(s).PATTERN}<-has been used in all of the following Token Types: ${l.join(", ")} <-`,type:we.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}i(D$,"findDuplicatePatterns");o(D$,"findDuplicatePatterns");function M$(e){let t=bt(e,n=>{if(!B(n,"GROUP"))return!1;let a=n.GROUP;return a!==Ze.SKIPPED&&a!==Ze.NA&&!ot(a)});return G(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:we.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}i(M$,"findInvalidGroupType");o(M$,"findInvalidGroupType");function x$(e,t){let r=bt(e,a=>a.PUSH_MODE!==void 0&&!nt(t,a.PUSH_MODE));return G(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:we.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}i(x$,"findModesThatDoNotExist");o(x$,"findModesThatDoNotExist");function F$(e){let t=[],r=mt(e,(n,a,s)=>{let l=a.PATTERN;return l===Ze.NA||(ot(l)?n.push({str:l,idx:s,tokenType:a}):mr(l)&&j$(l)&&n.push({str:l.source,idx:s,tokenType:a})),n},[]);return q(e,(n,a)=>{q(r,({str:s,idx:l,tokenType:u})=>{if(a${u.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:c,type:we.UNREACHABLE_PATTERN,tokenTypes:[n,u]})}})}),t}i(F$,"findUnreachablePatterns");o(F$,"findUnreachablePatterns");function G$(e,t){if(mr(t)){if(U$(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(Ar(t))return t(e,0,[],{});if(B(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}i(G$,"tryToMatchStrToPattern");o(G$,"tryToMatchStrToPattern");function j$(e){return Da([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}i(j$,"noMetaChar");o(j$,"noMetaChar");function U$(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:we.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),B(e,js)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+js+`> property in its definition +`,type:we.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),B(e,js)&&B(e,Li)&&!B(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Li}: <${e.defaultMode}>which does not exist +`,type:we.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),B(e,js)&&q(e.modes,(a,s)=>{q(a,(l,u)=>{if(gr(l))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${u}> +`,type:we.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(B(l,"LONGER_ALT")){let c=re(l.LONGER_ALT)?l.LONGER_ALT:[l.LONGER_ALT];q(c,f=>{!gr(f)&&!nt(a,f)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${f.name}> on token <${l.name}> outside of mode <${s}> +`,type:we.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}i(z$,"performRuntimeChecks");o(z$,"performRuntimeChecks");function B$(e,t,r){let n=[],a=!1,s=ks(Ot(xe(e.modes))),l=Vl(s,c=>c[An]===Ze.NA),u=vp(r);return t&&q(l,c=>{let f=yp(c,u);if(f!==!1){let p={message:W$(c,f),type:f.issue,tokenType:c};n.push(p)}else B(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(a=!0):Yl(u,c.PATTERN)&&(a=!0)}),t&&!a&&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:we.NO_LINE_BREAKS_FLAGS}),n}i(B$,"performWarningRuntimeChecks");o(B$,"performWarningRuntimeChecks");function K$(e){let t={},r=pt(e);return q(r,n=>{let a=e[n];if(re(a))t[n]=[];else throw Error("non exhaustive match")}),t}i(K$,"cloneEmptyGroups");o(K$,"cloneEmptyGroups");function gp(e){let t=e.PATTERN;if(mr(t))return!1;if(Ar(t))return!0;if(B(t,"exec"))return!0;if(ot(t))return!1;throw Error("non exhaustive match")}i(gp,"isCustomPattern");o(gp,"isCustomPattern");function q$(e){return ot(e)&&e.length===1?e.charCodeAt(0):!1}i(q$,"isShortPattern");o(q$,"isShortPattern");var OO={test:o(function(e){let t=e.length;for(let r=this.lastIndex;r Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===we.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")}i(W$,"buildLineBreakIssueMessage");o(W$,"buildLineBreakIssueMessage");function vp(e){return G(e,r=>ot(r)?r.charCodeAt(0):r)}i(vp,"getCharCodes");o(vp,"getCharCodes");function ho(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}i(ho,"addToMapOfArrays");o(ho,"addToMapOfArrays");var Di=256,mo=[];function yr(e){return e255?255+~~(e/255):e}}i(V$,"initCharCodeToOptimizedIndexMap");o(V$,"initCharCodeToOptimizedIndexMap");function Ka(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}i(Ka,"tokenStructuredMatcher");o(Ka,"tokenStructuredMatcher");function ls(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}i(ls,"tokenStructuredMatcherNoCategories");o(ls,"tokenStructuredMatcherNoCategories");var pm=1,H$={};function qa(e){let t=Y$(e);X$(t),Z$(t),J$(t),q(t,r=>{r.isParent=r.categoryMatches.length>0})}i(qa,"augmentTokenTypes");o(qa,"augmentTokenTypes");function Y$(e){let t=Ve(e),r=e,n=!0;for(;n;){r=ks(Ot(G(r,s=>s.CATEGORIES)));let a=Wl(r,t);t=t.concat(a),he(a)?n=!1:r=a}return t}i(Y$,"expandCategories");o(Y$,"expandCategories");function X$(e){q(e,t=>{Rp(t)||(H$[pm]=t,t.tokenTypeIdx=pm++),af(t)&&!re(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),af(t)||(t.CATEGORIES=[]),Q$(t)||(t.categoryMatches=[]),eA(t)||(t.categoryMatchesMap={})})}i(X$,"assignTokenDefaultProps");o(X$,"assignTokenDefaultProps");function J$(e){q(e,t=>{t.categoryMatches=[],q(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(H$[n].tokenTypeIdx)})})}i(J$,"assignCategoriesTokensProp");o(J$,"assignCategoriesTokensProp");function Z$(e){q(e,t=>{Tp([],t)})}i(Z$,"assignCategoriesMapProp");o(Z$,"assignCategoriesMapProp");function Tp(e,t){q(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),q(t.CATEGORIES,r=>{let n=e.concat(t);nt(n,r)||Tp(n,r)})}i(Tp,"singleAssignCategoriesToksMap");o(Tp,"singleAssignCategoriesToksMap");function Rp(e){return B(e,"tokenTypeIdx")}i(Rp,"hasShortKeyProperty");o(Rp,"hasShortKeyProperty");function af(e){return B(e,"CATEGORIES")}i(af,"hasCategoriesProperty");o(af,"hasCategoriesProperty");function Q$(e){return B(e,"categoryMatches")}i(Q$,"hasExtendingTokensTypesProperty");o(Q$,"hasExtendingTokensTypesProperty");function eA(e){return B(e,"categoryMatchesMap")}i(eA,"hasExtendingTokensTypesMapProperty");o(eA,"hasExtendingTokensTypesMapProperty");function tA(e){return B(e,"tokenTypeIdx")}i(tA,"isTokenType");o(tA,"isTokenType");var sf={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,a,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}},we;(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"})(we||(we={}));var Mi={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:sf,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Mi);var Ze=class{static{i(this,"Lexer")}static{o(this,"Lexer")}constructor(e,t=Mi){if(this.lexerDefinition=e,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=(n,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${n}>`);let{time:l,value:u}=hp(a),c=l>10?console.warn:console.log;return this.traceInitIndent time: ${l}ms`),this.traceInitIndent--,u}else return a()},typeof t=="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=ht({},Mi,t);let r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Mi.lineTerminatorsPattern)this.config.lineTerminatorsPattern=OO;else if(this.config.lineTerminatorCharacters===Mi.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(t.safeMode&&t.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),re(e)?n={modes:{defaultMode:Ve(e)},defaultMode:Li}:(a=!1,n=Ve(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(z$(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(B$(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},q(n.modes,(l,u)=>{n.modes[u]=Vl(l,c=>gr(c))});let s=pt(n.modes);if(q(n.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(S$(l,s))}),he(this.lexerDefinitionErrors)){qa(l);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=b$(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=c.charCodeToPatternIdxToConfig,this.emptyGroups=ht({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=c.canBeOptimized}})}),this.defaultMode=n.defaultMode,!he(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=G(this.lexerDefinitionErrors,c=>c.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+u)}q(this.lexerDefinitionWarning,l=>{pp(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(C$?(this.chopInput=Oa,this.match=this.matchWithTest):(this.updateLastIndex=Me,this.match=this.matchWithExec),a&&(this.handleModes=Me),this.trackStartLines===!1&&(this.computeNewColumn=Oa),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Me),/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=mt(this.canModeBeOptimized,(u,c,f)=>(c===!1&&u.push(f),u),[]);if(t.ensureOptimizations&&!he(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",()=>{$$()}),this.TRACE_INIT("toFastProperties",()=>{mp(this)})})}tokenize(e,t=this.defaultMode){if(!he(this.lexerDefinitionErrors)){let n=G(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,s,l,u,c,f,d,p,m,v,T,w,N,I,S=e,_=S.length,P=0,j=0,ee=this.hasCustom?0:Math.floor(e.length/10),X=new Array(ee),ce=[],me=this.trackStartLines?1:void 0,Re=this.trackStartLines?1:void 0,O=K$(this.emptyGroups),C=this.trackStartLines,y=this.config.lineTerminatorsPattern,E=0,R=[],$=[],b=[],L=[];Object.freeze(L);let x;function M(){return R}i(M,"getPossiblePatternsSlow"),o(M,"getPossiblePatternsSlow");function U(ie){let Le=yr(ie),Ue=$[Le];return Ue===void 0?L:Ue}i(U,"getPossiblePatternsOptimized"),o(U,"getPossiblePatternsOptimized");let W=o(ie=>{if(b.length===1&&ie.tokenType.PUSH_MODE===void 0){let Le=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ie);ce.push({offset:ie.startOffset,line:ie.startLine,column:ie.startColumn,length:ie.image.length,message:Le})}else{b.pop();let Le=$n(b);R=this.patternIdxToConfig[Le],$=this.charCodeToPatternIdxToConfig[Le],E=R.length;let Ue=this.canModeBeOptimized[Le]&&this.config.safeMode===!1;$&&Ue?x=U:x=M}},"pop_mode");function le(ie){b.push(ie),$=this.charCodeToPatternIdxToConfig[ie],R=this.patternIdxToConfig[ie],E=R.length,E=R.length;let Le=this.canModeBeOptimized[ie]&&this.config.safeMode===!1;$&&Le?x=U:x=M}i(le,"push_mode"),o(le,"push_mode"),le.call(this,t);let H,Oe=this.config.recoveryEnabled;for(;P<_;){u=null;let ie=S.charCodeAt(P),Le=x(ie),Ue=Le.length;for(r=0;ru.length){u=s,c=f,H=J;break}}}break}}if(u!==null){if(d=u.length,p=H.group,p!==void 0&&(m=H.tokenTypeIdx,v=this.createTokenInstance(u,P,m,H.tokenType,me,Re,d),this.handlePayload(v,c),p===!1?j=this.addToken(X,j,v):O[p].push(v)),e=this.chopInput(e,d),P=P+d,Re=this.computeNewColumn(Re,d),C===!0&&H.canLineTerminator===!0){let $e=0,ze,Ie;y.lastIndex=0;do ze=y.test(u),ze===!0&&(Ie=y.lastIndex-1,$e++);while(ze===!0);$e!==0&&(me=me+$e,Re=d-Ie,this.updateTokenEndLineColumnLocation(v,p,Ie,$e,me,Re,d))}this.handleModes(H,W,le,v)}else{let $e=P,ze=me,Ie=Re,J=Oe===!1;for(;J===!1&&P<_;)for(e=this.chopInput(e,1),P++,n=0;n ${vn(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:a}){let s="Expecting: ",u=` +but found: '`+Mt(t).image+"'";if(n)return s+n+u;{let c=mt(e,(m,v)=>m.concat(v),[]),f=G(c,m=>`[${G(m,v=>vn(v)).join(", ")}]`),p=`one of these possible Token sequences: +${G(f,(m,v)=>` ${v+1}. ${m}`).join(` +`)}`;return s+p+u}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let a="Expecting: ",l=` +but found: '`+Mt(t).image+"'";if(r)return a+r+l;{let c=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${G(e,f=>`[${G(f,d=>vn(d)).join(",")}]`).join(" ,")}>`;return a+c+l}}};Object.freeze($a);var DO={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},mn={buildDuplicateFoundError(e,t){function r(d){return d instanceof Te?d.terminalType.name:d instanceof et?d.nonTerminalName:""}i(r,"getExtraProductionArgument2"),o(r,"getExtraProductionArgument");let n=e.name,a=Mt(t),s=a.idx,l=It(a),u=r(a),c=s>0,f=`->${l}${c?s:""}<- ${u?`with argument: ->${u}<-`:""} + 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 f=f.replace(/[ \t]+/g," "),f=f.replace(/\s\s+/g,` +`),f},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=G(e.prefixPath,a=>vn(a)).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=G(e.prefixPath,a=>vn(a)).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=It(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=G(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 Ua?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function nA(e,t){let r=new MO(e,t);return r.resolveRefs(),r.errors}i(nA,"resolveGrammar");o(nA,"resolveGrammar");var MO=class extends za{static{i(this,"GastRefResolverVisitor")}static{o(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){q(xe(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:tt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},xO=class extends Hl{static{i(this,"AbstractNextPossibleTokensWalker")}static{o(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,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=Ve(this.path.ruleStack).reverse(),this.occurrenceStack=Ve(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){he(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},FO=class extends xO{static{i(this,"NextAfterTokenWalker")}static{o(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let n=t.concat(r),a=new lt({definition:n});this.possibleTokTypes=Ba(a),this.found=!0}}},Xl=class extends Hl{static{i(this,"AbstractNextTerminalAfterProductionWalker")}static{o(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},GO=class extends Xl{static{i(this,"NextTerminalAfterManyWalker")}static{o(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},Am=class extends Xl{static{i(this,"NextTerminalAfterManySepWalker")}static{o(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},jO=class extends Xl{static{i(this,"NextTerminalAfterAtLeastOneWalker")}static{o(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},Em=class extends Xl{static{i(this,"NextTerminalAfterAtLeastOneSepWalker")}static{o(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=Mt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};function Qo(e,t,r=[]){r=Ve(r);let n=[],a=0;function s(u){return u.concat(qe(e,a+1))}i(s,"remainingPathWith"),o(s,"remainingPathWith");function l(u){let c=Qo(s(u),t,r);return n.concat(c)}for(i(l,"getAlternativesForProd"),o(l,"getAlternativesForProd");r.length{he(c.definition)===!1&&(n=l(c.definition))}),n;if(u instanceof Te)r.push(u.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:qe(e,a)}),n}i(Qo,"possiblePathsFrom");o(Qo,"possiblePathsFrom");function Ep(e,t,r,n){let a="EXIT_NONE_TERMINAL",s=[a],l="EXIT_ALTERNATIVE",u=!1,c=t.length,f=c-n-1,d=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!he(p);){let m=p.pop();if(m===l){u&&$n(p).idx<=f&&p.pop();continue}let v=m.def,T=m.idx,w=m.ruleStack,N=m.occurrenceStack;if(he(v))continue;let I=v[0];if(I===a){let S={idx:T,def:qe(v),ruleStack:ss(w),occurrenceStack:ss(N)};p.push(S)}else if(I instanceof Te)if(T=0;S--){let _=I.definition[S],P={idx:T,def:_.definition.concat(qe(v)),ruleStack:w,occurrenceStack:N};p.push(P),p.push(l)}else if(I instanceof lt)p.push({idx:T,def:I.definition.concat(qe(v)),ruleStack:w,occurrenceStack:N});else if(I instanceof Ua)p.push(aA(I,T,w,N));else throw Error("non exhaustive match")}return d}i(Ep,"nextPossibleTokensAfter");o(Ep,"nextPossibleTokensAfter");function aA(e,t,r,n){let a=Ve(r);a.push(e.name);let s=Ve(n);return s.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:s}}i(aA,"expandTopLevelRule");o(aA,"expandTopLevelRule");var _e;(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"})(_e||(_e={}));function Jl(e){if(e instanceof We||e==="Option")return _e.OPTION;if(e instanceof Se||e==="Repetition")return _e.REPETITION;if(e instanceof gt||e==="RepetitionMandatory")return _e.REPETITION_MANDATORY;if(e instanceof yt||e==="RepetitionMandatoryWithSeparator")return _e.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof ut||e==="RepetitionWithSeparator")return _e.REPETITION_WITH_SEPARATOR;if(e instanceof ct||e==="Alternation")return _e.ALTERNATION;throw Error("non exhaustive match")}i(Jl,"getProdType");o(Jl,"getProdType");function of(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,s=Jl(n);return s===_e.ALTERNATION?Ls(t,r,a):Ds(t,r,s,a)}i(of,"getLookaheadPaths");o(of,"getLookaheadPaths");function iA(e,t,r,n,a,s){let l=Ls(e,t,r),u=Cp(l)?ls:Ka;return s(l,n,u,a)}i(iA,"buildLookaheadFuncForOr");o(iA,"buildLookaheadFuncForOr");function sA(e,t,r,n,a,s){let l=Ds(e,t,a,r),u=Cp(l)?ls:Ka;return s(l[0],u,n)}i(sA,"buildLookaheadFuncForOptionalProd");o(sA,"buildLookaheadFuncForOptionalProd");function oA(e,t,r,n){let a=e.length,s=Lt(e,l=>Lt(l,u=>u.length===1));if(t)return function(l){let u=G(l,c=>c.GATE);for(let c=0;cOt(c)),u=mt(l,(c,f,d)=>(q(f,p=>{B(c,p.tokenTypeIdx)||(c[p.tokenTypeIdx]=d),q(p.categoryMatches,m=>{B(c,m)||(c[m]=d)})}),c),{});return function(){let c=this.LA(1);return u[c.tokenTypeIdx]}}else return function(){for(let l=0;ls.length===1),a=e.length;if(n&&!r){let s=Ot(e);if(s.length===1&&he(s[0].categoryMatches)){let u=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===u}}else{let l=mt(s,(u,c,f)=>(u[c.tokenTypeIdx]=!0,q(c.categoryMatches,d=>{u[d]=!0}),u),[]);return function(){let u=this.LA(1);return l[u.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sQo([l],1)),n=lf(r.length),a=G(r,l=>{let u={};return q(l,c=>{let f=go(c.partialPath);q(f,d=>{u[d]=!0})}),u}),s=r;for(let l=1;l<=t;l++){let u=s;s=lf(u.length);for(let c=0;c{let I=go(N.partialPath);q(I,S=>{a[c][S]=!0})})}}}}return n}i(_p,"lookAheadSequenceFromAlternatives");o(_p,"lookAheadSequenceFromAlternatives");function Ls(e,t,r,n){let a=new uA(e,_e.ALTERNATION,n);return t.accept(a),_p(a.result,r)}i(Ls,"getLookaheadPathsForOr");o(Ls,"getLookaheadPathsForOr");function Ds(e,t,r,n){let a=new uA(e,r);t.accept(a);let s=a.result,u=new UO(t,e,r).startWalking(),c=new lt({definition:s}),f=new lt({definition:u});return _p([c,f],n)}i(Ds,"getLookaheadPathsForOptionalProd");o(Ds,"getLookaheadPathsForOptionalProd");function el(e,t){e:for(let r=0;r{let a=t[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}i(fA,"isStrictPrefixOfPath");o(fA,"isStrictPrefixOfPath");function Cp(e){return Lt(e,t=>Lt(t,r=>Lt(r,n=>he(n.categoryMatches))))}i(Cp,"areTokenCategoriesNotUsed");o(Cp,"areTokenCategoriesNotUsed");function dA(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return G(t,r=>Object.assign({type:tt.CUSTOM_LOOKAHEAD_VALIDATION},r))}i(dA,"validateLookahead");o(dA,"validateLookahead");function pA(e,t,r,n){let a=At(e,c=>hA(c,r)),s=_A(e,t,r),l=At(e,c=>RA(c,r)),u=At(e,c=>gA(c,e,n,r));return a.concat(s,l,u)}i(pA,"validateGrammar");o(pA,"validateGrammar");function hA(e,t){let r=new zO;e.accept(r);let n=r.allProductions,a=rO(n,mA),s=xt(a,u=>u.length>1);return G(xe(s),u=>{let c=Mt(u),f=t.buildDuplicateFoundError(e,u),d=It(c),p={message:f,type:tt.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:c.idx},m=bp(c);return m&&(p.parameter=m),p})}i(hA,"validateDuplicateProductions");o(hA,"validateDuplicateProductions");function mA(e){return`${It(e)}_#_${e.idx}_#_${bp(e)}`}i(mA,"identifyProductionForDuplicates");o(mA,"identifyProductionForDuplicates");function bp(e){return e instanceof Te?e.terminalType.name:e instanceof et?e.nonTerminalName:""}i(bp,"getExtraProductionArgument");o(bp,"getExtraProductionArgument");var zO=class extends za{static{i(this,"OccurrenceValidationCollector")}static{o(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function gA(e,t,r,n){let a=[];if(mt(t,(l,u)=>u.name===e.name?l+1:l,0)>1){let l=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:l,type:tt.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}i(gA,"validateRuleDoesNotAlreadyExist");o(gA,"validateRuleDoesNotAlreadyExist");function yA(e,t,r){let n=[],a;return nt(t,e)||(a=`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:a,type:tt.INVALID_RULE_OVERRIDE,ruleName:e})),n}i(yA,"validateRuleIsOverridden");o(yA,"validateRuleIsOverridden");function Sp(e,t,r,n=[]){let a=[],s=Xi(t.definition);if(he(s))return[];{let l=e.name;nt(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:tt.LEFT_RECURSION,ruleName:l});let c=Wl(s,n.concat([e])),f=At(c,d=>{let p=Ve(n);return p.push(d),Sp(e,d,r,p)});return a.concat(f)}}i(Sp,"validateNoLeftRecursion");o(Sp,"validateNoLeftRecursion");function Xi(e){let t=[];if(he(e))return t;let r=Mt(e);if(r instanceof et)t.push(r.referencedRule);else if(r instanceof lt||r instanceof We||r instanceof gt||r instanceof yt||r instanceof ut||r instanceof Se)t=t.concat(Xi(r.definition));else if(r instanceof ct)t=Ot(G(r.definition,s=>Xi(s.definition)));else if(!(r instanceof Te))throw Error("non exhaustive match");let n=os(r),a=e.length>1;if(n&&a){let s=qe(e);return t.concat(Xi(s))}else return t}i(Xi,"getFirstNoneTerminal");o(Xi,"getFirstNoneTerminal");var wp=class extends za{static{i(this,"OrCollector")}static{o(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function vA(e,t){let r=new wp;e.accept(r);let n=r.alternations;return At(n,s=>{let l=ss(s.definition);return At(l,(u,c)=>{let f=Ep([u],[],Ka,1);return he(f)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:c}),type:tt.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:c+1}]:[]})})}i(vA,"validateEmptyOrAlternative");o(vA,"validateEmptyOrAlternative");function TA(e,t,r){let n=new wp;e.accept(n);let a=n.alternations;return a=Vl(a,l=>l.ignoreAmbiguities===!0),At(a,l=>{let u=l.idx,c=l.maxLookahead||t,f=Ls(u,e,c,l),d=AA(f,l,e,r),p=EA(f,l,e,r);return d.concat(p)})}i(TA,"validateAmbiguousAlternationAlternatives");o(TA,"validateAmbiguousAlternationAlternatives");var BO=class extends za{static{i(this,"RepetitionCollector")}static{o(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function RA(e,t){let r=new wp;e.accept(r);let n=r.alternations;return At(n,s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:tt.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}i(RA,"validateTooManyAlts");o(RA,"validateTooManyAlts");function $A(e,t,r){let n=[];return q(e,a=>{let s=new BO;a.accept(s);let l=s.allProductions;q(l,u=>{let c=Jl(u),f=u.maxLookahead||t,d=u.idx,m=Ds(d,a,c,f)[0];if(he(Ot(m))){let v=r.buildEmptyRepetitionError({topLevelRule:a,repetition:u});n.push({message:v,type:tt.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}i($A,"validateSomeNonEmptyLookaheadPath");o($A,"validateSomeNonEmptyLookaheadPath");function AA(e,t,r,n){let a=[],s=mt(e,(u,c,f)=>(t.definition[f].ignoreAmbiguities===!0||q(c,d=>{let p=[f];q(e,(m,v)=>{f!==v&&el(m,d)&&t.definition[v].ignoreAmbiguities!==!0&&p.push(v)}),p.length>1&&!el(a,d)&&(a.push(d),u.push({alts:p,path:d}))}),u),[]);return G(s,u=>{let c=G(u.alts,d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:c,prefixPath:u.path}),type:tt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:u.alts}})}i(AA,"checkAlternativesAmbiguities");o(AA,"checkAlternativesAmbiguities");function EA(e,t,r,n){let a=mt(e,(l,u,c)=>{let f=G(u,d=>({idx:c,path:d}));return l.concat(f)},[]);return ks(At(a,l=>{if(t.definition[l.idx].ignoreAmbiguities===!0)return[];let c=l.idx,f=l.path,d=bt(a,m=>t.definition[m.idx].ignoreAmbiguities!==!0&&m.idx{let v=[m.idx+1,c+1],T=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:v,prefixPath:m.path}),type:tt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:T,alternatives:v}})}))}i(EA,"checkPrefixAlternativesAmbiguities");o(EA,"checkPrefixAlternativesAmbiguities");function _A(e,t,r){let n=[],a=G(t,s=>s.name);return q(e,s=>{let l=s.name;if(nt(a,l)){let u=r.buildNamespaceConflictError(s);n.push({message:u,type:tt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:l})}}),n}i(_A,"checkTerminalAndNoneTerminalsNameSpace");o(_A,"checkTerminalAndNoneTerminalsNameSpace");function CA(e){let t=fp(e,{errMsgProvider:DO}),r={};return q(e.rules,n=>{r[n.name]=n}),nA(r,t.errMsgProvider)}i(CA,"resolveGrammar2");o(CA,"resolveGrammar");function bA(e){return e=fp(e,{errMsgProvider:mn}),pA(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}i(bA,"validateGrammar2");o(bA,"validateGrammar");var SA="MismatchedTokenException",wA="NoViableAltException",IA="EarlyExitException",NA="NotAllInputParsedException",kA=[SA,wA,IA,NA];Object.freeze(kA);function us(e){return nt(kA,e.name)}i(us,"isRecognitionException");o(us,"isRecognitionException");var Zl=class extends Error{static{i(this,"RecognitionException")}static{o(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},PA=class extends Zl{static{i(this,"MismatchedTokenException")}static{o(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=SA}},KO=class extends Zl{static{i(this,"NoViableAltException")}static{o(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=wA}},qO=class extends Zl{static{i(this,"NotAllInputParsedException")}static{o(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=NA}},WO=class extends Zl{static{i(this,"EarlyExitException")}static{o(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=IA}},Iu={},OA="InRuleRecoveryException",VO=class extends Error{static{i(this,"InRuleRecoveryException")}static{o(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=OA}},HO=class{static{i(this,"Recoverable")}static{o(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=B(e,"recoveryEnabled")?e.recoveryEnabled:vr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=LA)}getTokenToInsert(e){let t=Os(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],u=!1,c=this.LA(1),f=this.LA(1),d=o(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:c,previous:p,ruleName:this.getCurrRuleFullName()}),v=new PA(m,c,this.LA(0));v.resyncedTokens=ss(l),this.SAVE_ERROR(v)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(f,n)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(f,a)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new VO("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||he(t))return!1;let r=this.LA(1);return Da(t,a=>this.tokenMatcher(r,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return nt(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){let n=Da(e,a=>Ap(t,a));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Iu;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return G(e,(r,n)=>n===0?Iu:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){let e=G(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ot(e)}getFollowSetFromFollowKey(e){if(e===Iu)return[Lr];let t=e.ruleName+e.idxInCallingRule+v$+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Lr)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return ss(t)}attemptInRepetitionRecovery(e,t,r,n,a,s,l){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=Ve(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return G(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function LA(e,t,r,n,a,s,l){let u=this.getKeyForAutomaticLookahead(n,a),c=this.firstAfterRepMap[u];if(c===void 0){let m=this.getCurrRuleFullName(),v=this.getGAstProductions()[m];c=new s(v,a).startWalking(),this.firstAfterRepMap[u]=c}let f=c.token,d=c.occurrence,p=c.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=Lr,d=1),!(f===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(f,d,l)&&this.tryInRepetitionRecovery(e,t,r,f)}i(LA,"attemptInRepetitionRecovery");o(LA,"attemptInRepetitionRecovery");var YO=4,jr=8,XO=8,DA=1<Sp(t,t,mn))}validateEmptyOrAlternatives(e){return At(e,t=>vA(t,mn))}validateAmbiguousAlternationAlternatives(e,t){return At(e,r=>TA(r,t,mn))}validateSomeNonEmptyLookaheadPath(e,t){return $A(e,t,mn)}buildLookaheadForAlternation(e){return iA(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,oA)}buildLookaheadForOptional(e){return sA(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Jl(e.prodType),lA)}},JO=class{static{i(this,"LooksAhead")}static{o(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=B(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:vr.dynamicTokensEnabled,this.maxLookahead=B(e,"maxLookahead")?e.maxLookahead:vr.maxLookahead,this.lookaheadStrategy=B(e,"lookaheadStrategy")?e.lookaheadStrategy:new Ip({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){q(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=xA(t);q(r,c=>{let f=c.idx===0?"":c.idx;this.TRACE_INIT(`${It(c)}${f}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:t,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=vo(this.fullRuleNameToShort[t.name],DA,c.idx);this.setLaFuncCache(p,d)})}),q(n,c=>{this.computeLookaheadFunc(t,c.idx,uf,"Repetition",c.maxLookahead,It(c))}),q(a,c=>{this.computeLookaheadFunc(t,c.idx,MA,"Option",c.maxLookahead,It(c))}),q(s,c=>{this.computeLookaheadFunc(t,c.idx,cf,"RepetitionMandatory",c.maxLookahead,It(c))}),q(l,c=>{this.computeLookaheadFunc(t,c.idx,yo,"RepetitionMandatoryWithSeparator",c.maxLookahead,It(c))}),q(u,c=>{this.computeLookaheadFunc(t,c.idx,ff,"RepetitionWithSeparator",c.maxLookahead,It(c))})})})}computeLookaheadFunc(e,t,r,n,a,s){this.TRACE_INIT(`${s}${t===0?"":t}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),u=vo(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(u,l)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return vo(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},ZO=class extends za{static{i(this,"DslMethodsCollectorVisitor")}static{o(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},Us=new ZO;function xA(e){Us.reset(),e.accept(Us);let t=Us.dslMethods;return Us.reset(),t}i(xA,"collectMethods");o(xA,"collectMethods");function df(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsetl.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}i(UA,"createBaseSemanticVisitorConstructor");o(UA,"createBaseSemanticVisitorConstructor");function zA(e,t,r){let n=o(function(){},"derivedConstructor");Np(n,e+"BaseSemanticsWithDefaults");let a=Object.create(r.prototype);return q(t,s=>{a[s]=jA}),n.prototype=a,n.prototype.constructor=n,n}i(zA,"createBaseVisitorConstructorWithDefaults");o(zA,"createBaseVisitorConstructorWithDefaults");var hf;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(hf||(hf={}));function BA(e,t){return KA(e,t)}i(BA,"validateVisitor");o(BA,"validateVisitor");function KA(e,t){let r=bt(t,a=>Ar(e[a])===!1),n=G(r,a=>({msg:`Missing visitor method: <${a}> on ${e.constructor.name} CST Visitor.`,type:hf.MISSING_METHOD,methodName:a}));return ks(n)}i(KA,"validateMissingCstMethods");o(KA,"validateMissingCstMethods");var eL=class{static{i(this,"TreeBuilder")}static{o(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=B(e,"nodeLocationTracking")?e.nodeLocationTracking:vr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Me,this.cstFinallyStateUpdate=Me,this.cstPostTerminal=Me,this.cstPostNonTerminal=Me,this.cstPostRule=Me;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=pf,this.setNodeLocationFromNode=pf,this.cstPostRule=Me,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=df,this.setNodeLocationFromNode=df,this.cstPostRule=Me,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=Me,this.setInitialNodeLocation=Me;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];FA(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];GA(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(gr(this.baseCstVisitorConstructor)){let e=UA(this.className,pt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(gr(this.baseCstVisitorWithDefaultsConstructor)){let e=zA(this.className,pt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},tL=class{static{i(this,"LexerAdapter")}static{o(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):tl}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?tl:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},rL=class{static{i(this,"RecognizerApi")}static{o(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=rl){if(nt(this.definedRulesNames,e)){let s={message:mn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:tt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=rl){let n=yA(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(us(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return d$(xe(this.gastProductionsCache))}},nL=class{static{i(this,"RecognizerEngine")}static{o(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ls,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},B(t,"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(re(e)){if(he(e))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 e[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(re(e))this.tokensMap=mt(e,(a,s)=>(a[s.name]=s,a),{});else if(B(e,"modes")&&Lt(Ot(xe(e.modes)),tA)){let a=Ot(xe(e.modes)),s=dp(a);this.tokensMap=mt(s,(l,u)=>(l[u.name]=u,l),{})}else if(_t(e))this.tokensMap=Ve(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Lr;let r=B(e,"modes")?Ot(xe(e.modes)):xe(e),n=Lt(r,a=>he(a.categoryMatches));this.tokenMatcher=n?ls:Ka,qa(xe(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> 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 n=B(r,"resyncEnabled")?r.resyncEnabled:rl.resyncEnabled,a=B(r,"recoveryValueFunc")?r.recoveryValueFunc:rl.recoveryValueFunc,s=this.ruleShortNameIdx<s.call(this)&&l.call(this),"lookAheadFunc")}}else a=e;if(n.call(this)===!0)return a.call(this)}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(cf,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!="function"){a=t.DEF;let s=t.GATE;if(s!==void 0){let l=n;n=o(()=>s.call(this)&&l.call(this),"lookAheadFunc")}}else a=t;if(n.call(this)===!0){let s=this.doSingleRepetition(a);for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,_e.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,cf,e,jO)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(yo,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,a=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let l=o(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,n,Em],l,yo,e,Em)}else throw this.raiseEarlyExitException(e,_e.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(uf,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!="function"){a=t.DEF;let l=t.GATE;if(l!==void 0){let u=n;n=o(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else a=t;let s=!0;for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,uf,e,GO,s)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(ff,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,a=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let l=o(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,n,Am],l,ff,e,Am)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,yo,e,a)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(DA,t),n=re(e)?e:e.DEF,s=this.getLaFuncFromCache(r).call(this,n);if(s!==void 0)return n[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qO(t,e))}}subruleInternal(e,t,r){let n;try{let a=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,a),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(a){throw this.subruleInternalError(a,r,e.ruleName)}}subruleInternalError(e,t,r){throw us(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),n=a):this.consumeInternalError(e,a,r)}catch(a){n=this.consumeInternalRecovery(e,t,a)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,a=this.LA(0);throw r!==void 0&&r.ERR_MSG?n=r.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new PA(n,t,a))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(a){throw a.name===OA?r:a}}else throw r}saveRecogState(){let e=this.errors,t=Ve(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Lr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},aL=class{static{i(this,"ErrorHandler")}static{o(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=B(e,"errorMessageProvider")?e.errorMessageProvider:vr.errorMessageProvider}SAVE_ERROR(e){if(us(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Ve(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Ve(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],l=Ds(e,a,t,this.maxLookahead)[0],u=[];for(let f=1;f<=this.maxLookahead;f++)u.push(this.LA(f));let c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new WO(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],a=Ls(e,n,this.maxLookahead),s=[];for(let c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new KO(u,this.LA(1),l))}},iL=class{static{i(this,"ContentAssist")}static{o(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(gr(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Ep([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Mt(e.ruleStack),n=this.getGAstProductions()[t];return new FO(n,e).startWalking()}},Ql={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ql);var _m=!0,Cm=Math.pow(2,jr)-1,qA=_a({name:"RECORDING_PHASE_TOKEN",pattern:Ze.NA});qa([qA]);var WA=Os(qA,`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(WA);var sL={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},oL=class{static{i(this,"GastRecorder")}static{o(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,n){return this.consumeInternalRecord(r,e,n)},this[`SUBRULE${t}`]=function(r,n){return this.subruleInternalRecord(r,e,n)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},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 e=this;for(let t=0;t<10;t++){let r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return tl}topLevelRuleRecord(e,t){try{let r=new Ua({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.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 r}throw r}}optionInternalRecord(e,t){return la.call(this,We,e,t)}atLeastOneInternalRecord(e,t){la.call(this,gt,t,e)}atLeastOneSepFirstInternalRecord(e,t){la.call(this,yt,t,e,_m)}manyInternalRecord(e,t){la.call(this,Se,t,e)}manySepFirstInternalRecord(e,t){la.call(this,ut,t,e,_m)}orInternalRecord(e,t){return VA.call(this,e,t)}subruleInternalRecord(e,t,r){if(cs(t),!e||B(e,"ruleName")===!1){let l=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let n=$n(this.recordingProdStack),a=e.ruleName,s=new et({idx:t,nonTerminalName:a,label:r?.LABEL,referencedRule:void 0});return n.definition.push(s),this.outputCst?sL:Ql}consumeInternalRecord(e,t,r){if(cs(t),!Rp(e)){let s=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let n=$n(this.recordingProdStack),a=new Te({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(a),WA}};function la(e,t,r,n=!1){cs(r);let a=$n(this.recordingProdStack),s=Ar(t)?t:t.DEF,l=new e({definition:[],idx:r});return n&&(l.separator=t.SEP),B(t,"MAX_LOOKAHEAD")&&(l.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(l),s.call(this),a.definition.push(l),this.recordingProdStack.pop(),Ql}i(la,"recordProd");o(la,"recordProd");function VA(e,t){cs(t);let r=$n(this.recordingProdStack),n=re(e)===!1,a=n===!1?e:e.DEF,s=new ct({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});B(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);let l=o$(a,u=>Ar(u.GATE));return s.hasPredicates=l,r.definition.push(s),q(a,u=>{let c=new lt({definition:[]});s.definition.push(c),B(u,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=u.IGNORE_AMBIGUITIES:B(u,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),u.ALT.call(this),this.recordingProdStack.pop()}),Ql}i(VA,"recordOrProd");o(VA,"recordOrProd");function mf(e){return e===0?"":`${e}`}i(mf,"getIdxSuffix");o(mf,"getIdxSuffix");function cs(e){if(e<0||e>Cm){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${Cm+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}i(cs,"assertMethodIdxIsValid");o(cs,"assertMethodIdxIsValid");var lL=class{static{i(this,"PerformanceTracer")}static{o(this,"PerformanceTracer")}initPerformanceTracer(e){if(B(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=vr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:n,value:a}=hp(t),s=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,a}else return t()}};function HA(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,a);s&&(s.get||s.set)?Object.defineProperty(e.prototype,a,s):e.prototype[a]=r.prototype[a]})})}i(HA,"applyMixins");o(HA,"applyMixins");var tl=Os(Lr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(tl);var vr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:$a,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),rl=Object.freeze({recoveryValueFunc:o(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),tt;(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"})(tt||(tt={}));function gf(e=void 0){return function(){return e}}i(gf,"EMPTY_ALT");o(gf,"EMPTY_ALT");var kp=class YA{static{i(this,"_Parser")}static{o(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",()=>{mp(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),q(this.definedRulesNames,a=>{let l=this[a].originalGrammarAction,u;this.TRACE_INIT(`${a} Rule`,()=>{u=this.topLevelRuleRecord(a,l)}),this.gastProductionsCache[a]=u})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=CA({rules:xe(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(he(n)&&this.skipValidations===!1){let a=bA({rules:xe(this.gastProductionsCache),tokenTypes:xe(this.tokensMap),errMsgProvider:mn,grammarName:r}),s=dA({lookaheadStrategy:this.lookaheadStrategy,rules:xe(this.gastProductionsCache),tokenTypes:xe(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,s)}}),he(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let a=T$(xe(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,s;(s=(a=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(a,{rules:xe(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(xe(this.gastProductionsCache))})),!YA.DEFER_DEFINITION_ERRORS_HANDLING&&!he(this.definitionErrors))throw t=G(this.definitionErrors,a=>a.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),B(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=B(r,"skipValidations")?r.skipValidations:vr.skipValidations}};kp.DEFER_DEFINITION_ERRORS_HANDLING=!1;HA(kp,[HO,JO,eL,tL,nL,rL,aL,iL,oL,lL]);var uL=class extends kp{static{i(this,"EmbeddedActionsParser")}static{o(this,"EmbeddedActionsParser")}constructor(e,t=vr){let r=Ve(t);r.outputCst=!1,super(e,r)}};function XA(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r-1}i(aE,"listCacheHas2");o(aE,"listCacheHas");var mL=aE;function iE(e,t){var r=this.__data__,n=eu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(iE,"listCacheSet2");o(iE,"listCacheSet");var gL=iE;function Fn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tu))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var p=-1,m=!0,v=r&AD?new FE:void 0;for(s.set(e,t),s.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=nM}i(o_,"isLength2");o(o_,"isLength");var Lp=o_,aM="[object Arguments]",iM="[object Array]",sM="[object Boolean]",oM="[object Date]",lM="[object Error]",uM="[object Function]",cM="[object Map]",fM="[object Number]",dM="[object Object]",pM="[object RegExp]",hM="[object Set]",mM="[object String]",gM="[object WeakMap]",yM="[object ArrayBuffer]",vM="[object DataView]",TM="[object Float32Array]",RM="[object Float64Array]",$M="[object Int8Array]",AM="[object Int16Array]",EM="[object Int32Array]",_M="[object Uint8Array]",CM="[object Uint8ClampedArray]",bM="[object Uint16Array]",SM="[object Uint32Array]",ve={};ve[TM]=ve[RM]=ve[$M]=ve[AM]=ve[EM]=ve[_M]=ve[CM]=ve[bM]=ve[SM]=!0;ve[aM]=ve[iM]=ve[yM]=ve[sM]=ve[vM]=ve[oM]=ve[lM]=ve[uM]=ve[cM]=ve[fM]=ve[dM]=ve[pM]=ve[hM]=ve[mM]=ve[gM]=!1;function l_(e){return Ma(e)&&Lp(e.length)&&!!ve[Wa(e)]}i(l_,"baseIsTypedArray2");o(l_,"baseIsTypedArray");var wM=l_;function u_(e){return function(t){return e(t)}}i(u_,"baseUnary2");o(u_,"baseUnary");var IM=u_,c_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ji=c_&&typeof module=="object"&&module&&!module.nodeType&&module,NM=Ji&&Ji.exports===c_,Pu=NM&&cE.process,kM=(function(){try{var e=Ji&&Ji.require&&Ji.require("util").types;return e||Pu&&Pu.binding&&Pu.binding("util")}catch{}})(),Dm=kM,Mm=Dm&&Dm.isTypedArray,PM=Mm?IM(Mm):wM,Dp=PM,OM=Object.prototype,LM=OM.hasOwnProperty;function f_(e,t){var r=rt(e),n=!r&&au(e),a=!r&&!n&&nl(e),s=!r&&!n&&!a&&Dp(e),l=r||n||a||s,u=l?WD(e.length,String):[],c=u.length;for(var f in e)(t||LM.call(e,f))&&!(l&&(f=="length"||a&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||s_(f,c)))&&u.push(f);return u}i(f_,"arrayLikeKeys2");o(f_,"arrayLikeKeys");var DM=f_,MM=Object.prototype;function d_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||MM;return e===r}i(d_,"isPrototype2");o(d_,"isPrototype");var p_=d_;function h_(e,t){return function(r){return e(t(r))}}i(h_,"overArg2");o(h_,"overArg");var xM=h_,FM=xM(Object.keys,Object),GM=FM,jM=Object.prototype,UM=jM.hasOwnProperty;function m_(e){if(!p_(e))return GM(e);var t=[];for(var r in Object(e))UM.call(e,r)&&r!="constructor"&&t.push(r);return t}i(m_,"baseKeys2");o(m_,"baseKeys");var g_=m_;function y_(e){return e!=null&&Lp(e.length)&&!yE(e)}i(y_,"isArrayLike2");o(y_,"isArrayLike");var iu=y_;function v_(e){return iu(e)?DM(e):g_(e)}i(v_,"keys2");o(v_,"keys");var Mp=v_;function T_(e){return jD(e,Mp,qD)}i(T_,"getAllKeys2");o(T_,"getAllKeys");var xm=T_,zM=1,BM=Object.prototype,KM=BM.hasOwnProperty;function R_(e,t,r,n,a,s){var l=r&zM,u=xm(e),c=u.length,f=xm(t),d=f.length;if(c!=d&&!l)return!1;for(var p=c;p--;){var m=u[p];if(!(l?m in t:KM.call(t,m)))return!1}var v=s.get(e),T=s.get(t);if(v&&T)return v==t&&T==e;var w=!0;s.set(e,t),s.set(t,e);for(var N=l;++pKp(e,t,l));return Bn(e,t,n,r,...a)}i(dC,"alternation");o(dC,"alternation");function pC(e,t,r){let n=Fe(e,t,r,{type:Dr});_r(e,n);let a=Bn(e,t,n,r,Ur(e,t,r));return hC(e,t,r,a)}i(pC,"option");o(pC,"option");function Ur(e,t,r){let n=Bx(cr(r.definition,a=>Kp(e,t,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:gC(e,n)}i(Ur,"block");o(Ur,"block");function qp(e,t,r,n,a){let s=n.left,l=n.right,u=Fe(e,t,r,{type:Hx});_r(e,u);let c=Fe(e,t,r,{type:aC});return s.loopback=u,c.loopback=u,e.decisionMap[En(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=u,ke(l,u),a===void 0?(ke(u,s),ke(u,c)):(ke(u,c),ke(u,a.left),ke(a.right,s)),{left:s,right:c}}i(qp,"plus");o(qp,"plus");function Wp(e,t,r,n,a){let s=n.left,l=n.right,u=Fe(e,t,r,{type:Vx});_r(e,u);let c=Fe(e,t,r,{type:aC}),f=Fe(e,t,r,{type:Wx});return u.loopback=f,c.loopback=f,ke(u,s),ke(u,c),ke(l,f),a!==void 0?(ke(f,c),ke(f,a.left),ke(a.right,s)):ke(f,u),e.decisionMap[En(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=u,{left:u,right:c}}i(Wp,"star");o(Wp,"star");function hC(e,t,r,n){let a=n.left,s=n.right;return ke(a,s),e.decisionMap[En(t,"Option",r.idx)]=a,n}i(hC,"optional");o(hC,"optional");function _r(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}i(_r,"defineDecisionState");o(_r,"defineDecisionState");function Bn(e,t,r,n,...a){let s=Fe(e,t,n,{type:qx,start:r});r.end=s;for(let u of a)u!==void 0?(ke(r,u.left),ke(u.right,s)):ke(r,s);let l={left:r,right:s};return e.decisionMap[En(t,mC(n),n.idx)]=r,l}i(Bn,"makeAlts");o(Bn,"makeAlts");function mC(e){if(e instanceof ct)return"Alternation";if(e instanceof We)return"Option";if(e instanceof Se)return"Repetition";if(e instanceof ut)return"RepetitionWithSeparator";if(e instanceof gt)return"RepetitionMandatory";if(e instanceof yt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}i(mC,"getProdType2");o(mC,"getProdType");function gC(e,t){let r=t.length;for(let s=0;se.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};function Vp(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}i(Vp,"getATNConfigKey");o(Vp,"getATNConfigKey");function RC(e,t,r){for(var n=-1,a=e.length;++n0&&r(u)?t>1?Hp(u,t-1,r,n,a):HE(a,u):n||(a[a.length]=u)}return a}i(Hp,"baseFlatten2");o(Hp,"baseFlatten");var _C=Hp;function CC(e,t){return _C(cr(e,t),1)}i(CC,"flatMap2");o(CC,"flatMap");var Qx=CC;function bC(e,t,r,n){for(var a=e.length,s=r+(n?1:-1);n?s--:++s-1}i(NC,"arrayIncludes2");o(NC,"arrayIncludes");var a1=NC;function kC(e,t,r){for(var n=-1,a=e==null?0:e.length;++n=c1){var f=t?null:u1(e);if(f)return Op(f);l=!1,a=UE,c=new FE}else c=t?[]:u;e:for(;++n{let a=n.toString(),s=r[a];return s!==void 0||(s={atnStartState:e,decision:t,states:{}},r[a]=s),s}}i(BC,"createDFACache");o(BC,"createDFACache");var KC=class{static{i(this,"PredicateSet")}static{o(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;rconsole.log(r))}initialize(e){this.atn=sC(e.rules),this.dfas=qC(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,s=this.dfas,l=this.logging,u=En(r,"Alternation",t),f=this.atn.decisionMap[u].decision,d=cr(of({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),p=>cr(p,m=>m[0]));if(Af(d,!1)&&!a){let p=Ym(d,(m,v,T)=>(Ou(v,w=>{w&&(m[w.tokenTypeIdx]=T,Ou(w.categoryMatches,N=>{m[N]=T}))}),m),{});return n?function(m){var v;let T=this.LA(1),w=p[T.tokenTypeIdx];if(m!==void 0&&w!==void 0){let N=(v=m[w])===null||v===void 0?void 0:v.GATE;if(N!==void 0&&N.call(this)===!1)return}return w}:function(){let m=this.LA(1);return p[m.tokenTypeIdx]}}else return n?function(p){let m=new KC,v=p===void 0?0:p.length;for(let w=0;wcr(p,m=>m[0]));if(Af(d)&&d[0][0]&&!a){let p=d[0],m=p1(p);if(m.length===1&&R1(m[0].categoryMatches)){let T=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===T}}else{let v=Ym(m,(T,w)=>(w!==void 0&&(T[w.tokenTypeIdx]=!0,Ou(w.categoryMatches,N=>{T[N]=!0})),T),{});return function(){let T=this.LA(1);return v[T.tokenTypeIdx]===!0}}}return function(){let p=Ro.call(this,s,f,Xm,l);return typeof p=="object"?!1:p===0}}};function Af(e,t=!0){let r=new Set;for(let n of e){let a=new Set;for(let s of n){if(s===void 0){if(t)break;return!1}let l=[s.tokenTypeIdx].concat(s.categoryMatches);for(let u of l)if(r.has(u)){if(!a.has(u))return!1}else r.add(u),a.add(u)}}return!0}i(Af,"isLL1Sequence");o(Af,"isLL1Sequence");function qC(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;nvn(a)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${XC(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}i(YC,"buildAmbiguityError");o(YC,"buildAmbiguityError");function XC(e){if(e instanceof et)return"SUBRULE";if(e instanceof We)return"OPTION";if(e instanceof ct)return"OR";if(e instanceof gt)return"AT_LEAST_ONE";if(e instanceof yt)return"AT_LEAST_ONE_SEP";if(e instanceof ut)return"MANY_SEP";if(e instanceof Se)return"MANY";if(e instanceof Te)return"CONSUME";throw Error("non exhaustive match")}i(XC,"getProductionDslName2");o(XC,"getProductionDslName");function JC(e,t,r){let n=Qx(t.configs.elements,s=>s.state.transitions),a=d1(n.filter(s=>s instanceof zp).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:e}}i(JC,"buildAdaptivePredictError");o(JC,"buildAdaptivePredictError");function ZC(e,t){return e.edges[t.tokenTypeIdx]}i(ZC,"getExistingTargetState");o(ZC,"getExistingTargetState");function QC(e,t,r){let n=new $f,a=[];for(let l of e.elements){if(r.is(l.alt)===!1)continue;if(l.state.type===Ms){a.push(l);continue}let u=l.state.transitions.length;for(let c=0;c0&&!ab(s))for(let l of a)s.add(l);return s}i(QC,"computeReachSet");o(QC,"computeReachSet");function eb(e,t){if(e instanceof zp&&Ap(t,e.tokenType))return e.target}i(eb,"getReachableTarget");o(eb,"getReachableTarget");function tb(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}i(tb,"getUniqueAlt");o(tb,"getUniqueAlt");function Yp(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}i(Yp,"newDFAState");o(Yp,"newDFAState");function Ef(e,t,r,n){return n=Xp(e,n),t.edges[r.tokenTypeIdx]=n,n}i(Ef,"addDFAEdge");o(Ef,"addDFAEdge");function Xp(e,t){if(t===al)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}i(Xp,"addDFAState");o(Xp,"addDFAState");function rb(e){let t=new $f,r=e.transitions.length;for(let n=0;n0){let a=[...e.stack],l={state:a.pop(),alt:e.alt,stack:a};hs(l,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let a=0;a1)return!0;return!1}i(lb,"hasConflictingAltSet");o(lb,"hasConflictingAltSet");function ub(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}i(ub,"hasStateAssociatedWithOneAlt");o(ub,"hasStateAssociatedWithOneAlt");ys();var cb=class{static{i(this,"CstNodeBuilder")}static{o(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Zp(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new pu;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new il(e.startOffset,e.image.length,ts(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){let t=e.container;if(t){let r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){let t=[];for(let a of e){let s=new il(a.startOffset,a.image.length,ts(a),a.tokenType,!0);s.root=this.rootNode,t.push(s)}let r=this.current,n=!1;if(r.content.length>0){r.content.push(...t);return}for(;r.container;){let a=r.container.content.indexOf(r);if(a>0){r.container.content.splice(a,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},Jp=class{static{i(this,"AbstractCstNode")}static{o(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},il=class extends Jp{static{i(this,"LeafCstNodeImpl")}static{o(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(e,t,r,n,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},pu=class extends Jp{static{i(this,"CompositeCstNodeImpl")}static{o(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new _1(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},_1=class fb extends Array{static{i(this,"_CstNodeContainer")}static{o(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,fb.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}},Zp=class extends pu{static{i(this,"RootCstNodeImpl")}static{o(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},sl=Symbol("Datatype");function $o(e){return e.$type===sl}i($o,"isDataTypeNode");o($o,"isDataTypeNode");var Jm="\u200B",db=o(e=>e.endsWith(Jm)?e:e+Jm,"withRuleSuffix"),Qp=class{static{i(this,"AbstractLangiumParser")}static{o(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new b1(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new gb(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},pb=class extends Qp{static{i(this,"LangiumParser")}static{o(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new cb,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),n;Na(e)&&(n=e.name,this.registerPrecedenceMap(e));let a=this.wrapper.DEFINE_RULE(db(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),Qe(e)&&e.entry&&(this.mainRule=a),a}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let n=0;n0&&(t=this.construct()),t===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return n=>{let a=!this.isRecording()&&e!==void 0;if(a){let s={$type:e};this.stack.push(s),e===sl?s.value="":t!==void 0&&(s.$infixName=t)}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let n=0;nr)return t.splice(0,n);return t.splice(0,t.length)}consume(e,t,r){let n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){let a=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(a);let s=this.nodeBuilder.buildLeafNode(n,r),{assignment:l,crossRef:u}=this.getAssignment(r),c=this.current;if(l){let f=pr(r)?n.image:this.converter.convert(n.image,s);this.assign(l.operator,l.feature,f,s,u)}else if($o(c)){let f=n.image;pr(r)||(f=this.converter.convert(f,s).toString()),c.value+=f}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,n,a){let s;!this.isRecording()&&!r&&(s=this.nodeBuilder.buildCompositeNode(n));let l;try{l=this.wrapper.wrapSubrule(e,t,a)}finally{this.isRecording()||(l===void 0&&!r&&(l=this.construct()),l!==void 0&&s&&s.length>0&&this.performSubruleAssignment(l,n,s))}}performSubruleAssignment(e,t,r){let{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){let s=this.current;if($o(s))s.value+=e.toString();else if(typeof e=="object"&&e){let u=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(u)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);let a={$type:e};this.stack.push(a),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):$o(e)?this.converter.convert(e.value,e.$cstNode):(Jf(this.astReflection,e),e)}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let a=0,s=-1;for(let T=0;Ts?(s=N.precedence,a=T):N.precedence===s&&(N.rightAssoc||(a=T))}let l=n.slice(0,a),u=n.slice(a+1),c=r.slice(0,a+1),f=r.slice(a+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:l},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:f,operators:u},m=this.constructInfix(d,t),v=this.constructInfix(p,t);return{$type:e.$type,$cstNode:e.$cstNode,left:m,operator:n[a],right:v}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=bn(e,dr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&wn(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){let s=this.current,l;switch(a==="single"&&typeof r=="string"?l=this.linker.buildReference(s,t,n,r):a==="multi"&&typeof r=="string"?l=this.linker.buildMultiReference(s,t,n,r):l=r,e){case"=":{s[t]=l;break}case"?=":{s[t]=!0;break}case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(l)}}assignWithoutOverride(e,t){for(let[n,a]of Object.entries(t)){let s=e[n];s===void 0?e[n]=a:Array.isArray(s)&&Array.isArray(a)&&(a.push(...s),e[n]=a)}let r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},hb=class{static{i(this,"AbstractParserErrorMessageProvider")}static{o(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return $a.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return $a.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return $a.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return $a.buildEarlyExitMessage(e)}},eh=class extends hb{static{i(this,"LangiumParserErrorMessageProvider")}static{o(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},mb=class extends Qp{static{i(this,"LangiumCompletionParser")}static{o(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let r=this.wrapper.DEFINE_RULE(db(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,n,a){this.before(n),this.wrapper.wrapSubrule(e,t,a),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},C1={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new eh},gb=class extends uL{static{i(this,"ChevrotainWrapper")}static{o(this,"ChevrotainWrapper")}constructor(e,t){let r=t&&"maxLookahead"in t;super(e,{...C1,lookaheadStrategy:r?new Ip({maxLookahead:t.maxLookahead}):new E1({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},b1=class extends gb{static{i(this,"ProfilerWrapper")}static{o(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};function hu(e,t,r){return yb({parser:t,tokens:r,ruleNames:new Map},e),t}i(hu,"createParser");o(hu,"createParser");function yb(e,t){let r=Il(t,!1),n=oe(t.rules).filter(Qe).filter(s=>r.has(s));for(let s of n){let l={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(s,Mr(l,s.definition))}let a=oe(t.rules).filter(Na).filter(s=>r.has(s));for(let s of a)e.parser.rule(s,vb(e,s))}i(yb,"buildRules");o(yb,"buildRules");function vb(e,t){let r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Ct(r))throw new Error("Cannot use terminal rule in infix expression");let n=t.operators.precedences.flatMap(v=>v.operators),a={$type:"Group",elements:[]},s={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},l={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(s,l);let c={$container:l,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},f={...s,$container:l};l.elements.push(c,f);let p=n.map(v=>e.tokens[v.value]).map((v,T)=>({ALT:o(()=>e.parser.consume(T,v,c),"ALT")})),m;return v=>{m??(m=mu(e,r)),e.parser.subrule(0,m,!1,s,v),e.parser.many(0,{DEF:o(()=>{e.parser.alternatives(0,p),e.parser.subrule(1,m,!1,f,v)},"DEF")})}}i(vb,"buildInfixRule");o(vb,"buildInfixRule");function Mr(e,t,r=!1){let n;if(pr(t))n=Cb(e,t);else if(Pr(t))n=Tb(e,t);else if(dr(t))n=Mr(e,t.terminal);else if(wn(t))n=th(e,t);else if(hr(t))n=Rb(e,t);else if(Rl(t))n=Ab(e,t);else if(_l(t))n=Eb(e,t);else if(In(t))n=_b(e,t);else if(ad(t)){let a=e.consume++;n=o(()=>e.parser.consume(a,Lr,t),"method")}else throw new bl(t.$cstNode,`Unexpected element type: ${t.$type}`);return rh(e,r?void 0:ms(t),n,t.cardinality)}i(Mr,"buildElement");o(Mr,"buildElement");function Tb(e,t){let r=Rn(t);return()=>e.parser.action(r,t)}i(Tb,"buildAction");o(Tb,"buildAction");function Rb(e,t){let r=t.rule.ref;if(Sn(r)){let n=e.subrule++,a=Qe(r)&&r.fragment,s=t.arguments.length>0?$b(r,t.arguments):()=>({}),l;return u=>{l??(l=mu(e,r)),e.parser.subrule(n,l,a,t,s(u))}}else if(Ct(r)){let n=e.consume++,a=ol(e,r.name);return()=>e.parser.consume(n,a,t)}else if(r)Fr(r);else throw new bl(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}i(Rb,"buildRuleCall");o(Rb,"buildRuleCall");function $b(e,t){if(t.some(n=>n.calledByName)){let n=t.map(a=>({parameterName:a.parameter?.ref?.name,predicate:Nt(a.value)}));return a=>{let s={};for(let{parameterName:l,predicate:u}of n)l&&(s[l]=u(a));return s}}else{let n=t.map(a=>Nt(a.value));return a=>{let s={};for(let l=0;lt(n)||r(n)}else if(rd(e)){let t=Nt(e.left),r=Nt(e.right);return n=>t(n)&&r(n)}else if(od(e)){let t=Nt(e.value);return r=>!t(r)}else if(ld(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(ed(e)){let t=!!e.true;return()=>t}Fr(e)}i(Nt,"buildPredicate");o(Nt,"buildPredicate");function Ab(e,t){if(t.elements.length===1)return Mr(e,t.elements[0]);{let r=[];for(let a of t.elements){let s={ALT:Mr(e,a,!0)},l=ms(a);l&&(s.GATE=Nt(l)),r.push(s)}let n=e.or++;return a=>e.parser.alternatives(n,r.map(s=>{let l={ALT:o(()=>s.ALT(a),"ALT")},u=s.GATE;return u&&(l.GATE=()=>u(a)),l}))}}i(Ab,"buildAlternatives");o(Ab,"buildAlternatives");function Eb(e,t){if(t.elements.length===1)return Mr(e,t.elements[0]);let r=[];for(let u of t.elements){let c={ALT:Mr(e,u,!0)},f=ms(u);f&&(c.GATE=Nt(f)),r.push(c)}let n=e.or++,a=o((u,c)=>{let f=c.getRuleStack().join("-");return`uGroup_${u}_${f}`},"idFunc"),s=o(u=>e.parser.alternatives(n,r.map((c,f)=>{let d={ALT:o(()=>!0,"ALT")},p=e.parser;d.ALT=()=>{if(c.ALT(u),!p.isRecording()){let v=a(n,p);p.unorderedGroups.get(v)||p.unorderedGroups.set(v,[]);let T=p.unorderedGroups.get(v);typeof T?.[f]>"u"&&(T[f]=!0)}};let m=c.GATE;return m?d.GATE=()=>m(u):d.GATE=()=>!p.unorderedGroups.get(a(n,p))?.[f],d})),"alternatives"),l=rh(e,ms(t),s,"*");return u=>{l(u),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}i(Eb,"buildUnorderedGroup");o(Eb,"buildUnorderedGroup");function _b(e,t){let r=t.elements.map(n=>Mr(e,n));return n=>r.forEach(a=>a(n))}i(_b,"buildGroup");o(_b,"buildGroup");function ms(e){if(In(e))return e.guardCondition}i(ms,"getGuardCondition");o(ms,"getGuardCondition");function th(e,t,r=t.terminal){if(r)if(hr(r)&&Qe(r.rule.ref)){let n=r.rule.ref,a=e.subrule++,s;return l=>{s??(s=mu(e,n)),e.parser.subrule(a,s,!1,t,l)}}else if(hr(r)&&Ct(r.rule.ref)){let n=e.consume++,a=ol(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}else if(pr(r)){let n=e.consume++,a=ol(e,r.value);return()=>e.parser.consume(n,a,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 a=Ol(t.type.ref)?.terminal;if(!a)throw new Error("Could not find name assignment for type: "+Rn(t.type.ref));return th(e,t,a)}}i(th,"buildCrossReference");o(th,"buildCrossReference");function Cb(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)}i(Cb,"buildKeyword");o(Cb,"buildKeyword");function rh(e,t,r,n){let a=t&&Nt(t);if(!n)if(a){let s=e.or++;return l=>e.parser.alternatives(s,[{ALT:o(()=>r(l),"ALT"),GATE:o(()=>a(l),"GATE")},{ALT:gf(),GATE:o(()=>!a(l),"GATE")}])}else return r;if(n==="*"){let s=e.many++;return l=>e.parser.many(s,{DEF:o(()=>r(l),"DEF"),GATE:a?()=>a(l):void 0})}else if(n==="+"){let s=e.many++;if(a){let l=e.or++;return u=>e.parser.alternatives(l,[{ALT:o(()=>e.parser.atLeastOne(s,{DEF:o(()=>r(u),"DEF")}),"ALT"),GATE:o(()=>a(u),"GATE")},{ALT:gf(),GATE:o(()=>!a(u),"GATE")}])}else return l=>e.parser.atLeastOne(s,{DEF:o(()=>r(l),"DEF")})}else if(n==="?"){let s=e.optional++;return l=>e.parser.optional(s,{DEF:o(()=>r(l),"DEF"),GATE:a?()=>a(l):void 0})}else Fr(n)}i(rh,"wrap");o(rh,"wrap");function mu(e,t){let r=bb(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}i(mu,"getRule");o(mu,"getRule");function bb(e,t){if(Sn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!Qe(n);)(In(n)||Rl(n)||_l(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,e.ruleNames.set(t,a),a}}i(bb,"getRuleName");o(bb,"getRuleName");function ol(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}i(ol,"getToken");o(ol,"getToken");function nh(e){let t=e.Grammar,r=e.parser.Lexer,n=new mb(e);return hu(t,n,r.definition),n.finalize(),n}i(nh,"createCompletionParser");o(nh,"createCompletionParser");function ah(e){let t=ih(e);return t.finalize(),t}i(ah,"createLangiumParser");o(ah,"createLangiumParser");function ih(e){let t=e.Grammar,r=e.parser.Lexer,n=new pb(e);return hu(t,n,r.definition)}i(ih,"prepareLangiumParser");o(ih,"prepareLangiumParser");var gu=class{static{i(this,"DefaultTokenBuilder")}static{o(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=oe(Il(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ct).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=Es(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return typeof r=="function"&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=wl(t)?Ze.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,n)=>(t.lastIndex=n,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Sn).flatMap(n=>$r(n).filter(pr)).distinct(n=>n.value).toArray().sort((n,a)=>a.value.length-n.value.length).map(n=>this.buildKeywordToken(n,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return typeof n=="function"&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,t){return t?new RegExp(ja(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{let a=n?.PATTERN;return a?.source&&Nd("^"+a.source+"$",e.value)&&r.push(n),r},[])}},sh=class{static{i(this,"DefaultValueConverter")}static{o(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(wn(r)&&(r=Dd(r)),hr(r)){let n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return Kt.convertInt(t);case"STRING":return Kt.convertString(t);case"ID":return Kt.convertID(t)}switch(Kd(e)?.toLowerCase()){case"number":return Kt.convertNumber(t);case"boolean":return Kt.convertBoolean(t);case"bigint":return Kt.convertBigint(t);case"date":return Kt.convertDate(t);default:return t}}},Kt;(function(e){function t(f){let d="";for(let p=1;p{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}i(yu,"delayNextTick");o(yu,"delayNextTick");var Ao=0,Sb=10;function vu(){return Ao=performance.now(),new pe.CancellationTokenSource}i(vu,"startCancelableOperation");o(vu,"startCancelableOperation");function oh(e){Sb=e}i(oh,"setInterruptionPeriod");o(oh,"setInterruptionPeriod");var Vt=Symbol("OperationCancelled");function Kn(e){return e===Vt}i(Kn,"isOperationCancelled");o(Kn,"isOperationCancelled");async function je(e){if(e===pe.CancellationToken.None)return;let t=performance.now();if(t-Ao>=Sb&&(Ao=t,await yu(),Ao=performance.now()),e.isCancellationRequested)throw Vt}i(je,"interruptAndCheck");o(je,"interruptAndCheck");var Tr=class{static{i(this,"Deferred")}static{o(this,"Deferred")}constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},Zm=class _f{static{i(this,"_FullTextDocument")}static{o(this,"FullTextDocument")}constructor(t,r,n,a){this._uri=t,this._languageId=r,this._version=n,this._content=a,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(_f.isIncremental(n)){let a=uh(n.range),s=this.offsetAt(a.start),l=this.offsetAt(a.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(l,this._content.length);let u=Math.max(a.start.line,0),c=Math.max(a.end.line,0),f=this._lineOffsets,d=Cf(n.text,!1,s);if(c-u===d.length)for(let m=0,v=d.length;mt?a=l:n=l+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 a=t.line+1r&&lh(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}},ll;(function(e){function t(a,s,l,u){return new Zm(a,s,l,u)}i(t,"create"),o(t,"create"),e.create=t;function r(a,s,l){if(a instanceof Zm)return a.update(s,l),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}i(r,"update"),o(r,"update"),e.update=r;function n(a,s){let l=a.getText(),u=ul(s.map(wb),(d,p)=>{let m=d.range.start.line-p.range.start.line;return m===0?d.range.start.character-p.range.start.character:m}),c=0,f=[];for(let d of u){let p=a.offsetAt(d.range.start);if(pc&&f.push(l.substring(c,p)),d.newText.length&&f.push(d.newText),c=a.offsetAt(d.range.end)}return f.push(l.substr(c)),f.join("")}i(n,"applyEdits"),o(n,"applyEdits"),e.applyEdits=n})(ll||(ll={}));function ul(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);ul(n,t),ul(a,t);let s=0,l=0,u=0;for(;sr.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}i(uh,"getWellformedRange");o(uh,"getWellformedRange");function wb(e){let t=uh(e.range);return t!==e.range?{newText:e.newText,range:t}:e}i(wb,"getWellformedEdit");o(wb,"getWellformedEdit");var Ib;(()=>{"use strict";var e={975:O=>{function C(R){if(typeof R!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(R))}i(C,"e2"),o(C,"e");function y(R,$){for(var b,L="",x=0,M=-1,U=0,W=0;W<=R.length;++W){if(W2){var le=L.lastIndexOf("/");if(le!==L.length-1){le===-1?(L="",x=0):x=(L=L.slice(0,le)).length-1-L.lastIndexOf("/"),M=W,U=0;continue}}else if(L.length===2||L.length===1){L="",x=0,M=W,U=0;continue}}$&&(L.length>0?L+="/..":L="..",x=2)}else L.length>0?L+="/"+R.slice(M+1,W):L=R.slice(M+1,W),x=W-M-1;M=W,U=0}else b===46&&U!==-1?++U:U=-1}return L}i(y,"r2"),o(y,"r");var E={resolve:o(function(){for(var R,$="",b=!1,L=arguments.length-1;L>=-1&&!b;L--){var x;L>=0?x=arguments[L]:(R===void 0&&(R=process.cwd()),x=R),C(x),x.length!==0&&($=x+"/"+$,b=x.charCodeAt(0)===47)}return $=y($,!b),b?$.length>0?"/"+$:"/":$.length>0?$:"."},"resolve"),normalize:o(function(R){if(C(R),R.length===0)return".";var $=R.charCodeAt(0)===47,b=R.charCodeAt(R.length-1)===47;return(R=y(R,!$)).length!==0||$||(R="."),R.length>0&&b&&(R+="/"),$?"/"+R:R},"normalize"),isAbsolute:o(function(R){return C(R),R.length>0&&R.charCodeAt(0)===47},"isAbsolute"),join:o(function(){if(arguments.length===0)return".";for(var R,$=0;$0&&(R===void 0?R=b:R+="/"+b)}return R===void 0?".":E.normalize(R)},"join"),relative:o(function(R,$){if(C(R),C($),R===$||(R=E.resolve(R))===($=E.resolve($)))return"";for(var b=1;bW){if($.charCodeAt(M+H)===47)return $.slice(M+H+1);if(H===0)return $.slice(M+H)}else x>W&&(R.charCodeAt(b+H)===47?le=H:H===0&&(le=0));break}var Oe=R.charCodeAt(b+H);if(Oe!==$.charCodeAt(M+H))break;Oe===47&&(le=H)}var ie="";for(H=b+le+1;H<=L;++H)H!==L&&R.charCodeAt(H)!==47||(ie.length===0?ie+="..":ie+="/..");return ie.length>0?ie+$.slice(M+le):(M+=le,$.charCodeAt(M)===47&&++M,$.slice(M))},"relative"),_makeLong:o(function(R){return R},"_makeLong"),dirname:o(function(R){if(C(R),R.length===0)return".";for(var $=R.charCodeAt(0),b=$===47,L=-1,x=!0,M=R.length-1;M>=1;--M)if(($=R.charCodeAt(M))===47){if(!x){L=M;break}}else x=!1;return L===-1?b?"/":".":b&&L===1?"//":R.slice(0,L)},"dirname"),basename:o(function(R,$){if($!==void 0&&typeof $!="string")throw new TypeError('"ext" argument must be a string');C(R);var b,L=0,x=-1,M=!0;if($!==void 0&&$.length>0&&$.length<=R.length){if($.length===R.length&&$===R)return"";var U=$.length-1,W=-1;for(b=R.length-1;b>=0;--b){var le=R.charCodeAt(b);if(le===47){if(!M){L=b+1;break}}else W===-1&&(M=!1,W=b+1),U>=0&&(le===$.charCodeAt(U)?--U==-1&&(x=b):(U=-1,x=W))}return L===x?x=W:x===-1&&(x=R.length),R.slice(L,x)}for(b=R.length-1;b>=0;--b)if(R.charCodeAt(b)===47){if(!M){L=b+1;break}}else x===-1&&(M=!1,x=b+1);return x===-1?"":R.slice(L,x)},"basename"),extname:o(function(R){C(R);for(var $=-1,b=0,L=-1,x=!0,M=0,U=R.length-1;U>=0;--U){var W=R.charCodeAt(U);if(W!==47)L===-1&&(x=!1,L=U+1),W===46?$===-1?$=U:M!==1&&(M=1):$!==-1&&(M=-1);else if(!x){b=U+1;break}}return $===-1||L===-1||M===0||M===1&&$===L-1&&$===b+1?"":R.slice($,L)},"extname"),format:o(function(R){if(R===null||typeof R!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof R);return(function($,b){var L=b.dir||b.root,x=b.base||(b.name||"")+(b.ext||"");return L?L===b.root?L+x:L+"/"+x:x})(0,R)},"format"),parse:o(function(R){C(R);var $={root:"",dir:"",base:"",ext:"",name:""};if(R.length===0)return $;var b,L=R.charCodeAt(0),x=L===47;x?($.root="/",b=1):b=0;for(var M=-1,U=0,W=-1,le=!0,H=R.length-1,Oe=0;H>=b;--H)if((L=R.charCodeAt(H))!==47)W===-1&&(le=!1,W=H+1),L===46?M===-1?M=H:Oe!==1&&(Oe=1):M!==-1&&(Oe=-1);else if(!le){U=H+1;break}return M===-1||W===-1||Oe===0||Oe===1&&M===W-1&&M===U+1?W!==-1&&($.base=$.name=U===0&&x?R.slice(1,W):R.slice(U,W)):(U===0&&x?($.name=R.slice(1,M),$.base=R.slice(1,W)):($.name=R.slice(U,M),$.base=R.slice(U,W)),$.ext=R.slice(M,W)),U>0?$.dir=R.slice(0,U-1):x&&($.dir="/"),$},"parse"),sep:"/",delimiter:":",win32:null,posix:null};E.posix=E,O.exports=E}},t={};function r(O){var C=t[O];if(C!==void 0)return C.exports;var y=t[O]={exports:{}};return e[O](y,y.exports,r),y.exports}i(r,"r"),o(r,"r"),r.d=(O,C)=>{for(var y in C)r.o(C,y)&&!r.o(O,y)&&Object.defineProperty(O,y,{enumerable:!0,get:C[y]})},r.o=(O,C)=>Object.prototype.hasOwnProperty.call(O,C),r.r=O=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:o(()=>m,"URI"),Utils:o(()=>Re,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//;function c(O,C){if(!O.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!s.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!l.test(O.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(u.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}i(c,"a"),o(c,"a");let f="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static{i(this,"l")}static{o(this,"l")}static isUri(C){return C instanceof m||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,y,E,R,$,b=!1){typeof C=="object"?(this.scheme=C.scheme||f,this.authority=C.authority||f,this.path=C.path||f,this.query=C.query||f,this.fragment=C.fragment||f):(this.scheme=(function(L,x){return L||x?L:"file"})(C,b),this.authority=y||f,this.path=(function(L,x){switch(L){case"https":case"http":case"file":x?x[0]!==d&&(x=d+x):x=d}return x})(this.scheme,E||f),this.query=R||f,this.fragment=$||f,c(this,b))}get fsPath(){return S(this,!1)}with(C){if(!C)return this;let{scheme:y,authority:E,path:R,query:$,fragment:b}=C;return y===void 0?y=this.scheme:y===null&&(y=f),E===void 0?E=this.authority:E===null&&(E=f),R===void 0?R=this.path:R===null&&(R=f),$===void 0?$=this.query:$===null&&($=f),b===void 0?b=this.fragment:b===null&&(b=f),y===this.scheme&&E===this.authority&&R===this.path&&$===this.query&&b===this.fragment?this:new T(y,E,R,$,b)}static parse(C,y=!1){let E=p.exec(C);return E?new T(E[2]||f,ee(E[4]||f),ee(E[5]||f),ee(E[7]||f),ee(E[9]||f),y):new T(f,f,f,f,f)}static file(C){let y=f;if(a&&(C=C.replace(/\\/g,d)),C[0]===d&&C[1]===d){let E=C.indexOf(d,2);E===-1?(y=C.substring(2),C=d):(y=C.substring(2,E),C=C.substring(E)||d)}return new T("file",y,C,f,f)}static from(C){let y=new T(C.scheme,C.authority,C.path,C.query,C.fragment);return c(y,!0),y}toString(C=!1){return _(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof m)return C;{let y=new T(C);return y._formatted=C.external,y._fsPath=C._sep===v?C.fsPath:null,y}}return C}}let v=a?1:void 0;class T extends m{static{i(this,"d")}static{o(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=S(this,!1)),this._fsPath}toString(C=!1){return C?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=v),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let w={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 N(O,C,y){let E,R=-1;for(let $=0;$=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===46||b===95||b===126||C&&b===47||y&&b===91||y&&b===93||y&&b===58)R!==-1&&(E+=encodeURIComponent(O.substring(R,$)),R=-1),E!==void 0&&(E+=O.charAt($));else{E===void 0&&(E=O.substr(0,$));let L=w[b];L!==void 0?(R!==-1&&(E+=encodeURIComponent(O.substring(R,$)),R=-1),E+=L):R===-1&&(R=$)}}return R!==-1&&(E+=encodeURIComponent(O.substring(R))),E!==void 0?E:O}i(N,"m"),o(N,"m");function I(O){let C;for(let y=0;y1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?C?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,a&&(y=y.replace(/\//g,"\\")),y}i(S,"v"),o(S,"v");function _(O,C){let y=C?I:N,E="",{scheme:R,authority:$,path:b,query:L,fragment:x}=O;if(R&&(E+=R,E+=":"),($||R==="file")&&(E+=d,E+=d),$){let M=$.indexOf("@");if(M!==-1){let U=$.substr(0,M);$=$.substr(M+1),M=U.lastIndexOf(":"),M===-1?E+=y(U,!1,!1):(E+=y(U.substr(0,M),!1,!1),E+=":",E+=y(U.substr(M+1),!1,!0)),E+="@"}$=$.toLowerCase(),M=$.lastIndexOf(":"),M===-1?E+=y($,!1,!0):(E+=y($.substr(0,M),!1,!0),E+=$.substr(M))}if(b){if(b.length>=3&&b.charCodeAt(0)===47&&b.charCodeAt(2)===58){let M=b.charCodeAt(1);M>=65&&M<=90&&(b=`/${String.fromCharCode(M+32)}:${b.substr(3)}`)}else if(b.length>=2&&b.charCodeAt(1)===58){let M=b.charCodeAt(0);M>=65&&M<=90&&(b=`${String.fromCharCode(M+32)}:${b.substr(2)}`)}E+=y(b,!0,!1)}return L&&(E+="?",E+=y(L,!1,!1)),x&&(E+="#",E+=C?x:N(x,!1,!1)),E}i(_,"b"),o(_,"b");function P(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+P(O.substr(3)):O}}i(P,"C"),o(P,"C");let j=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ee(O){return O.match(j)?O.replace(j,(C=>P(C))):O}i(ee,"w"),o(ee,"w");var X=r(975);let ce=X.posix||X,me="/";var Re;(function(O){O.joinPath=function(C,...y){return C.with({path:ce.join(C.path,...y)})},O.resolvePath=function(C,...y){let E=C.path,R=!1;E[0]!==me&&(E=me+E,R=!0);let $=ce.resolve(E,...y);return R&&$[0]===me&&!C.authority&&($=$.substring(1)),C.with({path:$})},O.dirname=function(C){if(C.path.length===0||C.path===me)return C;let y=ce.dirname(C.path);return y.length===1&&y.charCodeAt(0)===46&&(y=""),C.with({path:y})},O.basename=function(C){return ce.basename(C.path)},O.extname=function(C){return ce.extname(C.path)}})(Re||(Re={})),Ib=n})();var{URI:dt,Utils:vi}=Ib,Je;(function(e){e.basename=vi.basename,e.dirname=vi.dirname,e.extname=vi.extname,e.joinPath=vi.joinPath,e.resolvePath=vi.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(l,u){return l?.toString()===u?.toString()}i(r,"equals"),o(r,"equals"),e.equals=r;function n(l,u){let c=typeof l=="string"?dt.parse(l).path:l.path,f=typeof u=="string"?dt.parse(u).path:u.path,d=c.split("/").filter(w=>w.length>0),p=f.split("/").filter(w=>w.length>0);if(t){let w=/^[A-Z]:$/;if(d[0]&&w.test(d[0])&&(d[0]=d[0].toLowerCase()),p[0]&&w.test(p[0])&&(p[0]=p[0].toLowerCase()),d[0]!==p[0])return f.substring(1)}let m=0;for(;m({name:n.name,uri:Je.joinPath(dt.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(Je.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let n=this.root;for(let a of r){let s=n.children.get(a);if(!s)if(t)s={name:a,children:new Map,parent:n},n.children.set(a,s);else return;n=s}return n}collectValues(e){let t=[];e.element&&t.push(e.element);for(let r of e.children.values())t.push(...this.collectValues(r));return t}},Z;(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"})(Z||(Z={}));var Nb=class{static{i(this,"DefaultLangiumDocumentFactory")}static{o(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=pe.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??dt.parse(e.uri),pe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return pe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t=="string"){let n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else if("$model"in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){let n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else{let n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let a;if(r)a={parseResult:e,uri:t,state:Z.Parsed,references:[],textDocument:r};else{let s=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:Z.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),a=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{let s=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:s})}return r!==a&&(e.parseResult=await this.parseAsync(e.uri,a,t),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n;return()=>n??(n=ll.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},kb=class{static{i(this,"DefaultLangiumDocuments")}static{o(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new ch,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return oe(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(n=>(this.addDocument(n),n));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,Z.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=Z.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let n of r)n.state=Z.Changed;return this.documentTrie.delete(t),r}},Zr=Symbol("RefResolving"),Pb=class{static{i(this,"DefaultLinker")}static{o(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=pe.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let n of Pt(e.parseResult.value))await je(t),Ia(n).forEach(a=>{let s=`${n.$type}:${a.property}`;r.startSubTask(s);try{this.doLink(a,e)}finally{r.stopSubTask(s)}})}finally{r.stop()}}else for(let r of Pt(e.parseResult.value))await je(t),Ia(r).forEach(n=>this.doLink(n,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Zr;try{let n=this.getCandidate(e);if(tn(n))r._ref=n;else{r._nodeDescription=n;let a=this.loadAstNode(n);r._ref=a??this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);let a=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${a}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=Zr;try{let n=this.getCandidates(e),a=[];if(tn(n))r._linkingError=n;else for(let s of n){let l=this.loadAstNode(s);l&&a.push({ref:l,$nodeDescription:s})}r._items=a}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(let t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(n=>`${n.documentUri}#${n.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,t,r,n){let a=this,s={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Pe(this._ref))return this._ref;if(Hf(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=Zr;let l=Aa(e).$document,u=a.getLinkedNode({reference:s,container:e,property:t});if(u.error&&l&&l.state0))return this._linkingError=a.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(tn(t))return{error:t};let r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let r=Aa(e.container).$document;r&&r.statewn(t)&&t.isMulti)}findDeclarations(e){if(e){let t=Gd(e),r=e.astNode;if(t&&r){let n=r[t.feature];if(Xe(n)||Ht(n))return So(n);if(Array.isArray(n)){for(let a of n)if((Xe(a)||Ht(a))&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return So(a)}}if(r){let n=this.nameProvider.getNameNode(r);if(n&&(n===e||vd(e,n)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(let n of Ia(r))if(Ht(n.reference)&&n.reference.items.some(a=>a.ref===e))return n.reference.items.map(a=>a.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),r=[];for(let n of t){let a=this.nameProvider.getNameNode(n)??n.$cstNode;a&&r.push(a)}return r}findReferences(e,t){let r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(a=>Je.equals(a.sourceUri,t.documentUri))),r.push(...n),oe(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let n of t){let a=this.nameProvider.getNameNode(n);if(a){let s=kt(n),l=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:s.uri,sourcePath:l,targetUri:s.uri,targetPath:l,segment:Pa(a),local:!0})}}return r}},Rr=class{static{i(this,"MultiMap")}static{o(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return es.sum(oe(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let r=this.map.get(e);if(r){let n=r.indexOf(t);if(n>=0)return r.length===1?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?oe(t):ba}has(e,t){if(t===void 0)return this.map.has(e);{let r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(n=>e(n,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return oe(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return oe(this.map.keys())}values(){return oe(this.map.values()).flat()}entriesGroupedByKey(){return oe(this.map.entries())}},cl=class{static{i(this,"BiMap")}static{o(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}},Db=class{static{i(this,"DefaultScopeComputation")}static{o(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=pe.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=Ts,n=pe.CancellationToken.None){let a=[];this.addExportedSymbol(e,a,t);for(let s of r(e))await je(n),this.addExportedSymbol(s,a,t);return a}addExportedSymbol(e,t,r){let n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=pe.CancellationToken.None){let r=e.parseResult.value,n=new Rr;for(let a of $r(r))await je(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){let n=e.$container;if(n){let a=this.nameProvider.getName(e);a&&r.add(n,this.descriptions.createDescription(e,a,t))}}},bf=class{static{i(this,"StreamScope")}static{o(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===t):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(n=>n.name.toLowerCase()===t):this.elements.filter(n=>n.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},S1=class{static{i(this,"MapScope")}static{o(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(a,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?oe(n).concat(this.outerScope.getElements(e)):oe(n)}getAllElements(){let e=oe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Mb=class{static{i(this,"MultiMapScope")}static{o(this,"MultiMapScope")}constructor(e,t,r){this.elements=new Rr,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(a,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||r.length===0)&&this.outerScope?oe(r).concat(this.outerScope.getElements(e)):oe(r)}getAllElements(){let e=oe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},w1={getElement(){},getElements(){return ba},getAllElements(){return ba}},Tu=class{static{i(this,"DisposableCache")}static{o(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},dh=class extends Tu{static{i(this,"SimpleCache")}static{o(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},Ru=class extends Tu{static{i(this,"ContextCache")}static{o(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();let n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){let a=r();return n.set(t,a),a}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},xb=class extends Ru{static{i(this,"DocumentCache")}static{o(this,"DocumentCache")}constructor(e,t){super(r=>r.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,r=>{this.clear(r.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{for(let a of n)this.clear(a)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let a=r.concat(n);for(let s of a)this.clear(s)}))}},ph=class extends dh{static{i(this,"WorkspaceCache")}static{o(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{n.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},Fb=class{static{i(this,"DefaultScopeProvider")}static{o(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ph(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),n=kt(e.container).localSymbols;if(n){let s=e.container;do n.has(s)&&t.push(n.getStream(s).filter(l=>this.reflection.isSubtype(l.type,r))),s=s.$container;while(s)}let a=this.getGlobalScope(r,e);for(let s=t.length-1;s>=0;s--)a=this.createScope(t[s],a);return a}createScope(e,t,r){return new bf(oe(e),t,r)}createScopeForNodes(e,t,r){let n=oe(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new bf(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Mb(this.indexManager.allElements(e)))}};function hh(e){return typeof e.$comment=="string"}i(hh,"isAstNodeWithComment");o(hh,"isAstNodeWithComment");function Sf(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}i(Sf,"isIntermediateReference");o(Sf,"isIntermediateReference");var Gb=class{static{i(this,"DefaultJsonSerializer")}static{o(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},n=t?.replacer,a=o((l,u)=>this.replacer(l,u,r),"defaultReplacer"),s=n?(l,u)=>n(l,u,a):a;try{return this.currentDocument=kt(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:a,comments:s,uriConverter:l}){if(!this.ignoreProperties.has(e))if(Xe(t)){let u=t.ref,c=r?t.$refText:void 0;if(u){let f=kt(u),d="";this.currentDocument&&this.currentDocument!==f&&(l?d=l(f.uri,u):d=f.uri.toString());let p=this.astNodeLocator.getAstNodePath(u);return{$ref:`${d}#${p}`,$refText:c}}else return{$error:t.error?.message??"Could not resolve reference",$refText:c}}else if(Ht(t)){let u=r?t.$refText:void 0,c=[];for(let f of t.items){let d=f.ref,p=kt(f.ref),m="";this.currentDocument&&this.currentDocument!==p&&(l?m=l(p.uri,d):m=p.uri.toString());let v=this.astNodeLocator.getAstNodePath(d);c.push(`${m}#${v}`)}return{$refs:c,$refText:u}}else if(Pe(t)){let u;if(a&&(u=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&u?.$textRegion&&(u.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(u??(u={...t}),u.$sourceText=t.$cstNode?.text),s){u??(u={...t});let c=this.commentProvider.getComment(t);c&&(u.$comment=c.replace(/\r/g,""))}return u??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=o(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),n=r.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=xd(e.$cstNode,a).map(t);s.length!==0&&(n[a]=s)}),e}}linkNode(e,t,r,n,a,s){for(let[u,c]of Object.entries(e))if(Array.isArray(c))for(let f=0;f{await this.handleException(()=>e.call(t,r,n,a),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(a){if(Kn(a))throw a;console.error(`${t}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);let s=a instanceof Error?a.message:String(a);r("error",`${t}: ${s}`,{node:n})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(let r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=oe(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(n=>t.includes(n.category))),r.map(n=>n.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,a,s,l)=>{await this.handleException(()=>e.call(r,n,a,s,l),t,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},zb=Object.freeze({validateNode:!0,validateChildren:!0}),Bb=class{static{i(this,"DefaultDocumentValidator")}static{o(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=pe.CancellationToken.None){let n=e.parseResult,a=[];if(await je(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(s=>s.data?.code===$t.LexingError)||(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(s=>s.data?.code===$t.ParsingError))||(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(s=>s.data?.code===$t.LinkingError))))return a;try{a.push(...await this.validateAst(n.value,t,r))}catch(s){if(Kn(s))throw s;console.error("An error occurred during validation:",s)}return await je(r),a}processLexingErrors(e,t,r){let n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let a of n){let s=a.severity??"error",l={severity:Zi(s),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:gh(s),source:this.getSource()};t.push(l)}}processParsingErrors(e,t,r){for(let n of e.parserErrors){let a;if(isNaN(n.token.startOffset)){if("previousToken"in n){let s=n.previousToken;if(isNaN(s.startOffset)){let l={line:0,character:0};a={start:l,end:l}}else{let l={line:s.endLine-1,character:s.endColumn};a={start:l,end:l}}}}else a=ts(n.token);if(a){let s={severity:Zi("error"),range:a,message:n.message,data:gn($t.ParsingError),source:this.getSource()};t.push(s)}}}processLinkingErrors(e,t,r){for(let n of e.references){let a=n.error;if(a){let s={node:a.info.container,range:n.$refNode?.range,property:a.info.property,index:a.info.index,data:{code:$t.LinkingError,containerType:a.info.container.$type,property:a.info.property,refText:a.info.reference.$refText}};t.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,t,r=pe.CancellationToken.None){let n=[],a=o((s,l,u)=>{n.push(this.toDiagnostic(s,l,u))},"acceptor");return await this.validateAstBefore(e,t,a,r),await this.validateAstNodes(e,t,a,r),await this.validateAstAfter(e,t,a,r),n}async validateAstBefore(e,t,r,n=pe.CancellationToken.None){let a=this.validationRegistry.checksBefore;for(let s of a)await je(n),await s(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=pe.CancellationToken.None){if(this.profiler?.isActive("validating")){let a=this.profiler.createTask("validating",this.languageId);a.start();try{let s=Pt(e).iterator();for(let l of s){a.startSubTask(l.$type);let u=this.validateSingleNodeOptions(l,t);if(u.validateNode)try{let c=this.validationRegistry.getChecks(l.$type,t.categories);for(let f of c)await f(l,r,n)}finally{a.stopSubTask(l.$type)}u.validateChildren||s.prune()}}finally{a.stop()}}else{let a=Pt(e).iterator();for(let s of a){await je(n);let l=this.validateSingleNodeOptions(s,t);if(l.validateNode){let u=this.validationRegistry.getChecks(s.$type,t.categories);for(let c of u)await c(s,r,n)}l.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return zb}async validateAstAfter(e,t,r,n=pe.CancellationToken.None){let a=this.validationRegistry.checksAfter;for(let s of a)await je(n),await s(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:mh(r),severity:Zi(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function mh(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=Nl(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=Fd(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}}}i(mh,"getDiagnosticRange");o(mh,"getDiagnosticRange");function Zi(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)}}i(Zi,"toDiagnosticSeverity");o(Zi,"toDiagnosticSeverity");function gh(e){switch(e){case"error":return gn($t.LexingError);case"warning":return gn($t.LexingWarning);case"info":return gn($t.LexingInfo);case"hint":return gn($t.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}i(gh,"toDiagnosticData");o(gh,"toDiagnosticData");var $t;(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"})($t||($t={}));var Kb=class{static{i(this,"DefaultAstNodeDescriptionProvider")}static{o(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let n=r??kt(e);t??(t=this.nameProvider.getName(e));let a=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${a} has no name.`);let s,l=o(()=>s??(s=Pa(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return l()},selectionSegment:Pa(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},qb=class{static{i(this,"DefaultReferenceDescriptionProvider")}static{o(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=pe.CancellationToken.None){let r=[],n=e.parseResult.value;for(let a of Pt(n))await je(t),Ia(a).forEach(s=>{s.reference.error||r.push(...this.createInfoDescriptions(s))});return r}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Xe(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Ht(t)&&(r=t.items.map(u=>u.$nodeDescription).filter(u=>u!==void 0));let n=kt(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],l=Pa(t.$refNode);for(let u of r)s.push({sourceUri:n,sourcePath:a,targetUri:u.documentUri,targetPath:u.path,segment:l,local:Je.equals(u.documentUri,n)});return s}},Wb=class{static{i(this,"DefaultAstNodeLocator")}static{o(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((n,a)=>{if(!n||a.length===0)return n;let s=a.indexOf(this.indexSeparator);if(s>0){let l=a.substring(0,s),u=parseInt(a.substring(s+1));return n[l]?.[u]}return n[a]},e)}},$u={};ml($u,Kf(Fa(),1));var Vb=class{static{i(this,"DefaultConfigurationProvider")}static{o(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Tr,this.onConfigurationSectionUpdateEmitter=new $u.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(n=>({section:this.toSectionName(n.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((n,a)=>{this.updateSectionConfiguration(n.section,r[a])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([t,r])=>{this.updateSectionConfiguration(t,r),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:r})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},Bs=Kf(nw(),1),Tn;(function(e){function t(r){return{dispose:o(async()=>await r(),"dispose")}}i(t,"create"),o(t,"create"),e.create=t})(Tn||(Tn={}));var Hb=class{static{i(this,"DefaultDocumentBuilder")}static{o(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Rr,this.documentPhaseListeners=new Rr,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=pe.CancellationToken.None){for(let n of e){let a=n.uri.toString();if(n.state===Z.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,Z.IndexedReferences);else if(typeof t.validation=="object"){let s=this.findMissingValidationCategories(n,t);s.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:s}},result:this.buildState.get(a)?.result}),n.state=Z.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Z.Changed,await this.emitUpdate(e.map(n=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=pe.CancellationToken.None){this.currentState=Z.Changed;let n=[];for(let u of t){let c=this.langiumDocuments.deleteDocuments(u);for(let f of c)n.push(f.uri),this.cleanUpDeleted(f)}let a=(await Promise.all(e.map(u=>this.findChangedUris(u)))).flat();for(let u of a){let c=this.langiumDocuments.getDocument(u);c===void 0&&(c=this.langiumDocumentFactory.fromModel({$type:"INVALID"},u),c.state=Z.Changed,this.langiumDocuments.addDocument(c)),this.resetToState(c,Z.Changed)}let s=oe(a).concat(n).map(u=>u.toString()).toSet();this.langiumDocuments.all.filter(u=>!s.has(u.uri.toString())&&this.shouldRelink(u,s)).forEach(u=>this.resetToState(u,Z.ComputedScopes)),await this.emitUpdate(a,n),await je(r);let l=this.sortDocuments(this.langiumDocuments.all.filter(u=>u.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),a=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set,s=t===void 0||t.validation===!0?n:typeof t.validation=="object"?t.validation.categories??n:[];return oe(s).filter(l=>!a.has(l)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t=0&&!this.hasTextDocument(e[r]);)r--;tr.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Tn.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Z.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,Z.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,Z.ComputedScopes,r,async s=>{let l=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=await l.collectLocalSymbols(s,r)});let n=e.filter(s=>this.shouldLink(s));await this.runCancelable(n,Z.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(n,Z.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));let a=e.filter(s=>this.shouldValidate(s)?!0:(this.markAsCompleted(s),!1));await this.runCancelable(a,Z.Validated,r,async s=>{await this.validate(s,r),this.markAsCompleted(s)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let r of e){let n=r.uri.toString(),a=this.buildState.get(n);(!a||a.completed)&&this.buildState.set(n,{completed:!1,options:t,result:a?.result})}}async runCancelable(e,t,r,n){for(let s of e)s.states.state===t);await this.notifyBuildPhase(a,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),Tn.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Tn.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=pe.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let n=this.langiumDocuments.getDocument(t);if(n){if(n.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(Vt);if(this.currentState>=e&&e>n.state)return Promise.reject(new Bs.ResponseError(Bs.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Z[n.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`))}else return Promise.reject(new Bs.ResponseError(Bs.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((a,s)=>{let l=this.onDocumentPhase(e,c=>{Je.equals(c.uri,t)&&(l.dispose(),u.dispose(),a(c.uri))}),u=r.onCancellationRequested(()=>{l.dispose(),u.dispose(),s(Vt)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Vt):new Promise((r,n)=>{let a=this.onBuildPhase(e,()=>{a.dispose(),s.dispose(),r()}),s=t.onCancellationRequested(()=>{a.dispose(),s.dispose(),n(Vt)})})}async notifyDocumentPhase(e,t,r){let a=this.documentPhaseListeners.get(t).slice();for(let s of a)try{await je(r),await s(e,r)}catch(l){if(!Kn(l))throw l}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let a=this.buildPhaseListeners.get(t).slice();for(let s of a)await je(r),await s(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),a=typeof n.validation=="object"?{...n.validation}:{};a.categories=this.findMissingValidationCategories(e,n);let s=await r.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;let l=this.buildState.get(e.uri.toString());l&&(l.result??(l.result={}),l.result.validationChecks?l.result.validationChecks=oe(l.result.validationChecks).concat(a.categories).distinct().toArray():l.result.validationChecks=[...a.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},Yb=class{static{i(this,"DefaultIndexManager")}static{o(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Ru,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=kt(e).uri,n=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{Je.equals(s.targetUri,r)&&s.targetPath===t&&n.push(s)})}),oe(n)}allElements(e,t){let r=oe(this.symbolIndex.keys());return t&&(r=r.filter(n=>!t||t.has(n))),r.map(n=>this.getFileDescriptions(n,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(a=>this.astReflection.isSubtype(a.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=pe.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),a=e.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(e,t=pe.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());return r?r.some(n=>!n.local&&t.has(n.targetUri.toString())):!1}},Xb=class{static{i(this,"DefaultWorkspaceManager")}static{o(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Tr,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(e,t=pe.CancellationToken.None){let r=await this.performStartup(e);await je(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=o(s=>{t.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)},"collector");await this.loadAdditionalDocuments(e,r);let n=[];await Promise.all(e.map(s=>this.getRootFolder(s)).map(async s=>this.traverseFolder(s,n)));let a=oe(n).distinct(s=>s.toString()).filter(s=>!this.langiumDocuments.hasDocument(s));return await this.loadWorkspaceDocuments(a,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async r=>{let n=await this.langiumDocuments.getOrCreateDocument(r);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return dt.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async n=>{this.shouldIncludeEntry(n)&&(n.isDirectory?await this.traverseFolder(n.uri,t):n.isFile&&t.push(n.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=Je.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},Jb=class{static{i(this,"DefaultLexerErrorMessageProvider")}static{o(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,a){return sf.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return sf.buildUnableToPopLexerModeMessage(e)}},yh={mode:"full"},vh=class{static{i(this,"DefaultLexer")}static{o(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let r=dl(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Ze(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=yh){let r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(dl(e))return e;let t=Eu(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};function Au(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}i(Au,"isTokenTypeArray");o(Au,"isTokenTypeArray");function Eu(e){return e&&"modes"in e&&"defaultMode"in e}i(Eu,"isIMultiModeLexerDefinition");o(Eu,"isIMultiModeLexerDefinition");function dl(e){return!Au(e)&&!Eu(e)}i(dl,"isTokenTypeDictionary");o(dl,"isTokenTypeDictionary");ys();function Th(e,t,r){let n,a;typeof e=="string"?(a=t,n=r):(a=e.range.start,n=t),a||(a=ae.create(0,0));let s=$h(e),l=_u(n),u=Zb({lines:s,position:a,options:l});return tS({index:0,tokens:u,position:a})}i(Th,"parseJSDoc");o(Th,"parseJSDoc");function Rh(e,t){let r=_u(t),n=$h(e);if(n.length===0)return!1;let a=n[0],s=n[n.length-1],l=r.start,u=r.end;return!!l?.exec(a)&&!!u?.exec(s)}i(Rh,"isJSDoc");o(Rh,"isJSDoc");function $h(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(Qg)}i($h,"getLines");o($h,"getLines");var Qm=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,I1=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Zb(e){let t=[],r=e.position.line,n=e.position.character;for(let a=0;a=u.length){if(t.length>0){let d=ae.create(r,n);t.push({type:"break",content:"",range:Q.create(d,d)})}}else{Qm.lastIndex=c;let d=Qm.exec(u);if(d){let p=d[0],m=d[1],v=ae.create(r,n+c),T=ae.create(r,n+c+p.length);t.push({type:"tag",content:m,range:Q.create(v,T)}),c+=p.length,c=pl(u,c)}if(c0&&t[t.length-1].type==="break"?t.slice(0,-1):t}i(Zb,"tokenize");o(Zb,"tokenize");function Qb(e,t,r,n){let a=[];if(e.length===0){let s=ae.create(r,n),l=ae.create(r,n+t.length);a.push({type:"text",content:t,range:Q.create(s,l)})}else{let s=0;for(let u of e){let c=u.index,f=t.substring(s,c);f.length>0&&a.push({type:"text",content:t.substring(s,c),range:Q.create(ae.create(r,s+n),ae.create(r,c+n))});let d=f.length+1,p=u[1];if(a.push({type:"inline-tag",content:p,range:Q.create(ae.create(r,s+d+n),ae.create(r,s+d+p.length+n))}),d+=p.length,u.length===4){d+=u[2].length;let m=u[3];a.push({type:"text",content:m,range:Q.create(ae.create(r,s+d+n),ae.create(r,s+d+m.length+n))})}else a.push({type:"text",content:"",range:Q.create(ae.create(r,s+d+n),ae.create(r,s+d+n))});s=c+u[0].length}let l=t.substring(s);l.length>0&&a.push({type:"text",content:l,range:Q.create(ae.create(r,s+n),ae.create(r,s+n+l.length))})}return a}i(Qb,"buildInlineTokens");o(Qb,"buildInlineTokens");var N1=/\S/,k1=/\s*$/;function pl(e,t){let r=e.substring(t).match(N1);return r?t+r.index:e.length}i(pl,"skipWhitespace");o(pl,"skipWhitespace");function eS(e){let t=e.match(k1);if(t&&typeof t.index=="number")return t.index}i(eS,"lastCharacter");o(eS,"lastCharacter");function tS(e){let t=ae.create(e.position.line,e.position.character);if(e.tokens.length===0)return new eg([],Q.create(t,t));let r=[];for(;e.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let t of this.elements)if(e.length===0)e=t.toString();else{let r=t.toString();e+=If(e)+r}return e.trim()}toMarkdown(e){let t="";for(let r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{let n=r.toMarkdown(e);t+=If(t)+n}return t.trim()}},Lu=class{static{i(this,"JSDocTagImpl")}static{o(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let a=iS(this.name,t,e??{});if(typeof a=="string")return a}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let n=`${r}@${this.name}${r}`;return this.content.inlines.length===1?n=`${n} \u2014 ${t}`:this.content.inlines.length>1&&(n=`${n} +${t}`),this.inline?`{${n}}`:n}};function iS(e,t,r){if(e==="linkplain"||e==="linkcode"||e==="link"){let n=t.indexOf(" "),a=t;if(n>0){let l=pl(t,n);a=t.substring(l),t=t.substring(0,n)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(a=`\`${a}\``),r.renderLink?.(t,a)??sS(t,a)}}i(iS,"renderInlineTag");o(iS,"renderInlineTag");function sS(e,t){try{return dt.parse(e,!0),`[${t}](${e})`}catch{return e}}i(sS,"renderLinkDefault");o(sS,"renderLinkDefault");var wf=class{static{i(this,"JSDocTextImpl")}static{o(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let t="";for(let r=0;rn.range.start.line&&(t+=` +`)}return t}},oS=class{static{i(this,"JSDocLineImpl")}static{o(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function If(e){return e.endsWith(` +`)?` +`:` + +`}i(If,"fillNewlines");o(If,"fillNewlines");var lS=class{static{i(this,"JSDocDocumentationProvider")}static{o(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&Rh(t))return Th(t).toMarkdown({renderLink:o((n,a)=>this.documentationLinkRenderer(e,n,a),"renderLink"),renderTag:o(n=>this.documentationTagRenderer(e,n),"renderTag")})}documentationLinkRenderer(e,t,r){let n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){let a=n.nameSegment.range.start.line+1,s=n.nameSegment.range.start.character+1,l=n.documentUri.with({fragment:`L${a},${s}`});return`[${r}](${l.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=kt(e).localSymbols;if(!n)return;let a=e;do{let l=n.getStream(a).find(u=>u.name===t);if(l)return l;a=a.$container}while(a)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(n=>n.name===t)}},uS=class{static{i(this,"DefaultCommentProvider")}static{o(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return hh(e)?e.$comment:Ad(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},cS=class{static{i(this,"DefaultAsyncParser")}static{o(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},P1=class{static{i(this,"AbstractThreadedAsyncParser")}static{o(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new Tr,a,s=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(l=>{let u=this.hydrator.hydrate(l);n.resolve(u)}).catch(l=>{n.reject(l)}).finally(()=>{s.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let r of this.workerPool)if(r.ready)return r.lock(),r;let t=new Tr;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(Vt)}),this.queue.push(t),t.promise}},O1=class{static{i(this,"ParserWorker")}static{o(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new $u.Emitter,this.deferred=new Tr,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(a=>{let s=a;this.deferred.resolve(s),this.unlock()}),r(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(Vt),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Tr,this.sendMessage(e),this.deferred.promise}},fS=class{static{i(this,"DefaultWorkspaceLock")}static{o(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new pe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=vu();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=pe.CancellationToken.None){let n=new Tr,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:n})=>{try{let a=await Promise.resolve().then(()=>t(n));r.resolve(a)}catch(a){Kn(a)?r.resolve(void 0):r.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},dS=class{static{i(this,"DefaultHydrator")}static{o(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new cl,this.tokenTypeIdMap=new cl,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(t=>({...t,message:t.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,r=new Map;for(let n of Pt(e))t.set(n,{});if(e.$cstNode)for(let n of ka(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){let s=[];r[n]=s;for(let l of a)Pe(l)?s.push(this.dehydrateAstNode(l,t)):Xe(l)?s.push(this.dehydrateReference(l,t)):s.push(l)}else Pe(a)?r[n]=this.dehydrateAstNode(a,t):Xe(a)?r[n]=this.dehydrateReference(a,t):a!==void 0&&(r[n]=a);return r}dehydrateReference(e,t){let r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){let r=t.cstNodes.get(e);return vl(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),fr(e)?r.content=e.content.map(n=>this.dehydrateCstNode(n,t)):Cn(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){let t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){let t=new Map,r=new Map;for(let a of Pt(e))t.set(a,{});let n;if(e.$cstNode)for(let a of ka(e.$cstNode)){let s;"fullText"in a?(s=new Zp(a.fullText),n=s):"content"in a?s=new pu:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(r.set(a,s),s.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(let[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){let s=[];r[n]=s;for(let l of a)Pe(l)?s.push(this.setParent(this.hydrateAstNode(l,t),r)):Xe(l)?s.push(this.hydrateReference(l,r,n,t)):s.push(l)}else Pe(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):Xe(a)?r[n]=this.hydrateReference(a,r,n,t):a!==void 0&&(r[n]=a);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let n=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),fr(n))for(let a of e.content){let s=this.hydrateCstNode(a,t,r++);n.content.push(s)}return n}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,a=e.startLine,s=e.startColumn,l=e.endLine,u=e.endColumn,c=e.hidden;return new il(r,n,{start:{line:a,character:s},end:{line:l,character:u}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of Pt(this.grammar))Tl(t)&&this.grammarElementIdMap.set(t,e++)}};function Ch(e){return{documentation:{CommentProvider:o(t=>new uS(t),"CommentProvider"),DocumentationProvider:o(t=>new lS(t),"DocumentationProvider")},parser:{AsyncParser:o(t=>new cS(t),"AsyncParser"),GrammarConfig:o(t=>Wd(t),"GrammarConfig"),LangiumParser:o(t=>ah(t),"LangiumParser"),CompletionParser:o(t=>nh(t),"CompletionParser"),ValueConverter:o(()=>new sh,"ValueConverter"),TokenBuilder:o(()=>new gu,"TokenBuilder"),Lexer:o(t=>new vh(t),"Lexer"),ParserErrorMessageProvider:o(()=>new eh,"ParserErrorMessageProvider"),LexerErrorMessageProvider:o(()=>new Jb,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:o(()=>new Wb,"AstNodeLocator"),AstNodeDescriptionProvider:o(t=>new Kb(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:o(t=>new qb(t),"ReferenceDescriptionProvider")},references:{Linker:o(t=>new Pb(t),"Linker"),NameProvider:o(()=>new Ob,"NameProvider"),ScopeProvider:o(t=>new Fb(t),"ScopeProvider"),ScopeComputation:o(t=>new Db(t),"ScopeComputation"),References:o(t=>new Lb(t),"References")},serializer:{Hydrator:o(t=>new dS(t),"Hydrator"),JsonSerializer:o(t=>new Gb(t),"JsonSerializer")},validation:{DocumentValidator:o(t=>new Bb(t),"DocumentValidator"),ValidationRegistry:o(t=>new Ub(t),"ValidationRegistry")},shared:o(()=>e.shared,"shared")}}i(Ch,"createDefaultCoreModule");o(Ch,"createDefaultCoreModule");function bh(e){return{ServiceRegistry:o(t=>new jb(t),"ServiceRegistry"),workspace:{LangiumDocuments:o(t=>new kb(t),"LangiumDocuments"),LangiumDocumentFactory:o(t=>new Nb(t),"LangiumDocumentFactory"),DocumentBuilder:o(t=>new Hb(t),"DocumentBuilder"),IndexManager:o(t=>new Yb(t),"IndexManager"),WorkspaceManager:o(t=>new Xb(t),"WorkspaceManager"),FileSystemProvider:o(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:o(()=>new fS,"WorkspaceLock"),ConfigurationProvider:o(t=>new Vb(t),"ConfigurationProvider")},profilers:{}}}i(bh,"createDefaultSharedCoreModule");o(bh,"createDefaultSharedCoreModule");var Nf;(function(e){e.merge=(t,r)=>xa(xa({},t),r)})(Nf||(Nf={}));function hl(e,t,r,n,a,s,l,u,c){let f=[e,t,r,n,a,s,l,u,c].reduce(xa,{});return wh(f)}i(hl,"inject");o(hl,"inject");var pS=Symbol("isProxy");function Sh(e){if(e&&e[pS])for(let t of Object.values(e))Sh(t);return e}i(Sh,"eagerLoad");o(Sh,"eagerLoad");function wh(e,t){let r=new Proxy({},{deleteProperty:o(()=>!1,"deleteProperty"),set:o(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:o((n,a)=>a===pS?!0:kf(n,a,e,t||r),"get"),getOwnPropertyDescriptor:o((n,a)=>(kf(n,a,e,t||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:o((n,a)=>a in e,"has"),ownKeys:o(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}i(wh,"_inject");o(wh,"_inject");var tg=Symbol();function kf(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]===tg)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 a=r[t];e[t]=tg;try{e[t]=typeof a=="function"?a(n):wh(a,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}i(kf,"_resolve");o(kf,"_resolve");function xa(e,t){if(t){for(let[r,n]of Object.entries(t))if(n!=null)if(typeof n=="object"){let a=e[r];typeof a=="object"&&a!==null?e[r]=xa(a,n):e[r]=xa({},n)}else e[r]=n}return e}i(xa,"_merge");o(xa,"_merge");var Pf={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},yn;(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(yn||(yn={}));var hS=class extends gu{static{i(this,"IndentationAwareTokenBuilder")}static{o(this,"IndentationAwareTokenBuilder")}constructor(e=Pf){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Pf,...e},this.indentTokenType=_a({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=_a({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!Au(r))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:l}=this.options,u,c,f,d=[];for(let p of r){for(let[m,v]of l)p.name===m?p.PUSH_MODE=yn.IGNORE_INDENTATION:p.name===v&&(p.POP_MODE=!0);p.name===a?u=p:p.name===n?c=p:p.name===s?f=p:d.push(p)}if(!u||!c||!f)throw new Error("Some indentation/whitespace tokens not found!");return l.length>0?{modes:{[yn.REGULAR]:[u,c,...d,f],[yn.IGNORE_INDENTATION]:[...d,f]},defaultMode:yn.REGULAR}:[u,c,f,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r +`.includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;let a=this.whitespaceRegExp.exec(e);return{currIndentLevel:a?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){let a=this.getLineNumber(t,n);return Os(e,r,n,n+r.length,a,a,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:s,match:l}=this.matchWhitespace(e,t,r,n);return a<=s?null:(this.indentationStack.push(a),l)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:s,match:l}=this.matchWhitespace(e,t,r,n);if(a>=s)return null;let u=this.indentationStack.lastIndexOf(a);if(u===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${a} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:l?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let c=this.indentationStack.length-u-1,f=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let d=0;d1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},L1=class extends vh{static{i(this,"IndentationAwareLexer")}static{o(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof hS)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=yh){let r=super.tokenize(e),n=r.report;t?.mode==="full"&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];let{indentTokenType:a,dedentTokenType:s}=this.indentationTokenBuilder,l=a.tokenTypeIdx,u=s.tokenTypeIdx,c=[],f=r.tokens.length-1;for(let d=0;d=0&&c.push(r.tokens[f]),r.tokens=c,r}},Ih={};xr(Ih,{AstUtils:i(()=>Xf,"AstUtils"),BiMap:i(()=>cl,"BiMap"),Cancellation:i(()=>pe,"Cancellation"),ContextCache:i(()=>Ru,"ContextCache"),CstUtils:i(()=>Vf,"CstUtils"),DONE_RESULT:i(()=>Ye,"DONE_RESULT"),Deferred:i(()=>Tr,"Deferred"),Disposable:i(()=>Tn,"Disposable"),DisposableCache:i(()=>Tu,"DisposableCache"),DocumentCache:i(()=>xb,"DocumentCache"),EMPTY_STREAM:i(()=>ba,"EMPTY_STREAM"),ErrorWithLocation:i(()=>bl,"ErrorWithLocation"),GrammarUtils:i(()=>bd,"GrammarUtils"),MultiMap:i(()=>Rr,"MultiMap"),OperationCancelled:i(()=>Vt,"OperationCancelled"),Reduction:i(()=>es,"Reduction"),RegExpUtils:i(()=>wd,"RegExpUtils"),SimpleCache:i(()=>dh,"SimpleCache"),StreamImpl:i(()=>Wt,"StreamImpl"),TreeStreamImpl:i(()=>Sa,"TreeStreamImpl"),URI:i(()=>dt,"URI"),UriTrie:i(()=>ch,"UriTrie"),UriUtils:i(()=>Je,"UriUtils"),WorkspaceCache:i(()=>ph,"WorkspaceCache"),assertCondition:i(()=>Sd,"assertCondition"),assertUnreachable:i(()=>Fr,"assertUnreachable"),delayNextTick:i(()=>yu,"delayNextTick"),interruptAndCheck:i(()=>je,"interruptAndCheck"),isOperationCancelled:i(()=>Kn,"isOperationCancelled"),loadGrammarFromJson:i(()=>vt,"loadGrammarFromJson"),setInterruptionPeriod:i(()=>oh,"setInterruptionPeriod"),startCancelableOperation:i(()=>vu,"startCancelableOperation"),stream:i(()=>oe,"stream")});ml(Ih,$u);var mS=class{static{i(this,"EmptyFileSystemProvider")}static{o(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},gS={fileSystemProvider:o(()=>new mS,"fileSystemProvider")},D1={Grammar:o(()=>{},"Grammar"),LanguageMetaData:o(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},M1={AstReflection:o(()=>new yd,"AstReflection")};function yS(){let e=hl(bh(gS),M1),t=hl(Ch({shared:e}),D1);return e.ServiceRegistry.register(t),t}i(yS,"createMinimalGrammarServices");o(yS,"createMinimalGrammarServices");function vt(e){let t=yS(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,dt.parse(`memory:/${r.name??"grammar"}.langium`)),r}i(vt,"loadGrammarFromJson");o(vt,"loadGrammarFromJson");ml(Cg,Ih);var x1=class{static{i(this,"DefaultLangiumProfiler")}static{o(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Rr}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new vS(r=>this.records.add(e,this.dumpRecord(e,r)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let r=[];for(let s of t.entries.keys()){let l=t.entries.get(s),u=l.reduce((c,f)=>c+f);r.push({name:`${t.identifier}.${s}`,count:l.length,duration:u})}let n=t.duration-r.map(s=>s.duration).reduce((s,l)=>s+l,0);r.push({name:t.identifier,count:1,duration:n}),r.sort((s,l)=>l.duration-s.duration);function a(s){return Math.round(100*s)/100}return i(a,"Round"),o(a,"Round"),console.table(r.map(s=>({Element:s.name,Count:s.count,"Self %":a(100*s.duration/t.duration),"Time (ms)":a(s.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(r=>r===t[0])).flatMap(t=>t[1])}},vS=class{static{i(this,"ProfilingTask")}static{o(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Rr,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(t=>t.id).join(", ")}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);let r=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=r);let n=r-t.content;this.entries.add(e,n)}},Of;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(Of||(Of={}));var Lf;(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(Lf||(Lf={}));var Df;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(Df||(Df={}));var Mf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Mf||(Mf={}));var xf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xf||(xf={}));var Ff;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Ff||(Ff={}));var Gf;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Gf||(Gf={}));var jf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(jf||(jf={}));var Uf;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(Uf||(Uf={}));var zf;(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(zf||(zf={}));var CF={...Of.Terminals,...Lf.Terminals,...Df.Terminals,...Mf.Terminals,...xf.Terminals,...Ff.Terminals,...Gf.Terminals,...Uf.Terminals,...jf.Terminals,...zf.Terminals},Ks={$type:"Accelerator",name:"name",x:"x",y:"y"},qs={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},Ti={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},Du={$type:"Annotations",x:"x",y:"y"},sr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function F1(e){return Tt.isInstance(e,sr.$type)}i(F1,"isArchitecture");o(F1,"isArchitecture");var Ws={$type:"Axis",label:"label",name:"name"},_o={$type:"Branch",name:"name",order:"order"};function G1(e){return Tt.isInstance(e,_o.$type)}i(G1,"isBranch");o(G1,"isBranch");var rg={$type:"Checkout",branch:"branch"},Vs={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Mu={$type:"ClassDefStatement",className:"className",styleText:"styleText"},ua={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function j1(e){return Tt.isInstance(e,ua.$type)}i(j1,"isCommit");o(j1,"isCommit");var Hs={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Br={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Ys={$type:"Curve",entries:"entries",label:"label",name:"name"},Xs={$type:"Deaccelerator",name:"name",x:"x",y:"y"},ng={$type:"Decorator",strategy:"strategy"},Qn={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Ut={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},ea={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Kr={$type:"EmFrame"},Ri={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},ag={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},xu={$type:"EmModelEntity",name:"name"};function U1(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}i(U1,"isEmModelEntityType");o(U1,"isEmModelEntityType");var Js={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},or={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function z1(e){return Tt.isInstance(e,or.$type)}i(z1,"isEmResetFrame");o(z1,"isEmResetFrame");var br={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Fu={$type:"Entry",axis:"axis",value:"value"},nr={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},ig={$type:"Evolution",stages:"stages"},Zs={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Gu={$type:"Evolve",component:"component",target:"target"},Qr={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function B1(e){return Tt.isInstance(e,Qr.$type)}i(B1,"isGitGraph");o(B1,"isGitGraph");var $i={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},xi={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function K1(e){return Tt.isInstance(e,xi.$type)}i(K1,"isInfo");o(K1,"isInfo");var Ai={$type:"Item",classSelector:"classSelector",name:"name"},ju={$type:"Junction",id:"id",in:"in"},Ei={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},Qs={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},qr={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},ca={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function q1(e){return Tt.isInstance(e,ca.$type)}i(q1,"isMerge");o(q1,"isMerge");var eo={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Uu={$type:"Option",name:"name",value:"value"},fa={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function W1(e){return Tt.isInstance(e,fa.$type)}i(W1,"isPacket");o(W1,"isPacket");var da={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function V1(e){return Tt.isInstance(e,da.$type)}i(V1,"isPacketBlock");o(V1,"isPacketBlock");var en={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function H1(e){return Tt.isInstance(e,en.$type)}i(H1,"isPie");o(H1,"isPie");var Co={$type:"PieSection",label:"label",value:"value"};function Y1(e){return Tt.isInstance(e,Co.$type)}i(Y1,"isPieSection");o(Y1,"isPieSection");var zu={$type:"Pipeline",components:"components",parent:"parent"},to={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},Wr={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Bu={$type:"Section",classSelector:"classSelector",name:"name"},ta={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Ku={$type:"Size",height:"height",width:"width"},ra={$type:"Statement"},pa={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function X1(e){return Tt.isInstance(e,pa.$type)}i(X1,"isTreemap");o(X1,"isTreemap");var qu={$type:"TreemapRow",indent:"indent",item:"item"},Wu={$type:"TreeNode",indent:"indent",name:"name"},_i={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Ke={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function J1(e){return Tt.isInstance(e,Ke.$type)}i(J1,"isWardley");o(J1,"isWardley");var TS=class extends Yf{static{i(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Accelerator:{name:Ks.$type,properties:{name:{name:Ks.name},x:{name:Ks.x},y:{name:Ks.y}},superTypes:[]},Anchor:{name:qs.$type,properties:{evolution:{name:qs.evolution},name:{name:qs.name},visibility:{name:qs.visibility}},superTypes:[]},Annotation:{name:Ti.$type,properties:{number:{name:Ti.number},text:{name:Ti.text},x:{name:Ti.x},y:{name:Ti.y}},superTypes:[]},Annotations:{name:Du.$type,properties:{x:{name:Du.x},y:{name:Du.y}},superTypes:[]},Architecture:{name:sr.$type,properties:{accDescr:{name:sr.accDescr},accTitle:{name:sr.accTitle},edges:{name:sr.edges,defaultValue:[]},groups:{name:sr.groups,defaultValue:[]},junctions:{name:sr.junctions,defaultValue:[]},services:{name:sr.services,defaultValue:[]},title:{name:sr.title}},superTypes:[]},Axis:{name:Ws.$type,properties:{label:{name:Ws.label},name:{name:Ws.name}},superTypes:[]},Branch:{name:_o.$type,properties:{name:{name:_o.name},order:{name:_o.order}},superTypes:[ra.$type]},Checkout:{name:rg.$type,properties:{branch:{name:rg.branch}},superTypes:[ra.$type]},CherryPicking:{name:Vs.$type,properties:{id:{name:Vs.id},parent:{name:Vs.parent},tags:{name:Vs.tags,defaultValue:[]}},superTypes:[ra.$type]},ClassDefStatement:{name:Mu.$type,properties:{className:{name:Mu.className},styleText:{name:Mu.styleText}},superTypes:[]},Commit:{name:ua.$type,properties:{id:{name:ua.id},message:{name:ua.message},tags:{name:ua.tags,defaultValue:[]},type:{name:ua.type}},superTypes:[ra.$type]},Common:{name:Hs.$type,properties:{accDescr:{name:Hs.accDescr},accTitle:{name:Hs.accTitle},title:{name:Hs.title}},superTypes:[]},Component:{name:Br.$type,properties:{decorator:{name:Br.decorator},evolution:{name:Br.evolution},inertia:{name:Br.inertia,defaultValue:!1},label:{name:Br.label},name:{name:Br.name},visibility:{name:Br.visibility}},superTypes:[]},Curve:{name:Ys.$type,properties:{entries:{name:Ys.entries,defaultValue:[]},label:{name:Ys.label},name:{name:Ys.name}},superTypes:[]},Deaccelerator:{name:Xs.$type,properties:{name:{name:Xs.name},x:{name:Xs.x},y:{name:Xs.y}},superTypes:[]},Decorator:{name:ng.$type,properties:{strategy:{name:ng.strategy}},superTypes:[]},Direction:{name:Qn.$type,properties:{accDescr:{name:Qn.accDescr},accTitle:{name:Qn.accTitle},dir:{name:Qn.dir},statements:{name:Qn.statements,defaultValue:[]},title:{name:Qn.title}},superTypes:[Qr.$type]},Edge:{name:Ut.$type,properties:{lhsDir:{name:Ut.lhsDir},lhsGroup:{name:Ut.lhsGroup,defaultValue:!1},lhsId:{name:Ut.lhsId},lhsInto:{name:Ut.lhsInto,defaultValue:!1},rhsDir:{name:Ut.rhsDir},rhsGroup:{name:Ut.rhsGroup,defaultValue:!1},rhsId:{name:Ut.rhsId},rhsInto:{name:Ut.rhsInto,defaultValue:!1},title:{name:Ut.title}},superTypes:[]},EmDataEntity:{name:ea.$type,properties:{dataBlockValue:{name:ea.dataBlockValue},dataType:{name:ea.dataType},name:{name:ea.name}},superTypes:[]},EmFrame:{name:Kr.$type,properties:{},superTypes:[]},EmGwt:{name:Ri.$type,properties:{givenStatements:{name:Ri.givenStatements,defaultValue:[]},sourceFrame:{name:Ri.sourceFrame,referenceType:Kr.$type},thenStatements:{name:Ri.thenStatements,defaultValue:[]},whenStatements:{name:Ri.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:ag.$type,properties:{entityIdentifier:{name:ag.entityIdentifier,referenceType:xu.$type}},superTypes:[]},EmModelEntity:{name:xu.$type,properties:{name:{name:xu.name}},superTypes:[]},EmNoteEntity:{name:Js.$type,properties:{dataBlockValue:{name:Js.dataBlockValue},dataType:{name:Js.dataType},sourceFrame:{name:Js.sourceFrame,referenceType:Kr.$type}},superTypes:[]},EmResetFrame:{name:or.$type,properties:{dataInlineValue:{name:or.dataInlineValue},dataReference:{name:or.dataReference,referenceType:ea.$type},dataType:{name:or.dataType},entityIdentifier:{name:or.entityIdentifier},modelEntityType:{name:or.modelEntityType},name:{name:or.name},sourceFrames:{name:or.sourceFrames,defaultValue:[],referenceType:Kr.$type}},superTypes:[Kr.$type]},EmTimeFrame:{name:br.$type,properties:{dataInlineValue:{name:br.dataInlineValue},dataReference:{name:br.dataReference,referenceType:ea.$type},dataType:{name:br.dataType},entityIdentifier:{name:br.entityIdentifier},modelEntityType:{name:br.modelEntityType},name:{name:br.name},sourceFrames:{name:br.sourceFrames,defaultValue:[],referenceType:Kr.$type}},superTypes:[Kr.$type]},Entry:{name:Fu.$type,properties:{axis:{name:Fu.axis,referenceType:Ws.$type},value:{name:Fu.value}},superTypes:[]},EventModel:{name:nr.$type,properties:{accDescr:{name:nr.accDescr},accTitle:{name:nr.accTitle},dataEntities:{name:nr.dataEntities,defaultValue:[]},frames:{name:nr.frames,defaultValue:[]},gwtEntities:{name:nr.gwtEntities,defaultValue:[]},modelEntities:{name:nr.modelEntities,defaultValue:[]},noteEntities:{name:nr.noteEntities,defaultValue:[]},title:{name:nr.title}},superTypes:[]},Evolution:{name:ig.$type,properties:{stages:{name:ig.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Zs.$type,properties:{boundary:{name:Zs.boundary},name:{name:Zs.name},secondName:{name:Zs.secondName}},superTypes:[]},Evolve:{name:Gu.$type,properties:{component:{name:Gu.component},target:{name:Gu.target}},superTypes:[]},GitGraph:{name:Qr.$type,properties:{accDescr:{name:Qr.accDescr},accTitle:{name:Qr.accTitle},statements:{name:Qr.statements,defaultValue:[]},title:{name:Qr.title}},superTypes:[]},Group:{name:$i.$type,properties:{icon:{name:$i.icon},id:{name:$i.id},in:{name:$i.in},title:{name:$i.title}},superTypes:[]},Info:{name:xi.$type,properties:{accDescr:{name:xi.accDescr},accTitle:{name:xi.accTitle},title:{name:xi.title}},superTypes:[]},Item:{name:Ai.$type,properties:{classSelector:{name:Ai.classSelector},name:{name:Ai.name}},superTypes:[]},Junction:{name:ju.$type,properties:{id:{name:ju.id},in:{name:ju.in}},superTypes:[]},Label:{name:Ei.$type,properties:{negX:{name:Ei.negX,defaultValue:!1},negY:{name:Ei.negY,defaultValue:!1},offsetX:{name:Ei.offsetX},offsetY:{name:Ei.offsetY}},superTypes:[]},Leaf:{name:Qs.$type,properties:{classSelector:{name:Qs.classSelector},name:{name:Qs.name},value:{name:Qs.value}},superTypes:[Ai.$type]},Link:{name:qr.$type,properties:{arrow:{name:qr.arrow},from:{name:qr.from},fromPort:{name:qr.fromPort},linkLabel:{name:qr.linkLabel},to:{name:qr.to},toPort:{name:qr.toPort}},superTypes:[]},Merge:{name:ca.$type,properties:{branch:{name:ca.branch},id:{name:ca.id},tags:{name:ca.tags,defaultValue:[]},type:{name:ca.type}},superTypes:[ra.$type]},Note:{name:eo.$type,properties:{evolution:{name:eo.evolution},text:{name:eo.text},visibility:{name:eo.visibility}},superTypes:[]},Option:{name:Uu.$type,properties:{name:{name:Uu.name},value:{name:Uu.value,defaultValue:!1}},superTypes:[]},Packet:{name:fa.$type,properties:{accDescr:{name:fa.accDescr},accTitle:{name:fa.accTitle},blocks:{name:fa.blocks,defaultValue:[]},title:{name:fa.title}},superTypes:[]},PacketBlock:{name:da.$type,properties:{bits:{name:da.bits},end:{name:da.end},label:{name:da.label},start:{name:da.start}},superTypes:[]},Pie:{name:en.$type,properties:{accDescr:{name:en.accDescr},accTitle:{name:en.accTitle},sections:{name:en.sections,defaultValue:[]},showData:{name:en.showData,defaultValue:!1},title:{name:en.title}},superTypes:[]},PieSection:{name:Co.$type,properties:{label:{name:Co.label},value:{name:Co.value}},superTypes:[]},Pipeline:{name:zu.$type,properties:{components:{name:zu.components,defaultValue:[]},parent:{name:zu.parent}},superTypes:[]},PipelineComponent:{name:to.$type,properties:{evolution:{name:to.evolution},label:{name:to.label},name:{name:to.name}},superTypes:[]},Radar:{name:Wr.$type,properties:{accDescr:{name:Wr.accDescr},accTitle:{name:Wr.accTitle},axes:{name:Wr.axes,defaultValue:[]},curves:{name:Wr.curves,defaultValue:[]},options:{name:Wr.options,defaultValue:[]},title:{name:Wr.title}},superTypes:[]},Section:{name:Bu.$type,properties:{classSelector:{name:Bu.classSelector},name:{name:Bu.name}},superTypes:[Ai.$type]},Service:{name:ta.$type,properties:{icon:{name:ta.icon},iconText:{name:ta.iconText},id:{name:ta.id},in:{name:ta.in},title:{name:ta.title}},superTypes:[]},Size:{name:Ku.$type,properties:{height:{name:Ku.height},width:{name:Ku.width}},superTypes:[]},Statement:{name:ra.$type,properties:{},superTypes:[]},TreeNode:{name:Wu.$type,properties:{indent:{name:Wu.indent},name:{name:Wu.name}},superTypes:[]},TreeView:{name:_i.$type,properties:{accDescr:{name:_i.accDescr},accTitle:{name:_i.accTitle},nodes:{name:_i.nodes,defaultValue:[]},title:{name:_i.title}},superTypes:[]},Treemap:{name:pa.$type,properties:{accDescr:{name:pa.accDescr},accTitle:{name:pa.accTitle},title:{name:pa.title},TreemapRows:{name:pa.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:qu.$type,properties:{indent:{name:qu.indent},item:{name:qu.item}},superTypes:[]},Wardley:{name:Ke.$type,properties:{accDescr:{name:Ke.accDescr},accelerators:{name:Ke.accelerators,defaultValue:[]},accTitle:{name:Ke.accTitle},anchors:{name:Ke.anchors,defaultValue:[]},annotation:{name:Ke.annotation,defaultValue:[]},annotations:{name:Ke.annotations,defaultValue:[]},components:{name:Ke.components,defaultValue:[]},deaccelerators:{name:Ke.deaccelerators,defaultValue:[]},evolution:{name:Ke.evolution},evolves:{name:Ke.evolves,defaultValue:[]},links:{name:Ke.links,defaultValue:[]},notes:{name:Ke.notes,defaultValue:[]},pipelines:{name:Ke.pipelines,defaultValue:[]},size:{name:Ke.size},title:{name:Ke.title}},superTypes:[]}}}static{o(this,"MermaidAstReflection")}},Tt=new TS,sg,Z1=o(()=>sg??(sg=vt(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":[]}}]},"entry":false,"parameters":[]},{"$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":[]}}]},"entry":false,"parameters":[]},{"$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":":"}]},"entry":false,"parameters":[]},{"$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":[]}]},"entry":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),og,Q1=o(()=>og??(og=vt('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),lg,eF=o(()=>lg??(lg=vt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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"}]}},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),ug,tF=o(()=>ug??(ug=vt(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","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":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),cg,rF=o(()=>cg??(cg=vt(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$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":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$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":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),fg,nF=o(()=>fg??(fg=vt(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"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@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),dg,aF=o(()=>dg??(dg=vt(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":"]"}]},"entry":false,"parameters":[]},{"$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":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"*"}]}]},"entry":false,"parameters":[]},{"$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,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),pg,iF=o(()=>pg??(pg=vt(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),hg,sF=o(()=>hg??(hg=vt(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),mg,oF=o(()=>mg??(mg=vt(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),lF={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},uF={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cF={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},fF={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dF={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},pF={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hF={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mF={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},gF={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},yF={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bF={AstReflection:o(()=>new TS,"AstReflection")},SF={Grammar:o(()=>Z1(),"Grammar"),LanguageMetaData:o(()=>lF,"LanguageMetaData"),parser:{}},wF={Grammar:o(()=>Q1(),"Grammar"),LanguageMetaData:o(()=>uF,"LanguageMetaData"),parser:{}},IF={Grammar:o(()=>eF(),"Grammar"),LanguageMetaData:o(()=>cF,"LanguageMetaData"),parser:{}},NF={Grammar:o(()=>tF(),"Grammar"),LanguageMetaData:o(()=>fF,"LanguageMetaData"),parser:{}},kF={Grammar:o(()=>rF(),"Grammar"),LanguageMetaData:o(()=>dF,"LanguageMetaData"),parser:{}},PF={Grammar:o(()=>nF(),"Grammar"),LanguageMetaData:o(()=>pF,"LanguageMetaData"),parser:{}},OF={Grammar:o(()=>aF(),"Grammar"),LanguageMetaData:o(()=>hF,"LanguageMetaData"),parser:{}},LF={Grammar:o(()=>iF(),"Grammar"),LanguageMetaData:o(()=>mF,"LanguageMetaData"),parser:{}},DF={Grammar:o(()=>sF(),"Grammar"),LanguageMetaData:o(()=>gF,"LanguageMetaData"),parser:{}},MF={Grammar:o(()=>oF(),"Grammar"),LanguageMetaData:o(()=>yF,"LanguageMetaData"),parser:{}},vF=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,TF=/accTitle[\t ]*:([^\n\r]*)/,RF=/title([\t ][^\n\r]*|)/,$F={ACC_DESCR:vF,ACC_TITLE:TF,TITLE:RF},AF=class extends sh{static{i(this,"AbstractMermaidValueConverter")}static{o(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=$F[e.name];if(n===void 0)return;let a=n.exec(t);if(a!==null){if(a[1]!==void 0)return a[1].trim().replace(/[\t ]{2,}/gm," ");if(a[2]!==void 0)return a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},xF=class extends AF{static{i(this,"CommonValueConverter")}static{o(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},EF=class extends gu{static{i(this,"AbstractMermaidTokenBuilder")}static{o(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach(a=>{this.keywords.has(a.name)&&a.PATTERN!==void 0&&(a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},FF=class extends EF{static{i(this,"CommonTokenBuilder")}static{o(this,"CommonTokenBuilder")}};export{o as a,Ch as b,bh as c,hl as d,gS as e,z1 as f,bF as g,SF as h,wF as i,IF as j,NF as k,kF as l,PF as m,OF as n,LF as o,DF as p,MF as q,AF as r,xF as s,EF as t}; +/*! Bundled license information: + +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 + *) +*/ diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5IMINLNL.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5IMINLNL.mjs new file mode 100644 index 00000000000..609e64dfbf7 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5IMINLNL.mjs @@ -0,0 +1 @@ +import{a as g}from"./chunk-AQ6EADP3.mjs";function tt(a,t,s){if(a&&a.length){let[e,n]=t,o=Math.PI/180*s,r=Math.cos(o),h=Math.sin(o);for(let i of a){let[l,c]=i;i[0]=(l-e)*r-(c-n)*h+e,i[1]=(l-e)*h+(c-n)*r+n}}}g(tt,"t");function Wt(a,t){return a[0]===t[0]&&a[1]===t[1]}g(Wt,"e");function Et(a,t,s,e=1){let n=s,o=Math.max(t,.1),r=a[0]&&a[0][0]&&typeof a[0][0]=="number"?[a]:a,h=[0,0];if(n)for(let l of r)tt(l,h,n);let i=(function(l,c,d){let p=[];for(let k of l){let w=[...k];Wt(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&p.push(w)}let u=[];c=Math.max(c,.1);let f=[];for(let k of p)for(let w=0;wk.yminw.ymin?1:k.xw.x?1:k.ymax===w.ymax?0:(k.ymax-w.ymax)/Math.abs(k.ymax-w.ymax))),!f.length)return u;let M=[],b=f[0].ymin,y=0;for(;M.length||f.length;){if(f.length){let k=-1;for(let w=0;wb);w++)k=w;f.splice(0,k+1).forEach((w=>{M.push({s:b,edge:w})}))}if(M=M.filter((k=>!(k.edge.ymax<=b))),M.sort(((k,w)=>k.edge.x===w.edge.x?0:(k.edge.x-w.edge.x)/Math.abs(k.edge.x-w.edge.x))),(d!==1||y%c==0)&&M.length>1)for(let k=0;k=M.length)break;let v=M[k].edge,P=M[w].edge;u.push([[Math.round(v.x),b],[Math.round(P.x),b]])}b+=d,M.forEach((k=>{k.edge.x=k.edge.x+d*k.edge.islope})),y++}return u})(r,o,e);if(n){for(let l of r)tt(l,h,-n);(function(l,c,d){let p=[];l.forEach((u=>p.push(...u))),tt(p,c,d)})(i,h,-n)}return i}g(Et,"s");function V(a,t){var s;let e=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return t.roughness>=1&&(((s=t.randomizer)===null||s===void 0?void 0:s.next())||Math.random())>.7&&(o=n),Et(a,n,e,o||1)}g(V,"n");var F=class{static{g(this,"o")}constructor(t){this.helper=t}fillPolygons(t,s){return this._fillPolygons(t,s)}_fillPolygons(t,s){let e=V(t,s);return{type:"fillSketch",ops:this.renderLines(e,s)}}renderLines(t,s){let e=[];for(let n of t)e.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],s));return e}};function Y(a){let t=a[0],s=a[1];return Math.sqrt(Math.pow(t[0]-s[0],2)+Math.pow(t[1]-s[1],2))}g(Y,"a");var ot=class extends F{static{g(this,"h")}fillPolygons(t,s){let e=s.hachureGap;e<0&&(e=4*s.strokeWidth),e=Math.max(e,.1);let n=V(t,Object.assign({},s,{hachureGap:e})),o=Math.PI/180*s.hachureAngle,r=[],h=.5*e*Math.cos(o),i=.5*e*Math.sin(o);for(let[l,c]of n)Y([l,c])&&r.push([[l[0]-h,l[1]+i],[...c]],[[l[0]+h,l[1]-i],[...c]]);return{type:"fillSketch",ops:this.renderLines(r,s)}}},ht=class extends F{static{g(this,"r")}fillPolygons(t,s){let e=this._fillPolygons(t,s),n=Object.assign({},s,{hachureAngle:s.hachureAngle+90}),o=this._fillPolygons(t,n);return e.ops=e.ops.concat(o.ops),e}},rt=class{static{g(this,"i")}constructor(t){this.helper=t}fillPolygons(t,s){let e=V(t,s=Object.assign({},s,{hachureAngle:0}));return this.dotsOnLines(e,s)}dotsOnLines(t,s){let e=[],n=s.hachureGap;n<0&&(n=4*s.strokeWidth),n=Math.max(n,.1);let o=s.fillWeight;o<0&&(o=s.strokeWidth/2);let r=n/4;for(let h of t){let i=Y(h),l=i/n,c=Math.ceil(l)-1,d=i-c*n,p=(h[0][0]+h[1][0])/2-n/4,u=Math.min(h[0][1],h[1][1]);for(let f=0;f{let h=Y(r),i=Math.floor(h/(e+n)),l=(h+n-i*(e+n))/2,c=r[0],d=r[1];c[0]>d[0]&&(c=r[1],d=r[0]);let p=Math.atan((d[1]-c[1])/(d[0]-c[0]));for(let u=0;u{let r=Y(o),h=Math.round(r/(2*s)),i=o[0],l=o[1];i[0]>l[0]&&(i=o[1],l=o[0]);let c=Math.atan((l[1]-i[1])/(l[0]-i[0]));for(let d=0;dc%2?l+s:l+t));o.push({key:"C",data:i}),t=i[4],s=i[5];break}case"Q":o.push({key:"Q",data:[...h]}),t=h[2],s=h[3];break;case"q":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"Q",data:i}),t=i[2],s=i[3];break}case"A":o.push({key:"A",data:[...h]}),t=h[5],s=h[6];break;case"a":t+=h[5],s+=h[6],o.push({key:"A",data:[h[0],h[1],h[2],h[3],h[4],t,s]});break;case"H":o.push({key:"H",data:[...h]}),t=h[0];break;case"h":t+=h[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...h]}),s=h[0];break;case"v":s+=h[0],o.push({key:"V",data:[s]});break;case"S":o.push({key:"S",data:[...h]}),t=h[2],s=h[3];break;case"s":{let i=h.map(((l,c)=>c%2?l+s:l+t));o.push({key:"S",data:i}),t=i[2],s=i[3];break}case"T":o.push({key:"T",data:[...h]}),t=h[0],s=h[1];break;case"t":t+=h[0],s+=h[1],o.push({key:"T",data:[t,s]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=e,s=n}return o}g(Lt,"y");function Tt(a){let t=[],s="",e=0,n=0,o=0,r=0,h=0,i=0;for(let{key:l,data:c}of a){switch(l){case"M":t.push({key:"M",data:[...c]}),[e,n]=c,[o,r]=c;break;case"C":t.push({key:"C",data:[...c]}),e=c[4],n=c[5],h=c[2],i=c[3];break;case"L":t.push({key:"L",data:[...c]}),[e,n]=c;break;case"H":e=c[0],t.push({key:"L",data:[e,n]});break;case"V":n=c[0],t.push({key:"L",data:[e,n]});break;case"S":{let d=0,p=0;s==="C"||s==="S"?(d=e+(e-h),p=n+(n-i)):(d=e,p=n),t.push({key:"C",data:[d,p,...c]}),h=c[0],i=c[1],e=c[2],n=c[3];break}case"T":{let[d,p]=c,u=0,f=0;s==="Q"||s==="T"?(u=e+(e-h),f=n+(n-i)):(u=e,f=n);let M=e+2*(u-e)/3,b=n+2*(f-n)/3,y=d+2*(u-d)/3,k=p+2*(f-p)/3;t.push({key:"C",data:[M,b,y,k,d,p]}),h=u,i=f,e=d,n=p;break}case"Q":{let[d,p,u,f]=c,M=e+2*(d-e)/3,b=n+2*(p-n)/3,y=u+2*(d-u)/3,k=f+2*(p-f)/3;t.push({key:"C",data:[M,b,y,k,u,f]}),h=d,i=p,e=u,n=f;break}case"A":{let d=Math.abs(c[0]),p=Math.abs(c[1]),u=c[2],f=c[3],M=c[4],b=c[5],y=c[6];d===0||p===0?(t.push({key:"C",data:[e,n,b,y,b,y]}),e=b,n=y):(e!==b||n!==y)&&(Dt(e,n,b,y,d,p,u,f,M).forEach((function(k){t.push({key:"C",data:k})})),e=b,n=y);break}case"Z":t.push({key:"Z",data:[]}),e=o,n=r}s=l}return t}g(Tt,"m");function j(a,t,s){return[a*Math.cos(s)-t*Math.sin(s),a*Math.sin(s)+t*Math.cos(s)]}g(j,"w");function Dt(a,t,s,e,n,o,r,h,i,l){let c=(d=r,Math.PI*d/180);var d;let p=[],u=0,f=0,M=0,b=0;if(l)[u,f,M,b]=l;else{[a,t]=j(a,t,-c),[s,e]=j(s,e,-c);let D=(a-s)/2,S=(t-e)/2,I=D*D/(n*n)+S*S/(o*o);I>1&&(I=Math.sqrt(I),n*=I,o*=I);let E=n*n,G=o*o,Ct=E*G-E*S*S-G*D*D,zt=E*S*S+G*D*D,bt=(h===i?-1:1)*Math.sqrt(Math.abs(Ct/zt));M=bt*n*S/o+(a+s)/2,b=bt*-o*D/n+(t+e)/2,u=Math.asin(parseFloat(((t-b)/o).toFixed(9))),f=Math.asin(parseFloat(((e-b)/o).toFixed(9))),af&&(u-=2*Math.PI),!i&&f>u&&(f-=2*Math.PI)}let y=f-u;if(Math.abs(y)>120*Math.PI/180){let D=f,S=s,I=e;f=i&&f>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,p=Dt(s=M+n*Math.cos(f),e=b+o*Math.sin(f),S,I,n,o,r,0,i,[f,D,M,b])}y=f-u;let k=Math.cos(u),w=Math.sin(u),v=Math.cos(f),P=Math.sin(f),x=Math.tan(y/4),T=4/3*n*x,_=4/3*o*x,Z=[a,t],A=[a+T*w,t-_*k],z=[s+T*P,e-_*v],kt=[s,e];if(A[0]=2*Z[0]-A[0],A[1]=2*Z[1]-A[1],l)return[A,z,kt].concat(p);{p=[A,z,kt].concat(p);let D=[];for(let S=0;S2){let n=[];for(let o=0;o2*Math.PI&&(u=0,f=2*Math.PI);let M=2*Math.PI/i.curveStepCount,b=Math.min(M/2,(f-u)/2),y=St(b,l,c,d,p,u,f,1,i);if(!i.disableMultiStroke){let k=St(b,l,c,d,p,u,f,1.5,i);y.push(...k)}return r&&(h?y.push(...C(l,c,l+d*Math.cos(u),c+p*Math.sin(u),i),...C(l,c,l+d*Math.cos(f),c+p*Math.sin(f),i)):y.push({op:"lineTo",data:[l,c]},{op:"lineTo",data:[l+d*Math.cos(u),c+p*Math.sin(u)]})),{type:"path",ops:y}}g(wt,"A");function xt(a,t){let s=Tt(Lt(Mt(a))),e=[],n=[0,0],o=[0,0];for(let{key:r,data:h}of s)switch(r){case"M":o=[h[0],h[1]],n=[h[0],h[1]];break;case"L":e.push(...C(o[0],o[1],h[0],h[1],t)),o=[h[0],h[1]];break;case"C":{let[i,l,c,d,p,u]=h;e.push(...jt(i,l,c,d,p,u,o,t)),o=[p,u];break}case"Z":e.push(...C(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]]}return{type:"path",ops:e}}g(xt,"_");function nt(a,t){let s=[];for(let e of a)if(e.length){let n=t.maxRandomnessOffset||0,o=e.length;if(o>2){s.push({op:"move",data:[e[0][0]+m(n,t),e[0][1]+m(n,t)]});for(let r=1;r500?.4:-.0016668*i+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>h&&(c=i/10);let d=c/2,p=.2+.2*It(n),u=n.bowing*n.maxRandomnessOffset*(e-t)/200,f=n.bowing*n.maxRandomnessOffset*(a-s)/200;u=m(u,n,l),f=m(f,n,l);let M=[],b=g(()=>m(d,n,l),"M"),y=g(()=>m(c,n,l),"k"),k=n.preserveVertices;return o&&(r?M.push({op:"move",data:[a+(k?0:b()),t+(k?0:b())]}):M.push({op:"move",data:[a+(k?0:m(c,n,l)),t+(k?0:m(c,n,l))]})),r?M.push({op:"bcurveTo",data:[u+a+(s-a)*p+b(),f+t+(e-t)*p+b(),u+a+2*(s-a)*p+b(),f+t+2*(e-t)*p+b(),s+(k?0:b()),e+(k?0:b())]}):M.push({op:"bcurveTo",data:[u+a+(s-a)*p+y(),f+t+(e-t)*p+y(),u+a+2*(s-a)*p+y(),f+t+2*(e-t)*p+y(),s+(k?0:y()),e+(k?0:y())]}),M}g(pt,"R");function H(a,t,s){if(!a.length)return[];let e=[];e.push([a[0][0]+m(t,s),a[0][1]+m(t,s)]),e.push([a[0][0]+m(t,s),a[0][1]+m(t,s)]);for(let n=1;n3){let o=[],r=1-s.curveTightness;n.push({op:"move",data:[a[1][0],a[1][1]]});for(let h=1;h+21&&n.push(h)):n.push(h),n.push(a[t+3])}else{let i=a[t+0],l=a[t+1],c=a[t+2],d=a[t+3],p=W(i,l,.5),u=W(l,c,.5),f=W(c,d,.5),M=W(p,u,.5),b=W(u,f,.5),y=W(M,b,.5);ft([i,p,M,y],0,s,n),ft([y,b,f,d],0,s,n)}var o,r;return n}g(ft,"K");function Ft(a,t){return X(a,0,a.length,t)}g(Ft,"U");function X(a,t,s,e,n){let o=n||[],r=a[t],h=a[s-1],i=0,l=1;for(let c=t+1;ci&&(i=d,l=c)}return Math.sqrt(i)>e?(X(a,t,l+1,e,o),X(a,l,s,e,o)):(o.length||o.push(r),o.push(h)),o}g(X,"X");function at(a,t=.15,s){let e=[],n=(a.length-1)/3;for(let o=0;o0?X(e,0,e.length,s):e}g(at,"Y");var L="none",R=class{static{g(this,"et")}constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,s,e){return{shape:t,sets:s||[],options:e||this.defaultOptions}}line(t,s,e,n,o){let r=this._o(o);return this._d("line",[At(t,s,e,n,r)],r)}rectangle(t,s,e,n,o){let r=this._o(o),h=[],i=Rt(t,s,e,n,r);if(r.fill){let l=[[t,s],[t+e,s],[t+e,s+n],[t,s+n]];r.fillStyle==="solid"?h.push(nt([l],r)):h.push($([l],r))}return r.stroke!==L&&h.push(i),this._d("rectangle",h,r)}ellipse(t,s,e,n,o){let r=this._o(o),h=[],i=_t(e,n,r),l=ut(t,s,r,i);if(r.fill)if(r.fillStyle==="solid"){let c=ut(t,s,r,i).opset;c.type="fillPath",h.push(c)}else h.push($([l.estimatedPoints],r));return r.stroke!==L&&h.push(l.opset),this._d("ellipse",h,r)}circle(t,s,e,n){let o=this.ellipse(t,s,e,e,n);return o.shape="circle",o}linearPath(t,s){let e=this._o(s);return this._d("linearPath",[B(t,!1,e)],e)}arc(t,s,e,n,o,r,h=!1,i){let l=this._o(i),c=[],d=wt(t,s,e,n,o,r,h,!0,l);if(h&&l.fill)if(l.fillStyle==="solid"){let p=Object.assign({},l);p.disableMultiStroke=!0;let u=wt(t,s,e,n,o,r,!0,!1,p);u.type="fillPath",c.push(u)}else c.push((function(p,u,f,M,b,y,k){let w=p,v=u,P=Math.abs(f/2),x=Math.abs(M/2);P+=m(.01*P,k),x+=m(.01*x,k);let T=b,_=y;for(;T<0;)T+=2*Math.PI,_+=2*Math.PI;_-T>2*Math.PI&&(T=0,_=2*Math.PI);let Z=(_-T)/k.curveStepCount,A=[];for(let z=T;z<=_;z+=Z)A.push([w+P*Math.cos(z),v+x*Math.sin(z)]);return A.push([w+P*Math.cos(_),v+x*Math.sin(_)]),A.push([w,v]),$([A],k)})(t,s,e,n,o,r,l));return l.stroke!==L&&c.push(d),this._d("arc",c,l)}curve(t,s){let e=this._o(s),n=[],o=mt(t,e);if(e.fill&&e.fill!==L)if(e.fillStyle==="solid"){let r=mt(t,Object.assign(Object.assign({},e),{disableMultiStroke:!0,roughness:e.roughness?e.roughness+e.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(r.ops)})}else{let r=[],h=t;if(h.length){let i=typeof h[0][0]=="number"?[h]:h;for(let l of i)l.length<3?r.push(...l):l.length===3?r.push(...at(Ot([l[0],l[0],l[1],l[2]]),10,(1+e.roughness)/2)):r.push(...at(Ot(l),10,(1+e.roughness)/2))}r.length&&n.push($([r],e))}return e.stroke!==L&&n.push(o),this._d("curve",n,e)}polygon(t,s){let e=this._o(s),n=[],o=B(t,!0,e);return e.fill&&(e.fillStyle==="solid"?n.push(nt([t],e)):n.push($([t],e))),e.stroke!==L&&n.push(o),this._d("polygon",n,e)}path(t,s){let e=this._o(s),n=[];if(!t)return this._d("path",n,e);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=e.fill&&e.fill!=="transparent"&&e.fill!==L,r=e.stroke!==L,h=!!(e.simplification&&e.simplification<1),i=(function(c,d,p){let u=Tt(Lt(Mt(c))),f=[],M=[],b=[0,0],y=[],k=g(()=>{y.length>=4&&M.push(...at(y,d)),y=[]},"i"),w=g(()=>{k(),M.length&&(f.push(M),M=[])},"c");for(let{key:P,data:x}of u)switch(P){case"M":w(),b=[x[0],x[1]],M.push(b);break;case"L":k(),M.push([x[0],x[1]]);break;case"C":if(!y.length){let T=M.length?M[M.length-1]:b;y.push([T[0],T[1]])}y.push([x[0],x[1]]),y.push([x[2],x[3]]),y.push([x[4],x[5]]);break;case"Z":k(),M.push([b[0],b[1]])}if(w(),!p)return f;let v=[];for(let P of f){let x=Ft(P,p);x.length&&v.push(x)}return v})(t,1,h?4-4*(e.simplification||1):(1+e.roughness)/2),l=xt(t,e);if(o)if(e.fillStyle==="solid")if(i.length===1){let c=xt(t,Object.assign(Object.assign({},e),{disableMultiStroke:!0,roughness:e.roughness?e.roughness+e.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else n.push(nt(i,e));else n.push($(i,e));return r&&(h?i.forEach((c=>{n.push(B(c,!1,e))})):n.push(l)),this._d("path",n,e)}opsToPath(t,s){let e="";for(let n of t.ops){let o=typeof s=="number"&&s>=0?n.data.map((r=>+r.toFixed(s))):n.data;switch(n.op){case"move":e+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":e+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":e+=`L${o[0]} ${o[1]} `}}return e.trim()}toPaths(t){let s=t.sets||[],e=t.options||this.defaultOptions,n=[];for(let o of s){let r=null;switch(o.type){case"path":r={d:this.opsToPath(o),stroke:e.stroke,strokeWidth:e.strokeWidth,fill:L};break;case"fillPath":r={d:this.opsToPath(o),stroke:L,strokeWidth:0,fill:e.fill||L};break;case"fillSketch":r=this.fillSketch(o,e)}r&&n.push(r)}return n}fillSketch(t,s){let e=s.fillWeight;return e<0&&(e=s.strokeWidth/2),{d:this.opsToPath(t),stroke:s.fill||L,strokeWidth:e,fill:L}}_mergedShape(t){return t.filter(((s,e)=>e===0||s.op!=="move"))}},dt=class{static{g(this,"st")}constructor(t,s){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new R(s)}draw(t){let s=t.sets||[],e=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(let r of s)switch(r.type){case"path":n.save(),n.strokeStyle=e.stroke==="none"?"transparent":e.stroke,n.lineWidth=e.strokeWidth,e.strokeLineDash&&n.setLineDash(e.strokeLineDash),e.strokeLineDashOffset&&(n.lineDashOffset=e.strokeLineDashOffset),this._drawToContext(n,r,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=e.fill||"";let h=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,r,o,h),n.restore();break}case"fillSketch":this.fillSketch(n,r,e)}}fillSketch(t,s,e){let n=e.fillWeight;n<0&&(n=e.strokeWidth/2),t.save(),e.fillLineDash&&t.setLineDash(e.fillLineDash),e.fillLineDashOffset&&(t.lineDashOffset=e.fillLineDashOffset),t.strokeStyle=e.fill||"",t.lineWidth=n,this._drawToContext(t,s,e.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,s,e,n="nonzero"){t.beginPath();for(let o of s.ops){let r=typeof e=="number"&&e>=0?o.data.map((h=>+h.toFixed(e))):o.data;switch(o.op){case"move":t.moveTo(r[0],r[1]);break;case"bcurveTo":t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case"lineTo":t.lineTo(r[0],r[1])}}s.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,s,e,n,o){let r=this.gen.line(t,s,e,n,o);return this.draw(r),r}rectangle(t,s,e,n,o){let r=this.gen.rectangle(t,s,e,n,o);return this.draw(r),r}ellipse(t,s,e,n,o){let r=this.gen.ellipse(t,s,e,n,o);return this.draw(r),r}circle(t,s,e,n){let o=this.gen.circle(t,s,e,n);return this.draw(o),o}linearPath(t,s){let e=this.gen.linearPath(t,s);return this.draw(e),e}polygon(t,s){let e=this.gen.polygon(t,s);return this.draw(e),e}arc(t,s,e,n,o,r,h=!1,i){let l=this.gen.arc(t,s,e,n,o,r,h,i);return this.draw(l),l}curve(t,s){let e=this.gen.curve(t,s);return this.draw(e),e}path(t,s){let e=this.gen.path(t,s);return this.draw(e),e}},N="http://www.w3.org/2000/svg",gt=class{static{g(this,"ot")}constructor(t,s){this.svg=t,this.gen=new R(s)}draw(t){let s=t.sets||[],e=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(N,"g"),r=t.options.fixedDecimalPlaceDigits;for(let h of s){let i=null;switch(h.type){case"path":i=n.createElementNS(N,"path"),i.setAttribute("d",this.opsToPath(h,r)),i.setAttribute("stroke",e.stroke),i.setAttribute("stroke-width",e.strokeWidth+""),i.setAttribute("fill","none"),e.strokeLineDash&&i.setAttribute("stroke-dasharray",e.strokeLineDash.join(" ").trim()),e.strokeLineDashOffset&&i.setAttribute("stroke-dashoffset",`${e.strokeLineDashOffset}`);break;case"fillPath":i=n.createElementNS(N,"path"),i.setAttribute("d",this.opsToPath(h,r)),i.setAttribute("stroke","none"),i.setAttribute("stroke-width","0"),i.setAttribute("fill",e.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||i.setAttribute("fill-rule","evenodd");break;case"fillSketch":i=this.fillSketch(n,h,e)}i&&o.appendChild(i)}return o}fillSketch(t,s,e){let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let o=t.createElementNS(N,"path");return o.setAttribute("d",this.opsToPath(s,e.fixedDecimalPlaceDigits)),o.setAttribute("stroke",e.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),e.fillLineDash&&o.setAttribute("stroke-dasharray",e.fillLineDash.join(" ").trim()),e.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${e.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,s){return this.gen.opsToPath(t,s)}line(t,s,e,n,o){let r=this.gen.line(t,s,e,n,o);return this.draw(r)}rectangle(t,s,e,n,o){let r=this.gen.rectangle(t,s,e,n,o);return this.draw(r)}ellipse(t,s,e,n,o){let r=this.gen.ellipse(t,s,e,n,o);return this.draw(r)}circle(t,s,e,n){let o=this.gen.circle(t,s,e,n);return this.draw(o)}linearPath(t,s){let e=this.gen.linearPath(t,s);return this.draw(e)}polygon(t,s){let e=this.gen.polygon(t,s);return this.draw(e)}arc(t,s,e,n,o,r,h=!1,i){let l=this.gen.arc(t,s,e,n,o,r,h,i);return this.draw(l)}curve(t,s){let e=this.gen.curve(t,s);return this.draw(e)}path(t,s){let e=this.gen.path(t,s);return this.draw(e)}},Vt={canvas:g((a,t)=>new dt(a,t),"canvas"),svg:g((a,t)=>new gt(a,t),"svg"),generator:g(a=>new R(a),"generator"),newSeed:g(()=>R.newSeed(),"newSeed")};export{Vt as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5VCL7Z4A.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5VCL7Z4A.mjs new file mode 100644 index 00000000000..bc6953b4598 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-5VCL7Z4A.mjs @@ -0,0 +1 @@ +import{a as f}from"./chunk-AQ6EADP3.mjs";var d=f((t,r)=>{if(r)return"translate("+-t.width/2+", "+-t.height/2+")";let c=t.x??0,e=t.y??0;return"translate("+-(c+t.width/2)+", "+-(e+t.height/2)+")"},"computeLabelTransform");var s={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},T={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function b(t,r){if(t===void 0||r===void 0)return{angle:0,deltaX:0,deltaY:0};t=n(t),r=n(r);let[c,e]=[t.x,t.y],[o,i]=[r.x,r.y],l=o-c,p=i-e;return{angle:Math.atan(p/l),deltaX:l,deltaY:p}}f(b,"calculateDeltaAndAngle");var n=f(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),E=f(t=>({x:f(function(r,c,e){let o=0,i=n(e[0]).x=0?1:-1)}else if(c===e.length-1&&Object.hasOwn(s,t.arrowTypeEnd)){let{angle:a,deltaX:m}=b(e[e.length-1],e[e.length-2]);o=s[t.arrowTypeEnd]*Math.cos(a)*(m>=0?1:-1)}let l=Math.abs(n(r).x-n(e[e.length-1]).x),p=Math.abs(n(r).y-n(e[e.length-1]).y),u=Math.abs(n(r).x-n(e[0]).x),x=Math.abs(n(r).y-n(e[0]).y),y=s[t.arrowTypeStart],h=s[t.arrowTypeEnd],g=1;if(l0&&p0&&x=0?1:-1)}else if(c===e.length-1&&Object.hasOwn(s,t.arrowTypeEnd)){let{angle:a,deltaY:m}=b(e[e.length-1],e[e.length-2]);o=s[t.arrowTypeEnd]*Math.abs(Math.sin(a))*(m>=0?1:-1)}let l=Math.abs(n(r).y-n(e[e.length-1]).y),p=Math.abs(n(r).x-n(e[e.length-1]).x),u=Math.abs(n(r).y-n(e[0]).y),x=Math.abs(n(r).x-n(e[0]).x),y=s[t.arrowTypeStart],h=s[t.arrowTypeEnd],g=1;if(l0&&p0&&x{let e;return n==="sandbox"&&(e=o("#i"+t)),(n==="sandbox"?o(e.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{m as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-67TQ5CYL.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-67TQ5CYL.mjs new file mode 100644 index 00000000000..a24b08f9205 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-67TQ5CYL.mjs @@ -0,0 +1,128 @@ +import{b,c as vr}from"./chunk-7W6UQGC5.mjs";import{a as s,c as Yo}from"./chunk-AQ6EADP3.mjs";var Mr=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,qr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wr=/\s*%%.*\n/gm;var Qt=class extends Error{static{s(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}};var ti={},ks=s(function(r,t){r=r.replace(Mr,"").replace(qr,"").replace(wr,` +`);for(let[i,{detector:e}]of Object.entries(ti))if(e(r,t))return i;throw new Qt(`No diagram type detected matching given configuration for text: ${r}`)},"detectType"),Ts=s((...r)=>{for(let{id:t,detector:i,loader:e}of r)_i(t,i,e)},"registerLazyLoadedDiagrams"),_i=s((r,t,i)=>{ti[r]&&b.warn(`Detector with key ${r} already exists. Overwriting.`),ti[r]={detector:t,loader:i},b.debug(`Detector with key ${r} added${i?" with loader":""}`)},"addDetector"),bs=s(r=>ti[r].loader,"getDiagramLoader");var Ai=s((r,t,{depth:i=2,clobber:e=!1}={})=>{let d={depth:i,clobber:e};return Array.isArray(t)&&!Array.isArray(r)?(t.forEach(h=>Ai(r,h,d)),r):Array.isArray(t)&&Array.isArray(r)?(t.forEach(h=>{r.includes(h)||r.push(h)}),r):r===void 0||i<=0?r!=null&&typeof r=="object"&&typeof t=="object"?Object.assign(r,t):t:(t!==void 0&&typeof r=="object"&&typeof t=="object"&&Object.keys(t).forEach(h=>{typeof t[h]=="object"&&t[h]!==null&&(r[h]===void 0||typeof r[h]=="object")?(r[h]===void 0&&(r[h]=Array.isArray(t[h])?[]:{}),r[h]=Ai(r[h],t[h],{depth:i-1,clobber:e})):(e||typeof r[h]!="object"&&typeof t[h]!="object")&&(r[h]=t[h])}),r)},"assignWithDepth"),D=Ai;var ii={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:s(r=>r>=255?255:r<0?0:r,"r"),g:s(r=>r>=255?255:r<0?0:r,"g"),b:s(r=>r>=255?255:r<0?0:r,"b"),h:s(r=>r%360,"h"),s:s(r=>r>=100?100:r<0?0:r,"s"),l:s(r=>r>=100?100:r<0?0:r,"l"),a:s(r=>r>=1?1:r<0?0:r,"a")},toLinear:s(r=>{let t=r/255;return r>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:s((r,t,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<.16666666666666666?r+(t-r)*6*i:i<.5?t:i<.6666666666666666?r+(t-r)*(.6666666666666666-i)*6:r),"hue2rgb"),hsl2rgb:s(({h:r,s:t,l:i},e)=>{if(!t)return i*2.55;r/=360,t/=100,i/=100;let d=i<.5?i*(1+t):i+t-i*t,h=2*i-d;switch(e){case"r":return ii.hue2rgb(h,d,r+.3333333333333333)*255;case"g":return ii.hue2rgb(h,d,r)*255;case"b":return ii.hue2rgb(h,d,r-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:s(({r,g:t,b:i},e)=>{r/=255,t/=255,i/=255;let d=Math.max(r,t,i),h=Math.min(r,t,i),y=(d+h)/2;if(e==="l")return y*100;if(d===h)return 0;let f=d-h,M=y>.5?f/(2-d-h):f/(d+h);if(e==="s")return M*100;switch(d){case r:return((t-i)/f+(tt>i?Math.min(t,Math.max(i,r)):Math.min(i,Math.max(t,r)),"clamp"),round:s(r=>Math.round(r*1e10)/1e10,"round")},Ir=Xo;var Ko={dec2hex:s(r=>{let t=Math.round(r).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},Dr=Ko;var Zo={channel:Or,lang:Ir,unit:Dr},u=Zo;var it={};for(let r=0;r<=255;r++)it[r]=u.unit.dec2hex(r);var _={ALL:0,RGB:1,HSL:2};var vi=class{static{s(this,"Type")}constructor(){this.type=_.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=_.ALL}is(t){return this.type===t}},zr=vi;var Mi=class{static{s(this,"Channels")}constructor(t,i){this.color=i,this.changed=!1,this.data=t,this.type=new zr}set(t,i){return this.color=i,this.changed=!1,this.data=t,this.type.type=_.ALL,this}_ensureHSL(){let t=this.data,{h:i,s:e,l:d}=t;i===void 0&&(t.h=u.channel.rgb2hsl(t,"h")),e===void 0&&(t.s=u.channel.rgb2hsl(t,"s")),d===void 0&&(t.l=u.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r:i,g:e,b:d}=t;i===void 0&&(t.r=u.channel.hsl2rgb(t,"r")),e===void 0&&(t.g=u.channel.hsl2rgb(t,"g")),d===void 0&&(t.b=u.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,i=t.r;return!this.type.is(_.HSL)&&i!==void 0?i:(this._ensureHSL(),u.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,i=t.g;return!this.type.is(_.HSL)&&i!==void 0?i:(this._ensureHSL(),u.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,i=t.b;return!this.type.is(_.HSL)&&i!==void 0?i:(this._ensureHSL(),u.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,i=t.h;return!this.type.is(_.RGB)&&i!==void 0?i:(this._ensureRGB(),u.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,i=t.s;return!this.type.is(_.RGB)&&i!==void 0?i:(this._ensureRGB(),u.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,i=t.l;return!this.type.is(_.RGB)&&i!==void 0?i:(this._ensureRGB(),u.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(_.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(_.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(_.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(_.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(_.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(_.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},Rr=Mi;var Jo=new Rr({r:0,g:0,b:0,a:0},"transparent"),st=Jo;var Wr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:s(r=>{if(r.charCodeAt(0)!==35)return;let t=r.match(Wr.re);if(!t)return;let i=t[1],e=parseInt(i,16),d=i.length,h=d%4===0,y=d>4,f=y?1:17,M=y?8:4,q=h?0:-1,Y=y?255:15;return st.set({r:(e>>M*(q+3)&Y)*f,g:(e>>M*(q+2)&Y)*f,b:(e>>M*(q+1)&Y)*f,a:h?(e&Y)*f/255:1},r)},"parse"),stringify:s(r=>{let{r:t,g:i,b:e,a:d}=r;return d<1?`#${it[Math.round(t)]}${it[Math.round(i)]}${it[Math.round(e)]}${it[Math.round(d*255)]}`:`#${it[Math.round(t)]}${it[Math.round(i)]}${it[Math.round(e)]}`},"stringify")},dt=Wr;var ri={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:s(r=>{let t=r.match(ri.hueRe);if(t){let[,i,e]=t;switch(e){case"grad":return u.channel.clamp.h(parseFloat(i)*.9);case"rad":return u.channel.clamp.h(parseFloat(i)*180/Math.PI);case"turn":return u.channel.clamp.h(parseFloat(i)*360)}}return u.channel.clamp.h(parseFloat(r))},"_hue2deg"),parse:s(r=>{let t=r.charCodeAt(0);if(t!==104&&t!==72)return;let i=r.match(ri.re);if(!i)return;let[,e,d,h,y,f]=i;return st.set({h:ri._hue2deg(e),s:u.channel.clamp.s(parseFloat(d)),l:u.channel.clamp.l(parseFloat(h)),a:y?u.channel.clamp.a(f?parseFloat(y)/100:parseFloat(y)):1},r)},"parse"),stringify:s(r=>{let{h:t,s:i,l:e,a:d}=r;return d<1?`hsla(${u.lang.round(t)}, ${u.lang.round(i)}%, ${u.lang.round(e)}%, ${d})`:`hsl(${u.lang.round(t)}, ${u.lang.round(i)}%, ${u.lang.round(e)}%)`},"stringify")},Mt=ri;var oi={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:s(r=>{r=r.toLowerCase();let t=oi.colors[r];if(t)return dt.parse(t)},"parse"),stringify:s(r=>{let t=dt.stringify(r);for(let i in oi.colors)if(oi.colors[i]===t)return i},"stringify")},qi=oi;var Pr={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:s(r=>{let t=r.charCodeAt(0);if(t!==114&&t!==82)return;let i=r.match(Pr.re);if(!i)return;let[,e,d,h,y,f,M,q,Y]=i;return st.set({r:u.channel.clamp.r(d?parseFloat(e)*2.55:parseFloat(e)),g:u.channel.clamp.g(y?parseFloat(h)*2.55:parseFloat(h)),b:u.channel.clamp.b(M?parseFloat(f)*2.55:parseFloat(f)),a:q?u.channel.clamp.a(Y?parseFloat(q)/100:parseFloat(q)):1},r)},"parse"),stringify:s(r=>{let{r:t,g:i,b:e,a:d}=r;return d<1?`rgba(${u.lang.round(t)}, ${u.lang.round(i)}, ${u.lang.round(e)}, ${u.lang.round(d)})`:`rgb(${u.lang.round(t)}, ${u.lang.round(i)}, ${u.lang.round(e)})`},"stringify")},qt=Pr;var Qo={format:{keyword:qi,hex:dt,rgb:qt,rgba:qt,hsl:Mt,hsla:Mt},parse:s(r=>{if(typeof r!="string")return r;let t=dt.parse(r)||qt.parse(r)||Mt.parse(r)||qi.parse(r);if(t)return t;throw new Error(`Unsupported color format: "${r}"`)},"parse"),stringify:s(r=>!r.changed&&r.color?r.color:r.type.is(_.HSL)||r.data.r===void 0?Mt.stringify(r):r.a<1||!Number.isInteger(r.r)||!Number.isInteger(r.g)||!Number.isInteger(r.b)?qt.stringify(r):dt.stringify(r),"stringify")},A=Qo;var te=s((r,t)=>{let i=A.parse(r);for(let e in t)i[e]=u.channel.clamp[e](t[e]);return A.stringify(i)},"change"),ei=te;var ie=s((r,t,i=0,e=1)=>{if(typeof r!="number")return ei(r,{a:t});let d=st.set({r:u.channel.clamp.r(r),g:u.channel.clamp.g(t),b:u.channel.clamp.b(i),a:u.channel.clamp.a(e)});return A.stringify(d)},"rgba"),P=ie;var re=s((r,t)=>u.lang.round(A.parse(r)[t]),"channel"),oe=re;var ee=s(r=>{let{r:t,g:i,b:e}=A.parse(r),d=.2126*u.channel.toLinear(t)+.7152*u.channel.toLinear(i)+.0722*u.channel.toLinear(e);return u.lang.round(d)},"luminance"),Nr=ee;var se=s(r=>Nr(r)>=.5,"isLight"),Hr=se;var le=s(r=>!Hr(r),"isDark"),T=le;var ae=s((r,t,i)=>{let e=A.parse(r),d=e[t],h=u.channel.clamp[t](d+i);return d!==h&&(e[t]=h),A.stringify(e)},"adjustChannel"),Tt=ae;var he=s((r,t)=>Tt(r,"l",t),"lighten"),n=he;var ne=s((r,t)=>Tt(r,"l",-t),"darken"),c=ne;var ce=s((r,t)=>Tt(r,"a",-t),"transparentize"),de=ce;var Ce=s((r,t)=>{let i=A.parse(r),e={};for(let d in t)t[d]&&(e[d]=i[d]+t[d]);return ei(r,e)},"adjust"),o=Ce;var ge=s((r,t,i=50)=>{let{r:e,g:d,b:h,a:y}=A.parse(r),{r:f,g:M,b:q,a:Y}=A.parse(t),St=i/100,gt=St*2-1,rt=y-Y,ut=((gt*rt===-1?gt:(gt+rt)/(1+gt*rt))+1)/2,Ft=1-ut,gi=e*ut+f*Ft,pi=d*ut+M*Ft,mt=h*ut+q*Ft,w=y*St+Y*(1-St);return P(gi,pi,mt,w)},"mix"),Ur=ge;var pe=s((r,t=100)=>{let i=A.parse(r);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,Ur(i,r,t)},"invert"),a=pe;var F="#ffffff",L="#f2f2f2";var p=s((r,t)=>t?o(r,{s:-40,l:10}):o(r,{s:-40,l:-10}),"mkBorder");var wi=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?c(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||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(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||n(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||c(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||c(this.mainBkg,10)):(this.rowOdd=this.rowOdd||n(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||n(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Gr=s(r=>{let t=new wi;return t.calculate(r),t},"getThemeVariables");var Oi=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=n(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=n(a("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=P(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=c("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=c(this.sectionBkgColor,10),this.taskBorderColor=P(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=P(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||n(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||c(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=n(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=n(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=n(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=a(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},$r=s(r=>{let t=new Oi;return t.calculate(r),t},"getThemeVariables");var Ii=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=p(this.primaryColor,this.darkMode),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=p(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=P(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||c(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||c(this.tertiaryColor,40);for(let t=0;t{this[e]==="calculated"&&(this[e]=void 0)}),typeof t!="object"){this.updateColors();return}let i=Object.keys(t);i.forEach(e=>{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},jr=s(r=>{let t=new Ii;return t.calculate(r),t},"getThemeVariables");var Di=class{static{s(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=n("#cde498",10),this.primaryBorderColor=p(this.primaryColor,this.darkMode),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.primaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=c(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||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||c(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||c(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Vr=s(r=>{let t=new Di;return t.calculate(r),t},"getThemeVariables");var zi=class{static{s(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=n(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=p(this.primaryColor,this.darkMode),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||n(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=n(this.contrast,55),this.border2=this.contrast,this.actorBorder=n(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[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Yr=s(r=>{let t=new zi;return t.calculate(r),t},"getThemeVariables");var Ri=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=p(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?c(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||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);let t="#ECECFE",i="#E9E9F1",e=o(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||e,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||n(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||i,this.cScale2=this.cScale2||e,this.cScale3=this.cScale3||o(t,{h:30}),this.cScale4=this.cScale4||o(t,{h:60}),this.cScale5=this.cScale5||o(t,{h:90}),this.cScale6=this.cScale6||o(t,{h:120}),this.cScale7=this.cScale7||o(t,{h:150}),this.cScale8=this.cScale8||o(t,{h:210,l:150}),this.cScale9=this.cScale9||o(t,{h:270}),this.cScale10=this.cScale10||o(t,{h:300}),this.cScale11=this.cScale11||o(t,{h:330}),this.darkMode)for(let h=0;h{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Xr=s(r=>{let t=new Ri;return t.calculate(r),t},"getThemeVariables");var Wi=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=n(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=n(a("#323D47"),10),this.border1="#ccc",this.border2=P(255,255,255,.25),this.arrowheadColor=a(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?c(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||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(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||n(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Kr=s(r=>{let t=new Wi;return t.calculate(r),t},"getThemeVariables");var Pi=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=p("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?c(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);let t="#ECECFE",i="#E9E9F1",e=o(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||e,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||n(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let h=0;h{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Zr=s(r=>{let t=new Pi;return t.calculate(r),t},"getThemeVariables");var Ni=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=n(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=n(a("#323D47"),10),this.border1="#ccc",this.border2=P(255,255,255,.25),this.arrowheadColor=a(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?c(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(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||n(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Jr=s(r=>{let t=new Ni;return t.calculate(r),t},"getThemeVariables");var Hi=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=p(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?c(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||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);let t="#ECECFE",i="#E9E9F1",e=o(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||e,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||n(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let h=0;h{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Qr=s(r=>{let t=new Hi;return t.calculate(r),t},"getThemeVariables");var Ui=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=n(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=p(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=n(a("#323D47"),10),this.border1="#ccc",this.border2=P(255,255,255,.25),this.arrowheadColor=a(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||p(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||p(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||p(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||p(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?c(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||c(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||n(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},to=s(r=>{let t=new Ui;return t.calculate(r),t},"getThemeVariables");var lt={base:{getThemeVariables:Gr},dark:{getThemeVariables:$r},default:{getThemeVariables:jr},forest:{getThemeVariables:Vr},neutral:{getThemeVariables:Yr},neo:{getThemeVariables:Xr},"neo-dark":{getThemeVariables:Kr},redux:{getThemeVariables:Zr},"redux-dark":{getThemeVariables:Jr},"redux-color":{getThemeVariables:Qr},"redux-dark-color":{getThemeVariables:to}};var R={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1};var io={...R,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:lt.default.getThemeVariables(),sequence:{...R.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...R.gantt,tickInterval:void 0,useWidth:void 0},c4:{...R.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...R.flowchart,inheritDir:!1},external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...R.pie,useWidth:984},xyChart:{...R.xyChart,useWidth:void 0},requirement:{...R.requirement,useWidth:void 0},packet:{...R.packet},eventmodeling:{...R.eventmodeling},treeView:{...R.treeView,useWidth:void 0},radar:{...R.radar},ishikawa:{...R.ishikawa},sankey:{...R.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...R.venn}},ro=s((r,t="")=>Object.keys(r).reduce((i,e)=>Array.isArray(r[e])?i:typeof r[e]=="object"&&r[e]!==null?[...i,t+e,...ro(r[e],"")]:[...i,t+e],[]),"keyify"),oo=new Set(ro(io,"")),eo=io;var si=s(r=>{if(b.debug("sanitizeDirective called with",r),!(typeof r!="object"||r==null)){if(Array.isArray(r)){r.forEach(t=>si(t));return}for(let t of Object.keys(r)){if(b.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!oo.has(t)||r[t]==null){b.debug("sanitize deleting key: ",t),delete r[t];continue}if(typeof r[t]=="object"){if(t==="nodeColors"){let e=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(let d of Object.keys(r[t]))(typeof r[t][d]!="string"||!e.test(r[t][d]))&&(b.debug("sanitize deleting invalid color:",d,r[t][d]),delete r[t][d])}else b.debug("sanitizing object",t),si(r[t]);continue}let i=["themeCSS","fontFamily","altFontFamily"];for(let e of i)t.includes(e)&&(b.debug("sanitizing css option",t),r[t]=ue(r[t]))}if(r.themeVariables)for(let t of Object.keys(r.themeVariables)){let i=r.themeVariables[t];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(r.themeVariables[t]="")}b.debug("After sanitization",r)}},"sanitizeDirective"),ue=s(r=>{let t=0,i=0;for(let e of r){if(t!(r===!1||["false","null","0"].includes(String(r).trim().toLowerCase())),"evaluate"),$=D({},Ot),li,Ct=[],wt=D({},Ot),ai=s((r,t)=>{let i=D({},r),e={};for(let d of t)ao(d),e=D(e,d);if(i=D(i,e),e.theme&&e.theme in lt){let d=D({},li),h=D(d.themeVariables||{},e.themeVariables);i.theme&&i.theme in lt&&(i.themeVariables=lt[i.theme].getThemeVariables(h))}return wt=i,no(wt),wt},"updateCurrentConfig"),me=s(r=>($=D({},Ot),$=D($,r),r.theme&<[r.theme]&&($.themeVariables=lt[r.theme].getThemeVariables(r.themeVariables)),ai($,Ct),$),"setSiteConfig"),Zh=s(r=>{li=D({},r)},"saveConfigFromInitialize"),Jh=s(r=>($=D($,r),ai($,Ct),$),"updateSiteConfig"),Qh=s(()=>D({},$),"getSiteConfig"),lo=s(r=>(no(r),D(wt,r),It()),"setConfig"),It=s(()=>D({},wt),"getConfig"),ao=s(r=>{r&&(["secure",...$.secure??[]].forEach(t=>{Object.hasOwn(r,t)&&(b.debug(`Denied attempt to modify a secure key ${t}`,r[t]),delete r[t])}),Object.keys(r).forEach(t=>{t.startsWith("__")&&delete r[t]}),Object.keys(r).forEach(t=>{typeof r[t]=="string"&&(r[t].includes("<")||r[t].includes(">")||r[t].includes("url(data:"))&&delete r[t],typeof r[t]=="object"&&ao(r[t])}))},"sanitize"),tn=s(r=>{si(r),r.fontFamily&&!r.themeVariables?.fontFamily&&(r.themeVariables={...r.themeVariables,fontFamily:r.fontFamily}),Ct.push(r),ai($,Ct)},"addDirective"),rn=s((r=$)=>{Ct=[],ai(r,Ct)},"reset"),xe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},so={},ho=s(r=>{so[r]||(b.warn(xe[r]),so[r]=!0)},"issueWarning"),no=s(r=>{r&&(r.lazyLoadedDiagrams||r.loadExternalDiagramsAtStartup)&&ho("LAZY_LOAD_DEPRECATED")},"checkConfig"),on=s(()=>{let r={};li&&(r=D(r,li));for(let t of Ct)r=D(r,t);return r},"getUserDefinedConfig"),co=s(r=>(r.flowchart?.htmlLabels!=null&&ho("FLOWCHART_HTML_LABELS_DEPRECATED"),Gi(r.htmlLabels??r.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels");var{entries:ko,setPrototypeOf:Co,isFrozen:ye,getPrototypeOf:fe,getOwnPropertyDescriptor:ke}=Object,{freeze:H,seal:V,create:Nt}=Object,{apply:Zi,construct:Ji}=typeof Reflect<"u"&&Reflect;H||(H=s(function(t){return t},"freeze"));V||(V=s(function(t){return t},"seal"));Zi||(Zi=s(function(t,i){for(var e=arguments.length,d=new Array(e>2?e-2:0),h=2;h1?i-1:0),d=1;d1?i-1:0),d=1;d2&&arguments[2]!==void 0?arguments[2]:ni;Co&&Co(r,null);let e=t.length;for(;e--;){let d=t[e];if(typeof d=="string"){let h=i(d);h!==d&&(ye(t)||(t[e]=h),d=h)}r[d]=!0}return r}s(x,"addToSet");function Le(r){for(let t=0;t/gm),Me=V(/\$\{[\w\W]*/gm),qe=V(/^data-[\-\w.\u00B7-\uFFFF]+$/),we=V(/^aria-[\-\w]+$/),To=V(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oe=V(/^(?:\w+script|data):/i),Ie=V(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bo=V(/^html$/i),De=V(/^[a-z][.\w]*(-[.\w]+)+$/i),yo=Object.freeze({__proto__:null,ARIA_ATTR:we,ATTR_WHITESPACE:Ie,CUSTOM_ELEMENT:De,DATA_ATTR:qe,DOCTYPE_NAME:bo,ERB_EXPR:ve,IS_ALLOWED_URI:To,IS_SCRIPT_OR_DATA:Oe,MUSTACHE_EXPR:Ae,TMPLIT_EXPR:Me}),Pt={element:1,text:3,progressingInstruction:7,comment:8,document:9},ze=s(function(){return typeof window>"u"?null:window},"getGlobal"),Re=s(function(t,i){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let e=null,d="data-tt-policy-suffix";i&&i.hasAttribute(d)&&(e=i.getAttribute(d));let h="dompurify"+(e?"#"+e:"");try{return t.createPolicy(h,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},"_createTrustedTypesPolicy"),fo=s(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");function Bo(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ze(),t=s(m=>Bo(m),"DOMPurify");if(t.version="3.4.0",t.removed=[],!r||!r.document||r.document.nodeType!==Pt.document||!r.Element)return t.isSupported=!1,t;let{document:i}=r,e=i,d=e.currentScript,{DocumentFragment:h,HTMLTemplateElement:y,Node:f,Element:M,NodeFilter:q,NamedNodeMap:Y=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:St,DOMParser:gt,trustedTypes:rt}=r,pt=M.prototype,ut=Wt(pt,"cloneNode"),Ft=Wt(pt,"remove"),gi=Wt(pt,"nextSibling"),pi=Wt(pt,"childNodes"),mt=Wt(pt,"parentNode");if(typeof y=="function"){let m=i.createElement("template");m.content&&m.content.ownerDocument&&(i=m.content.ownerDocument)}let w,Lt="",{implementation:ui,createNodeIterator:wo,createDocumentFragment:Oo,getElementsByTagName:Io}=i,{importNode:Do}=e,W=fo();t.isSupported=typeof ko=="function"&&typeof mt=="function"&&ui&&ui.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ut,ERB_EXPR:Gt,TMPLIT_EXPR:$t,DATA_ATTR:zo,ARIA_ATTR:Ro,IS_SCRIPT_OR_DATA:Wo,ATTR_WHITESPACE:lr,CUSTOM_ELEMENT:Po}=yo,{IS_ALLOWED_URI:ar}=yo,v=null,hr=x({},[...po,...Vi,...Yi,...Xi,...uo]),O=null,nr=x({},[...mo,...Ki,...xo,...hi]),B=Object.seal(Nt(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}})),Et=null,jt=null,ot=Object.seal(Nt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),cr=!0,mi=!0,dr=!1,Cr=!0,ht=!1,_t=!0,nt=!1,xi=!1,yi=!1,xt=!1,Vt=!1,Yt=!1,gr=!0,pr=!1,No="user-content-",fi=!0,At=!1,yt={},Z=null,ki=x({},["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"]),ur=null,mr=x({},["audio","video","img","source","image","track"]),Ti=null,xr=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xt="http://www.w3.org/1998/Math/MathML",Kt="http://www.w3.org/2000/svg",J="http://www.w3.org/1999/xhtml",ft=J,bi=!1,Bi=null,Ho=x({},[Xt,Kt,J],$i),Zt=x({},["mi","mo","mn","ms","mtext"]),Jt=x({},["annotation-xml"]),Uo=x({},["title","style","font","a","script"]),vt=null,Go=["application/xhtml+xml","text/html"],$o="text/html",E=null,kt=null,jo=i.createElement("form"),yr=s(function(l){return l instanceof RegExp||l instanceof Function},"isRegexOrFunction"),Si=s(function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===l)){if((!l||typeof l!="object")&&(l={}),l=Q(l),vt=Go.indexOf(l.PARSER_MEDIA_TYPE)===-1?$o:l.PARSER_MEDIA_TYPE,E=vt==="application/xhtml+xml"?$i:ni,v=K(l,"ALLOWED_TAGS")?x({},l.ALLOWED_TAGS,E):hr,O=K(l,"ALLOWED_ATTR")?x({},l.ALLOWED_ATTR,E):nr,Bi=K(l,"ALLOWED_NAMESPACES")?x({},l.ALLOWED_NAMESPACES,$i):Ho,Ti=K(l,"ADD_URI_SAFE_ATTR")?x(Q(xr),l.ADD_URI_SAFE_ATTR,E):xr,ur=K(l,"ADD_DATA_URI_TAGS")?x(Q(mr),l.ADD_DATA_URI_TAGS,E):mr,Z=K(l,"FORBID_CONTENTS")?x({},l.FORBID_CONTENTS,E):ki,Et=K(l,"FORBID_TAGS")?x({},l.FORBID_TAGS,E):Q({}),jt=K(l,"FORBID_ATTR")?x({},l.FORBID_ATTR,E):Q({}),yt=K(l,"USE_PROFILES")?l.USE_PROFILES:!1,cr=l.ALLOW_ARIA_ATTR!==!1,mi=l.ALLOW_DATA_ATTR!==!1,dr=l.ALLOW_UNKNOWN_PROTOCOLS||!1,Cr=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ht=l.SAFE_FOR_TEMPLATES||!1,_t=l.SAFE_FOR_XML!==!1,nt=l.WHOLE_DOCUMENT||!1,xt=l.RETURN_DOM||!1,Vt=l.RETURN_DOM_FRAGMENT||!1,Yt=l.RETURN_TRUSTED_TYPE||!1,yi=l.FORCE_BODY||!1,gr=l.SANITIZE_DOM!==!1,pr=l.SANITIZE_NAMED_PROPS||!1,fi=l.KEEP_CONTENT!==!1,At=l.IN_PLACE||!1,ar=l.ALLOWED_URI_REGEXP||To,ft=l.NAMESPACE||J,Zt=l.MATHML_TEXT_INTEGRATION_POINTS||Zt,Jt=l.HTML_INTEGRATION_POINTS||Jt,B=l.CUSTOM_ELEMENT_HANDLING||Nt(null),l.CUSTOM_ELEMENT_HANDLING&&yr(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&yr(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ht&&(mi=!1),Vt&&(xt=!0),yt&&(v=x({},uo),O=Nt(null),yt.html===!0&&(x(v,po),x(O,mo)),yt.svg===!0&&(x(v,Vi),x(O,Ki),x(O,hi)),yt.svgFilters===!0&&(x(v,Yi),x(O,Ki),x(O,hi)),yt.mathMl===!0&&(x(v,Xi),x(O,xo),x(O,hi))),ot.tagCheck=null,ot.attributeCheck=null,l.ADD_TAGS&&(typeof l.ADD_TAGS=="function"?ot.tagCheck=l.ADD_TAGS:(v===hr&&(v=Q(v)),x(v,l.ADD_TAGS,E))),l.ADD_ATTR&&(typeof l.ADD_ATTR=="function"?ot.attributeCheck=l.ADD_ATTR:(O===nr&&(O=Q(O)),x(O,l.ADD_ATTR,E))),l.ADD_URI_SAFE_ATTR&&x(Ti,l.ADD_URI_SAFE_ATTR,E),l.FORBID_CONTENTS&&(Z===ki&&(Z=Q(Z)),x(Z,l.FORBID_CONTENTS,E)),l.ADD_FORBID_CONTENTS&&(Z===ki&&(Z=Q(Z)),x(Z,l.ADD_FORBID_CONTENTS,E)),fi&&(v["#text"]=!0),nt&&x(v,["html","head","body"]),v.table&&(x(v,["tbody"]),delete Et.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=l.TRUSTED_TYPES_POLICY,Lt=w.createHTML("")}else w===void 0&&(w=Re(rt,d)),w!==null&&typeof Lt=="string"&&(Lt=w.createHTML(""));H&&H(l),kt=l}},"_parseConfig"),fr=x({},[...Vi,...Yi,...Ee]),kr=x({},[...Xi,..._e]),Vo=s(function(l){let C=mt(l);(!C||!C.tagName)&&(C={namespaceURI:ft,tagName:"template"});let g=ni(l.tagName),k=ni(C.tagName);return Bi[l.namespaceURI]?l.namespaceURI===Kt?C.namespaceURI===J?g==="svg":C.namespaceURI===Xt?g==="svg"&&(k==="annotation-xml"||Zt[k]):!!fr[g]:l.namespaceURI===Xt?C.namespaceURI===J?g==="math":C.namespaceURI===Kt?g==="math"&&Jt[k]:!!kr[g]:l.namespaceURI===J?C.namespaceURI===Kt&&!Jt[k]||C.namespaceURI===Xt&&!Zt[k]?!1:!kr[g]&&(Uo[g]||!fr[g]):!!(vt==="application/xhtml+xml"&&Bi[l.namespaceURI]):!1},"_checkValidNamespace"),X=s(function(l){zt(t.removed,{element:l});try{mt(l).removeChild(l)}catch{Ft(l)}},"_forceRemove"),ct=s(function(l,C){try{zt(t.removed,{attribute:C.getAttributeNode(l),from:C})}catch{zt(t.removed,{attribute:null,from:C})}if(C.removeAttribute(l),l==="is")if(xt||Vt)try{X(C)}catch{}else try{C.setAttribute(l,"")}catch{}},"_removeAttribute"),Tr=s(function(l){let C=null,g=null;if(yi)l=""+l;else{let S=ji(l,/^[\r\n\t ]+/);g=S&&S[0]}vt==="application/xhtml+xml"&&ft===J&&(l=''+l+"");let k=w?w.createHTML(l):l;if(ft===J)try{C=new gt().parseFromString(k,vt)}catch{}if(!C||!C.documentElement){C=ui.createDocument(ft,"template",null);try{C.documentElement.innerHTML=bi?Lt:k}catch{}}let z=C.body||C.documentElement;return l&&g&&z.insertBefore(i.createTextNode(g),z.childNodes[0]||null),ft===J?Io.call(C,nt?"html":"body")[0]:nt?C.documentElement:z},"_initDocument"),br=s(function(l){return wo.call(l.ownerDocument||l,l,q.SHOW_ELEMENT|q.SHOW_COMMENT|q.SHOW_TEXT|q.SHOW_PROCESSING_INSTRUCTION|q.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Fi=s(function(l){return l instanceof St&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof Y)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},"_isClobbered"),Li=s(function(l){return typeof f=="function"&&l instanceof f},"_isNode");function tt(m,l,C){Dt(m,g=>{g.call(t,l,C,kt)})}s(tt,"_executeHooks");let Br=s(function(l){let C=null;if(tt(W.beforeSanitizeElements,l,null),Fi(l))return X(l),!0;let g=E(l.nodeName);if(tt(W.uponSanitizeElement,l,{tagName:g,allowedTags:v}),_t&&l.hasChildNodes()&&!Li(l.firstElementChild)&&N(/<[/\w!]/g,l.innerHTML)&&N(/<[/\w!]/g,l.textContent)||_t&&l.namespaceURI===J&&g==="style"&&Li(l.firstElementChild)||l.nodeType===Pt.progressingInstruction||_t&&l.nodeType===Pt.comment&&N(/<[/\w]/g,l.data))return X(l),!0;if(Et[g]||!(ot.tagCheck instanceof Function&&ot.tagCheck(g))&&!v[g]){if(!Et[g]&&Fr(g)&&(B.tagNameCheck instanceof RegExp&&N(B.tagNameCheck,g)||B.tagNameCheck instanceof Function&&B.tagNameCheck(g)))return!1;if(fi&&!Z[g]){let k=mt(l)||l.parentNode,z=pi(l)||l.childNodes;if(z&&k){let S=z.length;for(let G=S-1;G>=0;--G){let j=ut(z[G],!0);j.__removalCount=(l.__removalCount||0)+1,k.insertBefore(j,gi(l))}}}return X(l),!0}return l instanceof M&&!Vo(l)||(g==="noscript"||g==="noembed"||g==="noframes")&&N(/<\/no(script|embed|frames)/i,l.innerHTML)?(X(l),!0):(ht&&l.nodeType===Pt.text&&(C=l.textContent,Dt([Ut,Gt,$t],k=>{C=bt(C,k," ")}),l.textContent!==C&&(zt(t.removed,{element:l.cloneNode()}),l.textContent=C)),tt(W.afterSanitizeElements,l,null),!1)},"_sanitizeElements"),Sr=s(function(l,C,g){if(jt[C]||gr&&(C==="id"||C==="name")&&(g in i||g in jo))return!1;if(!(mi&&!jt[C]&&N(zo,C))){if(!(cr&&N(Ro,C))){if(!(ot.attributeCheck instanceof Function&&ot.attributeCheck(C,l))){if(!O[C]||jt[C]){if(!(Fr(l)&&(B.tagNameCheck instanceof RegExp&&N(B.tagNameCheck,l)||B.tagNameCheck instanceof Function&&B.tagNameCheck(l))&&(B.attributeNameCheck instanceof RegExp&&N(B.attributeNameCheck,C)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(C,l))||C==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&N(B.tagNameCheck,g)||B.tagNameCheck instanceof Function&&B.tagNameCheck(g))))return!1}else if(!Ti[C]){if(!N(ar,bt(g,lr,""))){if(!((C==="src"||C==="xlink:href"||C==="href")&&l!=="script"&&Be(g,"data:")===0&&ur[l])){if(!(dr&&!N(Wo,bt(g,lr,"")))){if(g)return!1}}}}}}}return!0},"_isValidAttribute"),Fr=s(function(l){return l!=="annotation-xml"&&ji(l,Po)},"_isBasicCustomElement"),Lr=s(function(l){tt(W.beforeSanitizeAttributes,l,null);let{attributes:C}=l;if(!C||Fi(l))return;let g={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O,forceKeepAttr:void 0},k=C.length;for(;k--;){let z=C[k],{name:S,namespaceURI:G,value:j}=z,et=E(S),Ei=j,I=S==="value"?Ei:Se(Ei);if(g.attrName=et,g.attrValue=I,g.keepAttr=!0,g.forceKeepAttr=void 0,tt(W.uponSanitizeAttribute,l,g),I=g.attrValue,pr&&(et==="id"||et==="name")&&(ct(S,l),I=No+I),_t&&N(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,I)){ct(S,l);continue}if(et==="attributename"&&ji(I,"href")){ct(S,l);continue}if(g.forceKeepAttr)continue;if(!g.keepAttr){ct(S,l);continue}if(!Cr&&N(/\/>/i,I)){ct(S,l);continue}ht&&Dt([Ut,Gt,$t],Ar=>{I=bt(I,Ar," ")});let _r=E(l.nodeName);if(!Sr(_r,et,I)){ct(S,l);continue}if(w&&typeof rt=="object"&&typeof rt.getAttributeType=="function"&&!G)switch(rt.getAttributeType(_r,et)){case"TrustedHTML":{I=w.createHTML(I);break}case"TrustedScriptURL":{I=w.createScriptURL(I);break}}if(I!==Ei)try{G?l.setAttributeNS(G,S,I):l.setAttribute(S,I),Fi(l)?X(l):go(t.removed)}catch{ct(S,l)}}tt(W.afterSanitizeAttributes,l,null)},"_sanitizeAttributes"),Er=s(function(l){let C=null,g=br(l);for(tt(W.beforeSanitizeShadowDOM,l,null);C=g.nextNode();)tt(W.uponSanitizeShadowNode,C,null),Br(C),Lr(C),C.content instanceof h&&Er(C.content);tt(W.afterSanitizeShadowDOM,l,null)},"_sanitizeShadowDOM");return t.sanitize=function(m){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=null,g=null,k=null,z=null;if(bi=!m,bi&&(m=""),typeof m!="string"&&!Li(m))if(typeof m.toString=="function"){if(m=m.toString(),typeof m!="string")throw Rt("dirty is not a string, aborting")}else throw Rt("toString is not a function");if(!t.isSupported)return m;if(xi||Si(l),t.removed=[],typeof m=="string"&&(At=!1),At){if(m.nodeName){let j=E(m.nodeName);if(!v[j]||Et[j])throw Rt("root node is forbidden and cannot be sanitized in-place")}}else if(m instanceof f)C=Tr(""),g=C.ownerDocument.importNode(m,!0),g.nodeType===Pt.element&&g.nodeName==="BODY"||g.nodeName==="HTML"?C=g:C.appendChild(g);else{if(!xt&&!ht&&!nt&&m.indexOf("<")===-1)return w&&Yt?w.createHTML(m):m;if(C=Tr(m),!C)return xt?null:Yt?Lt:""}C&&yi&&X(C.firstChild);let S=br(At?m:C);for(;k=S.nextNode();)Br(k),Lr(k),k.content instanceof h&&Er(k.content);if(At)return m;if(xt){if(ht){C.normalize();let j=C.innerHTML;Dt([Ut,Gt,$t],et=>{j=bt(j,et," ")}),C.innerHTML=j}if(Vt)for(z=Oo.call(C.ownerDocument);C.firstChild;)z.appendChild(C.firstChild);else z=C;return(O.shadowroot||O.shadowrootmode)&&(z=Do.call(e,z,!0)),z}let G=nt?C.outerHTML:C.innerHTML;return nt&&v["!doctype"]&&C.ownerDocument&&C.ownerDocument.doctype&&C.ownerDocument.doctype.name&&N(bo,C.ownerDocument.doctype.name)&&(G=" +`+G),ht&&Dt([Ut,Gt,$t],j=>{G=bt(G,j," ")}),w&&Yt?w.createHTML(G):G},t.setConfig=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Si(m),xi=!0},t.clearConfig=function(){kt=null,xi=!1},t.isValidAttribute=function(m,l,C){kt||Si({});let g=E(m),k=E(l);return Sr(g,k,C)},t.addHook=function(m,l){typeof l=="function"&&zt(W[m],l)},t.removeHook=function(m,l){if(l!==void 0){let C=Te(W[m],l);return C===-1?void 0:be(W[m],C,1)[0]}return go(W[m])},t.removeHooks=function(m){W[m]=[]},t.removeAllHooks=function(){W=fo()},t}s(Bo,"createDOMPurify");var Bt=Bo();var Ht=//gi,We=s(r=>r?_o(r).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Pe=(()=>{let r=!1;return()=>{r||(Ne(),r=!0)}})();function Ne(){let r="data-temp-href-target";Bt.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(r,t.getAttribute("target")??"")}),Bt.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(r)&&(t.setAttribute("target",t.getAttribute(r)??""),t.removeAttribute(r),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}s(Ne,"setupDompurifyHooks");var ns=s((r,t)=>{try{return!Bt||typeof Bt.sanitize!="function"?String(r??""):Bt.sanitize(r,t).toString()}catch(i){return String(r??"").replace(//g,">")}},"safeSanitize"),Eo=s(r=>(Pe(),ns(r)),"removeScript"),So=s((r,t)=>{if(co(t)){let i=t.securityLevel;i==="antiscript"||i==="strict"||i==="sandbox"?r=Eo(r):i!=="loose"&&(r=_o(r),r=r.replace(//g,">"),r=r.replace(/=/g,"="),r=$e(r))}return r},"sanitizeMore"),at=s((r,t)=>r&&(t.dompurifyConfig?r=ns(So(r,t),t.dompurifyConfig):r=ns(So(r,t),{FORBID_TAGS:["style"]}),r),"sanitizeText"),He=s((r,t)=>typeof r=="string"?at(r,t):r.flat().map(i=>at(i,t)),"sanitizeTextOrArray"),Ue=s(r=>Ht.test(r),"hasBreaks"),Ge=s(r=>r.split(Ht),"splitBreaks"),$e=s(r=>r.replace(/#br#/g,"
"),"placeholderToBreak"),_o=s(r=>r.replace(Ht,"#br#"),"breakToPlaceholder"),je=s(r=>{let t="";return r&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl");var Ve=s(function(...r){let t=r.filter(i=>!isNaN(i));return Math.max(...t)},"getMax"),Ye=s(function(...r){let t=r.filter(i=>!isNaN(i));return Math.min(...t)},"getMin"),cn=s(function(r){let t=r.split(/(,)/),i=[];for(let e=0;e0&&e+1Math.max(0,r.split(t).length-1),"countOccurrence"),Xe=s((r,t)=>{let i=Qi(r,"~"),e=Qi(t,"~");return i===1&&e===1},"shouldCombineSets"),Ke=s(r=>{let t=Qi(r,"~"),i=!1;if(t<=1)return r;t%2!==0&&r.startsWith("~")&&(r=r.substring(1),i=!0);let e=[...r],d=e.indexOf("~"),h=e.lastIndexOf("~");for(;d!==-1&&h!==-1&&d!==h;)e[d]="<",e[h]=">",d=e.indexOf("~"),h=e.lastIndexOf("~");return i&&e.unshift("~"),e.join("")},"processSet"),Fo=s(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ci=/\$\$(.*)\$\$/g,Lo=s(r=>(r.match(ci)?.length??0)>0,"hasKatex"),dn=s(async(r,t)=>{let i=document.createElement("div");i.innerHTML=await Je(r,t),i.id="katex-temp",i.style.visibility="hidden",i.style.position="absolute",i.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",i);let d={width:i.clientWidth,height:i.clientHeight};return i.remove(),d},"calculateMathMLDimensions"),Ze=s(async(r,t)=>{if(!Lo(r))return r;if(!(Fo()||t.legacyMathML||t.forceLegacyMathML))return r.replace(ci,"MathML is unsupported in this environment.");{let{default:i}=await import("./katex-K3KEBU37.mjs"),e=t.forceLegacyMathML||!Fo()&&t.legacyMathML?"htmlAndMathml":"mathml";return r.split(Ht).map(d=>Lo(d)?`
${d}
`:`
${d}
`).join("").replace(ci,(d,h)=>i.renderToString(h,{throwOnError:!0,displayMode:!0,output:e}).replace(/\n/g," ").replace(//g,""))}return r.replace(ci,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),Je=s(async(r,t)=>at(await Ze(r,t),t),"renderKatexSanitized"),Cn={getRows:We,sanitizeText:at,sanitizeTextOrArray:He,hasBreaks:Ue,splitBreaks:Ge,lineBreakRegex:Ht,removeScript:Eo,getUrl:je,evaluate:Gi,getMax:Ve,getMin:Ye};var Qe=s(function(r,t){for(let i of t)r.attr(i[0],i[1])},"d3Attrs"),ts=s(function(r,t,i){let e=new Map;return i?(e.set("width","100%"),e.set("style",`max-width: ${t}px;`)):(e.set("height",r),e.set("width",t)),e},"calculateSvgSizeAttrs"),is=s(function(r,t,i,e){let d=ts(t,i,e);Qe(r,d)},"configureSvgSize"),Ao=s(function(r,t,i,e){let d=t.node().getBBox(),h=d.width,y=d.height;b.info(`SVG bounds: ${h}x${y}`,d);let f=0,M=0;b.info(`Graph bounds: ${f}x${M}`,r),f=h+i*2,M=y+i*2,b.info(`Calculated bounds: ${f}x${M}`),is(t,M,f,e);let q=`${d.x-i} ${d.y-i} ${d.width+2*i} ${d.height+2*i}`;t.attr("viewBox",q)},"setupGraphViewbox");var di={};function fn(r){return[...r.cssRules].map(t=>t.cssText).join(` +`)}s(fn,"cssStyleSheetToString");var rs=s((r,t,i,e)=>{let d="";return r in di&&di[r]?d=di[r]({...i,svgId:e}):b.warn(`No theme found for ${r}`),` & { + font-family: ${i.fontFamily}; + font-size: ${i.fontSize}; + fill: ${i.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: ${i.errorBkgColor}; + } + & .error-text { + fill: ${i.errorTextColor}; + stroke: ${i.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${i.strokeWidth??1}px; + } + & .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: ${i.lineColor}; + stroke: ${i.lineColor}; + } + & .marker.cross { + stroke: ${i.lineColor}; + } + + & svg { + font-family: ${i.fontFamily}; + font-size: ${i.fontSize}; + } + & p { + margin: 0 + } + + ${d} + .node .neo-node { + stroke: ${i.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${i.useGradient?"url("+e+"-gradient)":i.nodeBorder}; + filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${e}-drop-shadow)`):"none"}; + } + + + [data-look="neo"].node path { + stroke: ${i.useGradient?"url("+e+"-gradient)":i.nodeBorder}; + stroke-width: ${i.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${e}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${i.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${i.useGradient?"url("+e+"-gradient)":i.nodeBorder}; + filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${e}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${i.useGradient?"url("+e+"-gradient)":i.nodeBorder}; + filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${e}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${i.useGradient?"url("+e+"-gradient)":i.nodeBorder}; + filter: ${i.dropShadow?i.dropShadow.replace("url(#drop-shadow)",`url(${e}-drop-shadow)`):"none"}; + } + + ${t} +`},"getStyles"),vo=s((r,t)=>{t!==void 0&&(di[r]=t)},"addStylesForDiagram"),kn=rs;var er={};Yo(er,{clear:()=>os,getAccDescription:()=>as,getAccTitle:()=>ss,getDiagramTitle:()=>ns,setAccDescription:()=>ls,setAccTitle:()=>es,setDiagramTitle:()=>hs});var tr="",ir="",rr="",or=s(r=>at(r,It()),"sanitizeText"),os=s(()=>{tr="",rr="",ir=""},"clear"),es=s(r=>{tr=or(r).replace(/^\s+/g,"")},"setAccTitle"),ss=s(()=>tr,"getAccTitle"),ls=s(r=>{rr=or(r).replace(/\n\s+/g,` +`)},"setAccDescription"),as=s(()=>rr,"getAccDescription"),hs=s(r=>{ir=or(r)},"setDiagramTitle"),ns=s(()=>ir,"getDiagramTitle");var Mo=b,cs=vr,qo=It,qn=lo,wn=Ot;var ds=s(r=>at(r,qo()),"sanitizeText"),Cs=Ao,gs=s(()=>er,"getCommonDb"),Ci={},On=s((r,t,i)=>{Ci[r]&&Mo.warn(`Diagram with id ${r} already registered. Overwriting.`),Ci[r]=t,i&&_i(r,i),vo(r,t.styles),t.injectUtils?.(Mo,cs,qo,ds,Cs,gs(),()=>{})},"registerDiagram"),In=s(r=>{if(r in Ci)return Ci[r];throw new sr(r)},"getDiagram"),sr=class extends Error{static{s(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};export{D as a,P as b,oe as c,T as d,n as e,c as f,de as g,jr as h,lt as i,eo as j,si as k,ue as l,Ot as m,Gi as n,me as o,Zh as p,Jh as q,Qh as r,lo as s,It as t,tn as u,rn as v,on as w,co as x,Bt as y,Ht as z,at as A,je as B,cn as C,Lo as D,dn as E,Je as F,Cn as G,Mr as H,qr as I,Qt as J,ti as K,ks as L,Ts as M,bs as N,is as O,Ao as P,fn as Q,kn as R,os as S,es as T,ss as U,ls as V,as as W,hs as X,ns as Y,er as Z,qo as _,qn as $,wn as aa,ds as ba,Cs as ca,On as da,In as ea}; +/*! Bundled license information: + +dompurify/dist/purify.es.mjs: + (*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE *) +*/ diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs new file mode 100644 index 00000000000..932c787644a --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs @@ -0,0 +1,37 @@ +import{a as c}from"./chunk-AQ6EADP3.mjs";function _e(e){return typeof e>"u"||e===null}c(_e,"isNothing");function Ve(e){return typeof e=="object"&&e!==null}c(Ve,"isObject");function Xe(e){return Array.isArray(e)?e:_e(e)?[]:[e]}c(Xe,"toArray");function Ze(e,n){var i,l,r,u;if(n)for(u=Object.keys(n),i=0,l=u.length;if&&(u=" ... ",n=l-f+u.length),i-l>f&&(o=" ...",i=l+f-o.length),{str:u+e.slice(n,i).replace(/\t/g,"\u2192")+o,pos:l-n+u.length}}c(Q,"getLine");function V(e,n){return C.repeat(" ",n-e.length)+e}c(V,"padStart");function fn(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,l=[0],r=[],u,o=-1;u=i.exec(e.buffer);)r.push(u.index),l.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=l.length-2);o<0&&(o=l.length-1);var f="",a,p,h=Math.min(e.line+n.linesAfter,r.length).toString().length,t=n.maxLength-(n.indent+h+3);for(a=1;a<=n.linesBefore&&!(o-a<0);a++)p=Q(e.buffer,l[o-a],r[o-a],e.position-(l[o]-l[o-a]),t),f=C.repeat(" ",n.indent)+V((e.line-a+1).toString(),h)+" | "+p.str+` +`+f;for(p=Q(e.buffer,l[o],r[o],e.position,t),f+=C.repeat(" ",n.indent)+V((e.line+1).toString(),h)+" | "+p.str+` +`,f+=C.repeat("-",n.indent+h+3+p.pos)+`^ +`,a=1;a<=n.linesAfter&&!(o+a>=r.length);a++)p=Q(e.buffer,l[o+a],r[o+a],e.position-(l[o]-l[o+a]),t),f+=C.repeat(" ",n.indent)+V((e.line+a+1).toString(),h)+" | "+p.str+` +`;return f.replace(/\n$/,"")}c(fn,"makeSnippet");var cn=fn,an=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],pn=["scalar","sequence","mapping"];function tn(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(l){n[String(l)]=i})}),n}c(tn,"compileStyleAliases");function hn(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(an.indexOf(i)===-1)throw new E('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=tn(n.styleAliases||null),pn.indexOf(this.kind)===-1)throw new E('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}c(hn,"Type$1");var _=hn;function fe(e,n){var i=[];return e[n].forEach(function(l){var r=i.length;i.forEach(function(u,o){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(r=o)}),i[r]=l}),i}c(fe,"compileList");function dn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function l(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(c(l,"collectType"),n=0,i=arguments.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:c(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:c(function(e){return e.toString(10)},"decimal"),hexadecimal:c(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"]}}),Rn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Dn(e){return!(e===null||!Rn.test(e)||e[e.length-1]==="_")}c(Dn,"resolveYamlFloat");function Mn(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}c(Mn,"constructYamlFloat");var Yn=/^[-+]?[0-9]+e/;function Bn(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return i=e.toString(10),Yn.test(i)?i.replace("e",".e"):i}c(Bn,"representYamlFloat");function Pn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}c(Pn,"isFloat");var Hn=new _("tag:yaml.org,2002:float",{kind:"scalar",resolve:Dn,construct:Mn,predicate:Pn,represent:Bn,defaultStyle:"lowercase"}),Ee=An.extend({implicit:[_n,Fn,Nn,Hn]}),jn=Ee,Se=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Fe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Un(e){return e===null?!1:Se.exec(e)!==null||Fe.exec(e)!==null}c(Un,"resolveYamlTimestamp");function Kn(e){var n,i,l,r,u,o,f,a=0,p=null,h,t,s;if(n=Se.exec(e),n===null&&(n=Fe.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(i,l,r));if(u=+n[4],o=+n[5],f=+n[6],n[7]){for(a=n[7].slice(0,3);a.length<3;)a+="0";a=+a}return n[9]&&(h=+n[10],t=+(n[11]||0),p=(h*60+t)*6e4,n[9]==="-"&&(p=-p)),s=new Date(Date.UTC(i,l,r,u,o,f,a)),p&&s.setTime(s.getTime()-p),s}c(Kn,"constructYamlTimestamp");function qn(e){return e.toISOString()}c(qn,"representYamlTimestamp");var Gn=new _("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Un,construct:Kn,instanceOf:Date,represent:qn});function Wn(e){return e==="<<"||e===null}c(Wn,"resolveYamlMerge");var $n=new _("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Wn}),ie=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Qn(e){if(e===null)return!1;var n,i,l=0,r=e.length,u=ie;for(i=0;i64)){if(n<0)return!1;l+=6}return l%8===0}c(Qn,"resolveYamlBinary");function Vn(e){var n,i,l=e.replace(/[\r\n=]/g,""),r=l.length,u=ie,o=0,f=[];for(n=0;n>16&255),f.push(o>>8&255),f.push(o&255)),o=o<<6|u.indexOf(l.charAt(n));return i=r%4*6,i===0?(f.push(o>>16&255),f.push(o>>8&255),f.push(o&255)):i===18?(f.push(o>>10&255),f.push(o>>2&255)):i===12&&f.push(o>>4&255),new Uint8Array(f)}c(Vn,"constructYamlBinary");function Xn(e){var n="",i=0,l,r,u=e.length,o=ie;for(l=0;l>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[l];return r=u%3,r===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):r===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):r===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}c(Xn,"representYamlBinary");function Zn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}c(Zn,"isBinary");var zn=new _("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Qn,construct:Vn,predicate:Zn,represent:Xn}),Jn=Object.prototype.hasOwnProperty,ei=Object.prototype.toString;function ni(e){if(e===null)return!0;var n=[],i,l,r,u,o,f=e;for(i=0,l=f.length;i>10)+55296,(e-65536&1023)+56320)}c(vi,"charFromCodepoint");function ke(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}c(ke,"setProperty");var Ne=new Array(256),Re=new Array(256);for(L=0;L<256;L++)Ne[L]=pe(L)?1:0,Re[L]=pe(L);var L;function yi(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||be,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.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=[]}c(yi,"State$1");function De(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=cn(i),new E(n,i)}c(De,"generateError");function d(e,n){throw De(e,n)}c(d,"throwError");function q(e,n){e.onWarning&&e.onWarning.call(null,De(e,n))}c(q,"throwWarning");var te={YAML:c(function(n,i,l){var r,u,o;n.version!==null&&d(n,"duplication of %YAML directive"),l.length!==1&&d(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),r===null&&d(n,"ill-formed argument of the YAML directive"),u=parseInt(r[1],10),o=parseInt(r[2],10),u!==1&&d(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&q(n,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:c(function(n,i,l){var r,u;l.length!==2&&d(n,"TAG directive accepts exactly two arguments"),r=l[0],u=l[1],Ie.test(r)||d(n,"ill-formed tag handle (first argument) of the TAG directive"),I.call(n.tagMap,r)&&d(n,'there is a previously declared suffix for "'+r+'" tag handle'),Le.test(u)||d(n,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{d(n,"tag prefix is malformed: "+u)}n.tagMap[r]=u},"handleTagDirective")};function O(e,n,i,l){var r,u,o,f;if(n1&&(e.result+=C.repeat(` +`,n-1))}c(le,"writeFoldedLines");function Ci(e,n,i){var l,r,u,o,f,a,p,h,t=e.kind,s=e.result,m;if(m=e.input.charCodeAt(e.position),S(m)||R(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)&&(r=e.input.charCodeAt(e.position+1),S(r)||i&&R(r)))return!1;for(e.kind="scalar",e.result="",u=o=e.position,f=!1;m!==0;){if(m===58){if(r=e.input.charCodeAt(e.position+1),S(r)||i&&R(r))break}else if(m===35){if(l=e.input.charCodeAt(e.position-1),S(l))break}else{if(e.position===e.lineStart&&$(e)||i&&R(m))break;if(b(m))if(a=e.line,p=e.lineStart,h=e.lineIndent,y(e,!1,-1),e.lineIndent>=n){f=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=a,e.lineStart=p,e.lineIndent=h;break}}f&&(O(e,u,o,!1),le(e,e.line-a),u=o=e.position,f=!1),k(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return O(e,u,o,!1),e.result?!0:(e.kind=t,e.result=s,!1)}c(Ci,"readPlainScalar");function _i(e,n){var i,l,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,l=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(O(e,l,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)l=e.position,e.position++,r=e.position;else return!0;else b(i)?(O(e,l,r,!0),le(e,y(e,!1,n)),l=r=e.position):e.position===e.lineStart&&$(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}c(_i,"readSingleQuotedScalar");function wi(e,n){var i,l,r,u,o,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=l=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return O(e,i,e.position,!0),e.position++,!0;if(f===92){if(O(e,i,e.position,!0),f=e.input.charCodeAt(++e.position),b(f))y(e,!1,n);else if(f<256&&Ne[f])e.result+=Re[f],e.position++;else if((o=gi(f))>0){for(r=o,u=0;r>0;r--)f=e.input.charCodeAt(++e.position),(o=xi(f))>=0?u=(u<<4)+o:d(e,"expected hexadecimal character");e.result+=vi(u),e.position++}else d(e,"unknown escape sequence");i=l=e.position}else b(f)?(O(e,i,l,!0),le(e,y(e,!1,n)),i=l=e.position):e.position===e.lineStart&&$(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,l=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}c(wi,"readDoubleQuotedScalar");function Ei(e,n){var i=!0,l,r,u,o=e.tag,f,a=e.anchor,p,h,t,s,m,x=Object.create(null),A,v,F,g;if(g=e.input.charCodeAt(e.position),g===91)h=93,m=!1,f=[];else if(g===123)h=125,m=!0,f={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),g=e.input.charCodeAt(++e.position);g!==0;){if(y(e,!0,n),g=e.input.charCodeAt(e.position),g===h)return e.position++,e.tag=o,e.anchor=a,e.kind=m?"mapping":"sequence",e.result=f,!0;i?g===44&&d(e,"expected the node content, but found ','"):d(e,"missed comma between flow collection entries"),v=A=F=null,t=s=!1,g===63&&(p=e.input.charCodeAt(e.position+1),S(p)&&(t=s=!0,e.position++,y(e,!0,n))),l=e.line,r=e.lineStart,u=e.position,M(e,n,U,!1,!0),v=e.tag,A=e.result,y(e,!0,n),g=e.input.charCodeAt(e.position),(s||e.line===l)&&g===58&&(t=!0,g=e.input.charCodeAt(++e.position),y(e,!0,n),M(e,n,U,!1,!0),F=e.result),m?D(e,f,x,v,A,F,l,r,u):t?f.push(D(e,null,x,v,A,F,l,r,u)):f.push(A),y(e,!0,n),g=e.input.charCodeAt(e.position),g===44?(i=!0,g=e.input.charCodeAt(++e.position)):i=!1}d(e,"unexpected end of the stream within a flow collection")}c(Ei,"readFlowCollection");function Si(e,n){var i,l,r=X,u=!1,o=!1,f=n,a=0,p=!1,h,t;if(t=e.input.charCodeAt(e.position),t===124)l=!1;else if(t===62)l=!0;else return!1;for(e.kind="scalar",e.result="";t!==0;)if(t=e.input.charCodeAt(++e.position),t===43||t===45)X===r?r=t===43?ce:hi:d(e,"repeat of a chomping mode identifier");else if((h=Ai(t))>=0)h===0?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?d(e,"repeat of an indentation width identifier"):(f=n+h-1,o=!0);else break;if(k(t)){do t=e.input.charCodeAt(++e.position);while(k(t));if(t===35)do t=e.input.charCodeAt(++e.position);while(!b(t)&&t!==0)}for(;t!==0;){for(re(e),e.lineIndent=0,t=e.input.charCodeAt(e.position);(!o||e.lineIndentf&&(f=e.lineIndent),b(t)){a++;continue}if(e.lineIndentn)&&a!==0)d(e,"bad indentation of a sequence entry");else if(e.lineIndentn)&&(v&&(o=e.line,f=e.lineStart,a=e.position),M(e,n,K,!0,r)&&(v?x=e.result:A=e.result),v||(D(e,t,s,m,x,A,o,f,a),m=x=A=null),y(e,!0,-1),g=e.input.charCodeAt(e.position)),(e.line===u||e.lineIndent>n)&&g!==0)d(e,"bad indentation of a mapping entry");else if(e.lineIndentn?a=1:e.lineIndent===n?a=0:e.lineIndentn?a=1:e.lineIndent===n?a=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),t=0,s=e.implicitTypes.length;t"),e.result!==null&&x.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}c(M,"composeNode");function Ii(e){var n=e.position,i,l,r,u=!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&&(y(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(u=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!S(o);)o=e.input.charCodeAt(++e.position);for(l=e.input.slice(i,e.position),r=[],l.length<1&&d(e,"directive name must not be less than one character in length");o!==0;){for(;k(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!b(o));break}if(b(o))break;for(i=e.position;o!==0&&!S(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(i,e.position))}o!==0&&re(e),I.call(te,l)?te[l](e,l,r):q(e,'unknown document directive "'+l+'"')}if(y(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,y(e,!0,-1)):u&&d(e,"directives end mark is expected"),M(e,e.lineIndent-1,K,!1,!0),y(e,!0,-1),e.checkLineBreaks&&si.test(e.input.slice(n,e.position))&&q(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&$(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,y(e,!0,-1));return}if(e.position"u"&&(i=n,n=null);var l=Me(e,i);if(typeof n!="function")return l;for(var r=0,u=l.length;r=55296&&i<=56319&&n+1=56320&&l<=57343)?(i-55296)*1024+l-56320+65536:i}c(Y,"codePointAt");function Ge(e){var n=/^\n* /;return n.test(e)}c(Ge,"needIndentIndicator");var We=1,ee=2,$e=3,Qe=4,N=5;function ur(e,n,i,l,r,u,o,f){var a,p=0,h=null,t=!1,s=!1,m=l!==-1,x=-1,A=lr(Y(e,0))&&or(Y(e,e.length-1));if(n||o)for(a=0;a=65536?a+=2:a++){if(p=Y(e,a),!j(p))return N;A=A&&xe(p,h,f),h=p}else{for(a=0;a=65536?a+=2:a++){if(p=Y(e,a),p===P)t=!0,m&&(s=s||a-x-1>l&&e[x+1]!==" ",x=a);else if(!j(p))return N;A=A&&xe(p,h,f),h=p}s=s||m&&a-x-1>l&&e[x+1]!==" "}return!t&&!s?A&&!o&&!r(e)?We:u===H?N:ee:i>9&&Ge(e)?N:o?u===H?N:ee:s?Qe:$e}c(ur,"chooseScalarStyle");function fr(e,n,i,l,r){e.dump=(function(){if(n.length===0)return e.quotingType===H?'""':"''";if(!e.noCompatMode&&(Zi.indexOf(n)!==-1||zi.test(n)))return e.quotingType===H?'"'+n+'"':"'"+n+"'";var u=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-u),f=l||e.flowLevel>-1&&i>=e.flowLevel;function a(p){return rr(e,p)}switch(c(a,"testAmbiguity"),ur(n,f,e.indent,o,a,e.quotingType,e.forceQuotes&&!l,r)){case We:return n;case ee:return"'"+n.replace(/'/g,"''")+"'";case $e:return"|"+ge(n,e.indent)+Ae(se(n,u));case Qe:return">"+ge(n,e.indent)+Ae(se(cr(n,o),u));case N:return'"'+ar(n)+'"';default:throw new E("impossible error: invalid scalar style")}})()}c(fr,"writeScalar");function ge(e,n){var i=Ge(e)?String(n):"",l=e[e.length-1]===` +`,r=l&&(e[e.length-2]===` +`||e===` +`),u=r?"+":l?"":"-";return i+u+` +`}c(ge,"blockHeader");function Ae(e){return e[e.length-1]===` +`?e.slice(0,-1):e}c(Ae,"dropEndingNewline");function cr(e,n){for(var i=/(\n+)([^\n]*)/g,l=(function(){var p=e.indexOf(` +`);return p=p!==-1?p:e.length,i.lastIndex=p,ve(e.slice(0,p),n)})(),r=e[0]===` +`||e[0]===" ",u,o;o=i.exec(e);){var f=o[1],a=o[2];u=a[0]===" ",l+=f+(!r&&!u&&a!==""?` +`:"")+ve(a,n),r=u}return l}c(cr,"foldString");function ve(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,l,r=0,u,o=0,f=0,a="";l=i.exec(e);)f=l.index,f-r>n&&(u=o>r?o:f,a+=` +`+e.slice(r,u),r=u+1),o=f;return a+=` +`,e.length-r>n&&o>r?a+=e.slice(r,o)+` +`+e.slice(o+1):a+=e.slice(r),a.slice(1)}c(ve,"foldLine");function ar(e){for(var n="",i=0,l,r=0;r=65536?r+=2:r++)i=Y(e,r),l=w[i],!l&&j(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=l||er(i);return n}c(ar,"escapeString");function pr(e,n,i){var l="",r=e.tag,u,o,f;for(u=0,o=i.length;u"u"&&T(e,n,null,!1,!1))&&(l!==""&&(l+=","+(e.condenseFlow?"":" ")),l+=e.dump);e.tag=r,e.dump="["+l+"]"}c(pr,"writeFlowSequence");function ye(e,n,i,l){var r="",u=e.tag,o,f,a;for(o=0,f=i.length;o"u"&&T(e,n+1,null,!0,!0,!1,!0))&&((!l||r!=="")&&(r+=J(e,n)),e.dump&&P===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=u,e.dump=r||"[]"}c(ye,"writeBlockSequence");function tr(e,n,i){var l="",r=e.tag,u=Object.keys(i),o,f,a,p,h;for(o=0,f=u.length;o1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),T(e,n,p,!1,!1)&&(h+=e.dump,l+=h));e.tag=r,e.dump="{"+l+"}"}c(tr,"writeFlowMapping");function hr(e,n,i,l){var r="",u=e.tag,o=Object.keys(i),f,a,p,h,t,s;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new E("sortKeys must be a boolean or a function");for(f=0,a=o.length;f1024,t&&(e.dump&&P===e.dump.charCodeAt(0)?s+="?":s+="? "),s+=e.dump,t&&(s+=J(e,n)),T(e,n+1,h,!0,t)&&(e.dump&&P===e.dump.charCodeAt(0)?s+=":":s+=": ",s+=e.dump,r+=s));e.tag=u,e.dump=r||"{}"}c(hr,"writeBlockMapping");function Ce(e,n,i){var l,r,u,o,f,a;for(r=i?e.explicitTypes:e.implicitTypes,u=0,o=r.length;u tag resolver accepts not "'+a+'" style');e.dump=l}return!0}return!1}c(Ce,"detectType");function T(e,n,i,l,r,u,o){e.tag=null,e.dump=i,Ce(e,i,!1)||Ce(e,i,!0);var f=Be.call(e.dump),a=l,p;l&&(l=e.flowLevel<0||e.flowLevel>n);var h=f==="[object Object]"||f==="[object Array]",t,s;if(h&&(t=e.duplicates.indexOf(i),s=t!==-1),(e.tag!==null&&e.tag!=="?"||s||e.indent!==2&&n>0)&&(r=!1),s&&e.usedDuplicates[t])e.dump="*ref_"+t;else{if(h&&s&&!e.usedDuplicates[t]&&(e.usedDuplicates[t]=!0),f==="[object Object]")l&&Object.keys(e.dump).length!==0?(hr(e,n,e.dump,r),s&&(e.dump="&ref_"+t+e.dump)):(tr(e,n,e.dump),s&&(e.dump="&ref_"+t+" "+e.dump));else if(f==="[object Array]")l&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?ye(e,n-1,e.dump,r):ye(e,n,e.dump,r),s&&(e.dump="&ref_"+t+e.dump)):(pr(e,n,e.dump),s&&(e.dump="&ref_"+t+" "+e.dump));else if(f==="[object String]")e.tag!=="?"&&fr(e,e.dump,n,u,a);else{if(f==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new E("unacceptable kind of an object to dump "+f)}e.tag!==null&&e.tag!=="?"&&(p=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?p="!"+p:p.slice(0,18)==="tag:yaml.org,2002:"?p="!!"+p.slice(18):p="!<"+p+">",e.dump=p+" "+e.dump)}return!0}c(T,"writeNode");function dr(e,n){var i=[],l=[],r,u;for(ne(e,i,l),r=0,u=l.length;r{t.arrowTypeStart&&wt(r,"start",t.arrowTypeStart,a,s,o,n,e),t.arrowTypeEnd&&wt(r,"end",t.arrowTypeEnd,a,s,o,n,e)},"addEdgeMarkers"),Ut={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Et=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],wt=d((r,t,a,s,o,n,e=!1,i)=>{let c=Ut[a],l=c&&Et.includes(c.type);if(!c){y.warn(`Unknown arrow type: ${a}`);return}let m=c.type,p=`${o}_${n}-${m}${t==="start"?"Start":"End"}${e&&l?"-margin":""}`;if(i&&i.trim()!==""){let x=i.replace(/[^\dA-Za-z]/g,"_"),h=`${p}_${x}`;if(!document.getElementById(h)){let k=document.getElementById(p);if(k){let u=k.cloneNode(!0);u.id=h,u.querySelectorAll("path, circle, line").forEach(X=>{X.setAttribute("stroke",i),c.fill&&X.setAttribute("fill",i)}),k.parentNode?.appendChild(u)}}r.attr(`marker-${t}`,`url(${s}#${h})`)}else r.attr(`marker-${t}`,`url(${s}#${p})`)},"addEdgeMarker");var Wt=d(r=>typeof r=="string"?r:U()?.flowchart?.curve,"resolveEdgeCurveType"),I=new Map,M=new Map,_r=d(()=>{I.clear(),M.clear()},"clear"),T=d(r=>r?typeof r=="string"?r:r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),Sr=d(async(r,t)=>{let a=U(),s=K(a),{labelStyles:o}=ut(t);t.labelStyle=o;let n=r.insert("g").attr("class","edgeLabel"),e=n.insert("g").attr("class","label").attr("data-id",t.id),i=t.labelType==="markdown",l=await mt(r,t.label,{style:T(t.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:i,width:i?void 0:void 0},a);e.node().appendChild(l),y.info("abc82",t,t.labelType);let m=l.getBBox(),g=m;if(s){let p=l.children[0],x=E(l);m=p.getBoundingClientRect(),g=m,x.attr("width",m.width),x.attr("height",m.height)}else{let p=E(l).select("text").node();p&&typeof p.getBBox=="function"&&(g=p.getBBox())}e.attr("transform",Y(g,s)),I.set(t.id,n),t.width=m.width,t.height=m.height;let f;if(t.startLabelLeft){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),h=await H(x,t.startLabelLeft,T(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(s){let u=h.children[0],b=E(h);k=u.getBoundingClientRect(),b.attr("width",k.width),b.attr("height",k.height)}x.attr("transform",Y(k,s)),M.get(t.id)||M.set(t.id,{}),M.get(t.id).startLeft=p,V(f,t.startLabelLeft)}if(t.startLabelRight){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),h=await H(x,t.startLabelRight,T(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(s){let u=h.children[0],b=E(h);k=u.getBoundingClientRect(),b.attr("width",k.width),b.attr("height",k.height)}x.attr("transform",Y(k,s)),M.get(t.id)||M.set(t.id,{}),M.get(t.id).startRight=p,V(f,t.startLabelRight)}if(t.endLabelLeft){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),h=await H(p,t.endLabelLeft,T(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(s){let u=h.children[0],b=E(h);k=u.getBoundingClientRect(),b.attr("width",k.width),b.attr("height",k.height)}x.attr("transform",Y(k,s)),M.get(t.id)||M.set(t.id,{}),M.get(t.id).endLeft=p,V(f,t.endLabelLeft)}if(t.endLabelRight){let p=r.insert("g").attr("class","edgeTerminals"),x=p.insert("g").attr("class","inner"),h=await H(p,t.endLabelRight,T(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(s){let u=h.children[0],b=E(h);k=u.getBoundingClientRect(),b.attr("width",k.width),b.attr("height",k.height)}x.attr("transform",Y(k,s)),M.get(t.id)||M.set(t.id,{}),M.get(t.id).endRight=p,V(f,t.endLabelRight)}return l},"insertEdgeLabel");function V(r,t){K(U())&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}d(V,"setTerminalWidth");var Or=d((r,t)=>{y.debug("Moving label abc88 ",r.id,r.label,I.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,s=U(),{subGraphTitleTotalMargin:o}=yt(s);if(r.label){let n=I.get(r.id),e=r.x,i=r.y;if(a){let c=W.calcLabelPosition(a);y.debug("Moving label "+r.label+" from (",e,",",i,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(e=c.x,i=c.y)}n.attr("transform",`translate(${e}, ${i+o/2})`)}if(r.startLabelLeft){let n=M.get(r.id).startLeft,e=r.x,i=r.y;if(a){let c=W.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);e=c.x,i=c.y}n.attr("transform",`translate(${e}, ${i})`)}if(r.startLabelRight){let n=M.get(r.id).startRight,e=r.x,i=r.y;if(a){let c=W.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);e=c.x,i=c.y}n.attr("transform",`translate(${e}, ${i})`)}if(r.endLabelLeft){let n=M.get(r.id).endLeft,e=r.x,i=r.y;if(a){let c=W.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);e=c.x,i=c.y}n.attr("transform",`translate(${e}, ${i})`)}if(r.endLabelRight){let n=M.get(r.id).endRight,e=r.x,i=r.y;if(a){let c=W.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);e=c.x,i=c.y}n.attr("transform",`translate(${e}, ${i})`)}},"positionEdgeLabel"),Xt=d((r,t)=>{let a=r.x,s=r.y,o=Math.abs(t.x-a),n=Math.abs(t.y-s),e=r.width/2,i=r.height/2;return o>=e||n>=i},"outsideNode"),Yt=d((r,t,a)=>{y.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(a)} + node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let s=r.x,o=r.y,n=Math.abs(s-a.x),e=r.width/2,i=a.xMath.abs(s-t.x)*c){let g=a.y{y.warn("abc88 cutPathAtIntersect",r,t);let a=[],s=r[0],o=!1;return r.forEach(n=>{if(y.info("abc88 checking point",n,t),!Xt(t,n)&&!o){let e=Yt(t,s,n);y.debug("abc88 inside",n,s,e),y.debug("abc88 intersection",e,t);let i=!1;a.forEach(c=>{i=i||c.x===e.x&&c.y===e.y}),a.some(c=>c.x===e.x&&c.y===e.y)?y.warn("abc88 no intersect",e,a):a.push(e),o=!0}else y.warn("abc88 outside",n,s),s=n,o||a.push(n)}),y.debug("returning points",a),a},"cutPathAtIntersect");function vt(r){let t=[],a=[];for(let s=1;s5&&Math.abs(n.y-o.y)>5||o.y===n.y&&n.x===e.x&&Math.abs(n.x-o.x)>5&&Math.abs(n.y-e.y)>5)&&(t.push(n),a.push(s))}return{cornerPoints:t,cornerPointPositions:a}}d(vt,"extractCornerPoints");var Lt=d(function(r,t,a){let s=t.x-r.x,o=t.y-r.y,n=Math.sqrt(s*s+o*o),e=a/n;return{x:t.x-e*s,y:t.y-e*o}},"findAdjacentPoint"),Ht=d(function(r){let{cornerPointPositions:t}=vt(r),a=[];for(let s=0;s10&&Math.abs(n.y-o.y)>=10){y.debug("Corner point fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));let p=5;e.x===i.x?f={x:l<0?i.x-p+g:i.x+p-g,y:m<0?i.y-g:i.y+g}:f={x:l<0?i.x-g:i.x+g,y:m<0?i.y-p+g:i.y+p-g}}else y.debug("Corner point skipping fixing",Math.abs(n.x-o.x),Math.abs(n.y-o.y));a.push(f,c)}else a.push(r[s]);return a},"fixCorners"),Bt=d((r,t,a)=>{let s=r-t-a,o=2,n=2,e=o+n,i=Math.floor(s/e),c=Array(i).fill(`${o} ${n}`).join(" ");return`0 ${t} ${c} ${a}`},"generateDashArray"),$r=d(function(r,t,a,s,o,n,e,i=!1){if(!e)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:c}=U(),l=t.points,m=!1,g=o;var f=n;let p=[];for(let _ in t.cssCompiledStyles)kt(_)||p.push(t.cssCompiledStyles[_]);y.debug("UIO intersect check",t.points,f.x,g.x),f.intersect&&g.intersect&&!i&&(l=l.slice(1,t.points.length-1),l.unshift(g.intersect(l[0])),y.debug("Last point UIO",t.start,"-->",t.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1])));let x=btoa(JSON.stringify(l));t.toCluster&&(y.info("to cluster abc88",a.get(t.toCluster)),l=Mt(t.points,a.get(t.toCluster).node),m=!0),t.fromCluster&&(y.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(l,null,2)),l=Mt(l.reverse(),a.get(t.fromCluster).node).reverse(),m=!0);let h=l.filter(_=>!Number.isNaN(_.y)),k=Wt(t.curve);k!=="rounded"&&(h=Ht(h));let u=N;switch(k){case"linear":u=N;break;case"basis":u=tt;break;case"cardinal":u=st;break;case"bumpX":u=et;break;case"bumpY":u=nt;break;case"catmullRom":u=ot;break;case"monotoneX":u=it;break;case"monotoneY":u=ct;break;case"natural":u=lt;break;case"step":u=dt;break;case"stepAfter":u=ft;break;case"stepBefore":u=pt;break;case"rounded":u=N;break;default:u=tt}let{x:b,y:X}=xt(t),j=at().x(b).y(X).curve(u),L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let w,C=k==="rounded"?Tt(Ct(h,t),5):j(h),S=Array.isArray(t.style)?t.style:[t.style],z=S.find(_=>_?.startsWith("stroke:")),O="";t.animate&&(O="edge-animation-fast"),t.animation&&(O="edge-animation-"+t.animation);let D=!1;if(t.look==="handDrawn"){let _=gt.svg(r);Object.assign([],h);let R=_.path(C,{roughness:.3,seed:c});L+=" transition",w=E(R).select("path").attr("id",`${e}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",S?S.reduce((Q,Z)=>Q+";"+Z,""):"");let q=w.attr("d");w.attr("d",q),r.node().appendChild(w.node())}else{let _=p.join(";"),R=S?S.reduce((P,v)=>P+v+";",""):"",q=(_?_+";"+R+";":R)+";"+(S?S.reduce((P,v)=>P+";"+v,""):"");w=r.append("path").attr("d",C).attr("id",`${e}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",q),z=q.match(/stroke:([^;]+)/)?.[1],D=t.animate===!0||!!t.animation||_.includes("animation");let Q=w.node(),Z=typeof Q.getTotalLength=="function"?Q.getTotalLength():0,J=rt[t.arrowTypeStart]||0,F=rt[t.arrowTypeEnd]||0;if(t.look==="neo"&&!D){let v=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Bt(Z,J,F):`0 ${J} ${Z-J-F} ${F}`}; stroke-dashoffset: 0;`;w.attr("style",v+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",x),w.attr("data-look",ht(t.look)),t.showPoints&&h.forEach(_=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",_.x).attr("cy",_.y)});let A="";(U().flowchart.arrowMarkerAbsolute||U().state.arrowMarkerAbsolute)&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),y.info("arrowTypeStart",t.arrowTypeStart),y.info("arrowTypeEnd",t.arrowTypeEnd);let St=!D&&t?.look==="neo";bt(w,t,A,e,s,St,z);let Ot=Math.floor(l.length/2),$t=l[Ot];W.isLabelCoordinateInPath($t,w.attr("d"))||(m=!0);let G={};return m&&(G.updatedPath=l),G.originalPath=t.points,G},"insertEdge");function Tt(r,t){if(r.length<2)return"";let a="",s=r.length,o=1e-5;for(let n=0;n({...o}));if(r.length>=2&&B[t.arrowTypeStart]){let o=B[t.arrowTypeStart],n=r[0],e=r[1],{angle:i}=_t(n,e),c=o*Math.cos(i),l=o*Math.sin(i);a[0].x=n.x+c,a[0].y=n.y+l}let s=r.length;if(s>=2&&B[t.arrowTypeEnd]){let o=B[t.arrowTypeEnd],n=r[s-1],e=r[s-2],{angle:i}=_t(e,n),c=o*Math.cos(i),l=o*Math.sin(i);a[s-1].x=n.x-c,a[s-1].y=n.y-l}return a}d(Ct,"applyMarkerOffsetsToPoints");var zt=d((r,t,a,s)=>{t.forEach(o=>{ir[o](r,a,s)})},"insertMarkers"),At=d((r,t,a)=>{y.trace("Making markers for ",a),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Rt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),qt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Qt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Zt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Pt=d((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Nt=d((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Vt=d((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",a+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),It=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),jt=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{transitionColor:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${n}`)},"barbNeo"),Dt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),Gt=d((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),s.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Jt=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),Ft=d((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Kt=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${n}`),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${n}`)},"only_one_neo"),tr=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:e}=o,i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");i.append("circle").attr("fill",e??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),i.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${n}`);let c=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");c.append("circle").attr("fill",e??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${n}`).attr("r",6),c.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${n}`)},"zero_or_one_neo"),rr=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${n}`),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${n}`)},"one_or_more_neo"),ar=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{strokeWidth:n,mainBkg:e}=o,i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");i.append("circle").attr("fill",e??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${n}`);let c=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");c.append("circle").attr("fill",e??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${n}`),c.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${n}`)},"zero_or_more_neo"),er=d((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),nr=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{strokeWidth:n}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${n}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),sr=d((r,t,a)=>{let s=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),or=d((r,t,a)=>{let s=$(),{themeVariables:o}=s,{strokeWidth:n}=o,e=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");e.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),e.selectAll("*").attr("stroke-width",`${n}`)},"requirement_contains_neo"),ir={extension:At,composition:Rt,aggregation:qt,dependency:Qt,lollipop:Zt,point:Pt,circle:Nt,cross:Vt,barb:It,barbNeo:jt,only_one:Dt,zero_or_one:Gt,one_or_more:Jt,zero_or_more:Ft,only_one_neo:Kt,zero_or_one_neo:tr,one_or_more_neo:rr,zero_or_more_neo:ar,requirement_arrow:er,requirement_contains:sr,requirement_arrow_neo:nr,requirement_contains_neo:or},Yr=zt;export{_r as a,Sr as b,Or as c,$r as d,Yr as e}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7W6UQGC5.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7W6UQGC5.mjs new file mode 100644 index 00000000000..87ef430e759 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-7W6UQGC5.mjs @@ -0,0 +1 @@ +import{a as r,b as fu,d as lu}from"./chunk-AQ6EADP3.mjs";var Bo=fu((fr,lr)=>{"use strict";(function(t,e){typeof fr=="object"&&typeof lr<"u"?lr.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(fr,(function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",o="second",a="minute",s="hour",u="day",l="week",f="month",h="quarter",p="year",c="date",m="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|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,T={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:r(function(v){var d=["th","st","nd","rd"],x=v%100;return"["+v+(d[(x-20)%10]||d[x]||d[0])+"]"},"ordinal")},k=r(function(v,d,x){var S=String(v);return!S||S.length>=d?v:""+Array(d+1-S.length).join(x)+v},"m"),I={s:k,z:r(function(v){var d=-v.utcOffset(),x=Math.abs(d),S=Math.floor(x/60),y=x%60;return(d<=0?"+":"-")+k(S,2,"0")+":"+k(y,2,"0")},"z"),m:r(function v(d,x){if(d.date()1)return v($[0])}else{var P=d.name;A[P]=d,y=P}return!S&&y&&(C=y),y||!S&&C},"t"),U=r(function(v,d){if(w(v))return v.clone();var x=typeof d=="object"?d:{};return x.date=v,x.args=arguments,new B(x)},"O"),E=I;E.l=Y,E.i=w,E.w=function(v,d){return U(v,{locale:d.$L,utc:d.$u,x:d.$x,$offset:d.$offset})};var B=(function(){function v(x){this.$L=Y(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[O]=!0}r(v,"M");var d=v.prototype;return d.parse=function(x){this.$d=(function(S){var y=S.date,D=S.utc;if(y===null)return new Date(NaN);if(E.u(y))return new Date;if(y instanceof Date)return new Date(y);if(typeof y=="string"&&!/Z$/i.test(y)){var $=y.match(_);if($){var P=$[2]-1||0,z=($[7]||"0").substring(0,3);return D?new Date(Date.UTC($[1],P,$[3]||1,$[4]||0,$[5]||0,$[6]||0,z)):new Date($[1],P,$[3]||1,$[4]||0,$[5]||0,$[6]||0,z)}}return new Date(y)})(x),this.init()},d.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},d.$utils=function(){return E},d.isValid=function(){return this.$d.toString()!==m},d.isSame=function(x,S){var y=U(x);return this.startOf(S)<=y&&y<=this.endOf(S)},d.isAfter=function(x,S){return U(x){},"trace"),debug:r((...t)=>{},"debug"),info:r((...t)=>{},"info"),warn:r((...t)=>{},"warn"),error:r((...t)=>{},"error"),fatal:r((...t)=>{},"fatal")},Wh=r(function(t="fatal"){let e=St.fatal;typeof t=="string"?t.toLowerCase()in St&&(e=St[t]):typeof t=="number"&&(e=t),pt.trace=()=>{},pt.debug=()=>{},pt.info=()=>{},pt.warn=()=>{},pt.error=()=>{},pt.fatal=()=>{},e<=St.fatal&&(pt.fatal=console.error?console.error.bind(console,mt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",mt("FATAL"))),e<=St.error&&(pt.error=console.error?console.error.bind(console,mt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",mt("ERROR"))),e<=St.warn&&(pt.warn=console.warn?console.warn.bind(console,mt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",mt("WARN"))),e<=St.info&&(pt.info=console.info?console.info.bind(console,mt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",mt("INFO"))),e<=St.debug&&(pt.debug=console.debug?console.debug.bind(console,mt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mt("DEBUG"))),e<=St.trace&&(pt.trace=console.debug?console.debug.bind(console,mt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",mt("TRACE")))},"setLogLevel"),mt=r(t=>`%c${(0,qo.default)().format("ss.SSS")} : ${t} : `,"format");function Wo(t,e){let n;if(e===void 0)for(let i of t)i!=null&&(n=i)&&(n=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n=o)&&(n=o)}return n}r(Wo,"max");function Vo(t,e){let n;if(e===void 0)for(let i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}r(Vo,"min");function Vt(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}r(Vt,"ascending");function cr(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}r(cr,"descending");function Xt(t){let e,n,i;t.length!==2?(e=Vt,n=r((u,l)=>Vt(t(u),l),"compare2"),i=r((u,l)=>t(u)-l,"delta")):(e=t===Vt||t===cr?t:cu,n=t,i=t);function o(u,l,f=0,h=u.length){if(f>>1;n(u[p],l)<0?f=p+1:h=p}while(f>>1;n(u[p],l)<=0?f=p+1:h=p}while(ff&&i(u[p-1],l)>-i(u[p],l)?p-1:p}return r(s,"center"),{left:o,center:s,right:a}}r(Xt,"bisector");function cu(){return 0}r(cu,"zero");function hr(t){return t===null?NaN:+t}r(hr,"number");var Xo=Xt(Vt),Go=Xo.right,hu=Xo.left,pu=Xt(hr).center,pr=Go;var fe=class extends Map{static{r(this,"InternMap")}constructor(e,n=xu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(let[i,o]of e)this.set(i,o)}get(e){return super.get(Zo(this,e))}has(e){return super.has(Zo(this,e))}set(e,n){return super.set(mu(this,e),n)}delete(e){return super.delete(du(this,e))}};function Zo({_intern:t,_key:e},n){let i=e(n);return t.has(i)?t.get(i):n}r(Zo,"intern_get");function mu({_intern:t,_key:e},n){let i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}r(mu,"intern_set");function du({_intern:t,_key:e},n){let i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}r(du,"intern_delete");function xu(t){return t!==null&&typeof t=="object"?t.valueOf():t}r(xu,"keyof");var _u=Math.sqrt(50),gu=Math.sqrt(10),yu=Math.sqrt(2);function cn(t,e,n){let i=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(i)),a=i/Math.pow(10,o),s=a>=_u?10:a>=gu?5:a>=yu?2:1,u,l,f;return o<0?(f=Math.pow(10,-o)/s,u=Math.round(t*f),l=Math.round(e*f),u/fe&&--l,f=-f):(f=Math.pow(10,o)*s,u=Math.round(t/f),l=Math.round(e/f),u*fe&&--l),l0))return[];if(t===e)return[t];let i=e=o))return[];let u=a-o+1,l=new Array(u);if(i)if(s<0)for(let f=0;f+t(e)}r(bu,"number");function Mu(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}r(Mu,"center");function Tu(){return!this.__axis}r(Tu,"entering");function Ko(t,e){var n=[],i=null,o=null,a=6,s=6,u=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,f=t===dn||t===mn?-1:1,h=t===mn||t===dr?"x":"y",p=t===dn||t===xr?vu:wu;function c(m){var _=i??(e.ticks?e.ticks.apply(e,n):e.domain()),M=o??(e.tickFormat?e.tickFormat.apply(e,n):mr),T=Math.max(a,0)+u,k=e.range(),I=+k[0]+l,C=+k[k.length-1]+l,A=(e.bandwidth?Mu:bu)(e.copy(),l),O=m.selection?m.selection():m,w=O.selectAll(".domain").data([null]),Y=O.selectAll(".tick").data(_,e).order(),U=Y.exit(),E=Y.enter().append("g").attr("class","tick"),B=Y.select("line"),N=Y.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Y=Y.merge(E),B=B.merge(E.append("line").attr("stroke","currentColor").attr(h+"2",f*a)),N=N.merge(E.append("text").attr("fill","currentColor").attr(h,f*T).attr("dy",t===dn?"0em":t===xr?"0.71em":"0.32em")),m!==O&&(w=w.transition(m),Y=Y.transition(m),B=B.transition(m),N=N.transition(m),U=U.transition(m).attr("opacity",Qo).attr("transform",function(v){return isFinite(v=A(v))?p(v+l):this.getAttribute("transform")}),E.attr("opacity",Qo).attr("transform",function(v){var d=this.parentNode.__axis;return p((d&&isFinite(d=d(v))?d:A(v))+l)})),U.remove(),w.attr("d",t===mn||t===dr?s?"M"+f*s+","+I+"H"+l+"V"+C+"H"+f*s:"M"+l+","+I+"V"+C:s?"M"+I+","+f*s+"V"+l+"H"+C+"V"+f*s:"M"+I+","+l+"H"+C),Y.attr("opacity",1).attr("transform",function(v){return p(A(v)+l)}),B.attr(h+"2",f*a),N.attr(h,f*T).text(M),O.filter(Tu).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===dr?"start":t===mn?"end":"middle"),O.each(function(){this.__axis=A})}return r(c,"axis"),c.scale=function(m){return arguments.length?(e=m,c):e},c.ticks=function(){return n=Array.from(arguments),c},c.tickArguments=function(m){return arguments.length?(n=m==null?[]:Array.from(m),c):n.slice()},c.tickValues=function(m){return arguments.length?(i=m==null?null:Array.from(m),c):i&&i.slice()},c.tickFormat=function(m){return arguments.length?(o=m,c):o},c.tickSize=function(m){return arguments.length?(a=s=+m,c):a},c.tickSizeInner=function(m){return arguments.length?(a=+m,c):a},c.tickSizeOuter=function(m){return arguments.length?(s=+m,c):s},c.tickPadding=function(m){return arguments.length?(u=+m,c):u},c.offset=function(m){return arguments.length?(l=+m,c):l},c}r(Ko,"axis");function ku(t){return Ko(dn,t)}r(ku,"axisTop");function Su(t){return Ko(xr,t)}r(Su,"axisBottom");function Cu(){}r(Cu,"none");function It(t){return t==null?Cu:function(){return this.querySelector(t)}}r(It,"default");function _r(t){typeof t!="function"&&(t=It(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=C&&(C=I+1);!(O=T[C])&&++C<_;);A._next=O||null}}return s=new G(s,i),s._enter=u,s._exit=l,s}r(kr,"default");function Uu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}r(Uu,"arraylike");function Sr(){return new G(this._exit||this._groups.map(Ie),this._parents)}r(Sr,"default");function Cr(t,e,n){var i=this.enter(),o=this,a=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(o=e(o),o&&(o=o.selection())),n==null?a.remove():n(a),i&&o?i.merge(o).order():o}r(Cr,"default");function Nr(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,o=n.length,a=i.length,s=Math.min(o,a),u=new Array(o),l=0;l=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}r(Ar,"default");function Dr(t){t||(t=Lu);function e(p,c){return p&&c?t(p.__data__,c.__data__):!p-!c}r(e,"compareNode");for(var n=this._groups,i=n.length,o=new Array(i),a=0;ae?1:t>=e?0:NaN}r(Lu,"ascending");function $r(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}r($r,"default");function Or(){return Array.from(this)}r(Or,"default");function Er(){for(var t=this._groups,e=0,n=t.length;e=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Yr.hasOwnProperty(e)?{space:Yr[e],local:t}:t}r(wt,"default");function zu(t){return function(){this.removeAttribute(t)}}r(zu,"attrRemove");function Hu(t){return function(){this.removeAttributeNS(t.space,t.local)}}r(Hu,"attrRemoveNS");function Bu(t,e){return function(){this.setAttribute(t,e)}}r(Bu,"attrConstant");function qu(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}r(qu,"attrConstantNS");function Wu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}r(Wu,"attrFunction");function Vu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}r(Vu,"attrFunctionNS");function Fr(t,e){var n=wt(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Hu:zu:typeof e=="function"?n.local?Vu:Wu:n.local?qu:Bu)(n,e))}r(Fr,"default");function Pe(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}r(Pe,"default");function Xu(t){return function(){this.style.removeProperty(t)}}r(Xu,"styleRemove");function Gu(t,e,n){return function(){this.style.setProperty(t,e,n)}}r(Gu,"styleConstant");function Zu(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}r(Zu,"styleFunction");function Ur(t,e,n){return arguments.length>1?this.each((e==null?Xu:typeof e=="function"?Zu:Gu)(t,e,n??"")):Rt(this.node(),t)}r(Ur,"default");function Rt(t,e){return t.style.getPropertyValue(e)||Pe(t).getComputedStyle(t,null).getPropertyValue(e)}r(Rt,"styleValue");function Qu(t){return function(){delete this[t]}}r(Qu,"propertyRemove");function Ku(t,e){return function(){this[t]=e}}r(Ku,"propertyConstant");function Ju(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}r(Ju,"propertyFunction");function Lr(t,e){return arguments.length>1?this.each((e==null?Qu:typeof e=="function"?Ju:Ku)(t,e)):this.node()[t]}r(Lr,"default");function Jo(t){return t.trim().split(/^|\s+/)}r(Jo,"classArray");function zr(t){return t.classList||new jo(t)}r(zr,"classList");function jo(t){this._node=t,this._names=Jo(t.getAttribute("class")||"")}r(jo,"ClassList");jo.prototype={add:r(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:r(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:r(function(t){return this._names.indexOf(t)>=0},"contains")};function ta(t,e){for(var n=zr(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}r(gf,"parseTypenames");function yf(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,a;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?gn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?gn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=kf.exec(t))?new nt(e[1],e[2],e[3],1):(e=Sf.exec(t))?new nt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Cf.exec(t))?gn(e[1],e[2],e[3],e[4]):(e=Nf.exec(t))?gn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Af.exec(t))?ca(e[1],e[2]/100,e[3]/100,1):(e=Df.exec(t))?ca(e[1],e[2]/100,e[3]/100,e[4]):oa.hasOwnProperty(t)?ua(oa[t]):t==="transparent"?new nt(NaN,NaN,NaN,0):null}r(_t,"color");function ua(t){return new nt(t>>16&255,t>>8&255,t&255,1)}r(ua,"rgbn");function gn(t,e,n,i){return i<=0&&(t=e=n=NaN),new nt(t,e,n,i)}r(gn,"rgba");function ri(t){return t instanceof Yt||(t=_t(t)),t?(t=t.rgb(),new nt(t.r,t.g,t.b,t.opacity)):new nt}r(ri,"rgbConvert");function de(t,e,n,i){return arguments.length===1?ri(t):new nt(t,e,n,i??1)}r(de,"rgb");function nt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}r(nt,"Rgb");Pt(nt,de,pe(Yt,{brighter(t){return t=t==null?vn:Math.pow(vn,t),new nt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fe:Math.pow(Fe,t),new nt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new nt(Zt(this.r),Zt(this.g),Zt(this.b),wn(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:fa,formatHex:fa,formatHex8:Ef,formatRgb:la,toString:la}));function fa(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}`}r(fa,"rgb_formatHex");function Ef(){return`#${Gt(this.r)}${Gt(this.g)}${Gt(this.b)}${Gt((isNaN(this.opacity)?1:this.opacity)*255)}`}r(Ef,"rgb_formatHex8");function la(){let t=wn(this.opacity);return`${t===1?"rgb(":"rgba("}${Zt(this.r)}, ${Zt(this.g)}, ${Zt(this.b)}${t===1?")":`, ${t})`}`}r(la,"rgb_formatRgb");function wn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}r(wn,"clampa");function Zt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}r(Zt,"clampi");function Gt(t){return t=Zt(t),(t<16?"0":"")+t.toString(16)}r(Gt,"hex");function ca(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xt(t,e,n,i)}r(ca,"hsla");function pa(t){if(t instanceof xt)return new xt(t.h,t.s,t.l,t.opacity);if(t instanceof Yt||(t=_t(t)),!t)return new xt;if(t instanceof xt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),a=Math.max(e,n,i),s=NaN,u=a-o,l=(a+o)/2;return u?(e===a?s=(n-i)/u+(n0&&l<1?0:s,new xt(s,u,l,t.opacity)}r(pa,"hslConvert");function ma(t,e,n,i){return arguments.length===1?pa(t):new xt(t,e,n,i??1)}r(ma,"hsl");function xt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}r(xt,"Hsl");Pt(xt,ma,pe(Yt,{brighter(t){return t=t==null?vn:Math.pow(vn,t),new xt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fe:Math.pow(Fe,t),new xt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new nt(ni(t>=240?t-240:t+120,o,i),ni(t,o,i),ni(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new xt(ha(this.h),yn(this.s),yn(this.l),wn(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 t=wn(this.opacity);return`${t===1?"hsl(":"hsla("}${ha(this.h)}, ${yn(this.s)*100}%, ${yn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ha(t){return t=(t||0)%360,t<0?t+360:t}r(ha,"clamph");function yn(t){return Math.max(0,Math.min(1,t||0))}r(yn,"clampt");function ni(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}r(ni,"hsl2rgb");var da=Math.PI/180,xa=180/Math.PI;var bn=18,_a=.96422,ga=1,ya=.82521,va=4/29,xe=6/29,wa=3*xe*xe,If=xe*xe*xe;function ba(t){if(t instanceof Mt)return new Mt(t.l,t.a,t.b,t.opacity);if(t instanceof Nt)return Ma(t);t instanceof nt||(t=ri(t));var e=si(t.r),n=si(t.g),i=si(t.b),o=ii((.2225045*e+.7168786*n+.0606169*i)/ga),a,s;return e===n&&n===i?a=s=o:(a=ii((.4360747*e+.3850649*n+.1430804*i)/_a),s=ii((.0139322*e+.0971045*n+.7141733*i)/ya)),new Mt(116*o-16,500*(a-o),200*(o-s),t.opacity)}r(ba,"labConvert");function ui(t,e,n,i){return arguments.length===1?ba(t):new Mt(t,e,n,i??1)}r(ui,"lab");function Mt(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}r(Mt,"Lab");Pt(Mt,ui,pe(Yt,{brighter(t){return new Mt(this.l+bn*(t??1),this.a,this.b,this.opacity)},darker(t){return new Mt(this.l-bn*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=_a*oi(e),t=ga*oi(t),n=ya*oi(n),new nt(ai(3.1338561*e-1.6168667*t-.4906146*n),ai(-.9787684*e+1.9161415*t+.033454*n),ai(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ii(t){return t>If?Math.pow(t,1/3):t/wa+va}r(ii,"xyz2lab");function oi(t){return t>xe?t*t*t:wa*(t-va)}r(oi,"lab2xyz");function ai(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}r(ai,"lrgb2rgb");function si(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}r(si,"rgb2lrgb");function Rf(t){if(t instanceof Nt)return new Nt(t.h,t.c,t.l,t.opacity);if(t instanceof Mt||(t=ba(t)),t.a===0&&t.b===0)return new Nt(NaN,0()=>t,"default");function Ta(t,e){return function(n){return t+n*e}}r(Ta,"linear");function Pf(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}r(Pf,"exponential");function ka(t,e){var n=e-t;return n?Ta(t,n>180||n<-180?n-360*Math.round(n/360):n):_e(isNaN(t)?e:t)}r(ka,"hue");function Sa(t){return(t=+t)==1?At:function(e,n){return n-e?Pf(e,n,t):_e(isNaN(e)?n:e)}}r(Sa,"gamma");function At(t,e){var n=e-t;return n?Ta(t,n):_e(isNaN(t)?e:t)}r(At,"nogamma");function Ca(t){return function(e,n){var i=t((e=Le(e)).h,(n=Le(n)).h),o=At(e.c,n.c),a=At(e.l,n.l),s=At(e.opacity,n.opacity);return function(u){return e.h=i(u),e.c=o(u),e.l=a(u),e.opacity=s(u),e+""}}}r(Ca,"hcl");var Yf=Ca(ka),Ff=Ca(At);function fi(t,e,n,i,o){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*n+(1+3*t+3*a-3*s)*i+s*o)/6}r(fi,"basis");function li(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],a=t[i+1],s=i>0?t[i-1]:2*o-a,u=in&&(a=e.slice(n,a),u[s]?u[s]+=a:u[++s]=a),(i=i[0])===(o=o[0])?u[s]?u[s]+=o:u[++s]=o:(u[++s]=null,l.push({i:s,x:j(i,o)})),n=di.lastIndex;return n180?h+=360:h-f>180&&(f+=360),c.push({i:p.push(o(p)+"rotate(",null,i)-2,x:j(f,h)})):h&&p.push(o(p)+"rotate("+h+i)}r(s,"rotate");function u(f,h,p,c){f!==h?c.push({i:p.push(o(p)+"skewX(",null,i)-2,x:j(f,h)}):h&&p.push(o(p)+"skewX("+h+i)}r(u,"skewX");function l(f,h,p,c,m,_){if(f!==p||h!==c){var M=m.push(o(m)+"scale(",null,",",null,")");_.push({i:M-4,x:j(f,p)},{i:M-2,x:j(h,c)})}else(p!==1||c!==1)&&m.push(o(m)+"scale("+p+","+c+")")}return r(l,"scale"),function(f,h){var p=[],c=[];return f=t(f),h=t(h),a(f.translateX,f.translateY,h.translateX,h.translateY,p,c),s(f.rotate,h.rotate,p,c),u(f.skewX,h.skewX,p,c),l(f.scaleX,f.scaleY,h.scaleX,h.scaleY,p,c),f=h=null,function(m){for(var _=-1,M=c.length,T;++_=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}r(yi,"default");function Kt(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}r(Kt,"formatDecimalParts");function gt(t){return t=Kt(Math.abs(t)),t?t[1]:NaN}r(gt,"default");function vi(t,e){return function(n,i){for(var o=n.length,a=[],s=0,u=t[0],l=0;o>0&&u>0&&(l+u+1>i&&(u=Math.max(1,i-l)),a.push(n.substring(o-=u,o+u)),!((l+=u+1)>i));)u=t[s=(s+1)%t.length];return a.reverse().join(e)}}r(vi,"default");function wi(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}r(wi,"default");var Bf=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ut(t){if(!(e=Bf.exec(t)))throw new Error("invalid format: "+t);var e;return new Cn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}r(Ut,"formatSpecifier");Ut.prototype=Cn.prototype;function Cn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}r(Cn,"FormatSpecifier");Cn.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 bi(t){t:for(var e=t.length,n=1,i=-1,o;n0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(o+1):t}r(bi,"default");var Mi;function Ti(t,e){var n=Kt(t,e);if(!n)return t+"";var i=n[0],o=n[1],a=o-(Mi=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Kt(t,Math.max(0,e+a-1))[0]}r(Ti,"default");function Nn(t,e){var n=Kt(t,e);if(!n)return t+"";var i=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}r(Nn,"default");var ki={"%":r((t,e)=>(t*100).toFixed(e),"%"),b:r(t=>Math.round(t).toString(2),"b"),c:r(t=>t+"","c"),d:yi,e:r((t,e)=>t.toExponential(e),"e"),f:r((t,e)=>t.toFixed(e),"f"),g:r((t,e)=>t.toPrecision(e),"g"),o:r(t=>Math.round(t).toString(8),"o"),p:r((t,e)=>Nn(t*100,e),"p"),r:Nn,s:Ti,X:r(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:r(t=>Math.round(t).toString(16),"x")};function An(t){return t}r(An,"default");var Ra=Array.prototype.map,Pa=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Si(t){var e=t.grouping===void 0||t.thousands===void 0?An:vi(Ra.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?An:wi(Ra.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function f(p){p=Ut(p);var c=p.fill,m=p.align,_=p.sign,M=p.symbol,T=p.zero,k=p.width,I=p.comma,C=p.precision,A=p.trim,O=p.type;O==="n"?(I=!0,O="g"):ki[O]||(C===void 0&&(C=12),A=!0,O="g"),(T||c==="0"&&m==="=")&&(T=!0,c="0",m="=");var w=M==="$"?n:M==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",Y=M==="$"?i:/[%p]/.test(O)?s:"",U=ki[O],E=/[defgprs%]/.test(O);C=C===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function B(N){var v=w,d=Y,x,S,y;if(O==="c")d=U(N)+d,N="";else{N=+N;var D=N<0||1/N<0;if(N=isNaN(N)?l:U(Math.abs(N),C),A&&(N=bi(N)),D&&+N==0&&_!=="+"&&(D=!1),v=(D?_==="("?_:u:_==="-"||_==="("?"":_)+v,d=(O==="s"?Pa[8+Mi/3]:"")+d+(D&&_==="("?")":""),E){for(x=-1,S=N.length;++xy||y>57){d=(y===46?o+N.slice(x+1):N.slice(x))+d,N=N.slice(0,x);break}}}I&&!T&&(N=e(N,1/0));var $=v.length+N.length+d.length,P=$>1)+v+N+d+P.slice($);break;default:N=P+v+N+d;break}return a(N)}return r(B,"format"),B.toString=function(){return p+""},B}r(f,"newFormat");function h(p,c){var m=f((p=Ut(p),p.type="f",p)),_=Math.max(-8,Math.min(8,Math.floor(gt(c)/3)))*3,M=Math.pow(10,-_),T=Pa[8+_/3];return function(k){return m(M*k)+T}}return r(h,"formatPrefix"),{format:f,formatPrefix:h}}r(Si,"default");var Dn,$n,On;Ci({thousands:",",grouping:[3],currency:["$",""]});function Ci(t){return Dn=Si(t),$n=Dn.format,On=Dn.formatPrefix,Dn}r(Ci,"defaultLocale");function En(t){return Math.max(0,-gt(Math.abs(t)))}r(En,"default");function In(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gt(e)/3)))*3-gt(Math.abs(t)))}r(In,"default");function Rn(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,gt(e)-gt(t))+1}r(Rn,"default");function qf(t){var e=0,n=t.children,i=n&&n.length;if(!i)e=1;else for(;--i>=0;)e+=n[i].value;t.value=e}r(qf,"count");function Ni(){return this.eachAfter(qf)}r(Ni,"default");function Ai(t,e){let n=-1;for(let i of this)t.call(e,i,++n,this);return this}r(Ai,"default");function Di(t,e){for(var n=this,i=[n],o,a,s=-1;n=i.pop();)if(t.call(e,n,++s,this),o=n.children)for(a=o.length-1;a>=0;--a)i.push(o[a]);return this}r(Di,"default");function $i(t,e){for(var n=this,i=[n],o=[],a,s,u,l=-1;n=i.pop();)if(o.push(n),a=n.children)for(s=0,u=a.length;s=0;)n+=i[o].value;e.value=n})}r(Ei,"default");function Ii(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}r(Ii,"default");function Ri(t){for(var e=this,n=Wf(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var o=i.length;t!==n;)i.splice(o,0,t),t=t.parent;return i}r(Ri,"default");function Wf(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),o=null;for(t=n.pop(),e=i.pop();t===e;)o=t,t=n.pop(),e=i.pop();return o}r(Wf,"leastCommonAncestor");function Pi(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}r(Pi,"default");function Yi(){return Array.from(this)}r(Yi,"default");function Fi(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}r(Fi,"default");function Ui(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}r(Ui,"default");function*Li(){var t=this,e,n=[t],i,o,a;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,i=t.children)for(o=0,a=i.length;o=0;--u)o.push(a=s[u]=new ze(s[u])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(Qf)}r(Pn,"hierarchy");function Vf(){return Pn(this).eachBefore(Zf)}r(Vf,"node_copy");function Xf(t){return t.children}r(Xf,"objectChildren");function Gf(t){return Array.isArray(t)?t[1]:null}r(Gf,"mapChildren");function Zf(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}r(Zf,"copyData");function Qf(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}r(Qf,"computeHeight");function ze(t){this.data=t,this.depth=this.height=0,this.parent=null}r(ze,"Node");ze.prototype=Pn.prototype={constructor:ze,count:Ni,each:Ai,eachAfter:$i,eachBefore:Di,find:Oi,sum:Ei,sort:Ii,path:Ri,ancestors:Pi,descendants:Yi,leaves:Fi,links:Ui,copy:Vf,[Symbol.iterator]:Li};function zi(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}r(zi,"default");function Hi(t,e,n,i,o){for(var a=t.children,s,u=-1,l=a.length,f=t.value&&(i-e)/t.value;++uI&&(I=f),w=T*T*O,C=Math.max(I/w,w/k),C>A){T-=f;break}A=C}s.push(l={value:T,dice:m<_,children:u.slice(h,p)}),l.dice?Hi(l,n,i,o,M?i+=_*T/M:a):Bi(l,n,i,M?n+=m*T/M:o,a),M-=T,h=p}return s}r(Jf,"squarifyRatio");var Ya=r((function t(e){function n(i,o,a,s,u){Jf(e,i,o,a,s,u)}return r(n,"squarify"),n.ratio=function(i){return t((i=+i)>1?i:1)},n}),"custom")(Kf);function Fa(t){if(typeof t!="function")throw new Error;return t}r(Fa,"required");function ye(){return 0}r(ye,"constantZero");function Jt(t){return function(){return t}}r(Jt,"default");function Ua(){var t=Ya,e=!1,n=1,i=1,o=[0],a=ye,s=ye,u=ye,l=ye,f=ye;function h(c){return c.x0=c.y0=0,c.x1=n,c.y1=i,c.eachBefore(p),o=[0],e&&c.eachBefore(zi),c}r(h,"treemap");function p(c){var m=o[c.depth],_=c.x0+m,M=c.y0+m,T=c.x1-m,k=c.y1-m;T<_&&(_=T=(_+T)/2),ke&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}r(jf,"clamper");function tl(t,e,n){var i=t[0],o=t[1],a=e[0],s=e[1];return o2?el:tl,l=f=null,p}r(h,"rescale");function p(c){return c==null||isNaN(c=+c)?a:(l||(l=u(t.map(i),e,n)))(i(s(c)))}return r(p,"scale"),p.invert=function(c){return s(o((f||(f=u(e,t.map(i),j)))(c)))},p.domain=function(c){return arguments.length?(t=Array.from(c,Vi),h()):t.slice()},p.range=function(c){return arguments.length?(e=Array.from(c),h()):e.slice()},p.rangeRound=function(c){return e=Array.from(c),n=Mn,h()},p.clamp=function(c){return arguments.length?(s=c?!0:ve,h()):s!==ve},p.interpolate=function(c){return arguments.length?(n=c,h()):n},p.unknown=function(c){return arguments.length?(a=c,p):a},function(c,m){return i=c,o=m,h()}}r(nl,"transformer");function Be(){return nl()(ve,ve)}r(Be,"continuous");function Gi(t,e,n,i){var o=le(t,e,n),a;switch(i=Ut(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(a=In(o,s))&&(i.precision=a),On(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Rn(o,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=En(o))&&(i.precision=a-(i.type==="%")*2);break}}return $n(i)}r(Gi,"tickFormat");function rl(t){var e=t.domain;return t.ticks=function(n){var i=e();return hn(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var o=e();return Gi(o[0],o[o.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),o=0,a=i.length-1,s=i[o],u=i[a],l,f,h=10;for(u0;){if(f=Ee(s,u,n),f===l)return i[o]=s,i[a]=u,e(i);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;l=f}return t},t}r(rl,"linearish");function Zi(){var t=Be();return t.copy=function(){return Yn(t,Zi())},Lt.apply(t,arguments),rl(t)}r(Zi,"linear");var Qi=new Date,Ki=new Date;function H(t,e,n,i){function o(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return r(o,"interval"),o.floor=a=>(t(a=new Date(+a)),a),o.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),o.round=a=>{let s=o(a),u=o.ceil(a);return a-s(e(a=new Date(+a),s==null?1:Math.floor(s)),a),o.range=(a,s,u)=>{let l=[];if(a=o.ceil(a),u=u==null?1:Math.floor(u),!(a0))return l;let f;do l.push(f=new Date(+a)),e(a,u),t(a);while(fH(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;e(s,-1),!a(s););else for(;--u>=0;)for(;e(s,1),!a(s););}),n&&(o.count=(a,s)=>(Qi.setTime(+a),Ki.setTime(+s),t(Qi),t(Ki),Math.floor(n(Qi,Ki))),o.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?o.filter(i?s=>i(s)%a===0:s=>o.count(0,s)%a===0):o)),o}r(H,"timeInterval");var jt=H(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);jt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?H(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):jt);var za=jt.range;var Tt=H(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),Ha=Tt.range;var we=H(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),il=we.range,Fn=H(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),ol=Fn.range;var be=H(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),al=be.range,Un=H(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),sl=Un.range;var Dt=H(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),ul=Dt.range,We=H(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),fl=We.range,Ln=H(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),ll=Ln.range;function ne(t){return H(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}r(ne,"timeWeekday");var $t=ne(0),Me=ne(1),qa=ne(2),Wa=ne(3),zt=ne(4),Va=ne(5),Xa=ne(6),Ga=$t.range,cl=Me.range,hl=qa.range,pl=Wa.range,ml=zt.range,dl=Va.range,xl=Xa.range;function re(t){return H(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/6048e5)}r(re,"utcWeekday");var ie=re(0),Te=re(1),Za=re(2),Qa=re(3),Ht=re(4),Ka=re(5),Ja=re(6),ja=ie.range,_l=Te.range,gl=Za.range,yl=Qa.range,vl=Ht.range,wl=Ka.range,bl=Ja.range;var ke=H(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),Ml=ke.range,zn=H(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),Tl=zn.range;var lt=H(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());lt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:H(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});var kl=lt.range,yt=H(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());yt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:H(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});var Sl=yt.range;function es(t,e,n,i,o,a){let s=[[Tt,1,1e3],[Tt,5,5*1e3],[Tt,15,15*1e3],[Tt,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[o,1,36e5],[o,3,3*36e5],[o,6,6*36e5],[o,12,12*36e5],[i,1,864e5],[i,2,2*864e5],[n,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function u(f,h,p){let c=hT).right(s,c);if(m===s.length)return t.every(le(f/31536e6,h/31536e6,p));if(m===0)return jt.every(Math.max(le(f,h,p),1));let[_,M]=s[c/s[m-1][2]53)return null;"w"in g||(g.w=1),"Z"in g?(q=eo(Ve(g.y,0,1)),ut=q.getUTCDay(),q=ut>4||ut===0?Te.ceil(q):Te(q),q=We.offset(q,(g.V-1)*7),g.y=q.getUTCFullYear(),g.m=q.getUTCMonth(),g.d=q.getUTCDate()+(g.w+6)%7):(q=to(Ve(g.y,0,1)),ut=q.getDay(),q=ut>4||ut===0?Me.ceil(q):Me(q),q=Dt.offset(q,(g.V-1)*7),g.y=q.getFullYear(),g.m=q.getMonth(),g.d=q.getDate()+(g.w+6)%7)}else("W"in g||"U"in g)&&("w"in g||(g.w="u"in g?g.u%7:"W"in g?1:0),ut="Z"in g?eo(Ve(g.y,0,1)).getUTCDay():to(Ve(g.y,0,1)).getDay(),g.m=0,g.d="W"in g?(g.w+6)%7+g.W*7-(ut+5)%7:g.w+g.U*7-(ut+6)%7);return"Z"in g?(g.H+=g.Z/100|0,g.M+=g.Z%100,eo(g)):to(g)}}r(Y,"newParse");function U(b,R,F,g){for(var at=0,q=R.length,ut=F.length,ft,Wt;at=ut)return-1;if(ft=R.charCodeAt(at++),ft===37){if(ft=R.charAt(at++),Wt=O[ft in ns?R.charAt(at++):ft],!Wt||(g=Wt(b,F,g))<0)return-1}else if(ft!=F.charCodeAt(g++))return-1}return g}r(U,"parseSpecifier");function E(b,R,F){var g=f.exec(R.slice(F));return g?(b.p=h.get(g[0].toLowerCase()),F+g[0].length):-1}r(E,"parsePeriod");function B(b,R,F){var g=m.exec(R.slice(F));return g?(b.w=_.get(g[0].toLowerCase()),F+g[0].length):-1}r(B,"parseShortWeekday");function N(b,R,F){var g=p.exec(R.slice(F));return g?(b.w=c.get(g[0].toLowerCase()),F+g[0].length):-1}r(N,"parseWeekday");function v(b,R,F){var g=k.exec(R.slice(F));return g?(b.m=I.get(g[0].toLowerCase()),F+g[0].length):-1}r(v,"parseShortMonth");function d(b,R,F){var g=M.exec(R.slice(F));return g?(b.m=T.get(g[0].toLowerCase()),F+g[0].length):-1}r(d,"parseMonth");function x(b,R,F){return U(b,e,R,F)}r(x,"parseLocaleDateTime");function S(b,R,F){return U(b,n,R,F)}r(S,"parseLocaleDate");function y(b,R,F){return U(b,i,R,F)}r(y,"parseLocaleTime");function D(b){return s[b.getDay()]}r(D,"formatShortWeekday");function $(b){return a[b.getDay()]}r($,"formatWeekday");function P(b){return l[b.getMonth()]}r(P,"formatShortMonth");function z(b){return u[b.getMonth()]}r(z,"formatMonth");function W(b){return o[+(b.getHours()>=12)]}r(W,"formatPeriod");function X(b){return 1+~~(b.getMonth()/3)}r(X,"formatQuarter");function J(b){return s[b.getUTCDay()]}r(J,"formatUTCShortWeekday");function ht(b){return a[b.getUTCDay()]}r(ht,"formatUTCWeekday");function Q(b){return l[b.getUTCMonth()]}r(Q,"formatUTCShortMonth");function dt(b){return u[b.getUTCMonth()]}r(dt,"formatUTCMonth");function st(b){return o[+(b.getUTCHours()>=12)]}r(st,"formatUTCPeriod");function Z(b){return 1+~~(b.getUTCMonth()/3)}return r(Z,"formatUTCQuarter"),{format:r(function(b){var R=w(b+="",C);return R.toString=function(){return b},R},"format"),parse:r(function(b){var R=Y(b+="",!1);return R.toString=function(){return b},R},"parse"),utcFormat:r(function(b){var R=w(b+="",A);return R.toString=function(){return b},R},"utcFormat"),utcParse:r(function(b){var R=Y(b+="",!0);return R.toString=function(){return b},R},"utcParse")}}r(no,"formatLocale");var ns={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,Dl=/^%/,$l=/[\\^$*+?|[\]().{}]/g;function L(t,e,n){var i=t<0?"-":"",o=(i?-t:t)+"",a=o.length;return i+(a[e.toLowerCase(),n]))}r(Ge,"formatLookup");function El(t,e,n){var i=tt.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}r(El,"parseWeekdayNumberSunday");function Il(t,e,n){var i=tt.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}r(Il,"parseWeekdayNumberMonday");function Rl(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}r(Rl,"parseWeekNumberSunday");function Pl(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}r(Pl,"parseWeekNumberISO");function Yl(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}r(Yl,"parseWeekNumberMonday");function rs(t,e,n){var i=tt.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}r(rs,"parseFullYear");function is(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}r(is,"parseYear");function Fl(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}r(Fl,"parseZone");function Ul(t,e,n){var i=tt.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}r(Ul,"parseQuarter");function Ll(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}r(Ll,"parseMonthNumber");function os(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}r(os,"parseDayOfMonth");function zl(t,e,n){var i=tt.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}r(zl,"parseDayOfYear");function as(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}r(as,"parseHour24");function Hl(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}r(Hl,"parseMinutes");function Bl(t,e,n){var i=tt.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}r(Bl,"parseSeconds");function ql(t,e,n){var i=tt.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}r(ql,"parseMilliseconds");function Wl(t,e,n){var i=tt.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}r(Wl,"parseMicroseconds");function Vl(t,e,n){var i=Dl.exec(e.slice(n,n+1));return i?n+i[0].length:-1}r(Vl,"parseLiteralPercent");function Xl(t,e,n){var i=tt.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}r(Xl,"parseUnixTimestamp");function Gl(t,e,n){var i=tt.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}r(Gl,"parseUnixTimestampSeconds");function ss(t,e){return L(t.getDate(),e,2)}r(ss,"formatDayOfMonth");function Zl(t,e){return L(t.getHours(),e,2)}r(Zl,"formatHour24");function Ql(t,e){return L(t.getHours()%12||12,e,2)}r(Ql,"formatHour12");function Kl(t,e){return L(1+Dt.count(lt(t),t),e,3)}r(Kl,"formatDayOfYear");function hs(t,e){return L(t.getMilliseconds(),e,3)}r(hs,"formatMilliseconds");function Jl(t,e){return hs(t,e)+"000"}r(Jl,"formatMicroseconds");function jl(t,e){return L(t.getMonth()+1,e,2)}r(jl,"formatMonthNumber");function tc(t,e){return L(t.getMinutes(),e,2)}r(tc,"formatMinutes");function ec(t,e){return L(t.getSeconds(),e,2)}r(ec,"formatSeconds");function nc(t){var e=t.getDay();return e===0?7:e}r(nc,"formatWeekdayNumberMonday");function rc(t,e){return L($t.count(lt(t)-1,t),e,2)}r(rc,"formatWeekNumberSunday");function ps(t){var e=t.getDay();return e>=4||e===0?zt(t):zt.ceil(t)}r(ps,"dISO");function ic(t,e){return t=ps(t),L(zt.count(lt(t),t)+(lt(t).getDay()===4),e,2)}r(ic,"formatWeekNumberISO");function oc(t){return t.getDay()}r(oc,"formatWeekdayNumberSunday");function ac(t,e){return L(Me.count(lt(t)-1,t),e,2)}r(ac,"formatWeekNumberMonday");function sc(t,e){return L(t.getFullYear()%100,e,2)}r(sc,"formatYear");function uc(t,e){return t=ps(t),L(t.getFullYear()%100,e,2)}r(uc,"formatYearISO");function fc(t,e){return L(t.getFullYear()%1e4,e,4)}r(fc,"formatFullYear");function lc(t,e){var n=t.getDay();return t=n>=4||n===0?zt(t):zt.ceil(t),L(t.getFullYear()%1e4,e,4)}r(lc,"formatFullYearISO");function cc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+L(e/60|0,"0",2)+L(e%60,"0",2)}r(cc,"formatZone");function us(t,e){return L(t.getUTCDate(),e,2)}r(us,"formatUTCDayOfMonth");function hc(t,e){return L(t.getUTCHours(),e,2)}r(hc,"formatUTCHour24");function pc(t,e){return L(t.getUTCHours()%12||12,e,2)}r(pc,"formatUTCHour12");function mc(t,e){return L(1+We.count(yt(t),t),e,3)}r(mc,"formatUTCDayOfYear");function ms(t,e){return L(t.getUTCMilliseconds(),e,3)}r(ms,"formatUTCMilliseconds");function dc(t,e){return ms(t,e)+"000"}r(dc,"formatUTCMicroseconds");function xc(t,e){return L(t.getUTCMonth()+1,e,2)}r(xc,"formatUTCMonthNumber");function _c(t,e){return L(t.getUTCMinutes(),e,2)}r(_c,"formatUTCMinutes");function gc(t,e){return L(t.getUTCSeconds(),e,2)}r(gc,"formatUTCSeconds");function yc(t){var e=t.getUTCDay();return e===0?7:e}r(yc,"formatUTCWeekdayNumberMonday");function vc(t,e){return L(ie.count(yt(t)-1,t),e,2)}r(vc,"formatUTCWeekNumberSunday");function ds(t){var e=t.getUTCDay();return e>=4||e===0?Ht(t):Ht.ceil(t)}r(ds,"UTCdISO");function wc(t,e){return t=ds(t),L(Ht.count(yt(t),t)+(yt(t).getUTCDay()===4),e,2)}r(wc,"formatUTCWeekNumberISO");function bc(t){return t.getUTCDay()}r(bc,"formatUTCWeekdayNumberSunday");function Mc(t,e){return L(Te.count(yt(t)-1,t),e,2)}r(Mc,"formatUTCWeekNumberMonday");function Tc(t,e){return L(t.getUTCFullYear()%100,e,2)}r(Tc,"formatUTCYear");function kc(t,e){return t=ds(t),L(t.getUTCFullYear()%100,e,2)}r(kc,"formatUTCYearISO");function Sc(t,e){return L(t.getUTCFullYear()%1e4,e,4)}r(Sc,"formatUTCFullYear");function Cc(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ht(t):Ht.ceil(t),L(t.getUTCFullYear()%1e4,e,4)}r(Cc,"formatUTCFullYearISO");function Nc(){return"+0000"}r(Nc,"formatUTCZone");function fs(){return"%"}r(fs,"formatLiteralPercent");function ls(t){return+t}r(ls,"formatUnixTimestamp");function cs(t){return Math.floor(+t/1e3)}r(cs,"formatUnixTimestampSeconds");var Se,Hn,xs,_s,gs;ro({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"]});function ro(t){return Se=no(t),Hn=Se.format,xs=Se.parse,_s=Se.utcFormat,gs=Se.utcParse,Se}r(ro,"defaultLocale");function io(t,e){t=t.slice();var n=0,i=t.length-1,o=t[n],a=t[i],s;return a1?0:t<-1?Ce:Math.acos(t)}r(bs,"acos");function uo(t){return t>=1?Ze:t<=-1?-Ze:Math.asin(t)}r(uo,"asin");var fo=Math.PI,lo=2*fo,ae=1e-6,Oc=lo-ae;function Ms(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ms;let n=10**e;return function(i){this._+=i[0];for(let o=1,a=i.length;oae)if(!(Math.abs(p*l-f*h)>ae)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let m=i-s,_=o-u,M=l*l+f*f,T=m*m+_*_,k=Math.sqrt(M),I=Math.sqrt(c),C=a*Math.tan((fo-Math.acos((M+c-T)/(2*k*I)))/2),A=C/I,O=C/k;Math.abs(A-1)>ae&&this._append`L${e+A*h},${n+A*p}`,this._append`A${a},${a},0,0,${+(p*m>h*_)},${this._x1=e+O*l},${this._y1=n+O*f}`}}arc(e,n,i,o,a,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(o),l=i*Math.sin(o),f=e+u,h=n+l,p=1^s,c=s?o-a:a-o;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>ae||Math.abs(this._y1-h)>ae)&&this._append`L${f},${h}`,i&&(c<0&&(c=c%lo+lo),c>Oc?this._append`A${i},${i},0,1,${p},${e-u},${n-l}A${i},${i},0,1,${p},${this._x1=f},${this._y1=h}`:c>ae&&this._append`A${i},${i},0,${+(c>=fo)},${p},${this._x1=e+i*Math.cos(a)},${this._y1=n+i*Math.sin(a)}`)}rect(e,n,i,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+o}h${-i}Z`}toString(){return this._}};function Ts(){return new se}r(Ts,"path");Ts.prototype=se.prototype;function qn(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{let i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new se(e)}r(qn,"withPath");function Ic(t){return t.innerRadius}r(Ic,"arcInnerRadius");function Rc(t){return t.outerRadius}r(Rc,"arcOuterRadius");function Pc(t){return t.startAngle}r(Pc,"arcStartAngle");function Yc(t){return t.endAngle}r(Yc,"arcEndAngle");function Fc(t){return t&&t.padAngle}r(Fc,"arcPadAngle");function Uc(t,e,n,i,o,a,s,u){var l=n-t,f=i-e,h=s-o,p=u-a,c=p*l-h*f;if(!(c*cx*x+S*S&&(U=B,E=N),{cx:U,cy:E,x01:-h,y01:-p,x11:U*(o/O-1),y11:E*(o/O-1)}}r(Wn,"cornerTangents");function ks(){var t=Ic,e=Rc,n=V(0),i=null,o=Pc,a=Yc,s=Fc,u=null,l=qn(f);function f(){var h,p,c=+t.apply(this,arguments),m=+e.apply(this,arguments),_=o.apply(this,arguments)-Ze,M=a.apply(this,arguments)-Ze,T=so(M-_),k=M>_;if(u||(u=h=l()),met))u.moveTo(0,0);else if(T>Ne-et)u.moveTo(m*Bt(_),m*vt(_)),u.arc(0,0,m,_,M,!k),c>et&&(u.moveTo(c*Bt(M),c*vt(M)),u.arc(0,0,c,M,_,k));else{var I=_,C=M,A=_,O=M,w=T,Y=T,U=s.apply(this,arguments)/2,E=U>et&&(i?+i.apply(this,arguments):oe(c*c+m*m)),B=Bn(so(m-c)/2,+n.apply(this,arguments)),N=B,v=B,d,x;if(E>et){var S=uo(E/c*vt(U)),y=uo(E/m*vt(U));(w-=S*2)>et?(S*=k?1:-1,A+=S,O-=S):(w=0,A=O=(_+M)/2),(Y-=y*2)>et?(y*=k?1:-1,I+=y,C-=y):(Y=0,I=C=(_+M)/2)}var D=m*Bt(I),$=m*vt(I),P=c*Bt(O),z=c*vt(O);if(B>et){var W=m*Bt(C),X=m*vt(C),J=c*Bt(A),ht=c*vt(A),Q;if(Tet?v>et?(d=Wn(J,ht,D,$,m,v,k),x=Wn(W,X,P,z,m,v,k),u.moveTo(d.cx+d.x01,d.cy+d.y01),vet)||!(w>et)?u.lineTo(P,z):N>et?(d=Wn(P,z,W,X,c,-N,k),x=Wn(D,$,J,ht,c,-N,k),u.lineTo(d.cx+d.x01,d.cy+d.y01),Nt?1:e>=t?0:NaN}r(co,"default");function ho(t){return t}r(ho,"default");function Ds(){var t=ho,e=co,n=null,i=V(0),o=V(Ne),a=V(0);function s(u){var l,f=(u=Qe(u)).length,h,p,c=0,m=new Array(f),_=new Array(f),M=+i.apply(this,arguments),T=Math.min(Ne,Math.max(-Ne,o.apply(this,arguments)-M)),k,I=Math.min(Math.abs(T)/f,a.apply(this,arguments)),C=I*(T<0?-1:1),A;for(l=0;l0&&(c+=A);for(e!=null?m.sort(function(O,w){return e(_[O],_[w])}):n!=null&&m.sort(function(O,w){return n(u[O],u[w])}),l=0,p=c?(T-f*C)/c:0;l0?A*p:0)+C,_[h]={data:u[h],index:l,value:A,startAngle:M,endAngle:k,padAngle:I};return _}return r(s,"pie"),s.value=function(u){return arguments.length?(t=typeof u=="function"?u:V(+u),s):t},s.sortValues=function(u){return arguments.length?(e=u,n=null,s):e},s.sort=function(u){return arguments.length?(n=u,e=null,s):n},s.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:V(+u),s):i},s.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:V(+u),s):o},s.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:V(+u),s):a},s}r(Ds,"default");var Xn=class{static{r(this,"Bump")}constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}};function Lc(t){return new Xn(t,!0)}r(Lc,"bumpX");function zc(t){return new Xn(t,!1)}r(zc,"bumpY");function Ae(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}r(Ae,"point");function Ke(t){this._context=t}r(Ke,"Basis");Ke.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:r(function(){switch(this._point){case 3:Ae(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:r(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:Ae(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function $s(t){return new Ke(t)}r($s,"default");function ct(){}r(ct,"default");function Os(t){this._context=t}r(Os,"BasisClosed");Os.prototype={areaStart:ct,areaEnd:ct,lineStart:r(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:r(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:r(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ae(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function Es(t){return new Os(t)}r(Es,"default");function Is(t){this._context=t}r(Is,"BasisOpen");Is.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:r(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:r(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Ae(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function Rs(t){return new Is(t)}r(Rs,"default");function Ps(t,e){this._basis=new Ke(t),this._beta=e}r(Ps,"Bundle");Ps.prototype={lineStart:r(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:r(function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1,l;++u<=n;)l=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+l*a),this._beta*e[u]+(1-this._beta)*(o+l*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:r(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};var Hc=r((function t(e){function n(i){return e===1?new Ke(i):new Ps(i,e)}return r(n,"bundle"),n.beta=function(i){return t(+i)},n}),"custom")(.85);function De(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}r(De,"point");function Gn(t,e){this._context=t,this._k=(1-e)/6}r(Gn,"Cardinal");Gn.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:r(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:r(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:De(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Bc=r((function t(e){function n(i){return new Gn(i,e)}return r(n,"cardinal"),n.tension=function(i){return t(+i)},n}),"custom")(0);function Zn(t,e){this._context=t,this._k=(1-e)/6}r(Zn,"CardinalClosed");Zn.prototype={areaStart:ct,areaEnd:ct,lineStart:r(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:r(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:r(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:De(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var qc=r((function t(e){function n(i){return new Zn(i,e)}return r(n,"cardinal"),n.tension=function(i){return t(+i)},n}),"custom")(0);function Qn(t,e){this._context=t,this._k=(1-e)/6}r(Qn,"CardinalOpen");Qn.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:r(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:r(function(t,e){switch(t=+t,e=+e,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:De(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Wc=r((function t(e){function n(i){return new Qn(i,e)}return r(n,"cardinal"),n.tension=function(i){return t(+i)},n}),"custom")(0);function Je(t,e,n){var i=t._x1,o=t._y1,a=t._x2,s=t._y2;if(t._l01_a>et){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>et){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*f+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*f+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,o,a,s,t._x2,t._y2)}r(Je,"point");function Ys(t,e){this._context=t,this._alpha=e}r(Ys,"CatmullRom");Ys.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(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:r(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:r(function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Je(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Vc=r((function t(e){function n(i){return e?new Ys(i,e):new Gn(i,0)}return r(n,"catmullRom"),n.alpha=function(i){return t(+i)},n}),"custom")(.5);function Fs(t,e){this._context=t,this._alpha=e}r(Fs,"CatmullRomClosed");Fs.prototype={areaStart:ct,areaEnd:ct,lineStart:r(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:r(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:r(function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Je(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Xc=r((function t(e){function n(i){return e?new Fs(i,e):new Zn(i,0)}return r(n,"catmullRom"),n.alpha=function(i){return t(+i)},n}),"custom")(.5);function Us(t,e){this._context=t,this._alpha=e}r(Us,"CatmullRomOpen");Us.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(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:r(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:r(function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Je(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Gc=r((function t(e){function n(i){return e?new Us(i,e):new Qn(i,0)}return r(n,"catmullRom"),n.alpha=function(i){return t(+i)},n}),"custom")(.5);function Ls(t){this._context=t}r(Ls,"LinearClosed");Ls.prototype={areaStart:ct,areaEnd:ct,lineStart:r(function(){this._point=0},"lineStart"),lineEnd:r(function(){this._point&&this._context.closePath()},"lineEnd"),point:r(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};function zs(t){return new Ls(t)}r(zs,"default");function Hs(t){return t<0?-1:1}r(Hs,"sign");function Bs(t,e,n){var i=t._x1-t._x0,o=e-t._x1,a=(t._y1-t._y0)/(i||o<0&&-0),s=(n-t._y1)/(o||i<0&&-0),u=(a*o+s*i)/(i+o);return(Hs(a)+Hs(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}r(Bs,"slope3");function qs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}r(qs,"slope2");function po(t,e,n){var i=t._x0,o=t._y0,a=t._x1,s=t._y1,u=(a-i)/3;t._context.bezierCurveTo(i+u,o+u*e,a-u,s-u*n,a,s)}r(po,"point");function Kn(t){this._context=t}r(Kn,"MonotoneX");Kn.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:r(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:po(this,this._t0,qs(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:r(function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,po(this,qs(this,n=Bs(this,t,e)),n);break;default:po(this,this._t0,n=Bs(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}},"point")};function Ws(t){this._context=new Vs(t)}r(Ws,"MonotoneY");(Ws.prototype=Object.create(Kn.prototype)).point=function(t,e){Kn.prototype.point.call(this,e,t)};function Vs(t){this._context=t}r(Vs,"ReflectContext");Vs.prototype={moveTo:r(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:r(function(){this._context.closePath()},"closePath"),lineTo:r(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:r(function(t,e,n,i,o,a){this._context.bezierCurveTo(e,t,i,n,a,o)},"bezierCurveTo")};function Zc(t){return new Kn(t)}r(Zc,"monotoneX");function Qc(t){return new Ws(t)}r(Qc,"monotoneY");function Gs(t){this._context=t}r(Gs,"Natural");Gs.prototype={areaStart:r(function(){this._line=0},"areaStart"),areaEnd:r(function(){this._line=NaN},"areaEnd"),lineStart:r(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:r(function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=Xs(t),o=Xs(e),a=0,s=1;s=0;--e)o[e]=(s[e]-o[e+1])/a[e];for(a[n-1]=(t[n]+o[n-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:r(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e},"point")};function Qs(t){return new Jn(t,.5)}r(Qs,"default");function Kc(t){return new Jn(t,0)}r(Kc,"stepBefore");function Jc(t){return new Jn(t,1)}r(Jc,"stepAfter");var jc={value:r(()=>{},"value")};function Js(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}r(th,"parseTypenames");jn.prototype=Js.prototype={constructor:jn,on:r(function(t,e){var n=this._,i=th(t+"",n),o,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var n=new Array(o),i=0,o,a;i=0&&t._call.call(void 0,e),t=t._next;--$e}r(nu,"timerFlush");function js(){ue=(er=nn.now())+nr,$e=tn=0;try{nu()}finally{$e=0,ih(),ue=0}}r(js,"wake");function rh(){var t=nn.now(),e=t-er;e>tu&&(nr-=e,er=t)}r(rh,"poke");function ih(){for(var t,e=tr,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:tr=n);en=t,xo(i)}r(ih,"nap");function xo(t){if(!$e){tn&&(tn=clearTimeout(tn));var e=t-ue;e>24?(t<1/0&&(tn=setTimeout(js,t-nn.now()-nr)),je&&(je=clearInterval(je))):(je||(er=nn.now(),je=setInterval(rh,tu)),$e=1,eu(js))}}r(xo,"sleep");function an(t,e,n){var i=new rn;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,n),i}r(an,"default");var oh=mo("start","end","cancel","interrupt"),ah=[],ou=0,ru=1,or=2,ir=3,iu=4,ar=5,sn=6;function Ot(t,e,n,i,o,a){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;sh(t,n,{name:e,index:i,group:o,on:oh,tween:ah,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ou})}r(Ot,"default");function un(t,e){var n=K(t,e);if(n.state>ou)throw new Error("too late; already scheduled");return n}r(un,"init");function it(t,e){var n=K(t,e);if(n.state>ir)throw new Error("too late; already running");return n}r(it,"set");function K(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}r(K,"get");function sh(t,e,n){var i=t.__transition,o;i[e]=n,n.timer=rr(a,0,n.time);function a(f){n.state=ru,n.timer.restart(s,n.delay,n.time),n.delay<=f&&s(f-n.delay)}r(a,"schedule");function s(f){var h,p,c,m;if(n.state!==ru)return l();for(h in i)if(m=i[h],m.name===n.name){if(m.state===ir)return an(s);m.state===iu?(m.state=sn,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete i[h]):+hor&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}r(Sh,"start");function Ch(t,e,n){var i,o,a=Sh(e)?un:it;return function(){var s=a(this,t),u=s.on;u!==i&&(o=(i=u).copy()).on(e,n),s.on=o}}r(Ch,"onFunction");function Co(t,e){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(t):this.each(Ch(n,t,e))}r(Co,"default");function Nh(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}r(Nh,"removeFunction");function No(){return this.on("end.remove",Nh(this._id))}r(No,"default");function Ao(t){var e=this._name,n=this._id;typeof t!="function"&&(t=It(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;se(b,"name",{value:a,configurable:!0});var n=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),o=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var p=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c,p as d}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-AZZRMDJM.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-AZZRMDJM.mjs new file mode 100644 index 00000000000..397cba44236 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-AZZRMDJM.mjs @@ -0,0 +1,15 @@ +import{a as e}from"./chunk-AQ6EADP3.mjs";var o=e(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,"getIconStyles");export{o as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-C62D2QBJ.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-C62D2QBJ.mjs new file mode 100644 index 00000000000..0cf4ccc889c --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-C62D2QBJ.mjs @@ -0,0 +1 @@ +import{a as e,b as n,c as s,d as o,e as u,g as d,m as l,r as c,t as m}from"./chunk-4R4BOZG6.mjs";import{a as t}from"./chunk-AQ6EADP3.mjs";var v=class extends m{static{t(this,"PieTokenBuilder")}static{e(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},C=class extends c{static{t(this,"PieValueConverter")}static{e(this,"PieValueConverter")}runCustomConverter(a,r,i){if(a.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},P={parser:{TokenBuilder:e(()=>new v,"TokenBuilder"),ValueConverter:e(()=>new C,"ValueConverter")}};function p(a=u){let r=o(s(a),d),i=o(n({shared:r}),l,P);return r.ServiceRegistry.register(i),{shared:r,Pie:i}}t(p,"createPieServices");e(p,"createPieServices");export{P as a,p as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-CEXFNPSA.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-CEXFNPSA.mjs new file mode 100644 index 00000000000..3e49740ea6a --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-CEXFNPSA.mjs @@ -0,0 +1 @@ +import{a as r,b as o,c as s,d as n,e as u,g as l,p as d,r as c,t as T}from"./chunk-4R4BOZG6.mjs";import{a}from"./chunk-AQ6EADP3.mjs";var V=class extends c{static{a(this,"TreeViewValueConverter")}static{r(this,"TreeViewValueConverter")}runCustomConverter(t,e,i){if(t.name==="INDENTATION")return e?.length||0;if(t.name==="STRING2")return e.substring(1,e.length-1)}},m=class extends T{static{a(this,"TreeViewTokenBuilder")}static{r(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},v={parser:{TokenBuilder:r(()=>new m,"TokenBuilder"),ValueConverter:r(()=>new V,"ValueConverter")}};function w(t=u){let e=n(s(t),l),i=n(o({shared:e}),d,v);return e.ServiceRegistry.register(i),{shared:e,TreeView:i}}a(w,"createTreeViewServices");r(w,"createTreeViewServices");export{v as a,w as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-INKRHTLW.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-INKRHTLW.mjs new file mode 100644 index 00000000000..c407e0e6627 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-INKRHTLW.mjs @@ -0,0 +1,70 @@ +import{r as K}from"./chunk-QA3QBVWF.mjs";import{A as P,D as Q,F as ye,G as Se,t as q}from"./chunk-67TQ5CYL.mjs";import{b as I,h as M}from"./chunk-7W6UQGC5.mjs";import{a as c}from"./chunk-AQ6EADP3.mjs";var ot=Object.freeze({left:0,top:0,width:16,height:16}),L=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),X=Object.freeze({...ot,...L}),Te=Object.freeze({...X,body:"",hidden:!1});var lt=Object.freeze({width:null,height:null}),Ie=Object.freeze({...lt,...L});var J=c((n,e,r,s="")=>{let t=n.split(":");if(n.slice(0,1)==="@"){if(t.length<2||t.length>3)return null;s=t.shift().slice(1)}if(t.length>3||!t.length)return null;if(t.length>1){let o=t.pop(),a=t.pop(),p={provider:t.length>0?t[0]:s,prefix:a,name:o};return e&&!O(p)?null:p}let l=t[0],i=l.split("-");if(i.length>1){let o={provider:s,prefix:i.shift(),name:i.join("-")};return e&&!O(o)?null:o}if(r&&s===""){let o={provider:s,prefix:"",name:l};return e&&!O(o,r)?null:o}return null},"stringToIcon"),O=c((n,e)=>n?!!((e&&n.prefix===""||n.prefix)&&n.name):!1,"validateIconName");function $e(n,e){let r={};!n.hFlip!=!e.hFlip&&(r.hFlip=!0),!n.vFlip!=!e.vFlip&&(r.vFlip=!0);let s=((n.rotate||0)+(e.rotate||0))%4;return s&&(r.rotate=s),r}c($e,"mergeIconTransformations");function Y(n,e){let r=$e(n,e);for(let s in Te)s in L?s in n&&!(s in r)&&(r[s]=L[s]):s in e?r[s]=e[s]:s in n&&(r[s]=n[s]);return r}c(Y,"mergeIconData");function Re(n,e){let r=n.icons,s=n.aliases||Object.create(null),t=Object.create(null);function l(i){if(r[i])return t[i]=[];if(!(i in t)){t[i]=null;let o=s[i]&&s[i].parent,a=o&&l(o);a&&(t[i]=[o].concat(a))}return t[i]}return c(l,"resolve"),(e||Object.keys(r).concat(Object.keys(s))).forEach(l),t}c(Re,"getIconsTree");function Ee(n,e,r){let s=n.icons,t=n.aliases||Object.create(null),l={};function i(o){l=Y(s[o]||t[o],l)}return c(i,"parse"),i(e),r.forEach(i),Y(n,l)}c(Ee,"internalGetIconData");function ee(n,e){if(n.icons[e])return Ee(n,e,[]);let r=Re(n,[e])[e];return r?Ee(n,e,r):null}c(ee,"getIconData");var at=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ct=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function te(n,e,r){if(e===1)return n;if(r=r||100,typeof n=="number")return Math.ceil(n*e*r)/r;if(typeof n!="string")return n;let s=n.split(at);if(s===null||!s.length)return n;let t=[],l=s.shift(),i=ct.test(l);for(;;){if(i){let o=parseFloat(l);isNaN(o)?t.push(l):t.push(Math.ceil(o*e*r)/r)}else t.push(l);if(l=s.shift(),l===void 0)return t.join("");i=!i}}c(te,"calculateSize");function pt(n,e="defs"){let r="",s=n.indexOf("<"+e);for(;s>=0;){let t=n.indexOf(">",s),l=n.indexOf("",l);if(i===-1)break;r+=n.slice(t+1,l).trim(),n=n.slice(0,s).trim()+n.slice(i+1)}return{defs:r,content:n}}c(pt,"splitSVGDefs");function ht(n,e){return n?""+n+""+e:e}c(ht,"mergeDefsAndContent");function ze(n,e,r){let s=pt(n);return ht(s.defs,e+s.content+r)}c(ze,"wrapSVGContent");var ut=c(n=>n==="unset"||n==="undefined"||n==="none","isUnsetKeyword");function ne(n,e){let r={...X,...n},s={...Ie,...e},t={left:r.left,top:r.top,width:r.width,height:r.height},l=r.body;[r,s].forEach(x=>{let b=[],A=x.hFlip,v=x.vFlip,S=x.rotate;A?v?S+=2:(b.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),b.push("scale(-1 1)"),t.top=t.left=0):v&&(b.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),b.push("scale(1 -1)"),t.top=t.left=0);let y;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:y=t.height/2+t.top,b.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:b.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:y=t.width/2+t.left,b.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}S%2===1&&(t.left!==t.top&&(y=t.left,t.left=t.top,t.top=y),t.width!==t.height&&(y=t.width,t.width=t.height,t.height=y)),b.length&&(l=ze(l,'',""))});let i=s.width,o=s.height,a=t.width,p=t.height,h,u;i===null?(u=o===null?"1em":o==="auto"?p:o,h=te(u,a/p)):(h=i==="auto"?a:i,u=o===null?te(h,p/a):o==="auto"?p:o);let f={},g=c((x,b)=>{ut(b)||(f[x]=b.toString())},"setAttr");g("width",h),g("height",u);let d=[t.left,t.top,a,p];return f.viewBox=d.join(" "),{attributes:f,viewBox:d,body:l}}c(ne,"iconToSVG");var ft=/\sid="(\S+)"/g,gt="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),dt=0;function re(n,e=gt){let r=[],s;for(;s=ft.exec(n);)r.push(s[1]);if(!r.length)return n;let t="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(l=>{let i=typeof e=="function"?e(l):e+(dt++).toString(),o=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+i+t+"$3")}),n=n.replace(new RegExp(t,"g"),""),n}c(re,"replaceIDs");function se(n,e){let r=n.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let s in e)r+=" "+s+'="'+e[s]+'"';return'"+n+""}c(se,"iconToHTML");var mt={body:'?',height:80,width:80},ie=new Map,Me=new Map,Qn=c(n=>{for(let e of n){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",e.name),"loader"in e)Me.set(e.name,e.loader);else if("icons"in e)ie.set(e.name,e.icons);else throw I.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Le=c(async(n,e)=>{let r=J(n,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${n}`);let s=r.prefix||e;if(!s)throw new Error(`Icon name must contain a prefix: ${n}`);let t=ie.get(s);if(!t){let i=Me.get(s);if(!i)throw new Error(`Icon set not found: ${r.prefix}`);try{t={...await i(),prefix:s},ie.set(s,t)}catch(o){throw I.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let l=ee(t,r.name);if(!l)throw new Error(`Icon not found: ${n}`);return l},"getRegisteredIconData"),Ae=c(async n=>{try{return await Le(n),!0}catch{return!1}},"isIconAvailable"),ve=c(async(n,e,r)=>{let s;try{s=await Le(n,e?.fallbackPrefix)}catch(i){I.error(i),s=mt}let t=ne(s,e),l=se(re(t.body),{...t.attributes,...r});return P(l,q())},"getIconSVG");function Ce(n){for(var e=[],r=1;rnull,"exec")};function k(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:c((t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(w.caret,"$1"),r=r.replace(t,i),s},"replace"),getRegex:c(()=>new RegExp(r,e),"getRegex")};return s}c(k,"h");var w={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:c(n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:c(n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:c(n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:c(n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:c(n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),"headingBeginRegex"),htmlBeginRegex:c(n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},kt=/^(?:[ \t]*(?:\n|$))+/,xt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,bt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,F=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pe=/(?:[*+-]|\d{1,9}[.)])/,qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Oe=k(qe).replace(/bull/g,pe).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(),yt=k(qe).replace(/bull/g,pe).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(),he=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,St=/^[^\n]+/,ue=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Tt=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ue).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),It=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pe).getRegex(),N="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",fe=/|$))/,$t=k("^ {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",fe).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ge=k(he).replace("hr",F).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",N).getRegex(),Rt=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ge).getRegex(),ge={blockquote:Rt,code:xt,def:Tt,fences:bt,heading:wt,hr:F,html:$t,lheading:Oe,list:It,newline:kt,paragraph:Ge,table:B,text:St},Pe=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",F).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",N).getRegex(),Et={...ge,lheading:yt,table:Pe,paragraph:k(he).replace("hr",F).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pe).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",N).getRegex()},zt={...ge,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe).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:B,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(he).replace("hr",F).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Oe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Mt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,We=/^( {2,}|\\)\n(?!\s*$)/,At=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Ne=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Dt=k(Ne,"u").replace(/punct/g,Z).getRegex(),_t=k(Ne,"u").replace(/punct/g,He).getRegex(),Ze="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Bt=k(Ze,"gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,de).replace(/punct/g,Z).getRegex(),Ft=k(Ze,"gu").replace(/notPunctSpace/g,Pt).replace(/punctSpace/g,Ct).replace(/punct/g,He).getRegex(),qt=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,de).replace(/punct/g,Z).getRegex(),Ot=k(/\\(punct)/,"gu").replace(/punct/g,Z).getRegex(),Gt=k(/^<(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(),Wt=k(fe).replace("(?:-->|$)","-->").getRegex(),Vt=k("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Wt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),W=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Ht=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",W).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ue=k(/^!?\[(label)\]\[(ref)\]/).replace("label",W).replace("ref",ue).getRegex(),Qe=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",ue).getRegex(),Nt=k("reflink|nolink(?!\\()","g").replace("reflink",Ue).replace("nolink",Qe).getRegex(),me={_backpedal:B,anyPunctuation:Ot,autolink:Gt,blockSkip:jt,br:We,code:Lt,del:B,emStrongLDelim:Dt,emStrongRDelimAst:Bt,emStrongRDelimUnd:qt,escape:Mt,link:Ht,nolink:Qe,punctuation:vt,reflink:Ue,reflinkSearch:Nt,tag:Vt,text:At,url:B},Zt={...me,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",W).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W).getRegex()},oe={...me,emStrongRDelimAst:Ft,emStrongLDelim:_t,url:k(/^((?: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\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},je=c(n=>Qt[n],"ke");function T(n,e){if(e){if(w.escapeTest.test(n))return n.replace(w.escapeReplace,je)}else if(w.escapeTestNoEncode.test(n))return n.replace(w.escapeReplaceNoEncode,je);return n}c(T,"w");function De(n){try{n=encodeURI(n).replace(w.percentDecode,"%")}catch{return null}return n}c(De,"J");function _e(n,e){let r=n.replace(w.findPipe,(l,i,o)=>{let a=!1,p=i;for(;--p>=0&&o[p]==="\\";)a=!a;return a?"|":" |"}),s=r.split(w.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length0?-2:-1}c(Kt,"ge");function Be(n,e,r,s,t){let l=e.href,i=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}c(Be,"fe");function Xt(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(` +`).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[o]=i;return o.length>=t.length?l.slice(t.length):l}).join(` +`)}c(Xt,"Je");var V=class{static{c(this,"y")}options;rules;lexer;constructor(n){this.options=n||z}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:D(r,` +`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let r=e[0],s=Xt(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let s=D(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:D(e[0],` +`)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let r=D(e[0],` +`).split(` +`),s="",t="",l=[];for(;r.length>0;){let i=!1,o=[],a;for(a=0;a1,t={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let l=this.rules.other.listItemRegex(r),i=!1;for(;n;){let a=!1,p="",h="";if(!(e=l.exec(n))||this.rules.block.hr.test(n))break;p=e[0],n=n.substring(p.length);let u=e[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),f=n.split(` +`,1)[0],g=!u.trim(),d=0;if(this.options.pedantic?(d=2,h=u.trimStart()):g?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,h=u.slice(d),d+=e[1].length),g&&this.rules.other.blankLine.test(f)&&(p+=f+` +`,n=n.substring(f.length+1),a=!0),!a){let A=this.rules.other.nextBulletRegex(d),v=this.rules.other.hrRegex(d),S=this.rules.other.fencesBeginRegex(d),y=this.rules.other.headingBeginRegex(d),it=this.rules.other.htmlBeginRegex(d);for(;n;){let U=n.split(` +`,1)[0],C;if(f=U,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),C=f):C=f.replace(this.rules.other.tabCharGlobal," "),S.test(f)||y.test(f)||it.test(f)||A.test(f)||v.test(f))break;if(C.search(this.rules.other.nonSpaceChar)>=d||!f.trim())h+=` +`+C.slice(d);else{if(g||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(u)||y.test(u)||v.test(u))break;h+=` +`+f}!g&&!f.trim()&&(g=!0),p+=U+` +`,n=n.substring(U.length+1),u=C.slice(d)}}t.loose||(i?t.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(i=!0));let x=null,b;this.options.gfm&&(x=this.rules.other.listIsTask.exec(h),x&&(b=x[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:p,task:!!x,checked:b,loose:!1,text:h,tokens:[]}),t.raw+=p}let o=t.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let a=0;au.type==="space"),h=p.length>0&&p.some(u=>this.rules.other.anyLine.test(u.raw));t.loose=h}if(t.loose)for(let a=0;a({text:o,tokens:this.lexer.inline(o),header:!1,align:l.align[a]})));return l}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let r=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=D(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=Kt(e[2],"()");if(l===-2)return;if(l>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let s=e[2],t="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],t=l[3])}else t=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),Be(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let r;if((r=this.rules.inline.reflink.exec(n))||(r=this.rules.inline.nolink.exec(n))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=e[s.toLowerCase()];if(!t){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return Be(r,t,r[0],this.lexer,this.rules)}}emStrong(n,e,r=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let t=[...s[0]].length-1,l,i,o=t,a=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*n.length+t);(s=p.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(i=[...l].length,s[3]||s[4]){o+=i;continue}else if((s[5]||s[6])&&t%3&&!((t+i)%3)){a+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+a);let h=[...s[0]][0].length,u=n.slice(0,t+s.index+h+i);if(Math.min(t,i)%2){let g=u.slice(1,-1);return{type:"em",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}let f=u.slice(2,-2);return{type:"strong",raw:u,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),t=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&t&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let r,s;return e[2]==="@"?(r=e[1],s="mailto:"+r):(r=e[1],s=r),{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let r,s;if(e[2]==="@")r=e[0],s="mailto:"+r;else{let t;do t=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(t!==e[0]);r=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},$=class le{static{c(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||z,this.options.tokenizer=this.options.tokenizer||new V,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:w,block:G.normal,inline:j.normal};this.options.pedantic?(r.block=G.pedantic,r.inline=j.pedantic):this.options.gfm&&(r.block=G.gfm,this.options.breaks?r.inline=j.breaks:r.inline=j.gfm),this.tokenizer.rules=r}static get rules(){return{block:G,inline:j}}static lex(e,r){return new le(r).lex(e)}static lexInline(e,r){return new le(r).inlineTokens(e)}lex(e){e=e.replace(w.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let r=0;r(t=i.call({lexer:this},e,r))?(e=e.substring(t.raw.length),r.push(t),!0):!1))continue;if(t=this.tokenizer.space(e)){e=e.substring(t.raw.length);let i=r.at(-1);t.raw.length===1&&i!==void 0?i.raw+=` +`:r.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+t.raw,i.text+=` +`+t.text,this.inlineQueue.at(-1).src=i.text):r.push(t);continue}if(t=this.tokenizer.fences(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.heading(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.hr(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.blockquote(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.list(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.html(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.def(e)){e=e.substring(t.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+t.raw,i.text+=` +`+t.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},r.push(t));continue}if(t=this.tokenizer.table(e)){e=e.substring(t.raw.length),r.push(t);continue}if(t=this.tokenizer.lheading(e)){e=e.substring(t.raw.length),r.push(t);continue}let l=e;if(this.options.extensions?.startBlock){let i=1/0,o=e.slice(1),a;this.options.extensions.startBlock.forEach(p=>{a=p.call({lexer:this},o),typeof a=="number"&&a>=0&&(i=Math.min(i,a))}),i<1/0&&i>=0&&(l=e.substring(0,i+1))}if(this.state.top&&(t=this.tokenizer.paragraph(l))){let i=r.at(-1);s&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+t.raw,i.text+=` +`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(t),s=l.length!==e.length,e=e.substring(t.raw.length);continue}if(t=this.tokenizer.text(e)){e=e.substring(t.raw.length);let i=r.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(` +`)?"":` +`)+t.raw,i.text+=` +`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):r.push(t);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let s=e,t=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)o.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,t.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(t=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let l=!1,i="";for(;e;){l||(i=""),l=!1;let o;if(this.options.extensions?.inline?.some(p=>(o=p.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let p=r.at(-1);o.type==="text"&&p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,s,i)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let a=e;if(this.options.extensions?.startInline){let p=1/0,h=e.slice(1),u;this.options.extensions.startInline.forEach(f=>{u=f.call({lexer:this},h),typeof u=="number"&&u>=0&&(p=Math.min(p,u))}),p<1/0&&p>=0&&(a=e.substring(0,p+1))}if(o=this.tokenizer.inlineText(a)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(i=o.raw.slice(-1)),l=!0;let p=r.at(-1);p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):r.push(o);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},H=class{static{c(this,"P")}options;parser;constructor(n){this.options=n||z}space(n){return""}code({text:n,lang:e,escaped:r}){let s=(e||"").match(w.notSpaceStart)?.[0],t=n.replace(w.endingNewline,"")+` +`;return s?'
'+(r?t:T(t,!0))+`
+`:"
"+(r?t:T(t,!0))+`
+`}blockquote({tokens:n}){return`
+${this.parser.parse(n)}
+`}html({text:n}){return n}def(n){return""}heading({tokens:n,depth:e}){return`${this.parser.parseInline(n)} +`}hr(n){return`
+`}list(n){let e=n.ordered,r=n.start,s="";for(let i=0;i +`+s+" +`}listitem(n){let e="";if(n.task){let r=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=r+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=r+" "+T(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(n.tokens,!!n.loose),`
  • ${e}
  • +`}checkbox({checked:n}){return"'}paragraph({tokens:n}){return`

    ${this.parser.parseInline(n)}

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

    An error occurred:

    "+T(r.message+"",!0)+"
    ";return e?Promise.resolve(s):s}if(e)return Promise.reject(r);throw r}}},E=new Jt;function m(n,e){return E.parse(n,e)}c(m,"d");m.options=m.setOptions=function(n){return E.setOptions(n),m.defaults=E.defaults,Fe(m.defaults),m};m.getDefaults=ce;m.defaults=z;m.use=function(...n){return E.use(...n),m.defaults=E.defaults,Fe(m.defaults),m};m.walkTokens=function(n,e){return E.walkTokens(n,e)};m.parseInline=E.parseInline;m.Parser=R;m.parser=R.parse;m.Renderer=H;m.TextRenderer=ke;m.Lexer=$;m.lexer=$.lex;m.Tokenizer=V;m.Hooks=_;m.parse=m;var er=m.options,tr=m.setOptions,nr=m.use,rr=m.walkTokens,sr=m.parseInline;var ir=R.parse,or=$.lex;function Yt(n,{markdownAutoWrap:e}){let s=n.replace(//g,` +`).replace(/\n{2,}/g,` +`);return Ce(s)}c(Yt,"preprocessMarkdown");function Ke(n){return n.split(/\\n|\n|/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}c(Ke,"nonMarkdownToLines");function Xe(n,e={}){let r=Yt(n,e),s=m.lexer(r),t=[[]],l=0;function i(o,a="normal"){o.type==="text"?o.text.split(` +`).forEach((h,u)=>{u!==0&&(l++,t.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&t[l].push({content:f,type:a})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(p=>{i(p,o.type)}):o.type==="html"&&t[l].push({content:o.text,type:"normal"})}return c(i,"processNode"),s.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(a=>{i(a)}):o.type==="html"?t[l].push({content:o.text,type:"normal"}):t[l].push({content:o.raw,type:"normal"})}),t}c(Xe,"markdownToLines");function Je(n){return n?`

    ${n.replace(/\\n|\n/g,"
    ")}

    `:""}c(Je,"nonMarkdownToHTML");function Ye(n,{markdownAutoWrap:e}={}){let r=m.lexer(n);function s(t){return t.type==="text"?e===!1?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):t.type==="strong"?`${t.tokens?.map(s).join("")}`:t.type==="em"?`${t.tokens?.map(s).join("")}`:t.type==="paragraph"?`

    ${t.tokens?.map(s).join("")}

    `:t.type==="space"?"":t.type==="html"?`${t.text}`:t.type==="escape"?t.text:(I.warn(`Unsupported markdown: ${t.type}`),t.raw)}return c(s,"output"),r.map(s).join("")}c(Ye,"markdownToHTML");function en(n){return Intl.Segmenter?[...new Intl.Segmenter().segment(n)].map(e=>e.segment):[...n]}c(en,"splitTextToChars");function tn(n,e){let r=en(e.content);return et(n,[],r,e.type)}c(tn,"splitWordToFitWidth");function et(n,e,r,s){if(r.length===0)return[{content:e.join(""),type:s},{content:"",type:s}];let[t,...l]=r,i=[...e,t];return n([{content:i.join(""),type:s}])?et(n,i,l,s):(e.length===0&&t&&(e.push(t),r.shift()),[{content:e.join(""),type:s},{content:r.join(""),type:s}])}c(et,"splitWordToFitWidthRecursion");function tt(n,e){if(n.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return xe(n,e)}c(tt,"splitLineToFitWidth");function xe(n,e,r=[],s=[]){if(n.length===0)return s.length>0&&r.push(s),r.length>0?r:[];let t="";n[0].content===" "&&(t=" ",n.shift());let l=n.shift()??{content:" ",type:"normal"},i=[...s];if(t!==""&&i.push({content:t,type:"normal"}),i.push(l),e(i))return xe(n,e,r,i);if(s.length>0)r.push(s),n.unshift(l);else if(l.content){let[o,a]=tn(e,l);r.push([o]),a.content&&n.unshift(a)}return xe(n,e,r)}c(xe,"splitLineToFitWidthRecursion");function nt(n,e){e&&n.attr("style",e)}c(nt,"applyStyle");var rt=16384;async function nn(n,e,r,s,t=!1,l=q()){let i=n.append("foreignObject");i.attr("width",`${Math.min(10*r,rt)}px`),i.attr("height",`${Math.min(10*r,rt)}px`);let o=i.append("xhtml:div"),a=Q(e.label)?await ye(e.label.replace(Se.lineBreakRegex,` +`),l):P(e.label,l),p=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(a),nt(h,e.labelStyle),h.attr("class",`${p} ${s}`),nt(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),t&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),i.node()}c(nn,"addHtmlSpan");function be(n,e,r,s=!1){let t=n.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return s&&t.attr("text-anchor","middle"),t}c(be,"createTspan");function rn(n,e,r){let s=n.append("text"),t=be(s,1,e);we(t,r);let l=t.node().getComputedTextLength();return s.remove(),l}c(rn,"computeWidthOfText");function Mr(n,e,r){let s=n.append("text"),t=be(s,1,e);we(t,[{content:r,type:"normal"}]);let l=t.node()?.getBoundingClientRect();return l&&s.remove(),l}c(Mr,"computeDimensionOfText");function sn(n,e,r,s=!1,t=!1){let i=e.append("g"),o=i.insert("rect").attr("class","background").attr("style","stroke: none"),a=i.append("text").attr("y","-10.1");t&&a.attr("text-anchor","middle");let p=0;for(let h of r){let u=c(g=>rn(i,1.1,g)<=n,"checkWidth"),f=u(h)?[h]:tt(h,u);for(let g of f){let d=be(a,p,1.1,t);we(d,g),p++}}if(s){let h=a.node().getBBox(),u=2;return o.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),i.node()}else return a.node()}c(sn,"createFormattedText");function st(n){let e=/&(amp|lt|gt);/g;return n.replace(e,(r,s)=>{switch(s){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}c(st,"decodeHTMLEntities");function we(n,e){n.text(""),e.forEach((r,s)=>{let t=n.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");s===0?t.text(st(r.content)):t.text(" "+st(r.content))})}c(we,"updateTextContentAndStyles");async function on(n,e={}){let r=[];n.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,l,i)=>(r.push((async()=>{let o=`${l}:${i}`;return await Ae(o)?await ve(o,void 0,{class:"label-icon"}):``})()),t));let s=await Promise.all(r);return n.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>s.shift()??"")}c(on,"replaceIconSubstring");var Lr=c(async(n,e="",{style:r="",isTitle:s=!1,classes:t="",useHtmlLabels:l=!0,markdown:i=!0,isNode:o=!0,width:a=200,addSvgBackground:p=!1}={},h)=>{if(I.debug("XYZ createText",e,r,s,t,l,o,"addSvgBackground: ",p),l){let u=i?Ye(e,h):Je(e),f=await on(K(u),h),g=e.replace(/\\\\/g,"\\"),d={isNode:o,label:Q(e)?g:f,labelStyle:r.replace("fill:","color:")};return await nn(n,d,a,t,p,h)}else{let u=K(e.replace(//g,"
    ")),f=i?Xe(u.replace("
    ","
    "),h):Ke(u),g=sn(a,n,f,e?p:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");M(g).attr("style",d)}else{let d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");M(g).select("rect").attr("style",d.replace(/background:/g,"fill:"));let x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");M(g).select("text").attr("style",x)}return s?M(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):M(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");export{mt as a,Qn as b,ve as c,Ce as d,Mr as e,Lr as f}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-J5EP6P6S.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-J5EP6P6S.mjs new file mode 100644 index 00000000000..545e6935a4b --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-J5EP6P6S.mjs @@ -0,0 +1 @@ +import{a as e,b as o,c as n,d as a,e as u,g as d,j as l,s,t as G}from"./chunk-4R4BOZG6.mjs";import{a as t}from"./chunk-AQ6EADP3.mjs";var p=class extends G{static{t(this,"GitGraphTokenBuilder")}static{e(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},h={parser:{TokenBuilder:e(()=>new p,"TokenBuilder"),ValueConverter:e(()=>new s,"ValueConverter")}};function m(c=u){let r=a(n(c),d),i=a(o({shared:r}),l,h);return r.ServiceRegistry.register(i),{shared:r,GitGraph:i}}t(m,"createGitGraphServices");e(m,"createGitGraphServices");export{h as a,m as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-JQRUD6KW.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-JQRUD6KW.mjs new file mode 100644 index 00000000000..d3a0cd6fdd0 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-JQRUD6KW.mjs @@ -0,0 +1 @@ +import{a as r}from"./chunk-AQ6EADP3.mjs";function c(i,e){i.accDescr&&e.setAccDescription?.(i.accDescr),i.accTitle&&e.setAccTitle?.(i.accTitle),i.title&&e.setDiagramTitle?.(i.title)}r(c,"populateCommonDb");export{c as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGFNY3KK.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGFNY3KK.mjs new file mode 100644 index 00000000000..88fd84b7d53 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGFNY3KK.mjs @@ -0,0 +1,62 @@ +import{a as D}from"./chunk-5IMINLNL.mjs";import{a as Ut,b as yt,d as v,e as P}from"./chunk-T2UQINTJ.mjs";import{a as zt,b as It}from"./chunk-UY5QBCOK.mjs";import{c as dt,f as rt}from"./chunk-INKRHTLW.mjs";import{k as wt,r as Nt,t as q}from"./chunk-QA3QBVWF.mjs";import{A as Vt,C as Lt,D as qt,_ as Z,ba as Rt,n as lt,t as ft,x as tt}from"./chunk-67TQ5CYL.mjs";import{b as Y,h as J}from"./chunk-7W6UQGC5.mjs";import{a as x}from"./chunk-AQ6EADP3.mjs";var G=x(async(d,t,c)=>{let h,a=t.useHtmlLabels||lt(Z()?.htmlLabels);c?h=c:h="node default";let o=d.insert("g").attr("class",h).attr("id",t.domId||t.id),f=o.insert("g").attr("class","label").attr("style",q(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,r=t.labelType==="markdown",e=await rt(f,Vt(Nt(i),Z()),{useHtmlLabels:a,width:t.width||Z().flowchart?.wrappingWidth,classes:r?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:r},Z()),s=e.getBBox(),p=(t?.padding??0)/2;if(a){let l=e.children[0],m=J(e);await zt(l,i),s=l.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return a?f.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):f.attr("transform","translate(0, "+-s.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:o,bbox:s,halfPadding:p,label:f}},"labelHelper"),Gt=x(async(d,t,c)=>{let h=c.useHtmlLabels??tt(Z()),a=d.insert("g").attr("class","label").attr("style",c.labelStyle||""),o=await rt(a,Vt(Nt(t),Z()),{useHtmlLabels:h,width:c.width||Z()?.flowchart?.wrappingWidth,style:c.labelStyle,addSvgBackground:!!c.icon||!!c.img}),f=o.getBBox(),i=c.padding/2;if(tt(Z())){let n=o.children[0],r=J(o);f=n.getBoundingClientRect(),r.attr("width",f.width),r.attr("height",f.height)}return h?a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):a.attr("transform","translate(0, "+-f.height/2+")"),c.centerLabel&&a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:d,bbox:f,halfPadding:i,label:a}},"insertLabel"),k=x((d,t)=>{let c=t.node().getBBox();d.width=c.width,d.height=c.height},"updateNodeBounds");var T=x((d,t)=>(d.look==="handDrawn"?"rough-node":"node")+" "+d.cssClasses+" "+(t||""),"getNodeClasses");function I(d){let t=d.map((c,h)=>`${h===0?"M":"L"}${c.x},${c.y}`);return t.push("Z"),t.join(" ")}x(I,"createPathFromPoints");function at(d,t,c,h,a,o){let f=[],n=c-d,r=h-t,e=n/o,s=2*Math.PI/e,p=t+r/2;for(let l=0;l<=50;l++){let m=l/50,g=d+m*n,u=p+a*Math.sin(s*(g-d));f.push({x:g,y:u})}return f}x(at,"generateFullSineWavePoints");function $t(d,t,c,h,a,o){let f=[],i=a*Math.PI/180,e=(o*Math.PI/180-i)/(h-1);for(let s=0;sn.tagName==="path"),c=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");c.setAttribute("d",h);let a=t.find(n=>n.getAttribute("fill")!=="none"),o=t.find(n=>n.getAttribute("stroke")!=="none"),f=x((n,r)=>n?.getAttribute(r)??void 0,"getAttr");if(a){let n={fill:f(a,"fill"),"fill-opacity":f(a,"fill-opacity")??"1"};Object.entries(n).forEach(([r,e])=>{e&&c.setAttribute(r,e)})}if(o){let n={stroke:f(o,"stroke"),"stroke-width":f(o,"stroke-width")??"1","stroke-opacity":f(o,"stroke-opacity")??"1"};Object.entries(n).forEach(([r,e])=>{e&&c.setAttribute(r,e)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(c),i}x(Wt,"mergePaths");var Ps=x((d,t)=>{var c=d.x,h=d.y,a=t.x-c,o=t.y-h,f=d.width/2,i=d.height/2,n,r;return Math.abs(o)*f>Math.abs(a)*i?(o<0&&(i=-i),n=o===0?0:i*a/o,r=i):(a<0&&(f=-f),n=f,r=a===0?0:f*o/a),{x:c+n,y:h+r}},"intersectRect"),ut=Ps;var vs=x(async(d,t,c,h=!1,a=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);let f=Z(),i=tt(f);return await rt(d,o,{style:c,isTitle:h,useHtmlLabels:i,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},f)},"createLabel"),vt=vs;var it=x((d,t,c,h,a)=>["M",d+a,t,"H",d+c-a,"A",a,a,0,0,1,d+c,t+a,"V",t+h-a,"A",a,a,0,0,1,d+c-a,t+h,"H",d+a,"A",a,a,0,0,1,d,t+h-a,"V",t+a,"A",a,a,0,0,1,d+a,t,"Z"].join(" "),"createRoundedRectPathD");var Zt=x(async(d,t)=>{Y.info("Creating subgraph rect for ",t.id,t);let c=Z(),{themeVariables:h,handDrawnSeed:a}=c,{clusterBkg:o,clusterBorder:f}=h,{labelStyles:i,nodeStyles:n,borderStyles:r,backgroundStyles:e}=v(t),s=d.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=tt(c),l=s.insert("g").attr("class","cluster-label "),m;t.labelType==="markdown"?m=await rt(l,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await vt(l,t.label,t.labelStyle||"",!1,!0);let g=m.getBBox();if(tt(c)){let C=m.children[0],R=J(m);g=C.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}let u=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(u-t.width)/2-t.padding:t.diff=-t.padding;let y=t.height,b=t.x-u/2,S=t.y-y/2;Y.trace("Data ",t,JSON.stringify(t));let N;if(t.look==="handDrawn"){let C=D.svg(s),R=P(t,{roughness:.7,fill:o,stroke:f,fillWeight:3,seed:a}),M=C.path(it(b,S,u,y,0),R);N=s.insert(()=>(Y.debug("Rough node insert CXC",M),M),":first-child"),N.select("path:nth-child(2)").attr("style",r.join(";")),N.select("path").attr("style",e.join(";").replace("fill","stroke"))}else N=s.insert("rect",":first-child"),N.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",u).attr("height",y);let{subGraphTitleTopMargin:w}=It(c);if(l.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),i){let C=l.select("span");C&&C.attr("style",i)}let B=N.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(C){return ut(t,C)},{cluster:s,labelBBox:g}},"rect"),ks=x((d,t)=>{let c=d.insert("g").attr("class","note-cluster").attr("id",t.domId),h=c.insert("rect",":first-child"),a=0*t.padding,o=a/2;h.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");let f=h.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(i){return ut(t,i)},{cluster:c,labelBBox:{width:0,height:0}}},"noteGroup"),Bs=x(async(d,t)=>{let c=Z(),{themeVariables:h,handDrawnSeed:a}=c,{altBackground:o,compositeBackground:f,compositeTitleBackground:i,nodeBorder:n}=h,r=d.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),e=r.insert("g",":first-child"),s=r.insert("g").attr("class","cluster-label"),p=r.append("rect"),l=await vt(s,t.label,t.labelStyle,void 0,!0),m=l.getBBox();if(tt(c)){let M=l.children[0],E=J(l);m=M.getBoundingClientRect(),E.attr("width",m.width),E.attr("height",m.height)}let g=0*t.padding,u=g/2,y=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height+g,S=t.height+g-m.height-6,N=t.x-y/2,w=t.y-b/2;t.width=y;let B=t.y-t.height/2-u+m.height+2,C;if(t.look==="handDrawn"){let M=t.cssClasses.includes("statediagram-cluster-alt"),E=D.svg(r),H=t.rx||t.ry?E.path(it(N,w,y,b,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:a}):E.rectangle(N,w,y,b,{seed:a});C=r.insert(()=>H,":first-child");let W=E.rectangle(N,B,y,S,{fill:M?o:f,fillStyle:M?"hachure":"solid",stroke:n,seed:a});C=r.insert(()=>H,":first-child"),p=r.insert(()=>W)}else C=e.insert("rect",":first-child"),C.attr("class","outer").attr("x",N).attr("y",w).attr("width",y).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",N).attr("y",B).attr("width",y).attr("height",S);s.attr("transform",`translate(${t.x-m.width/2}, ${w+1-(tt(c)?0:3)})`);let R=C.node().getBBox();return t.height=R.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(M){return ut(t,M)},{cluster:r,labelBBox:m}},"roundedWithTitle"),Ts=x(async(d,t)=>{Y.info("Creating subgraph rect for ",t.id,t);let c=Z(),{themeVariables:h,handDrawnSeed:a}=c,{clusterBkg:o,clusterBorder:f}=h,{labelStyles:i,nodeStyles:n,borderStyles:r,backgroundStyles:e}=v(t),s=d.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=tt(c),l=s.insert("g").attr("class","cluster-label "),m=await rt(l,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),g=m.getBBox();if(tt(c)){let C=m.children[0],R=J(m);g=C.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}let u=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(u-t.width)/2-t.padding:t.diff=-t.padding;let y=t.height,b=t.x-u/2,S=t.y-y/2;Y.trace("Data ",t,JSON.stringify(t));let N;if(t.look==="handDrawn"){let C=D.svg(s),R=P(t,{roughness:.7,fill:o,stroke:f,fillWeight:4,seed:a}),M=C.path(it(b,S,u,y,t.rx),R);N=s.insert(()=>(Y.debug("Rough node insert CXC",M),M),":first-child"),N.select("path:nth-child(2)").attr("style",r.join(";")),N.select("path").attr("style",e.join(";").replace("fill","stroke"))}else N=s.insert("rect",":first-child"),N.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",u).attr("height",y);let{subGraphTitleTopMargin:w}=It(c);if(l.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),i){let C=l.select("span");C&&C.attr("style",i)}let B=N.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=g.height-t.padding/2,t.intersect=function(C){return ut(t,C)},{cluster:s,labelBBox:g}},"kanbanSection"),Cs=x((d,t)=>{let c=Z(),{themeVariables:h,handDrawnSeed:a}=c,{nodeBorder:o}=h,f=d.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),i=f.insert("g",":first-child"),n=0*t.padding,r=t.width+n;t.diff=-t.padding;let e=t.height+n,s=t.x-r/2,p=t.y-e/2;t.width=r;let l;if(t.look==="handDrawn"){let u=D.svg(f).rectangle(s,p,r,e,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});l=f.insert(()=>u,":first-child")}else{l=i.insert("rect",":first-child");let g="outer";t.look,g="divider",l.attr("class",g).attr("x",s).attr("y",p).attr("width",r).attr("height",e).attr("data-look",t.look)}let m=l.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return ut(t,g)},{cluster:f,labelBBox:{}}},"divider"),Rs=Zt,Gs={rect:Zt,squareRect:Rs,roundedWithTitle:Bs,noteGroup:ks,divider:Cs,kanbanSection:Ts},Jt=new Map,Rr=x(async(d,t)=>{let c=t.shape||"rect",h=await Gs[c](d,t);return Jt.set(t.id,h),h},"insertCluster");var Gr=x(()=>{Jt=new Map},"clear");function Ms(d,t){return d.intersect(t)}x(Ms,"intersectNode");var Kt=Ms;function Es(d,t,c,h){var a=d.x,o=d.y,f=a-h.x,i=o-h.y,n=Math.sqrt(t*t*i*i+c*c*f*f),r=Math.abs(t*c*f/n);h.x0}x(te,"sameSign");var ee=js;function As(d,t,c){let h=d.x,a=d.y,o=[],f=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(e){f=Math.min(f,e.x),i=Math.min(i,e.y)}):(f=Math.min(f,t.x),i=Math.min(i,t.y));let n=h-d.width/2-f,r=a-d.height/2-i;for(let e=0;e1&&o.sort(function(e,s){let p=e.x-c.x,l=e.y-c.y,m=Math.sqrt(p*p+l*l),g=s.x-c.x,u=s.y-c.y,y=Math.sqrt(g*g+u*u);return me,":first-child");return s.attr("class","anchor").attr("style",q(i)),k(t,s),t.intersect=function(p){return Y.info("Circle intersect",t,f,p),$.circle(t,f,p)},o}x(re,"anchor");function ie(d,t,c,h,a,o,f){let n=(d+c)/2,r=(t+h)/2,e=Math.atan2(h-t,c-d),s=(c-d)/2,p=(h-t)/2,l=s/a,m=p/o,g=Math.sqrt(l**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");let u=Math.sqrt(1-g**2),y=n+u*o*Math.sin(e)*(f?-1:1),b=r-u*a*Math.cos(e)*(f?-1:1),S=Math.atan2((t-b)/o,(d-y)/a),w=Math.atan2((h-b)/o,(c-y)/a)-S;f&&w<0&&(w+=2*Math.PI),!f&&w>0&&(w-=2*Math.PI);let B=[];for(let C=0;C<20;C++){let R=C/19,M=S+R*w,E=y+a*Math.cos(M),H=b+o*Math.sin(M);B.push({x:E,y:H})}return B}x(ie,"generateArcPoints");function Os(d,t,c){let[h,a]=[t,c].sort((o,f)=>f-o);return a*(1-Math.sqrt(1-(d/h/2)**2))}x(Os,"calculateArcSagitta");async function oe(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a,i=x(M=>M+f,"calcTotalHeight"),n=x(M=>{let E=M/2;return[E/(2.5+M/50),E]},"calcEllipseRadius"),{shapeSvg:r,bbox:e}=await G(d,t,T(t)),s=i(t?.height?t?.height:e.height),[p,l]=n(s),m=Os(s,p,l),u=(t?.width?t?.width:e.width)+o*2+m-m,y=s,{cssStyles:b}=t,S=[{x:u/2,y:-y/2},{x:-u/2,y:-y/2},...ie(-u/2,-y/2,-u/2,y/2,p,l,!1),{x:u/2,y:y/2},...ie(u/2,y/2,u/2,-y/2,p,l,!0)],N=D.svg(r),w=P(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let B=I(S),C=N.path(B,w),R=r.insert(()=>C,":first-child");return R.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",b),h&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",h),R.attr("transform",`translate(${p/2}, 0)`),k(t,R),t.intersect=function(M){return $.polygon(t,S,M)},r}x(oe,"bowTieRect");function et(d,t,c,h){return d.insert("polygon",":first-child").attr("points",h.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+c/2+")")}x(et,"insertPolygonShape");var Et=12;async function ae(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?28:a,f=t.look==="neo"?24:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.width??n.width)+(t.look==="neo"?o*2:o+Et),e=(t?.height??n.height)+(t.look==="neo"?f*2:f),s=0,p=r,l=-e,m=0,g=[{x:s+Et,y:l},{x:p,y:l},{x:p,y:m},{x:s,y:m},{x:s,y:l+Et},{x:s+Et,y:l}],u,{cssStyles:y}=t;if(t.look==="handDrawn"){let b=D.svg(i),S=P(t,{}),N=I(g),w=b.path(N,S);u=i.insert(()=>w,":first-child").attr("transform",`translate(${-r/2}, ${e/2})`),y&&u.attr("style",y)}else u=et(i,r,e,g);return h&&u.attr("style",h),k(t,u),t.intersect=function(b){return $.polygon(t,g,b)},i}x(ae,"card");function ne(d,t){let{nodeStyles:c}=v(t);t.label="";let h=d.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(28,t.width??0),f=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],i=D.svg(h),n=P(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let r=I(f),e=i.path(r,n),s=h.insert(()=>e,":first-child");return a&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",a),c&&t.look!=="handDrawn"&&s.selectAll("path").attr("style",c),t.width=28,t.height=28,t.intersect=function(p){return $.polygon(t,f,p)},h}x(ne,"choice");async function Ht(d,t,c){let{labelStyles:h,nodeStyles:a}=v(t);t.labelStyle=h;let{shapeSvg:o,bbox:f,halfPadding:i}=await G(d,t,T(t)),n=16,r=c?.padding??i,e=t.look==="neo"?f.width/2+n*2:f.width/2+r,s,{cssStyles:p}=t;if(t.look==="handDrawn"){let l=D.svg(o),m=P(t,{}),g=l.circle(0,0,e*2,m);s=o.insert(()=>g,":first-child"),s.attr("class","basic label-container").attr("style",q(p))}else s=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",e).attr("cx",0).attr("cy",0);return k(t,s),t.calcIntersect=function(l,m){let g=l.width/2;return $.circle(l,g,m)},t.intersect=function(l){return Y.info("Circle intersect",t,e,l),$.circle(t,e,l)},o}x(Ht,"circle");function Vs(d){let t=Math.cos(Math.PI/4),c=Math.sin(Math.PI/4),h=d*2,a={x:h/2*t,y:h/2*c},o={x:-(h/2)*t,y:h/2*c},f={x:-(h/2)*t,y:-(h/2)*c},i={x:h/2*t,y:-(h/2)*c};return`M ${o.x},${o.y} L ${i.x},${i.y} + M ${a.x},${a.y} L ${f.x},${f.y}`}x(Vs,"createLine");function le(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c,t.label="";let a=d.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:f}=t,i=D.svg(a),n=P(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let r=i.circle(0,0,o*2,n),e=Vs(o),s=i.path(e,n),p=a.insert(()=>r,":first-child");return p.insert(()=>s),p.attr("class","outer-path"),f&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",h),k(t,p),t.intersect=function(l){return Y.info("crossedCircle intersect",t,{radius:o,point:l}),$.circle(t,o,l)},a}x(le,"crossedCircle");function xt(d,t,c,h=100,a=0,o=180){let f=[],i=a*Math.PI/180,e=(o*Math.PI/180-i)/(h-1);for(let s=0;sw,":first-child").attr("stroke-opacity",0),B.insert(()=>S,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",h),B.attr("transform",`translate(${s}, 0)`),f.attr("transform",`translate(${-r/2+s-(o.x-(o.left??0))},${-e/2+(t.padding??0)/2-(o.y-(o.top??0))})`),k(t,B),t.intersect=function(C){return $.polygon(t,m,C)},a}x(ce,"curlyBraceLeft");function bt(d,t,c,h=100,a=0,o=180){let f=[],i=a*Math.PI/180,e=(o*Math.PI/180-i)/(h-1);for(let s=0;sw,":first-child").attr("stroke-opacity",0),B.insert(()=>S,":first-child"),B.attr("class","text"),p&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",h),B.attr("transform",`translate(${-s}, 0)`),f.attr("transform",`translate(${-r/2+(t.padding??0)/2-(o.x-(o.left??0))},${-e/2+(t.padding??0)/2-(o.y-(o.top??0))})`),k(t,B),t.intersect=function(C){return $.polygon(t,m,C)},a}x(he,"curlyBraceRight");function st(d,t,c,h=100,a=0,o=180){let f=[],i=a*Math.PI/180,e=(o*Math.PI/180-i)/(h-1);for(let s=0;sM,":first-child").attr("stroke-opacity",0),E.insert(()=>N,":first-child"),E.insert(()=>C,":first-child"),E.attr("class","text"),p&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",h),E.attr("transform",`translate(${s-s/4}, 0)`),f.attr("transform",`translate(${-r/2+(t.padding??0)/2-(o.x-(o.left??0))},${-e/2+(t.padding??0)/2-(o.y-(o.top??0))})`),k(t,E),t.intersect=function(H){return $.polygon(t,g,H)},a}x(pe,"curlyBraces");async function me(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a,i=20,n=5,{shapeSvg:r,bbox:e}=await G(d,t,T(t)),s=Math.max(i,(e.width+o*2)*1.25,t?.width??0),p=Math.max(n,e.height+f*2,t?.height??0),l=p/2,{cssStyles:m}=t,g=D.svg(r),u=P(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=s,b=p,S=y-l,N=b/4,w=[{x:S,y:0},{x:N,y:0},{x:0,y:b/2},{x:N,y:b},{x:S,y:b},...$t(-S,-b/2,l,50,270,90)],B=I(w),C=g.path(B,u),R=r.insert(()=>C,":first-child");return R.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",m),h&&t.look!=="handDrawn"&&R.selectChildren("path").attr("style",h),R.attr("transform",`translate(${-s/2}, ${-p/2})`),k(t,R),t.intersect=function(M){return $.polygon(t,w,M)},r}x(me,"curvedTrapezoid");var Ls=x((d,t,c,h,a,o)=>[`M${d},${t+o}`,`a${a},${o} 0,0,0 ${c},0`,`a${a},${o} 0,0,0 ${-c},0`,`l0,${h}`,`a${a},${o} 0,0,0 ${c},0`,`l0,${-h}`].join(" "),"createCylinderPathD"),Is=x((d,t,c,h,a,o)=>[`M${d},${t+o}`,`M${d+c},${t+o}`,`a${a},${o} 0,0,0 ${-c},0`,`l0,${h}`,`a${a},${o} 0,0,0 ${c},0`,`l0,${-h}`].join(" "),"createOuterCylinderPathD"),Ws=x((d,t,c,h,a,o)=>[`M${d-c/2},${-h/2}`,`a${a},${o} 0,0,0 ${c},0`].join(" "),"createInnerCylinderPathD"),ge=8,fe=8;async function de(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?24:a,f=t.look==="neo"?24:a;if(t.width||t.height){let u=t.width??0;t.width=(t.width??0)-f,t.widthw,":first-child"),m=i.insert(()=>N,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{let u=Ls(0,0,e,l,s,p);m=i.insert("path",":first-child").attr("d",u).attr("class","basic label-container outer-path").attr("style",q(g)).attr("style",h)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-e/2}, ${-(l/2+p)})`),k(t,m),r.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(u){let y=$.rect(t,u),b=y.x-(t.x??0);if(s!=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-p)){let S=p*p*(1-b*b/(s*s));S>0&&(S=Math.sqrt(S)),S=p-S,u.y-(t.y??0)>0&&(S=-S),y.y+=S}return y},i}x(de,"cylinder");async function ct(d,t,c){let{labelStyles:h,nodeStyles:a}=v(t);t.labelStyle=h;let{shapeSvg:o,bbox:f}=await G(d,t,T(t)),i=Math.max(f.width+c.labelPaddingX*2,t?.width||0),n=Math.max(f.height+c.labelPaddingY*2,t?.height||0),r=-i/2,e=-n/2,s,{rx:p,ry:l}=t,{cssStyles:m}=t;if(c?.rx&&c.ry&&(p=c.rx,l=c.ry),t.look==="handDrawn"){let g=D.svg(o),u=P(t,{}),y=p||l?g.path(it(r,e,i,n,p||0),u):g.rectangle(r,e,i,n,u);s=o.insert(()=>y,":first-child"),s.attr("class","basic label-container").attr("style",q(m))}else s=o.insert("rect",":first-child"),s.attr("class","basic label-container").attr("style",a).attr("rx",q(p)).attr("ry",q(l)).attr("x",r).attr("y",e).attr("width",i).attr("height",n);return k(t,s),t.calcIntersect=function(g,u){return $.rect(g,u)},t.intersect=function(g){return $.rect(t,g)},o}x(ct,"drawRect");async function ye(d,t){let{cssClasses:c,labelPaddingX:h,labelPaddingY:a,padding:o,width:f,height:i}=t,n={rx:0,ry:0,classes:c??"",labelPaddingX:h??(o??0)*2,labelPaddingY:a??o??0},r=await ct(d,t,n);if(t.look==="handDrawn"){let l=D.svg(r),m=P(t,{}),g=r.select(".basic.label-container > path:nth-child(2)"),u=g.node();if(!u)return r;let y=null;if(u instanceof SVGGraphicsElement)y=u.getBBox();else return r;return r.insert(()=>l.line(y.x,y.y,y.x+y.width,y.y,m),".basic.label-container g.label"),r.insert(()=>l.line(y.x,y.y+y.height,y.x+y.width,y.y+y.height,m),".basic.label-container g.label"),g.remove(),r}let e=r.select(".basic.label-container"),s=(Number(e.attr("width"))||f)??0,p=(Number(e.attr("height"))||i)??0;return s>0&&p>0&&e.attr("stroke-dasharray",`${s} ${p}`),r}x(ye,"datastore");async function ue(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await G(d,t,T(t)),r=i.width+a,e=i.height+o,s=e*.2,p=-r/2,l=-e/2-s/2,{cssStyles:m}=t,g=D.svg(f),u=P(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=[{x:p,y:l+s},{x:-p,y:l+s},{x:-p,y:-l},{x:p,y:-l},{x:p,y:l},{x:-p,y:l},{x:-p,y:l+s}],b=g.polygon(y.map(N=>[N.x,N.y]),u),S=f.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n.attr("transform",`translate(${p+(t.padding??0)/2-(i.x-(i.left??0))}, ${l+s+(t.padding??0)/2-(i.y-(i.top??0))})`),k(t,S),t.intersect=function(N){return $.rect(t,N)},f}x(ue,"dividedRectangle");async function xe(d,t){let{labelStyles:c,nodeStyles:h}=v(t),a=t.look==="neo"?12:5;t.labelStyle=c;let o=t.padding??0,f=t.look==="neo"?16:o,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.width?t?.width/2:n.width/2)+(f??0),e=r-a,s,{cssStyles:p}=t;if(t.look==="handDrawn"){let l=D.svg(i),m=P(t,{roughness:.2,strokeWidth:2.5}),g=P(t,{roughness:.2,strokeWidth:1.5}),u=l.circle(0,0,r*2,m),y=l.circle(0,0,e*2,g);s=i.insert("g",":first-child"),s.attr("class",q(t.cssClasses)).attr("style",q(p)),s.node()?.appendChild(u),s.node()?.appendChild(y)}else{s=i.insert("g",":first-child");let l=s.insert("circle",":first-child"),m=s.insert("circle");s.attr("class","basic label-container").attr("style",h),l.attr("class","outer-circle").attr("style",h).attr("r",r).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",h).attr("r",e).attr("cx",0).attr("cy",0)}return k(t,s),t.intersect=function(l){return Y.info("DoubleCircle intersect",t,r,l),$.circle(t,r,l)},i}x(xe,"doublecircle");function be(d,t,{config:{themeVariables:c}}){let{labelStyles:h,nodeStyles:a}=v(t);t.label="",t.labelStyle=h;let o=d.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),f=7,{cssStyles:i}=t,n=D.svg(o),{nodeBorder:r}=c,e=P(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let s=n.circle(0,0,f*2,e),p=o.insert(()=>s,":first-child");return p.selectAll("path").attr("style",`fill: ${r} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),k(t,p),t.intersect=function(l){return Y.info("filledCircle intersect",t,{radius:f,point:l}),$.circle(t,f,l)},o}x(be,"filledCircle");var Se=10,we=10;async function Ne(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.heighty,":first-child").attr("transform",`translate(${-e/2}, ${e/2})`).attr("class","outer-path");return l&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",l),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),t.width=r,t.height=e,k(t,b),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-e/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(S){return Y.info("Triangle intersect",t,p,S),$.polygon(t,p,S)},f}x(Ne,"flippedTriangle");function $e(d,t,{dir:c,config:{state:h,themeVariables:a}}){let{nodeStyles:o}=v(t);t.label="";let f=d.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,n=Math.max(70,t?.width??0),r=Math.max(10,t?.height??0);c==="LR"&&(n=Math.max(10,t?.width??0),r=Math.max(70,t?.height??0));let e=-1*n/2,s=-1*r/2,p=D.svg(f),l=P(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let m=p.rectangle(e,s,n,r,l),g=f.insert(()=>m,":first-child");i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),k(t,g);let u=h?.padding??0;return t.width&&t.height&&(t.width+=u/2||0,t.height+=u/2||0),t.intersect=function(y){return $.rect(t,y)},f}x($e,"forkJoin");async function De(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=15,o=10,f=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.heightb,":first-child");return S.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",l),h&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",h),k(t,S),t.intersect=function(N){return Y.info("Pill intersect",t,{radius:p,point:N}),$.polygon(t,u,N)},n}x(De,"halfRoundedRectangle");var Xs=x((d,t,c,h,a)=>[`M${d+a},${t}`,`L${d+c-a},${t}`,`L${d+c},${t-h/2}`,`L${d+c-a},${t-h}`,`L${d+a},${t-h}`,`L${d},${t-h/2}`,"Z"].join(" "),"createHexagonPathD");async function Pe(d,t){let{labelStyles:c,nodeStyles:h}=v(t),a=t.look==="neo"?3.5:4;t.labelStyle=c;let o=t.padding??0,f=70,i=32,n=t.look==="neo"?f:o,r=t.look==="neo"?i:o;if(t.width||t.height){let S=(t.height??0)/a;t.width=(t?.width??0)-2*S-r,t.height=(t.height??0)-n}let{shapeSvg:e,bbox:s}=await G(d,t,T(t)),p=(t?.height?t?.height:s.height)+n,l=p/a,m=(t?.width?t?.width:s.width)+2*l+r,g=[{x:l,y:0},{x:m-l,y:0},{x:m,y:-p/2},{x:m-l,y:-p},{x:l,y:-p},{x:0,y:-p/2}],u,{cssStyles:y}=t;if(t.look==="handDrawn"){let b=D.svg(e),S=P(t,{}),N=Xs(0,0,m,p,l),w=b.path(N,S);u=e.insert(()=>w,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),y&&u.attr("style",y)}else u=et(e,m,p,g);return h&&u.attr("style",h),t.width=m,t.height=p,k(t,u),t.intersect=function(b){return $.polygon(t,g,b)},e}x(Pe,"hexagon");async function ve(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.label="",t.labelStyle=c;let{shapeSvg:a}=await G(d,t,T(t)),o=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:i}=t,n=D.svg(a),r=P(t,{});t.look!=="handDrawn"&&(r.roughness=0,r.fillStyle="solid");let e=[{x:0,y:0},{x:o,y:0},{x:0,y:f},{x:o,y:f}],s=I(e),p=n.path(s,r),l=a.insert(()=>p,":first-child");return l.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&l.selectChildren("path").attr("style",i),h&&t.look!=="handDrawn"&&l.selectChildren("path").attr("style",h),l.attr("transform",`translate(${-o/2}, ${-f/2})`),k(t,l),t.intersect=function(m){return Y.info("Pill intersect",t,{points:e}),$.polygon(t,e,m)},a}x(ve,"hourglass");async function ke(d,t,{config:{themeVariables:c,flowchart:h}}){let{labelStyles:a}=v(t);t.labelStyle=a;let o=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(o,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:r,bbox:e,label:s}=await G(d,t,"icon-shape default"),p=t.pos==="t",l=i,m=i,{nodeBorder:g}=c,{stylesMap:u}=yt(t),y=-m/2,b=-l/2,S=t.label?8:0,N=D.svg(r),w=P(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let B=N.rectangle(y,b,m,l,w),C=Math.max(m,e.width),R=l+e.height+S,M=N.rectangle(-C/2,-R/2,C,R,{...w,fill:"transparent",stroke:"none"}),E=r.insert(()=>B,":first-child"),H=r.insert(()=>M);if(t.icon){let W=r.append("g");W.html(`${await dt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let j=W.node().getBBox(),V=j.width,O=j.height,A=j.x,L=j.y;W.attr("transform",`translate(${-V/2-A},${p?e.height/2+S/2-O/2-L:-e.height/2-S/2-O/2-L})`),W.attr("style",`color: ${u.get("stroke")??g};`)}return s.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${p?-R/2:R/2-e.height})`),E.attr("transform",`translate(0,${p?e.height/2+S/2:-e.height/2-S/2})`),k(t,H),t.intersect=function(W){if(Y.info("iconSquare intersect",t,W),!t.label)return $.rect(t,W);let j=t.x??0,V=t.y??0,O=t.height??0,A=[];return p?A=[{x:j-e.width/2,y:V-O/2},{x:j+e.width/2,y:V-O/2},{x:j+e.width/2,y:V-O/2+e.height+S},{x:j+m/2,y:V-O/2+e.height+S},{x:j+m/2,y:V+O/2},{x:j-m/2,y:V+O/2},{x:j-m/2,y:V-O/2+e.height+S},{x:j-e.width/2,y:V-O/2+e.height+S}]:A=[{x:j-m/2,y:V-O/2},{x:j+m/2,y:V-O/2},{x:j+m/2,y:V-O/2+l},{x:j+e.width/2,y:V-O/2+l},{x:j+e.width/2/2,y:V+O/2},{x:j-e.width/2,y:V+O/2},{x:j-e.width/2,y:V-O/2+l},{x:j-m/2,y:V-O/2+l}],$.polygon(t,A,W)},r}x(ke,"icon");async function Be(d,t,{config:{themeVariables:c,flowchart:h}}){let{labelStyles:a}=v(t);t.labelStyle=a;let o=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(o,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:r,bbox:e,label:s}=await G(d,t,"icon-shape default"),p=20,l=t.label?8:0,m=t.pos==="t",{nodeBorder:g,mainBkg:u}=c,{stylesMap:y}=yt(t),b=D.svg(r),S=P(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let N=y.get("fill");S.stroke=N??u;let w=r.append("g");t.icon&&w.html(`${await dt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let B=w.node().getBBox(),C=B.width,R=B.height,M=B.x,E=B.y,H=Math.max(C,R)*Math.SQRT2+p*2,W=b.circle(0,0,H,S),j=Math.max(H,e.width),V=H+e.height+l,O=b.rectangle(-j/2,-V/2,j,V,{...S,fill:"transparent",stroke:"none"}),A=r.insert(()=>W,":first-child"),L=r.insert(()=>O);return w.attr("transform",`translate(${-C/2-M},${m?e.height/2+l/2-R/2-E:-e.height/2-l/2-R/2-E})`),w.attr("style",`color: ${y.get("stroke")??g};`),s.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${m?-V/2:V/2-e.height})`),A.attr("transform",`translate(0,${m?e.height/2+l/2:-e.height/2-l/2})`),k(t,L),t.intersect=function(X){return Y.info("iconSquare intersect",t,X),$.rect(t,X)},r}x(Be,"iconCircle");async function Te(d,t,{config:{themeVariables:c,flowchart:h}}){let{labelStyles:a}=v(t);t.labelStyle=a;let o=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(o,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:r,bbox:e,halfPadding:s,label:p}=await G(d,t,"icon-shape default"),l=t.pos==="t",m=i+s*2,g=i+s*2,{nodeBorder:u,mainBkg:y}=c,{stylesMap:b}=yt(t),S=-g/2,N=-m/2,w=t.label?8:0,B=D.svg(r),C=P(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let R=b.get("fill");C.stroke=R??y;let M=B.path(it(S,N,g,m,5),C),E=Math.max(g,e.width),H=m+e.height+w,W=B.rectangle(-E/2,-H/2,E,H,{...C,fill:"transparent",stroke:"none"}),j=r.insert(()=>M,":first-child").attr("class","icon-shape2"),V=r.insert(()=>W);if(t.icon){let O=r.append("g");O.html(`${await dt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let A=O.node().getBBox(),L=A.width,X=A.height,_=A.x,z=A.y;O.attr("transform",`translate(${-L/2-_},${l?e.height/2+w/2-X/2-z:-e.height/2-w/2-X/2-z})`),O.attr("style",`color: ${b.get("stroke")??u};`)}return p.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${l?-H/2:H/2-e.height})`),j.attr("transform",`translate(0,${l?e.height/2+w/2:-e.height/2-w/2})`),k(t,V),t.intersect=function(O){if(Y.info("iconSquare intersect",t,O),!t.label)return $.rect(t,O);let A=t.x??0,L=t.y??0,X=t.height??0,_=[];return l?_=[{x:A-e.width/2,y:L-X/2},{x:A+e.width/2,y:L-X/2},{x:A+e.width/2,y:L-X/2+e.height+w},{x:A+g/2,y:L-X/2+e.height+w},{x:A+g/2,y:L+X/2},{x:A-g/2,y:L+X/2},{x:A-g/2,y:L-X/2+e.height+w},{x:A-e.width/2,y:L-X/2+e.height+w}]:_=[{x:A-g/2,y:L-X/2},{x:A+g/2,y:L-X/2},{x:A+g/2,y:L-X/2+m},{x:A+e.width/2,y:L-X/2+m},{x:A+e.width/2/2,y:L+X/2},{x:A-e.width/2,y:L+X/2},{x:A-e.width/2,y:L-X/2+m},{x:A-g/2,y:L-X/2+m}],$.polygon(t,_,O)},r}x(Te,"iconRounded");async function Ce(d,t,{config:{themeVariables:c,flowchart:h}}){let{labelStyles:a}=v(t);t.labelStyle=a;let o=t.assetHeight??48,f=t.assetWidth??48,i=Math.max(o,f),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:r,bbox:e,halfPadding:s,label:p}=await G(d,t,"icon-shape default"),l=t.pos==="t",m=i+s*2,g=i+s*2,{nodeBorder:u,mainBkg:y}=c,{stylesMap:b}=yt(t),S=-g/2,N=-m/2,w=t.label?8:0,B=D.svg(r),C=P(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let R=b.get("fill");C.stroke=R??y;let M=B.path(it(S,N,g,m,.1),C),E=Math.max(g,e.width),H=m+e.height+w,W=B.rectangle(-E/2,-H/2,E,H,{...C,fill:"transparent",stroke:"none"}),j=r.insert(()=>M,":first-child"),V=r.insert(()=>W);if(t.icon){let O=r.append("g");O.html(`${await dt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let A=O.node().getBBox(),L=A.width,X=A.height,_=A.x,z=A.y;O.attr("transform",`translate(${-L/2-_},${l?e.height/2+w/2-X/2-z:-e.height/2-w/2-X/2-z})`),O.attr("style",`color: ${b.get("stroke")??u};`)}return p.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${l?-H/2:H/2-e.height})`),j.attr("transform",`translate(0,${l?e.height/2+w/2:-e.height/2-w/2})`),k(t,V),t.intersect=function(O){if(Y.info("iconSquare intersect",t,O),!t.label)return $.rect(t,O);let A=t.x??0,L=t.y??0,X=t.height??0,_=[];return l?_=[{x:A-e.width/2,y:L-X/2},{x:A+e.width/2,y:L-X/2},{x:A+e.width/2,y:L-X/2+e.height+w},{x:A+g/2,y:L-X/2+e.height+w},{x:A+g/2,y:L+X/2},{x:A-g/2,y:L+X/2},{x:A-g/2,y:L-X/2+e.height+w},{x:A-e.width/2,y:L-X/2+e.height+w}]:_=[{x:A-g/2,y:L-X/2},{x:A+g/2,y:L-X/2},{x:A+g/2,y:L-X/2+m},{x:A+e.width/2,y:L-X/2+m},{x:A+e.width/2/2,y:L+X/2},{x:A-e.width/2,y:L+X/2},{x:A-e.width/2,y:L-X/2+m},{x:A-g/2,y:L-X/2+m}],$.polygon(t,_,O)},r}x(Ce,"iconSquare");async function Re(d,t,{config:{flowchart:c}}){let h=new Image;h.src=t?.img??"",await h.decode();let a=Number(h.naturalWidth.toString().replace("px","")),o=Number(h.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/o;let{labelStyles:f}=v(t);t.labelStyle=f;let i=c?.wrappingWidth;t.defaultWidth=c?.wrappingWidth;let n=Math.max(t.label?i??0:0,t?.assetWidth??a),r=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,e=t.constraint==="on"?r/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(r,i??0);let{shapeSvg:s,bbox:p,label:l}=await G(d,t,"image-shape default"),m=t.pos==="t",g=-r/2,u=-e/2,y=t.label?8:0,b=D.svg(s),S=P(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let N=b.rectangle(g,u,r,e,S),w=Math.max(r,p.width),B=e+p.height+y,C=b.rectangle(-w/2,-B/2,w,B,{...S,fill:"none",stroke:"none"}),R=s.insert(()=>N,":first-child"),M=s.insert(()=>C);if(t.img){let E=s.append("image");E.attr("href",t.img),E.attr("width",r),E.attr("height",e),E.attr("preserveAspectRatio","none"),E.attr("transform",`translate(${-r/2},${m?B/2-e:-B/2})`)}return l.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-e/2-p.height/2-y/2:e/2-p.height/2+y/2})`),R.attr("transform",`translate(0,${m?p.height/2+y/2:-p.height/2-y/2})`),k(t,M),t.intersect=function(E){if(Y.info("iconSquare intersect",t,E),!t.label)return $.rect(t,E);let H=t.x??0,W=t.y??0,j=t.height??0,V=[];return m?V=[{x:H-p.width/2,y:W-j/2},{x:H+p.width/2,y:W-j/2},{x:H+p.width/2,y:W-j/2+p.height+y},{x:H+r/2,y:W-j/2+p.height+y},{x:H+r/2,y:W+j/2},{x:H-r/2,y:W+j/2},{x:H-r/2,y:W-j/2+p.height+y},{x:H-p.width/2,y:W-j/2+p.height+y}]:V=[{x:H-r/2,y:W-j/2},{x:H+r/2,y:W-j/2},{x:H+r/2,y:W-j/2+e},{x:H+p.width/2,y:W-j/2+e},{x:H+p.width/2/2,y:W+j/2},{x:H-p.width/2,y:W+j/2},{x:H-p.width/2,y:W-j/2+e},{x:H-r/2,y:W-j/2+e}],$.polygon(t,V,E)},s}x(Re,"imageSquare");async function Ge(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=a,f=t.look==="neo"?a*2:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=Math.max(n.width+(f??0)*2,t?.width??0),e=Math.max(n.height+(o??0)*2,t?.height??0),s=[{x:0,y:0},{x:r,y:0},{x:r+3*e/6,y:-e},{x:-3*e/6,y:-e}],p,{cssStyles:l}=t;if(t.look==="handDrawn"){let m=D.svg(i),g=P(t,{}),u=I(s),y=m.path(u,g);p=i.insert(()=>y,":first-child").attr("transform",`translate(${-r/2}, ${e/2})`),l&&p.attr("style",l)}else p=et(i,r,e,s);return h&&p.attr("style",h),t.width=r,t.height=e,k(t,p),t.intersect=function(m){return $.polygon(t,s,m)},i}x(Ge,"inv_trapezoid");async function Me(d,t){let{shapeSvg:c,bbox:h,label:a}=await G(d,t,"label"),o=c.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),c.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),k(t,o),t.intersect=function(n){return $.rect(t,n)},c}x(Me,"labelRect");async function Ee(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=a,f=t.look==="neo"?a*2:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.height??n.height)+o,e=(t?.width??n.width)+f,s=[{x:0,y:0},{x:e+3*r/6,y:0},{x:e,y:-r},{x:-(3*r)/6,y:-r}],p,{cssStyles:l}=t;if(t.look==="handDrawn"){let m=D.svg(i),g=P(t,{}),u=I(s),y=m.path(u,g);p=i.insert(()=>y,":first-child").attr("transform",`translate(${-e/2}, ${r/2})`),l&&p.attr("style",l)}else p=et(i,e,r,s);return h&&p.attr("style",h),t.width=e,t.height=r,k(t,p),t.intersect=function(m){return $.polygon(t,s,m)},i}x(Ee,"lean_left");async function He(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=a,f=t.look==="neo"?a*2:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.height??n.height)+o,e=(t?.width??n.width)+f,s=[{x:-3*r/6,y:0},{x:e,y:0},{x:e+3*r/6,y:-r},{x:0,y:-r}],p,{cssStyles:l}=t;if(t.look==="handDrawn"){let m=D.svg(i),g=P(t,{}),u=I(s),y=m.path(u,g);p=i.insert(()=>y,":first-child").attr("transform",`translate(${-e/2}, ${r/2})`),l&&p.attr("style",l)}else p=et(i,e,r,s);return h&&p.attr("style",h),t.width=e,t.height=r,k(t,p),t.intersect=function(m){return $.polygon(t,s,m)},i}x(He,"lean_right");function je(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.label="",t.labelStyle=c;let a=d.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,f=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,r=[{x:f,y:0},{x:0,y:i+n/2},{x:f-2*n,y:i+n/2},{x:0,y:2*i},{x:f,y:i-n/2},{x:2*n,y:i-n/2}],e=D.svg(a),s=P(t,{});t.look!=="handDrawn"&&(s.roughness=0,s.fillStyle="solid");let p=I(r),l=e.path(p,s),m=a.insert(()=>l,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",h),m.attr("transform",`translate(-${f/2},${-i})`),k(t,m),t.intersect=function(g){return Y.info("lightningBolt intersect",t,g),$.polygon(t,r,g)},a}x(je,"lightningBolt");var Ys=x((d,t,c,h,a,o,f)=>[`M${d},${t+o}`,`a${a},${o} 0,0,0 ${c},0`,`a${a},${o} 0,0,0 ${-c},0`,`l0,${h}`,`a${a},${o} 0,0,0 ${c},0`,`l0,${-h}`,`M${d},${t+o+f}`,`a${a},${o} 0,0,0 ${c},0`].join(" "),"createCylinderPathD"),Fs=x((d,t,c,h,a,o,f)=>[`M${d},${t+o}`,`M${d+c},${t+o}`,`a${a},${o} 0,0,0 ${-c},0`,`l0,${h}`,`a${a},${o} 0,0,0 ${c},0`,`l0,${-h}`,`M${d},${t+o+f}`,`a${a},${o} 0,0,0 ${c},0`].join(" "),"createOuterCylinderPathD"),_s=x((d,t,c,h,a,o)=>[`M${d-c/2},${-h/2}`,`a${a},${o} 0,0,0 ${c},0`].join(" "),"createInnerCylinderPathD"),Ae=10,Oe=10;async function Ve(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?24:a;if(t.width||t.height){let y=t.width??0;t.width=(t.width??0)-o,t.widthB,":first-child").attr("class","line"),g=i.insert(()=>w,":first-child"),g.attr("class","basic label-container"),u&&g.attr("style",u)}else{let y=Ys(0,0,e,l,s,p,m);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",q(u)).attr("style",h)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-e/2}, ${-(l/2+p)})`),k(t,g),r.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+p-(n.y-(n.top??0))})`),t.intersect=function(y){let b=$.rect(t,y),S=b.x-(t.x??0);if(s!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let N=p*p*(1-S*S/(s*s));N>0&&(N=Math.sqrt(N)),N=p-N,y.y-(t.y??0)>0&&(N=-N),b.y+=N}return b},i}x(Ve,"linedCylinder");async function Le(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a;if(t.width||t.height){let N=t.width;t.width=(N??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10)}let{shapeSvg:i,bbox:n,label:r}=await G(d,t,T(t)),e=(t?.width?t?.width:n.width)+(o??0)*2,s=(t?.height?t?.height:n.height)+(f??0)*2,p=t.look==="neo"?s/4:s/8,l=s+p,{cssStyles:m}=t,g=D.svg(i),u=P(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=[{x:-e/2-e/2*.1,y:-l/2},{x:-e/2-e/2*.1,y:l/2},...at(-e/2-e/2*.1,l/2,e/2+e/2*.1,l/2,p,.8),{x:e/2+e/2*.1,y:-l/2},{x:-e/2-e/2*.1,y:-l/2},{x:-e/2,y:-l/2},{x:-e/2,y:l/2*1.1},{x:-e/2,y:-l/2}],b=g.polygon(y.map(N=>[N.x,N.y]),u),S=i.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),S.attr("transform",`translate(0,${-p/2})`),r.attr("transform",`translate(${-e/2+(t.padding??0)+e/2*.1/2-(n.x-(n.left??0))},${-s/2+(t.padding??0)-p/2-(n.y-(n.top??0))})`),k(t,S),t.intersect=function(N){return $.polygon(t,y,N)},i}x(Le,"linedWaveEdgedRect");async function Ie(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*i,10),t.height=Math.max((t?.height??0)-f*2-2*i,10));let{shapeSvg:n,bbox:r,label:e}=await G(d,t,T(t)),s=(t?.width?t?.width:r.width)+o*2+2*i,p=(t?.height?t?.height:r.height)+f*2+2*i,l=s-2*i,m=p-2*i,g=-l/2,u=-m/2,{cssStyles:y}=t,b=D.svg(n),S=P(t,{}),N=[{x:g-i,y:u+i},{x:g-i,y:u+m+i},{x:g+l-i,y:u+m+i},{x:g+l-i,y:u+m},{x:g+l,y:u+m},{x:g+l,y:u+m-i},{x:g+l+i,y:u+m-i},{x:g+l+i,y:u-i},{x:g+i,y:u-i},{x:g+i,y:u},{x:g,y:u},{x:g,y:u+i}],w=[{x:g,y:u+i},{x:g+l-i,y:u+i},{x:g+l-i,y:u+m},{x:g+l,y:u+m},{x:g+l,y:u},{x:g,y:u}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let B=I(N),C=b.path(B,S),R=I(w),M=b.path(R,S);t.look!=="handDrawn"&&(C=Wt(C),M=Wt(M));let E=n.insert("g",":first-child");return E.insert(()=>C),E.insert(()=>M),E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",h),e.attr("transform",`translate(${-(r.width/2)-i-(r.x-(r.left??0))}, ${-(r.height/2)+i-(r.y-(r.top??0))})`),k(t,E),t.intersect=function(H){return $.polygon(t,N,H)},n}x(Ie,"multiRect");async function We(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o,label:f}=await G(d,t,T(t)),i=t.padding??0,n=t.look==="neo"?16:i,r=t.look==="neo"?12:i,e=!0;(t.width||t.height)&&(e=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-r*3);let s=Math.max(o.width,t?.width??0)+n*2,p=Math.max(o.height,t?.height??0)+r*3,l=t.look==="neo"?p/4:p/8,m=p+(e?l/2:-l/2),g=-s/2,u=-m/2,y=10,{cssStyles:b}=t,S=at(g-y,u+m+y,g+s-y,u+m+y,l,.8),N=S?.[S.length-1],w=[{x:g-y,y:u+y},{x:g-y,y:u+m+y},...S,{x:g+s-y,y:N.y-y},{x:g+s,y:N.y-y},{x:g+s,y:N.y-2*y},{x:g+s+y,y:N.y-2*y},{x:g+s+y,y:u-y},{x:g+y,y:u-y},{x:g+y,y:u},{x:g,y:u},{x:g,y:u+y}],B=[{x:g,y:u+y},{x:g+s-y,y:u+y},{x:g+s-y,y:N.y-y},{x:g+s,y:N.y-y},{x:g+s,y:u},{x:g,y:u}],C=D.svg(a),R=P(t,{});t.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let M=I(w),E=C.path(M,R),H=I(B),W=C.path(H,R),j=a.insert(()=>E,":first-child");return j.insert(()=>W),j.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",b),h&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",h),j.attr("transform",`translate(0,${-l/2})`),f.attr("transform",`translate(${-(o.width/2)-y-(o.x-(o.left??0))}, ${-(o.height/2)+y-l/2-(o.y-(o.top??0))})`),k(t,j),t.intersect=function(V){return $.polygon(t,w,V)},a}x(We,"multiWaveEdgedRectangle");async function Xe(d,t,{config:{themeVariables:c}}){let{labelStyles:h,nodeStyles:a}=v(t);t.labelStyle=h,t.useHtmlLabels||tt(ft())||(t.centerLabel=!0);let{shapeSvg:f,bbox:i,label:n}=await G(d,t,T(t)),r=Math.max(i.width+(t.padding??0)*2,t?.width??0),e=Math.max(i.height+(t.padding??0)*2,t?.height??0),s=-r/2,p=-e/2,{cssStyles:l}=t,m=D.svg(f),g=P(t,{fill:c.noteBkgColor,stroke:c.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let u=m.rectangle(s,p,r,e,g),y=f.insert(()=>u,":first-child");return y.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),k(t,y),t.intersect=function(b){return $.rect(t,b)},f}x(Xe,"note");var qs=x((d,t,c)=>[`M${d+c/2},${t}`,`L${d+c},${t-c/2}`,`L${d+c/2},${t-c}`,`L${d},${t-c/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ye(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o}=await G(d,t,T(t)),f=o.width+(t.padding??0),i=o.height+(t.padding??0),n=f+i,r=.5,e=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],s,{cssStyles:p}=t;if(t.look==="handDrawn"){let l=D.svg(a),m=P(t,{}),g=qs(0,0,n),u=l.path(g,m);s=a.insert(()=>u,":first-child").attr("transform",`translate(${-n/2+r}, ${n/2})`),p&&s.attr("style",p)}else s=et(a,n,n,e),s.attr("transform",`translate(${-n/2+r}, ${n/2})`);return h&&s.attr("style",h),k(t,s),t.calcIntersect=function(l,m){let g=l.width,u=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],y=$.polygon(l,u,m);return{x:y.x-.5,y:y.y-.5}},t.intersect=function(l){return this.calcIntersect(t,l)},a}x(Ye,"question");async function Fe(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?21:a??0,f=t.look==="neo"?12:a??0,{shapeSvg:i,bbox:n,label:r}=await G(d,t,T(t)),e=(t?.width??n.width)+(t.look==="neo"?o*2:o),s=(t?.height??n.height)+(t.look==="neo"?f*2:f),p=-e/2,l=-s/2,m=l/2,g=[{x:p+m,y:l},{x:p,y:0},{x:p+m,y:-l},{x:-p,y:-l},{x:-p,y:l}],{cssStyles:u}=t,y=D.svg(i),b=P(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let S=I(g),N=y.path(S,b),w=i.insert(()=>N,":first-child");return w.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",u),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),w.attr("transform",`translate(${-m/2},0)`),r.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),k(t,w),t.intersect=function(B){return $.polygon(t,g,B)},i}x(Fe,"rect_left_inv_arrow");async function _e(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";let o=d.insert("g").attr("class",a).attr("id",t.domId||t.id),f=o.insert("g"),i=o.insert("g").attr("class","label").attr("style",h),n=t.description,r=t.label,e=await vt(i,r,t.labelStyle,!0,!0),s={width:0,height:0};if(tt(Z())){let R=e.children[0],M=J(e);s=R.getBoundingClientRect(),M.attr("width",s.width),M.attr("height",s.height)}Y.info("Text 2",n);let p=n||[],l=e.getBBox(),m=await vt(i,Array.isArray(p)?p.join("
    "):p,t.labelStyle,!0,!0),g=m.children[0],u=J(m);s=g.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height);let y=(t.padding||0)/2;J(m).attr("transform","translate( "+(s.width>l.width?0:(l.width-s.width)/2)+", "+(l.height+y+5)+")"),J(e).attr("transform","translate( "+(s.width(Y.debug("Rough node insert CXC",E),H),":first-child"),B=o.insert(()=>(Y.debug("Rough node insert CXC",E),E),":first-child")}else B=f.insert("rect",":first-child"),C=f.insert("line"),B.attr("class","outer title-state").attr("style",h).attr("x",-s.width/2-y).attr("y",-s.height/2-y).attr("width",s.width+(t.padding||0)).attr("height",s.height+(t.padding||0)),C.attr("class","divider").attr("x1",-s.width/2-y).attr("x2",s.width/2+y).attr("y1",-s.height/2-y+l.height+y).attr("y2",-s.height/2-y+l.height+y);return k(t,B),t.intersect=function(R){return $.rect(t,R)},o}x(_e,"rectWithTitle");async function qe(d,t,{config:{themeVariables:c}}){let h=c?.radius??5,a={rx:h,ry:h,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return ct(d,t,a)}x(qe,"roundedRect");var Dt=8;async function ze(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:f,bbox:i,label:n}=await G(d,t,T(t)),r=(t?.width??i.width)+a*2+(t.look==="neo"?Dt:Dt*2),e=(t?.height??i.height)+o*2,s=r-Dt,p=e,l=Dt-r/2,m=-e/2,{cssStyles:g}=t,u=D.svg(f),y=P(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:l,y:m},{x:l+s,y:m},{x:l+s,y:m+p},{x:l-Dt,y:m+p},{x:l-Dt,y:m},{x:l,y:m},{x:l,y:m+p}],S=u.polygon(b.map(w=>[w.x,w.y]),y),N=f.insert(()=>S,":first-child");return N.attr("class","basic label-container outer-path").attr("style",q(g)),h&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",h),g&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",h),n.attr("transform",`translate(${Dt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),k(t,N),t.intersect=function(w){return $.rect(t,w)},f}x(ze,"shadedProcess");async function Ue(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-f*2,10));let{shapeSvg:i,bbox:n,label:r}=await G(d,t,T(t)),e=(t?.width?t?.width:n.width)+o*2,s=((t?.height?t?.height:n.height)+f*2)*1.5,p=e,l=s/1.5,m=-p/2,g=-l/2,{cssStyles:u}=t,y=D.svg(i),b=P(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let S=[{x:m,y:g},{x:m,y:g+l},{x:m+p,y:g+l},{x:m+p,y:g-l/2}],N=I(S),w=y.path(N,b),B=i.insert(()=>w,":first-child");return B.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",u),h&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",h),B.attr("transform",`translate(0, ${l/4})`),r.attr("transform",`translate(${-p/2+(t.padding??0)-(n.x-(n.left??0))}, ${-l/4+(t.padding??0)-(n.y-(n.top??0))})`),k(t,B),t.intersect=function(C){return $.polygon(t,S,C)},i}x(Ue,"slopedRect");async function Ze(d,t){let c=t.padding??0,h=t.look==="neo"?16:c*2,a=t.look==="neo"?12:c,o={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??h,labelPaddingY:a};return ct(d,t,o)}x(Ze,"squareRect");async function Je(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?20:a,f=t.look==="neo"?12:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=n.height+(t.look==="neo"?f*2:f),e=n.width+r/4+(t.look==="neo"?o*2:o),s=r/2,{cssStyles:p}=t,l=D.svg(i),m=P(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-e/2+s,y:-r/2},{x:e/2-s,y:-r/2},...$t(-e/2+s,0,s,50,90,270),{x:e/2-s,y:r/2},...$t(e/2-s,0,s,50,270,450)],u=I(g),y=l.path(u,m),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),h&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),k(t,b),t.intersect=function(S){return $.polygon(t,g,S)},i}x(Je,"stadium");async function Ke(d,t){let c={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return ct(d,t,c)}x(Ke,"state");function Qe(d,t,{config:{themeVariables:c}}){let{labelStyles:h,nodeStyles:a}=v(t);t.labelStyle=h;let{cssStyles:o}=t,{lineColor:f,stateBorder:i,nodeBorder:n,nodeShadow:r}=c;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let e=d.insert("g").attr("class","node default").attr("id",t.domId??t.id),s=D.svg(e),p=P(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let l=s.circle(0,0,t.width,{...p,stroke:f,strokeWidth:2}),m=i??n,g=(t.width??0)*5/14,u=s.circle(0,0,g,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),y=e.insert(()=>l,":first-child");if(y.insert(()=>u),t.look!=="handDrawn"&&y.attr("class","outer-path"),o&&y.selectAll("path").attr("style",o),a&&y.selectAll("path").attr("style",a),t.width<25&&r&&t.look!=="handDrawn"){let b=d.node()?.ownerSVGElement?.id??"",S=b?`${b}-drop-shadow-small`:"drop-shadow-small";y.attr("style",`filter:url(#${S})`)}return k(t,y),t.intersect=function(b){return $.circle(t,(t.width??0)/2,b)},e}x(Qe,"stateEnd");function ts(d,t,{config:{themeVariables:c}}){let{lineColor:h,nodeShadow:a}=c;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let o=d.insert("g").attr("class","node default").attr("id",t.domId||t.id),f;if(t.look==="handDrawn"){let n=D.svg(o).circle(0,0,t.width,Ut(h));f=o.insert(()=>n),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else f=o.insert("circle",":first-child"),f.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){let i=d.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";f.attr("style",`filter:url(#${n})`)}return k(t,f),t.intersect=function(i){return $.circle(t,(t.width??7)/2,i)},o}x(ts,"stateStart");var kt=8;async function es(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t?.padding??8,o=t.look==="neo"?28:a,f=t.look==="neo"?12:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.width??n.width)+2*kt+o,e=(t?.height??n.height)+f,s=r-2*kt,p=e,l=-r/2,m=-e/2,g=[{x:0,y:0},{x:s,y:0},{x:s,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){let u=D.svg(i),y=P(t,{}),b=u.rectangle(l,m,s+16,p,y),S=u.line(l+kt,m,l+kt,m+p,y),N=u.line(l+kt+s,m,l+kt+s,m+p,y);i.insert(()=>S,":first-child"),i.insert(()=>N,":first-child");let w=i.insert(()=>b,":first-child"),{cssStyles:B}=t;w.attr("class","basic label-container").attr("style",q(B)),k(t,w)}else{let u=et(i,s,p,g);h&&u.attr("style",h),k(t,u)}return t.intersect=function(u){return $.polygon(t,g,u)},i}x(es,"subroutine");var Xt=.2;async function ss(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-f*2,10),t.width=Math.max((t?.width??0)-o*2-Xt*(t.height+f*2),10));let{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.height?t?.height:n.height)+f*2,e=Xt*r,s=Xt*r,l=(t?.width?t?.width:n.width)+o*2+e-e,m=r,g=-l/2,u=-m/2,{cssStyles:y}=t,b=D.svg(i),S=P(t,{}),N=[{x:g-e/2,y:u},{x:g+l+e/2,y:u},{x:g+l+e/2,y:u+m},{x:g-e/2,y:u+m}],w=[{x:g+l-e/2,y:u+m},{x:g+l+e/2,y:u+m},{x:g+l+e/2,y:u+m-s}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let B=I(N),C=b.path(B,S),R=I(w),M=b.path(R,{...S,fillStyle:"solid"}),E=i.insert(()=>M,":first-child");return E.insert(()=>C,":first-child"),E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",h),k(t,E),t.intersect=function(H){return $.polygon(t,N,H)},i}x(ss,"taggedRect");async function rs(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o,label:f}=await G(d,t,T(t)),i=Math.max(o.width+(t.padding??0)*2,t?.width??0),n=Math.max(o.height+(t.padding??0)*2,t?.height??0),r=n/8,e=.2*i,s=.2*n,p=n+r,{cssStyles:l}=t,m=D.svg(a),g=P(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let u=[{x:-i/2-i/2*.1,y:p/2},...at(-i/2-i/2*.1,p/2,i/2+i/2*.1,p/2,r,.8),{x:i/2+i/2*.1,y:-p/2},{x:-i/2-i/2*.1,y:-p/2}],y=-i/2+i/2*.1,b=-p/2-s*.4,S=[{x:y+i-e,y:(b+n)*1.3},{x:y+i,y:b+n-s},{x:y+i,y:(b+n)*.9},...at(y+i,(b+n)*1.25,y+i-e,(b+n)*1.3,-n*.02,.5)],N=I(u),w=m.path(N,g),B=I(S),C=m.path(B,{...g,fillStyle:"solid"}),R=a.insert(()=>C,":first-child");return R.insert(()=>w,":first-child"),R.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",l),h&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",h),R.attr("transform",`translate(0,${-r/2})`),f.attr("transform",`translate(${-i/2+(t.padding??0)-(o.x-(o.left??0))},${-n/2+(t.padding??0)-r/2-(o.y-(o.top??0))})`),k(t,R),t.intersect=function(M){return $.polygon(t,u,M)},a}x(rs,"taggedWaveEdgedRectangle");async function is(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o}=await G(d,t,T(t)),f=Math.max(o.width+(t.padding??0),t?.width||0),i=Math.max(o.height+(t.padding??0),t?.height||0),n=-f/2,r=-i/2,e=a.insert("rect",":first-child");return e.attr("class","text").attr("style",h).attr("rx",0).attr("ry",0).attr("x",n).attr("y",r).attr("width",f).attr("height",i),k(t,e),t.intersect=function(s){return $.rect(t,s)},a}x(is,"text");var zs=x((d,t,c,h,a,o)=>`M${d},${t} + a${a},${o} 0,0,1 0,${-h} + l${c},0 + a${a},${o} 0,0,1 0,${h} + M${c},${-h} + a${a},${o} 0,0,0 0,${h} + l${-c},0`,"createCylinderPathD"),Us=x((d,t,c,h,a,o)=>[`M${d},${t}`,`M${d+c},${t}`,`a${a},${o} 0,0,0 0,${-h}`,`l${-c},0`,`a${a},${o} 0,0,0 0,${h}`,`l${c},0`].join(" "),"createOuterCylinderPathD"),Zs=x((d,t,c,h,a,o)=>[`M${d+c/2},${-h/2}`,`a${a},${o} 0,0,0 0,${h}`].join(" "),"createInnerCylinderPathD"),os=5,as=10;async function ns(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?12:a/2;if(t.width||t.height){let g=t.height??0;t.height=(t.height??0)-o,t.heightS,":first-child"),m=f.insert(()=>b,":first-child"),m.attr("class","basic label-container"),l&&m.attr("style",l)}else{let g=zs(0,0,p,r,s,e);m=f.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",q(l)).attr("style",h),m.attr("class","basic label-container outer-path"),l&&m.selectAll("path").attr("style",l),h&&m.selectAll("path").attr("style",h)}return m.attr("label-offset-x",s),m.attr("transform",`translate(${-p/2}, ${r/2} )`),n.attr("transform",`translate(${-(i.width/2)-s-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),k(t,m),t.intersect=function(g){let u=$.rect(t,g),y=u.y-(t.y??0);if(e!=0&&(Math.abs(y)<(t.height??0)/2||Math.abs(y)==(t.height??0)/2&&Math.abs(u.x-(t.x??0))>(t.width??0)/2-s)){let b=s*s*(1-y*y/(e*e));b!=0&&(b=Math.sqrt(Math.abs(b))),b=s-b,g.x-(t.x??0)>0&&(b=-b),u.x+=b}return u},f}x(ns,"tiltedCylinder");async function ls(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=(t.look==="neo",a),f=t.look==="neo"?a*2:a,{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.height??n.height)+o,e=(t?.width??n.width)+f,s=[{x:-3*r/6,y:0},{x:e+3*r/6,y:0},{x:e,y:-r},{x:0,y:-r}],p,{cssStyles:l}=t;if(t.look==="handDrawn"){let m=D.svg(i),g=P(t,{}),u=I(s),y=m.path(u,g);p=i.insert(()=>y,":first-child").attr("transform",`translate(${-e/2}, ${r/2})`),l&&p.attr("style",l)}else p=et(i,e,r,s);return h&&p.attr("style",h),t.width=e,t.height=r,k(t,p),t.intersect=function(m){return $.polygon(t,s,m)},i}x(ls,"trapezoid");async function cs(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a,i=15,n=5;(t.width||t.height)&&(t.height=(t.height??0)-f*2,t.heightb,":first-child");return S.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",l),h&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",h),k(t,S),t.intersect=function(N){return $.polygon(t,u,N)},r}x(cs,"trapezoidalPentagon");var hs=10,ps=10;async function ms(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.widthb,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),h&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",h),t.width=e,t.height=s,k(t,S),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${s/2-(i.height+(t.padding??0)/(r?2:1)-(i.y-(i.top??0)))})`),t.intersect=function(N){return Y.info("Triangle intersect",t,l,N),$.polygon(t,l,N)},f}x(ms,"triangle");async function gs(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?12:a,i=!0;(t.width||t.height)&&(i=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-f*2,t.height<10&&(t.height=10));let{shapeSvg:n,bbox:r,label:e}=await G(d,t,T(t)),s=(t?.width?t?.width:r.width)+(o??0)*2,p=(t?.height?t?.height:r.height)+(f??0)*2,l=t.look==="neo"?p/4:p/8,m=p+(i?l:-l),{cssStyles:g}=t,y=14-s,b=y>0?y/2:0,S=D.svg(n),N=P(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");let w=[{x:-s/2-b,y:m/2},...at(-s/2-b,m/2,s/2+b,m/2,l,.8),{x:s/2+b,y:-m/2},{x:-s/2-b,y:-m/2}],B=I(w),C=S.path(B,N),R=n.insert(()=>C,":first-child");return R.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",h),R.attr("transform",`translate(0,${-l/2})`),e.attr("transform",`translate(${-s/2+(t.padding??0)-(r.x-(r.left??0))},${-p/2+(t.padding??0)-l-(r.y-(r.top??0))})`),k(t,R),t.intersect=function(M){return $.polygon(t,w,M)},n}x(gs,"waveEdgedRectangle");async function fs(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.padding??0,o=t.look==="neo"?16:a,f=t.look==="neo"?20:a;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let N=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-f-N*(20/9)),t.width=t.width-o*2}let{shapeSvg:i,bbox:n}=await G(d,t,T(t)),r=(t?.width?t?.width:n.width)+o*2,e=(t?.height?t?.height:n.height)+f,s=e/8,p=e+s*2,{cssStyles:l}=t,m=D.svg(i),g=P(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let u=[{x:-r/2,y:p/2},...at(-r/2,p/2,r/2,p/2,s,1),{x:r/2,y:-p/2},...at(r/2,-p/2,-r/2,-p/2,s,-1)],y=I(u),b=m.path(y,g),S=i.insert(()=>b,":first-child");return S.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",l),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),k(t,S),t.intersect=function(N){return $.polygon(t,u,N)},i}x(fs,"waveRectangle");var K=10;async function ds(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-K,10),t.height=Math.max((t?.height??0)-o*2-K,10));let{shapeSvg:f,bbox:i,label:n}=await G(d,t,T(t)),r=(t?.width?t?.width:i.width)+a*2+K,e=(t?.height?t?.height:i.height)+o*2+K,s=r-K,p=e-K,l=-s/2,m=-p/2,{cssStyles:g}=t,u=D.svg(f),y=P(t,{}),b=[{x:l-K,y:m-K},{x:l-K,y:m+p},{x:l+s,y:m+p},{x:l+s,y:m-K}],S=`M${l-K},${m-K} L${l+s},${m-K} L${l+s},${m+p} L${l-K},${m+p} L${l-K},${m-K} + M${l-K},${m} L${l+s},${m} + M${l},${m-K} L${l},${m+p}`;t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let N=u.path(S,y),w=f.insert(()=>N,":first-child");return w.attr("transform",`translate(${K/2}, ${K/2})`),w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",h),n.attr("transform",`translate(${-(i.width/2)+K/2-(i.x-(i.left??0))}, ${-(i.height/2)+K/2-(i.y-(i.top??0))})`),k(t,w),t.intersect=function(B){return $.polygon(t,b,B)},f}x(ds,"windowPane");var ys=new Set(["redux-color","redux-dark-color"]),Js=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Yt(d,t){let c=t;c.alias&&(t.label=c.alias);let{theme:h,themeVariables:a}=ft(),{rowEven:o,rowOdd:f,nodeBorder:i,borderColorArray:n}=a;if(t.look==="handDrawn"){let{themeVariables:F}=ft(),{background:U}=F,Q={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${U}`]};await Yt(d,Q)}let r=ft();t.useHtmlLabels=r.htmlLabels;let e=r.er?.diagramPadding??10,s=r.er?.entityPadding??6,{cssStyles:p}=t,{labelStyles:l,nodeStyles:m}=v(t);if(c.attributes.length===0&&t.label){let F={rx:0,ry:0,labelPaddingX:e,labelPaddingY:e*1.5,classes:""};wt(t.label,r)+F.labelPaddingX*20){let F=y.width+e*2-(w+B+C+R);w+=F/H,B+=F/H,C>0&&(C+=F/H),R>0&&(R+=F/H)}let j=w+B+C+R,V=D.svg(u),O=P(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let A=0;N.length>0&&(A=N.reduce((F,U)=>F+(U?.rowHeight??0),0));let L=Math.max(W.width+e*2,t?.width||0,j),X=Math.max((A??0)+y.height,t?.height||0),_=-L/2,z=-X/2;if(u.selectAll("g:not(:first-child)").each((F,U,Q)=>{let ot=J(Q[U]),St=ot.attr("transform"),gt=0,_t=0;if(St){let Ot=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(St);Ot&&(gt=parseFloat(Ot[1]),_t=parseFloat(Ot[2]),ot.attr("class").includes("attribute-name")?gt+=w:ot.attr("class").includes("attribute-keys")?gt+=w+B:ot.attr("class").includes("attribute-comment")&&(gt+=w+B+C))}ot.attr("transform",`translate(${_+e/2+gt}, ${_t+z+y.height+s/2})`)}),u.select(".name").attr("transform","translate("+-y.width/2+", "+(z+s/2)+")"),h!=null&&ys.has(h)){let F=c.colorIndex??0;u.attr("data-color-id",`color-${F%n.length}`)}let Bt=V.rectangle(_,z,L,X,O),Pt=u.insert(()=>Bt,":first-child").attr("class","outer-path").attr("style",p.join(""));S.push(0);for(let[F,U]of N.entries()){let ot=(F+1)%2===0&&U.yOffset!==0,St=V.rectangle(_,y.height+z+U?.yOffset,L,U?.rowHeight,{...O,fill:ot?o:f,stroke:i});u.insert(()=>St,"g.label").attr("style",p.join("")).attr("class",`row-rect-${ot?"even":"odd"}`)}let ht=1e-4,nt=Ct(_,y.height+z,L+_,y.height+z,ht),pt=V.polygon(nt.map(F=>[F.x,F.y]),O);if(u.insert(()=>pt).attr("class","divider"),nt=Ct(w+_,y.height+z,w+_,X+z,ht),pt=V.polygon(nt.map(F=>[F.x,F.y]),O),u.insert(()=>pt).attr("class","divider"),M){let F=w+B+_;nt=Ct(F,y.height+z,F,X+z,ht),pt=V.polygon(nt.map(U=>[U.x,U.y]),O),u.insert(()=>pt).attr("class","divider")}if(E){let F=w+B+C+_;nt=Ct(F,y.height+z,F,X+z,ht),pt=V.polygon(nt.map(U=>[U.x,U.y]),O),u.insert(()=>pt).attr("class","divider")}for(let F of S){let U=y.height+z+F;nt=Ct(_,U,L+_,U,ht),pt=V.polygon(nt.map(Q=>[Q.x,Q.y]),O),u.insert(()=>pt).attr("class","divider")}if(k(t,Pt),m&&t.look!=="handDrawn")if(h!=null&&Js.has(h))u.selectAll("path").attr("style",m);else{let U=m.split(";")?.filter(Q=>Q.includes("stroke"))?.map(Q=>`${Q}`).join("; ");u.selectAll("path").attr("style",U??""),u.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(F){return $.rect(t,F)},u}x(Yt,"erBox");async function Tt(d,t,c,h=0,a=0,o=[],f=""){let i=d.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${h}, ${a})`).attr("style",f);t!==Lt(t)&&(t=Lt(t),t=t.replaceAll("<","<").replaceAll(">",">"));let n=i.node().appendChild(await rt(i,t,{width:wt(t,c)+100,style:f,useHtmlLabels:c.htmlLabels},c));if(t.includes("<")||t.includes(">")){let e=n.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let r=n.getBBox();if(lt(c.htmlLabels)){let e=n.children[0];e.style.textAlign="start";let s=J(n);r=e.getBoundingClientRect(),s.attr("width",r.width),s.attr("height",r.height)}return r}x(Tt,"addText");function Ct(d,t,c,h,a){return d===c?[{x:d-a/2,y:t},{x:d+a/2,y:t},{x:c+a/2,y:h},{x:c-a/2,y:h}]:[{x:d,y:t-a/2},{x:d,y:t+a/2},{x:c,y:h+a/2},{x:c,y:h-a/2}]}x(Ct,"lineToPolygon");async function us(d,t,c,h,a=c.class.padding??12){let o=h?0:3,f=d.insert("g").attr("class",T(t)).attr("id",t.domId||t.id),i=null,n=null,r=null,e=null,s=0,p=0,l=0;if(i=f.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let b=t.annotations[0];await jt(i,{text:`\xAB${b}\xBB`},0),s=i.node().getBBox().height}n=f.insert("g").attr("class","label-group text"),await jt(n,t,0,["font-weight: bolder"]);let m=n.node().getBBox();p=m.height,r=f.insert("g").attr("class","members-group text");let g=0;for(let b of t.members){let S=await jt(r,b,g,[b.parseClassifier()]);g+=S+o}l=r.node().getBBox().height,l<=0&&(l=a/2),e=f.insert("g").attr("class","methods-group text");let u=0;for(let b of t.methods){let S=await jt(e,b,u,[b.parseClassifier()]);u+=S+o}let y=f.node().getBBox();if(i!==null){let b=i.node().getBBox();i.attr("transform",`translate(${-b.width/2})`)}return n.attr("transform",`translate(${-m.width/2}, ${s})`),y=f.node().getBBox(),r.attr("transform",`translate(0, ${s+p+a*2})`),y=f.node().getBBox(),e.attr("transform",`translate(0, ${s+p+(l?l+a*4:a*2)})`),y=f.node().getBBox(),{shapeSvg:f,bbox:y}}x(us,"textHelper");async function jt(d,t,c,h=[]){let a=d.insert("g").attr("class","label").attr("style",h.join("; ")),o=ft(),f="useHtmlLabels"in t?t.useHtmlLabels:lt(o.htmlLabels)??!0,i="";"text"in t?i=t.text:i=t.label,!f&&i.startsWith("\\")&&(i=i.substring(1)),qt(i)&&(f=!0);let n=await rt(a,Rt(Nt(i)),{width:wt(i,o)+50,classes:"markdown-node-label",useHtmlLabels:f},o),r,e=1;if(f){let s=n.children[0],p=J(n);e=s.innerHTML.split("
    ").length,s.innerHTML.includes("")&&(e+=s.innerHTML.split("").length-1);let l=s.getElementsByTagName("img");if(l){let m=i.replace(/]*>/g,"").trim()==="";await Promise.all([...l].map(g=>new Promise(u=>{function y(){if(g.style.display="flex",g.style.flexDirection="column",m){let b=o.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,N=parseInt(b,10)*5+"px";g.style.minWidth=N,g.style.maxWidth=N}else g.style.width="100%";u(g)}x(y,"setupImage"),setTimeout(()=>{g.complete&&y()}),g.addEventListener("error",y),g.addEventListener("load",y)})))}r=s.getBoundingClientRect(),p.attr("width",r.width),p.attr("height",r.height)}else{h.includes("font-weight: bolder")&&J(n).selectAll("tspan").attr("font-weight",""),e=n.children.length;let s=n.children[0];(n.textContent===""||n.textContent.includes(">"))&&(s.textContent=i[0]+i.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),i[1]===" "&&(s.textContent=s.textContent[0]+" "+s.textContent.substring(1))),s.textContent==="undefined"&&(s.textContent=""),r=n.getBBox()}return a.attr("transform","translate(0,"+(-r.height/(2*e)+c)+")"),r.height}x(jt,"addText");async function xs(d,t){let c=Z(),{themeVariables:h}=c,{useGradient:a}=h,o=c.class.padding??12,f=o,i=t.useHtmlLabels??lt(c.htmlLabels)??!0,n=t;n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[];let{shapeSvg:r,bbox:e}=await us(d,t,c,i,f),{labelStyles:s,nodeStyles:p}=v(t);t.labelStyle=s,t.cssStyles=n.styles||"";let l=n.styles?.join(";")||p||"";t.cssStyles||(t.cssStyles=l.replaceAll("!important","").split(";"));let m=n.members.length===0&&n.methods.length===0&&!c.class?.hideEmptyMembersBox,g=D.svg(r),u=P(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let y=Math.max(t.width??0,e.width),b=Math.max(t.height??0,e.height),S=(t.height??0)>e.height;n.members.length===0&&n.methods.length===0?b+=f:n.members.length>0&&n.methods.length===0&&(b+=f*2);let N=-y/2,w=-b/2,B=m?o*2:n.members.length===0&&n.methods.length===0?-o:0;S&&(B=o*2);let C=g.rectangle(N-o,w-o-(m?o:n.members.length===0&&n.methods.length===0?-o/2:0),y+2*o,b+2*o+B,u),R=r.insert(()=>C,":first-child");R.attr("class","basic label-container outer-path");let M=R.node().getBBox(),E=r.select(".annotation-group").node().getBBox().height-(m?o/2:0)||0,H=r.select(".label-group").node().getBBox().height-(m?o/2:0)||0,W=r.select(".members-group").node().getBBox().height-(m?o/2:0)||0,j=(E+H+w+o-(w-o-(m?o:n.members.length===0&&n.methods.length===0?-o/2:0)))/2;if(r.selectAll(".text").each((V,O,A)=>{let L=J(A[O]),X=L.attr("transform"),_=0;if(X){let ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(X);ht&&(_=parseFloat(ht[2]))}let z=_+w+o-(m?o:n.members.length===0&&n.methods.length===0?-o/2:0);if(L.attr("class").includes("methods-group")){let Pt=Math.max(W,f/2);S?z=Math.max(j,E+H+Pt+w+f*2+o)+f*2:z=E+H+Pt+w+f*4+o}n.members.length===0&&n.methods.length===0&&c.class?.hideEmptyMembersBox&&(n.annotations.length>0?z=_-f:z=_),i||(z-=4);let Bt=N;(L.attr("class").includes("label-group")||L.attr("class").includes("annotation-group"))&&(Bt=-L.node()?.getBBox().width/2||0,r.selectAll("text").each(function(Pt,ht,nt){window.getComputedStyle(nt[ht]).textAnchor==="middle"&&(Bt=0)})),L.attr("transform",`translate(${Bt}, ${z})`)}),n.members.length>0||n.methods.length>0||m){let V=E+H+w+o,O=g.line(M.x,V,M.x+M.width,V+.001,u);r.insert(()=>O).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",l)}if(m||n.members.length>0||n.methods.length>0){let V=E+H+W+w+f*2+o,O=g.line(M.x,S?Math.max(j,V):V,M.x+M.width,(S?Math.max(j,V):V)+.001,u);r.insert(()=>O).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",l)}if(n.look!=="handDrawn"&&r.selectAll("path").attr("style",l),R.select(":nth-child(2)").attr("style",l),r.selectAll(".divider").select("path").attr("style",l),t.labelStyle?r.selectAll("span").attr("style",t.labelStyle):r.selectAll("span").attr("style",l),!i){let V=RegExp(/color\s*:\s*([^;]*)/),O=V.exec(l);if(O){let A=O[0].replace("color","fill");r.selectAll("tspan").attr("style",A)}else if(s){let A=V.exec(s);if(A){let L=A[0].replace("color","fill");r.selectAll("tspan").attr("style",L)}}}return k(t,R),t.intersect=function(V){return $.rect(t,V)},r}x(xs,"classBox");async function bs(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let a=t,o=t,f=20,i=20,n="verifyMethod"in t,r=T(t),{themeVariables:e}=Z(),{borderColorArray:s,requirementEdgeLabelBackground:p}=e,l=d.insert("g").attr("class",r).attr("id",t.domId??t.id),m;n?m=await mt(l,`<<${a.type}>>`,0,t.labelStyle):m=await mt(l,"<<Element>>",0,t.labelStyle);let g=m,u=await mt(l,a.name,g,t.labelStyle+"; font-weight: bold;");if(g+=u+i,n){let M=await mt(l,`${a.requirementId?`ID: ${a.requirementId}`:""}`,g,t.labelStyle);g+=M;let E=await mt(l,`${a.text?`Text: ${a.text}`:""}`,g,t.labelStyle);g+=E;let H=await mt(l,`${a.risk?`Risk: ${a.risk}`:""}`,g,t.labelStyle);g+=H,await mt(l,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,g,t.labelStyle)}else{let M=await mt(l,`${o.type?`Type: ${o.type}`:""}`,g,t.labelStyle);g+=M,await mt(l,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,g,t.labelStyle)}let y=(l.node()?.getBBox().width??200)+f,b=(l.node()?.getBBox().height??200)+f,S=-y/2,N=-b/2,w=D.svg(l),B=P(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");let C=w.rectangle(S,N,y,b,B),R=l.insert(()=>C,":first-child");if(R.attr("class","basic label-container outer-path").attr("style",h),s?.length){let M=t.colorIndex??0;l.attr("data-color-id",`color-${M%s.length}`)}if(l.selectAll(".label").each((M,E,H)=>{let W=J(H[E]),j=W.attr("transform"),V=0,O=0;if(j){let _=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);_&&(V=parseFloat(_[1]),O=parseFloat(_[2]))}let A=O-b/2,L=S+f/2;(E===0||E===1)&&(L=V),W.attr("transform",`translate(${L}, ${A+f})`)}),g>m+u+i){let M=N+m+u+i,E;if(t.look==="neo"){let j=[[S,M],[S+y,M],[S+y,M+.001],[S,M+.001]];E=w.polygon(j,B)}else E=w.line(S,M,S+y,M,B);l.insert(()=>E).attr("class","divider")}return k(t,R),t.intersect=function(M){return $.rect(t,M)},h&&t.look!=="handDrawn"&&(p||s?.length)&&l.selectAll("path").attr("style",h),l}x(bs,"requirementBox");async function mt(d,t,c,h=""){if(t==="")return 0;let a=d.insert("g").attr("class","label").attr("style",h),o=Z(),f=o.htmlLabels??!0,i=await rt(a,Rt(Nt(t)),{width:wt(t,o)+50,classes:"markdown-node-label",useHtmlLabels:f,style:h},o),n;if(f){let r=i.children[0],e=J(i);n=r.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{let r=i.children[0];for(let e of r.children)h&&e.setAttribute("style",h);n=i.getBBox(),n.height+=6}return a.attr("transform",`translate(${-n.width/2},${-n.height/2+c})`),n.height}x(mt,"addText");var Ks=x(d=>{switch(d){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Ss(d,t,{config:c}){let{labelStyles:h,nodeStyles:a}=v(t);t.labelStyle=h||"";let o=10,f=t.width;t.width=(t.width??200)-10;let{shapeSvg:i,bbox:n,label:r}=await G(d,t,T(t)),e=t.padding||10,s="",p;"ticket"in t&&t.ticket&&c?.kanban?.ticketBaseUrl&&(s=c?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=i.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",s).attr("target","_blank"));let l={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},m,g;p?{label:m,bbox:g}=await Gt(p,"ticket"in t&&t.ticket||"",l):{label:m,bbox:g}=await Gt(i,"ticket"in t&&t.ticket||"",l);let{label:u,bbox:y}=await Gt(i,"assigned"in t&&t.assigned||"",l);t.width=f;let b=10,S=t?.width||0,N=Math.max(g.height,y.height)/2,w=Math.max(n.height+b*2,t?.height||0)+N,B=-S/2,C=-w/2;r.attr("transform","translate("+(e-S/2)+", "+(-N-n.height/2)+")"),m.attr("transform","translate("+(e-S/2)+", "+(-N+n.height/2)+")"),u.attr("transform","translate("+(e+S/2-y.width-2*o)+", "+(-N+n.height/2)+")");let R,{rx:M,ry:E}=t,{cssStyles:H}=t;if(t.look==="handDrawn"){let W=D.svg(i),j=P(t,{}),V=M||E?W.path(it(B,C,S,w,M||0),j):W.rectangle(B,C,S,w,j);R=i.insert(()=>V,":first-child"),R.attr("class","basic label-container").attr("style",H||null)}else{R=i.insert("rect",":first-child"),R.attr("class","basic label-container __APA__").attr("style",a).attr("rx",M??5).attr("ry",E??5).attr("x",B).attr("y",C).attr("width",S).attr("height",w);let W="priority"in t&&t.priority;if(W){let j=i.append("line"),V=B+2,O=C+Math.floor((M??0)/2),A=C+w-Math.floor((M??0)/2);j.attr("x1",V).attr("y1",O).attr("x2",V).attr("y2",A).attr("stroke-width","4").attr("stroke",Ks(W))}}return k(t,R),t.height=w,t.intersect=function(W){return $.rect(t,W)},i}x(Ss,"kanbanItem");async function ws(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o,halfPadding:f,label:i}=await G(d,t,T(t)),n=o.width+10*f,r=o.height+8*f,e=.15*n,{cssStyles:s}=t,p=o.width+20,l=o.height+20,m=Math.max(n,p),g=Math.max(r,l);i.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let u,y=`M0 0 + a${e},${e} 1 0,0 ${m*.25},${-1*g*.1} + a${e},${e} 1 0,0 ${m*.25},0 + a${e},${e} 1 0,0 ${m*.25},0 + a${e},${e} 1 0,0 ${m*.25},${g*.1} + + a${e},${e} 1 0,0 ${m*.15},${g*.33} + a${e*.8},${e*.8} 1 0,0 0,${g*.34} + a${e},${e} 1 0,0 ${-1*m*.15},${g*.33} + + a${e},${e} 1 0,0 ${-1*m*.25},${g*.15} + a${e},${e} 1 0,0 ${-1*m*.25},0 + a${e},${e} 1 0,0 ${-1*m*.25},0 + a${e},${e} 1 0,0 ${-1*m*.25},${-1*g*.15} + + a${e},${e} 1 0,0 ${-1*m*.1},${-1*g*.33} + a${e*.8},${e*.8} 1 0,0 0,${-1*g*.34} + a${e},${e} 1 0,0 ${m*.1},${-1*g*.33} + H0 V0 Z`;if(t.look==="handDrawn"){let b=D.svg(a),S=P(t,{}),N=b.path(y,S);u=a.insert(()=>N,":first-child"),u.attr("class","basic label-container").attr("style",q(s))}else u=a.insert("path",":first-child").attr("class","basic label-container").attr("style",h).attr("d",y);return u.attr("transform",`translate(${-m/2}, ${-g/2})`),k(t,u),t.calcIntersect=function(b,S){return $.rect(b,S)},t.intersect=function(b){return Y.info("Bang intersect",t,b),$.rect(t,b)},a}x(ws,"bang");async function Ns(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o,halfPadding:f,label:i}=await G(d,t,T(t)),n=o.width+2*f,r=o.height+2*f,e=.15*n,s=.25*n,p=.35*n,l=.2*n,{cssStyles:m}=t,g,u=`M0 0 + a${e},${e} 0 0,1 ${n*.25},${-1*n*.1} + a${p},${p} 1 0,1 ${n*.4},${-1*n*.1} + a${s},${s} 1 0,1 ${n*.35},${n*.2} + + a${e},${e} 1 0,1 ${n*.15},${r*.35} + a${l},${l} 1 0,1 ${-1*n*.15},${r*.65} + + a${s},${e} 1 0,1 ${-1*n*.25},${n*.15} + a${p},${p} 1 0,1 ${-1*n*.5},0 + a${e},${e} 1 0,1 ${-1*n*.25},${-1*n*.15} + + a${e},${e} 1 0,1 ${-1*n*.1},${-1*r*.35} + a${l},${l} 1 0,1 ${n*.1},${-1*r*.65} + H0 V0 Z`;if(t.look==="handDrawn"){let y=D.svg(a),b=P(t,{}),S=y.path(u,b);g=a.insert(()=>S,":first-child"),g.attr("class","basic label-container").attr("style",q(m))}else g=a.insert("path",":first-child").attr("class","basic label-container").attr("style",h).attr("d",u);return i.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),g.attr("transform",`translate(${-n/2}, ${-r/2})`),k(t,g),t.calcIntersect=function(y,b){return $.rect(y,b)},t.intersect=function(y){return Y.info("Cloud intersect",t,y),$.rect(t,y)},a}x(Ns,"cloud");async function $s(d,t){let{labelStyles:c,nodeStyles:h}=v(t);t.labelStyle=c;let{shapeSvg:a,bbox:o,halfPadding:f,label:i}=await G(d,t,T(t)),n=o.width+8*f,r=o.height+2*f,e=5,s=t.look==="neo"?` + M${-n/2} ${r/2-e} + v${-r+2*e} + q0,-${e} ${e},-${e} + h${n-2*e} + q${e},0 ${e},${e} + v${r-e} + H${-n/2} + Z + `:` + M${-n/2} ${r/2-e} + v${-r+2*e} + q0,-${e} ${e},-${e} + h${n-2*e} + q${e},0 ${e},${e} + v${r-2*e} + q0,${e} ${-e},${e} + h${-(n-2*e)} + q${-e},0 ${-e},${-e} + Z + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let p=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",h).attr("d",s);return a.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",r/2).attr("x2",n/2).attr("y2",r/2),i.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>i.node()),k(t,p),t.calcIntersect=function(l,m){return $.rect(l,m)},t.intersect=function(l){return $.rect(t,l)},a}x($s,"defaultMindmapNode");async function Ds(d,t){let c={padding:t.padding??0};return Ht(d,t,c)}x(Ds,"mindmapCircle");var Qs=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Ze},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:qe},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Je},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:es},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:de},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ye},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ht},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ws},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Ns},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ye},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Pe},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:He},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ee},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ls},{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:Ge},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:xe},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:is},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ae},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ze},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:ts},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Qe},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:$e},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ve},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ce},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:he},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:pe},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:je},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:gs},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:De},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ns},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Ve},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:me},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ue},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ms},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ds},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:be},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cs},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Ne},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ue},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:We},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ie},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:oe},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:le},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:rs},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ss},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:fs},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Fe},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Le}],tr=x(()=>{let t=[...Object.entries({state:Ke,choice:ne,note:Xe,rectWithTitle:_e,labelRect:Me,iconSquare:Ce,iconCircle:Be,icon:ke,iconRounded:Te,imageSquare:Re,anchor:re,kanbanItem:Ss,mindmapCircle:Ds,defaultMindmapNode:$s,classBox:xs,erBox:Yt,requirementBox:bs}),...Qs.flatMap(c=>[c.shortName,..."aliases"in c?c.aliases:[],..."internalAliases"in c?c.internalAliases:[]].map(a=>[a,c.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Ft=tr();function Xg(d){return d in Ft}x(Xg,"isValidShape");var At=new Map;async function Ug(d,t,c){let h,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let o=t.shape?Ft[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let f;c.config.securityLevel==="sandbox"?f="_top":t.linkTarget&&(f=t.linkTarget||"_blank"),h=d.insert("svg:a").attr("xlink:href",t.link).attr("target",f??null),a=await o(h,t,c)}else a=await o(d,t,c),h=a;return h.attr("data-look",q(t.look)),t.tooltip&&a.attr("title",t.tooltip),At.set(t.id,h),t.haveCallback&&h.attr("class",h.attr("class")+" clickable"),h}x(Ug,"insertNode");var Zg=x((d,t)=>{At.set(t.id,d)},"setNodeElem"),Jg=x(()=>{At.clear()},"clear"),Kg=x(d=>{let t=At.get(d.id);Y.trace("Transforming node",d.diff,d,"translate("+(d.x-d.width/2-5)+", "+d.width/2+")");let c=8,h=d.diff||0;return d.clusterNode?t.attr("transform","translate("+(d.x+h-d.width/2)+", "+(d.y-d.height/2-c)+")"):t.attr("transform","translate("+d.x+", "+d.y+")"),h},"positionNode");export{G as a,k as b,vt as c,Xg as d,Rr as e,Gr as f,Ug as g,Zg as h,Jg as i,Kg as j}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGYTTC2M.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGYTTC2M.mjs new file mode 100644 index 00000000000..f50150fd310 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KGYTTC2M.mjs @@ -0,0 +1 @@ +import{a as e,b as a,c as i,d as n,e as s,g as u,k as d,s as l,t as c}from"./chunk-4R4BOZG6.mjs";import{a as o}from"./chunk-AQ6EADP3.mjs";var m=class extends c{static{o(this,"InfoTokenBuilder")}static{e(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},v={parser:{TokenBuilder:e(()=>new m,"TokenBuilder"),ValueConverter:e(()=>new l,"ValueConverter")}};function I(f=s){let r=n(i(f),u),t=n(a({shared:r}),d,v);return r.ServiceRegistry.register(t),{shared:r,Info:t}}o(I,"createInfoServices");e(I,"createInfoServices");export{v as a,I as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KNLZD3CH.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KNLZD3CH.mjs new file mode 100644 index 00000000000..8ba7646472b --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KNLZD3CH.mjs @@ -0,0 +1 @@ +import{a as n,b as R}from"./chunk-AQ6EADP3.mjs";var g=R(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0;e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;e.htmlCtrlEntityRegex=/&(newline|tab);/gi;e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;e.urlSchemeRegex=/^.+(:|:)/gim;e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;e.relativeFirstCharacters=[".","/"];e.BLANK_URL="about:blank"});var f=R(h=>{"use strict";Object.defineProperty(h,"__esModule",{value:!0});h.sanitizeUrl=void 0;var t=g();function v(r){return t.relativeFirstCharacters.indexOf(r[0])>-1}n(v,"isRelativeUrlWithoutProtocol");function x(r){var c=r.replace(t.ctrlCharactersRegex,"");return c.replace(t.htmlEntitiesRegex,function(a,i){return String.fromCharCode(i)})}n(x,"decodeHtmlCharacters");function C(r){return URL.canParse(r)}n(C,"isValidUrl");function d(r){try{return decodeURIComponent(r)}catch{return r}}n(d,"decodeURI");function p(r){if(!r)return t.BLANK_URL;var c,a=d(r.trim());do a=x(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),a=d(a),c=a.match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex);while(c&&c.length>0);var i=a;if(!i)return t.BLANK_URL;if(v(i))return i;var u=i.trimStart(),m=u.match(t.urlSchemeRegex);if(!m)return i;var l=m[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(l))return t.BLANK_URL;var s=u.replace(/\\/g,"/");if(l==="mailto:"||l.includes("://"))return s;if(l==="http:"||l==="https:"){if(!C(s))return t.BLANK_URL;var o=new URL(s);return o.protocol=o.protocol.toLowerCase(),o.hostname=o.hostname.toLowerCase(),o.toString()}return s}n(p,"sanitizeUrl");h.sanitizeUrl=p});export{f as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KRXBNO2N.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KRXBNO2N.mjs new file mode 100644 index 00000000000..fc8560e050f --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-KRXBNO2N.mjs @@ -0,0 +1 @@ +import{A as I,B as A,C as Z,D as E,a as vr,b as F,c as N,e as _r,f as Q,g as wr,h as R,i as u,j as O,k as Y,l as _,m as br,n as Er,o as q,p as P,q as y,r as G,s as x,t as z,u as L,v as V,w as B,x as k,y as S,z as yr}from"./chunk-W44A43WB.mjs";import{a as s}from"./chunk-AQ6EADP3.mjs";function g(r,e,n,t){var o;do o=A(t);while(r.hasNode(o));return n.dummy=e,r.setNode(o,n),o}s(g,"addDummyNode");function xr(r){var e=new E().setGraph(r.graph());return u(r.nodes(),function(n){e.setNode(n,r.node(n))}),u(r.edges(),function(n){var t=e.edge(n.v,n.w)||{weight:0,minlen:1},o=r.edge(n);e.setEdge(n.v,n.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),e}s(xr,"simplify");function X(r){var e=new E({multigraph:r.isMultigraph()}).setGraph(r.graph());return u(r.nodes(),function(n){r.children(n).length||e.setNode(n,r.node(n))}),u(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}s(X,"asNonCompoundGraph");function $(r,e){var n=r.x,t=r.y,o=e.x-n,a=e.y-t,i=r.width/2,f=r.height/2;if(!o&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var d,c;return Math.abs(a)*i>Math.abs(o)*f?(a<0&&(f=-f),d=f*o/a,c=f):(o<0&&(i=-i),d=i,c=i*a/o),{x:n+d,y:t+c}}s($,"intersectRect");function C(r){var e=_(k(er(r)+1),function(){return[]});return u(r.nodes(),function(n){var t=r.node(n),o=t.rank;y(o)||(e[o][t.order]=n)}),e}s(C,"buildLayerMatrix");function kr(r){var e=L(_(r.nodes(),function(n){return r.node(n).rank}));u(r.nodes(),function(n){var t=r.node(n);q(t,"rank")&&(t.rank-=e)})}s(kr,"normalizeRanks");function gr(r){var e=L(_(r.nodes(),function(a){return r.node(a).rank})),n=[];u(r.nodes(),function(a){var i=r.node(a).rank-e;n[i]||(n[i]=[]),n[i].push(a)});var t=0,o=r.graph().nodeRankFactor;u(n,function(a,i){y(a)&&i%o!==0?--t:t&&u(a,function(f){r.node(f).rank+=t})})}s(gr,"removeEmptyRanks");function rr(r,e,n,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=t),g(r,"border",o,e)}s(rr,"addBorderNode");function er(r){return x(_(r.nodes(),function(e){var n=r.node(e).rank;if(!y(n))return n}))}s(er,"maxRank");function Nr(r,e){var n={lhs:[],rhs:[]};return u(r,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}s(Nr,"partition");function Or(r,e){var n=Q();try{return e()}finally{console.log(r+" time: "+(Q()-n)+"ms")}}s(Or,"time");function Ir(r,e){return e()}s(Ir,"notime");function Lr(r){function e(n){var t=r.children(n),o=r.node(n);if(t.length&&u(t,e),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var a=o.minRank,i=o.maxRank+1;a0;--f)if(i=e[f].dequeue(),i){t=t.concat(or(r,e,n,i,!0));break}}}return t}s(be,"doGreedyFAS");function or(r,e,n,t,o){var a=o?[]:void 0;return u(r.inEdges(t.v),function(i){var f=r.edge(i),d=r.node(i.v);o&&a.push({v:i.v,w:i.w}),d.out-=f,ar(e,n,d)}),u(r.outEdges(t.v),function(i){var f=r.edge(i),d=i.w,c=r.node(d);c.in-=f,ar(e,n,c)}),r.removeNode(t.v),a}s(or,"removeNode");function Ee(r,e){var n=new E,t=0,o=0;u(r.nodes(),function(f){n.setNode(f,{v:f,in:0,out:0})}),u(r.edges(),function(f){var d=n.edge(f.v,f.w)||0,c=e(f),h=d+c;n.setEdge(f.v,f.w,h),o=Math.max(o,n.node(f.v).out+=c),t=Math.max(t,n.node(f.w).in+=c)});var a=k(o+t+3).map(function(){return new H}),i=t+1;return u(n.nodes(),function(f){ar(a,i,n.node(f))}),{graph:n,buckets:a,zeroIdx:i}}s(Ee,"buildState");function ar(r,e,n){n.out?n.in?r[n.out-n.in+e].enqueue(n):r[r.length-1].enqueue(n):r[0].enqueue(n)}s(ar,"assignBucket");function Fr(r){var e=r.graph().acyclicer==="greedy"?Mr(r,n(r)):ye(r);u(e,function(t){var o=r.edge(t);r.removeEdge(t),o.forwardName=t.name,o.reversed=!0,r.setEdge(t.w,t.v,o,A("rev"))});function n(t){return function(o){return t.edge(o).weight}}s(n,"weightFn")}s(Fr,"run");function ye(r){var e=[],n={},t={};function o(a){Object.prototype.hasOwnProperty.call(t,a)||(t[a]=!0,n[a]=!0,u(r.outEdges(a),function(i){Object.prototype.hasOwnProperty.call(n,i.w)?e.push(i):o(i.w)}),delete n[a])}return s(o,"dfs"),u(r.nodes(),o),e}s(ye,"dfsFAS");function Gr(r){u(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var t=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,t)}})}s(Gr,"undo");function Br(r){r.graph().dummyChains=[],u(r.edges(),function(e){xe(r,e)})}s(Br,"run");function xe(r,e){var n=e.v,t=r.node(n).rank,o=e.w,a=r.node(o).rank,i=e.name,f=r.edge(e),d=f.labelRank;if(a!==t+1){r.removeEdge(e);var c=void 0,h,l;for(l=0,++t;ti.lim&&(f=i,d=!0);var c=O(e.edges(),function(h){return d===zr(r,r.node(h.v),f)&&d!==zr(r,r.node(h.w),f)});return V(c,function(h){return M(e,h)})}s(Xr,"enterEdge");function Hr(r,e,n,t){var o=n.v,a=n.w;r.removeEdge(o,a),r.setEdge(t.v,t.w,{}),dr(r),ur(r,e),je(r,e)}s(Hr,"exchangeEdges");function je(r,e){var n=Y(r.nodes(),function(o){return!e.node(o).parent}),t=fr(r,n);t=t.slice(1),u(t,function(o){var a=r.node(o).parent,i=e.edge(o,a),f=!1;i||(i=e.edge(a,o),f=!0),e.node(o).rank=e.node(a).rank+(f?i.minlen:-i.minlen)})}s(je,"updateRanks");function Te(r,e,n){return r.hasEdge(e,n)}s(Te,"isTreeEdge");function zr(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}s(zr,"isDescendant");function cr(r){switch(r.graph().ranker){case"network-simplex":Jr(r);break;case"tight-tree":Se(r);break;case"longest-path":Re(r);break;default:Jr(r)}}s(cr,"rank");var Re=U;function Se(r){U(r),J(r)}s(Se,"tightTreeRanker");function Jr(r){T(r)}s(Jr,"networkSimplexRanker");function Kr(r){var e=g(r,"root",{},"_root"),n=Me(r),t=x(P(n))-1,o=2*t+1;r.graph().nestingRoot=e,u(r.edges(),function(i){r.edge(i).minlen*=o});var a=Fe(r)+1;u(r.children(),function(i){Qr(r,e,o,a,t,n,i)}),r.graph().nodeRankFactor=o}s(Kr,"run");function Qr(r,e,n,t,o,a,i){var f=r.children(i);if(!f.length){i!==e&&r.setEdge(e,i,{weight:0,minlen:n});return}var d=rr(r,"_bt"),c=rr(r,"_bb"),h=r.node(i);r.setParent(d,i),h.borderTop=d,r.setParent(c,i),h.borderBottom=c,u(f,function(l){Qr(r,e,n,t,o,a,l);var p=r.node(l),m=p.borderTop?p.borderTop:l,v=p.borderBottom?p.borderBottom:l,b=p.borderTop?t:2*t,D=m!==v?1:o-a[i]+1;r.setEdge(d,m,{weight:b,minlen:D,nestingEdge:!0}),r.setEdge(v,c,{weight:b,minlen:D,nestingEdge:!0})}),r.parent(i)||r.setEdge(e,d,{weight:0,minlen:o+a[i]})}s(Qr,"dfs");function Me(r){var e={};function n(t,o){var a=r.children(t);a&&a.length&&u(a,function(i){n(i,o+1)}),e[t]=o}return s(n,"dfs"),u(r.children(),function(t){n(t,1)}),e}s(Me,"treeDepths");function Fe(r){return S(r.edges(),function(e,n){return e+r.edge(n).weight},0)}s(Fe,"sumWeights");function Zr(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,u(r.edges(),function(n){var t=r.edge(n);t.nestingEdge&&r.removeEdge(n)})}s(Zr,"cleanup");function $r(r,e,n){var t={},o;u(n,function(a){for(var i=r.parent(a),f,d;i;){if(f=r.parent(i),f?(d=t[f],t[f]=i):(d=o,o=i),d&&d!==i){e.setEdge(d,i);return}i=f}})}s($r,"addSubgraphConstraints");function re(r,e,n){var t=Ve(r),o=new E({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return r.node(a)});return u(r.nodes(),function(a){var i=r.node(a),f=r.parent(a);(i.rank===e||i.minRank<=e&&e<=i.maxRank)&&(o.setNode(a),o.setParent(a,f||t),u(r[n](a),function(d){var c=d.v===a?d.w:d.v,h=o.edge(c,a),l=y(h)?0:h.weight;o.setEdge(c,a,{weight:r.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(i,"minRank")&&o.setNode(a,{borderLeft:i.borderLeft[e],borderRight:i.borderRight[e]}))}),o}s(re,"buildLayerGraph");function Ve(r){for(var e;r.hasNode(e=A("_root")););return e}s(Ve,"createRootNode");function ee(r,e){for(var n=0,t=1;t0;)h%2&&(l+=f[h+1]),h=h-1>>1,f[h]+=c.weight;d+=c.weight*l})),d}s(Be,"twoLayerCrossCount");function ne(r){var e={},n=O(r.nodes(),function(f){return!r.children(f).length}),t=x(_(n,function(f){return r.node(f).rank})),o=_(k(t+1),function(){return[]});function a(f){if(!q(e,f)){e[f]=!0;var d=r.node(f);o[d.rank].push(f),u(r.successors(f),a)}}s(a,"dfs");var i=I(n,function(f){return r.node(f).rank});return u(i,a),o}s(ne,"initOrder");function te(r,e){return _(e,function(n){var t=r.inEdges(n);if(t.length){var o=S(t,function(a,i){var f=r.edge(i),d=r.node(i.v);return{sum:a.sum+f.weight*d.order,weight:a.weight+f.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}s(te,"barycenter");function oe(r,e){var n={};u(r,function(o,a){var i=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:a};y(o.barycenter)||(i.barycenter=o.barycenter,i.weight=o.weight)}),u(e.edges(),function(o){var a=n[o.v],i=n[o.w];!y(a)&&!y(i)&&(i.indegree++,a.out.push(n[o.w]))});var t=O(n,function(o){return!o.indegree});return Ae(t)}s(oe,"resolveConflicts");function Ae(r){var e=[];function n(a){return function(i){i.merged||(y(i.barycenter)||y(a.barycenter)||i.barycenter>=a.barycenter)&&De(a,i)}}s(n,"handleIn");function t(a){return function(i){i.in.push(a),--i.indegree===0&&r.push(i)}}for(s(t,"handleOut");r.length;){var o=r.pop();e.push(o),u(o.in.reverse(),n(o)),u(o.out,t(o))}return _(O(e,function(a){return!a.merged}),function(a){return B(a,["vs","i","barycenter","weight"])})}s(Ae,"doResolveConflicts");function De(r,e){var n=0,t=0;r.weight&&(n+=r.barycenter*r.weight,t+=r.weight),e.weight&&(n+=e.barycenter*e.weight,t+=e.weight),r.vs=e.vs.concat(r.vs),r.barycenter=n/t,r.weight=t,r.i=Math.min(e.i,r.i),e.merged=!0}s(De,"mergeEntries");function ie(r,e){var n=Nr(r,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),t=n.lhs,o=I(n.rhs,function(h){return-h.i}),a=[],i=0,f=0,d=0;t.sort(Ye(!!e)),d=ae(a,o,d),u(t,function(h){d+=h.vs.length,a.push(h.vs),i+=h.barycenter*h.weight,f+=h.weight,d=ae(a,o,d)});var c={vs:N(a)};return f&&(c.barycenter=i/f,c.weight=f),c}s(ie,"sort");function ae(r,e,n){for(var t;e.length&&(t=R(e)).i<=n;)e.pop(),r.push(t.vs),n++;return n}s(ae,"consumeUnsortable");function Ye(r){return function(e,n){return e.barycentern.barycenter?1:r?n.i-e.i:e.i-n.i}}s(Ye,"compareWithBias");function hr(r,e,n,t){var o=r.children(e),a=r.node(e),i=a?a.borderLeft:void 0,f=a?a.borderRight:void 0,d={};i&&(o=O(o,function(v){return v!==i&&v!==f}));var c=te(r,o);u(c,function(v){if(r.children(v.v).length){var b=hr(r,v.v,n,t);d[v.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&Ue(v,b)}});var h=oe(c,n);ze(h,d);var l=ie(h,t);if(i&&(l.vs=N([i,l.vs,f]),r.predecessors(i).length)){var p=r.node(r.predecessors(i)[0]),m=r.node(r.predecessors(f)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+p.order+m.order)/(l.weight+2),l.weight+=2}return l}s(hr,"sortSubgraph");function ze(r,e){u(r,function(n){n.vs=N(n.vs.map(function(t){return e[t]?e[t].vs:t}))})}s(ze,"expandSubgraphs");function Ue(r,e){y(r.barycenter)?(r.barycenter=e.barycenter,r.weight=e.weight):(r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight)}s(Ue,"mergeBarycenters");function ue(r){var e=er(r),n=se(r,k(1,e+1),"inEdges"),t=se(r,k(e-1,-1,-1),"outEdges"),o=ne(r);fe(r,o);for(var a=Number.POSITIVE_INFINITY,i,f=0,d=0;d<4;++f,++d){We(f%2?n:t,f%4>=2),o=C(r);var c=ee(r,o);ci||f>e[d].lim));for(c=d,d=t;(d=r.parent(d))!==c;)a.push(d);return{path:o.concat(a.reverse()),lca:c}}s(qe,"findPath");function Xe(r){var e={},n=0;function t(o){var a=n;u(r.children(o),t),e[o]={low:a,lim:n++}}return s(t,"dfs"),u(r.children(),t),e}s(Xe,"postorder");function He(r,e){var n={};function t(o,a){var i=0,f=0,d=o.length,c=R(a);return u(a,function(h,l){var p=Ke(r,h),m=p?r.node(p).order:d;(p||h===c)&&(u(a.slice(f,l+1),function(v){u(r.predecessors(v),function(b){var D=r.node(b),mr=D.order;(mrc)&&ce(n,p,h)})})}s(t,"scan");function o(a,i){var f=-1,d,c=0;return u(i,function(h,l){if(r.node(h).dummy==="border"){var p=r.predecessors(h);p.length&&(d=r.node(p[0]).order,t(i,c,l,f,d),c=l,f=d)}t(i,c,i.length,d,a.length)}),i}return s(o,"visitLayer"),S(e,o),n}s(Je,"findType2Conflicts");function Ke(r,e){if(r.node(e).dummy)return Y(r.predecessors(e),function(n){return r.node(n).dummy})}s(Ke,"findOtherInnerSegmentNode");function ce(r,e,n){if(e>n){var t=e;e=n,n=t}Object.prototype.hasOwnProperty.call(r,e)||Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=r[e];Object.defineProperty(o,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}s(ce,"addConflict");function Qe(r,e,n){if(e>n){var t=e;e=n,n=t}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}s(Qe,"hasConflict");function Ze(r,e,n,t){var o={},a={},i={};return u(e,function(f){u(f,function(d,c){o[d]=d,a[d]=d,i[d]=c})}),u(e,function(f){var d=-1;u(f,function(c){var h=t(c);if(h.length){h=I(h,function(b){return i[b]});for(var l=(h.length-1)/2,p=Math.floor(l),m=Math.ceil(l);p<=m;++p){var v=h[p];a[c]===c&&d{var t=n(" buildLayoutGraph",()=>bn(r));n(" runLayout",()=>un(t,n)),n(" updateInputGraph",()=>dn(r,t))})}s(fn,"layout");function un(r,e){e(" makeSpaceForEdgeLabels",()=>En(r)),e(" removeSelfEdges",()=>Ln(r)),e(" acyclic",()=>Fr(r)),e(" nestingGraph.run",()=>Kr(r)),e(" rank",()=>cr(X(r))),e(" injectEdgeLabelProxies",()=>yn(r)),e(" removeEmptyRanks",()=>gr(r)),e(" nestingGraph.cleanup",()=>Zr(r)),e(" normalizeRanks",()=>kr(r)),e(" assignRankMinMax",()=>xn(r)),e(" removeEdgeLabelProxies",()=>kn(r)),e(" normalize.run",()=>Br(r)),e(" parentDummyChains",()=>de(r)),e(" addBorderSegments",()=>Lr(r)),e(" order",()=>ue(r)),e(" insertSelfEdges",()=>Cn(r)),e(" adjustCoordinateSystem",()=>jr(r)),e(" position",()=>le(r)),e(" positionSelfEdges",()=>jn(r)),e(" removeBorderNodes",()=>Pn(r)),e(" normalize.undo",()=>Ar(r)),e(" fixupEdgeLabelCoords",()=>On(r)),e(" undoCoordinateSystem",()=>Tr(r)),e(" translateGraph",()=>gn(r)),e(" assignNodeIntersects",()=>Nn(r)),e(" reversePoints",()=>In(r)),e(" acyclic.undo",()=>Gr(r))}s(un,"runLayout");function dn(r,e){u(r.nodes(),function(n){var t=r.node(n),o=e.node(n);t&&(t.x=o.x,t.y=o.y,e.children(n).length&&(t.width=o.width,t.height=o.height))}),u(r.edges(),function(n){var t=r.edge(n),o=e.edge(n);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}s(dn,"updateInputGraph");var cn=["nodesep","edgesep","ranksep","marginx","marginy"],hn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},ln=["acyclicer","ranker","rankdir","align"],pn=["width","height"],mn={width:0,height:0},vn=["minlen","weight","width","height","labeloffset"],_n={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},wn=["labelpos"];function bn(r){var e=new E({multigraph:!0,compound:!0}),n=pr(r.graph());return e.setGraph(z({},hn,lr(n,cn),B(n,ln))),u(r.nodes(),function(t){var o=pr(r.node(t));e.setNode(t,wr(lr(o,pn),mn)),e.setParent(t,r.parent(t))}),u(r.edges(),function(t){var o=pr(r.edge(t));e.setEdge(t,z({},_n,lr(o,vn),B(o,wn)))}),e}s(bn,"buildLayoutGraph");function En(r){var e=r.graph();e.ranksep/=2,u(r.edges(),function(n){var t=r.edge(n);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}s(En,"makeSpaceForEdgeLabels");function yn(r){u(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var t=r.node(e.v),o=r.node(e.w),a={rank:(o.rank-t.rank)/2+t.rank,e};g(r,"edge-proxy",a,"_ep")}})}s(yn,"injectEdgeLabelProxies");function xn(r){var e=0;u(r.nodes(),function(n){var t=r.node(n);t.borderTop&&(t.minRank=r.node(t.borderTop).rank,t.maxRank=r.node(t.borderBottom).rank,e=x(e,t.maxRank))}),r.graph().maxRank=e}s(xn,"assignRankMinMax");function kn(r){u(r.nodes(),function(e){var n=r.node(e);n.dummy==="edge-proxy"&&(r.edge(n.e).labelRank=n.rank,r.removeNode(e))})}s(kn,"removeEdgeLabelProxies");function gn(r){var e=Number.POSITIVE_INFINITY,n=0,t=Number.POSITIVE_INFINITY,o=0,a=r.graph(),i=a.marginx||0,f=a.marginy||0;function d(c){var h=c.x,l=c.y,p=c.width,m=c.height;e=Math.min(e,h-p/2),n=Math.max(n,h+p/2),t=Math.min(t,l-m/2),o=Math.max(o,l+m/2)}s(d,"getExtremes"),u(r.nodes(),function(c){d(r.node(c))}),u(r.edges(),function(c){var h=r.edge(c);Object.prototype.hasOwnProperty.call(h,"x")&&d(h)}),e-=i,t-=f,u(r.nodes(),function(c){var h=r.node(c);h.x-=e,h.y-=t}),u(r.edges(),function(c){var h=r.edge(c);u(h.points,function(l){l.x-=e,l.y-=t}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=t)}),a.width=n-e+i,a.height=o-t+f}s(gn,"translateGraph");function Nn(r){u(r.edges(),function(e){var n=r.edge(e),t=r.node(e.v),o=r.node(e.w),a,i;n.points?(a=n.points[0],i=n.points[n.points.length-1]):(n.points=[],a=o,i=t),n.points.unshift($(t,a)),n.points.push($(o,i))})}s(Nn,"assignNodeIntersects");function On(r){u(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}s(On,"fixupEdgeLabelCoords");function In(r){u(r.edges(),function(e){var n=r.edge(e);n.reversed&&n.points.reverse()})}s(In,"reversePointsForReversedEdges");function Pn(r){u(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),t=r.node(n.borderTop),o=r.node(n.borderBottom),a=r.node(R(n.borderLeft)),i=r.node(R(n.borderRight));n.width=Math.abs(i.x-a.x),n.height=Math.abs(o.y-t.y),n.x=a.x+n.width/2,n.y=t.y+n.height/2}}),u(r.nodes(),function(e){r.node(e).dummy==="border"&&r.removeNode(e)})}s(Pn,"removeBorderNodes");function Ln(r){u(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}s(Ln,"removeSelfEdges");function Cn(r){var e=C(r);u(e,function(n){var t=0;u(n,function(o,a){var i=r.node(o);i.order=a+t,u(i.selfEdges,function(f){g(r,"selfedge",{width:f.label.width,height:f.label.height,rank:i.rank,order:a+ ++t,e:f.e,label:f.label},"_se")}),delete i.selfEdges})})}s(Cn,"insertSelfEdges");function jn(r){u(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var t=r.node(n.e.v),o=t.x+t.width/2,a=t.y,i=n.x-o,f=t.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:o+2*i/3,y:a-f},{x:o+5*i/6,y:a-f},{x:o+i,y:a},{x:o+5*i/6,y:a+f},{x:o+2*i/3,y:a+f}],n.label.x=n.x,n.label.y=n.y}})}s(jn,"positionSelfEdges");function lr(r,e){return G(B(r,e),Number)}s(lr,"selectNumberAttrs");function pr(r){var e={};return u(r,function(n,t){e[t.toLowerCase()]=n}),e}s(pr,"canonicalize");export{fn as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LCXTWHL2.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LCXTWHL2.mjs new file mode 100644 index 00000000000..4024110c8b3 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LCXTWHL2.mjs @@ -0,0 +1,231 @@ +import{a as Qt}from"./chunk-6764PJDD.mjs";import{a as te}from"./chunk-ZXARS5L4.mjs";import{b as Zt}from"./chunk-VU6ZFW4Y.mjs";import{g as Jt,p as qt}from"./chunk-QA3QBVWF.mjs";import{G as Y,S as Ut,T as Ht,U as jt,V as Wt,W as zt,X as Kt,Y as Xt,_ as L}from"./chunk-67TQ5CYL.mjs";import{b as _}from"./chunk-7W6UQGC5.mjs";import{a as c}from"./chunk-AQ6EADP3.mjs";var Ct=(function(){var t=c(function(F,o,d,n){for(d=d||{},n=F.length;n--;d[F[n]]=o);return d},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],u=[1,9],S=[1,11],f=[1,16],p=[1,17],m=[1,18],E=[1,19],b=[1,33],I=[1,20],D=[1,21],h=[1,22],R=[1,23],x=[1,24],G=[1,26],N=[1,27],$=[1,28],v=[1,29],Z=[1,30],st=[1,31],it=[1,32],rt=[1,35],nt=[1,36],at=[1,37],ot=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Ft=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Et={trace:c(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,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$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:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"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],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:c(function(o,d,n,y,T,i,X){var l=i.length-1;switch(T){case 3:return y.setRootDoc(i[l]),i[l];break;case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:let ct=i[l-1];ct.description=y.trimColon(i[l]),this.$=ct;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:let dt=y.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:dt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var P=i[l],M=i[l-2].trim();if(i[l].match(":")){var tt=i[l].split(":");P=tt[0],M=[M,tt[1]]}this.$={stmt:"state",id:P,type:"default",description:M};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:f,17:p,19:m,22:E,24:b,25:I,26:D,27:h,28:R,29:x,32:25,33:G,35:N,37:$,38:v,41:Z,45:st,48:it,51:rt,52:nt,53:at,54:ot,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:f,17:p,19:m,22:E,24:b,25:I,26:D,27:h,28:R,29:x,32:25,33:G,35:N,37:$,38:v,41:Z,45:st,48:it,51:rt,52:nt,53:at,54:ot,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:b,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:b,57:K},t(g,[2,17]),t(Ft,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:f,17:p,19:m,21:[1,72],22:E,24:b,25:I,26:D,27:h,28:R,29:x,32:25,33:G,35:N,37:$,38:v,41:Z,45:st,48:it,51:rt,52:nt,53:at,54:ot,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(g,[2,15]),t(g,[2,19]),t(Ft,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:f,17:p,19:m,21:[1,81],22:E,24:b,25:I,26:D,27:h,28:R,29:x,32:25,33:G,35:N,37:$,38:v,41:Z,45:st,48:it,51:rt,52:nt,53:at,54:ot,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:c(function(o,d){if(d.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=d,n}},"parseError"),parse:c(function(o){var d=this,n=[0],y=[],T=[null],i=[],X=this.table,l="",P=0,M=0,tt=0,ct=2,dt=1,ke=i.slice.call(arguments,1),k=Object.create(this.lexer),H={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&(H.yy[bt]=this.yy[bt]);k.setInput(o,H.yy),H.yy.lexer=k,H.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var kt=k.yylloc;i.push(kt);var De=k.options&&k.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(O){n.length=n.length-2*O,T.length=T.length-O,i.length=i.length-O}c(Me,"popStack");function xe(){var O;return O=y.pop()||k.lex()||dt,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=d.symbols_[O]||O),O}c(xe,"lex");for(var A,Dt,j,w,Be,xt,J={},ht,B,Vt,ut;;){if(j=n[n.length-1],this.defaultActions[j]?w=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=xe()),w=X[j]&&X[j][A]),typeof w>"u"||!w.length||!w[0]){var At="";ut=[];for(ht in X[j])this.terminals_[ht]&&ht>ct&&ut.push("'"+this.terminals_[ht]+"'");k.showPosition?At="Parse error on line "+(P+1)+`: +`+k.showPosition()+` +Expecting `+ut.join(", ")+", got '"+(this.terminals_[A]||A)+"'":At="Parse error on line "+(P+1)+": Unexpected "+(A==dt?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(At,{text:k.match,token:this.terminals_[A]||A,line:k.yylineno,loc:kt,expected:ut})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(w[0]){case 1:n.push(A),T.push(k.yytext),i.push(k.yylloc),n.push(w[1]),A=null,Dt?(A=Dt,Dt=null):(M=k.yyleng,l=k.yytext,P=k.yylineno,kt=k.yylloc,tt>0&&tt--);break;case 2:if(B=this.productions_[w[1]][1],J.$=T[T.length-B],J._$={first_line:i[i.length-(B||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(B||1)].first_column,last_column:i[i.length-1].last_column},De&&(J._$.range=[i[i.length-(B||1)].range[0],i[i.length-1].range[1]]),xt=this.performAction.apply(J,[l,M,P,H.yy,w[1],T,i].concat(ke)),typeof xt<"u")return xt;B&&(n=n.slice(0,-1*B*2),T=T.slice(0,-1*B),i=i.slice(0,-1*B)),n.push(this.productions_[w[1]][0]),T.push(J.$),i.push(J._$),Vt=X[n[n.length-2]][n[n.length-1]],n.push(Vt);break;case 3:return!0}}return!0},"parse")},be=(function(){var F={EOF:1,parseError:c(function(d,n){if(this.yy.parser)this.yy.parser.parseError(d,n);else throw new Error(d)},"parseError"),setInput:c(function(o,d){return this.yy=d||this.yy||{},this._input=o,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:c(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:c(function(o){var d=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;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),n.length-1&&(this.yylineno-=n.length-1);var T=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===y.length?this.yylloc.first_column:0)+y[y.length-n.length].length-n[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:c(function(o,d){var n,y,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),y=o[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+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],n=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in T)this[i]=T[i];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,d,n,y;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),i=0;id[0].length)){if(d=n,y=i,this.options.backtrack_lexer){if(o=this.test_match(n,T[i]),o!==!1)return o;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(o=this.test_match(d,T[y]),o!==!1?o:!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:c(function(){var d=this.next();return d||this.lex()},"lex"),begin:c(function(d){this.conditionStack.push(d)},"begin"),popState:c(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:c(function(d){this.begin(d)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(d,n,y,T){function i(){let l=n.yytext.indexOf("%%");if(l===0)return!1;if(l>0){let P=n.yytext.slice(0,l),M=n.yytext.slice(l);M&&d.lexer.unput(M),n.yytext=P}return!0}c(i,"processId");var X=T;switch(y){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;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"),59;break;case 59:return this.popState(),this.pushState("NOTE_ID"),60;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:if(!i())return;return this.popState(),"ID";break;case 65:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;break;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return i()?24:void 0;case 73:return n.yytext=n.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?: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,/^(?:[\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,/^(?:\})/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]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],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:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return F})();Et.lexer=be;function _t(){this.yy={}}return c(_t,"Parser"),_t.prototype=Et,Et.Parser=_t,new _t})();Ct.parser=Ct;var Ye=Ct;var V="state",W="root",et="relation",ee="classDef",se="style",ie="applyClass",z="default",St="divider",Lt="fill:none",It="fill: #333";var Rt="markdown",Nt="normal",pt="rect",ft="rectWithTitle",re="stateStart",ne="stateEnd",vt="divider",Ot="roundedWithTitle",ae="note",oe="noteGroup",q="statediagram",Ae="state",le=`${q}-${Ae}`,wt="transition",Ce="note",Le="note-edge",ce=`${wt} ${Le}`,de=`${q}-${Ce}`,Ie="cluster",he=`${q}-${Ie}`,Re="cluster-alt",ue=`${q}-${Re}`,Gt="parent",$t="note",Se="state",gt="----",pe=`${gt}${$t}`,Pt=`${gt}${Gt}`;var Bt=c((t,e="TB")=>{if(!t.doc)return e;let s=e;for(let a of t.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir"),Ne=c(function(t,e){return e.db.getClasses()},"getClasses"),ve=c(async function(t,e,s,a){_.info("REF0:"),_.info("Drawing state diagram (v2)",e);let{securityLevel:r,state:u,layout:S}=L();a.db.extract(a.db.getRootDocV2());let f=a.db.getData(),p=Qt(e,r);f.type=a.type,f.layoutAlgorithm=S,f.nodeSpacing=u?.nodeSpacing||50,f.rankSpacing=u?.rankSpacing||50,L().look==="neo"?f.markers=["barbNeo"]:f.markers=["barb"],f.diagramId=e,await Zt(f,p);let E=8;try{(typeof a.db.getLinks=="function"?a.db.getLinks():new Map).forEach((I,D)=>{let h=typeof D=="string"?D:typeof D?.id=="string"?D.id:"";if(!h){_.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(D));return}let R=p.node()?.querySelectorAll("g"),x;if(R?.forEach(v=>{v.textContent?.trim()===h&&(x=v)}),!x){_.warn("\u26A0\uFE0F Could not find node matching text:",h);return}let G=x.parentNode;if(!G){_.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",h);return}let N=document.createElementNS("http://www.w3.org/2000/svg","a"),$=I.url.replace(/^"+|"+$/g,"");if(N.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",$),N.setAttribute("target","_blank"),I.tooltip){let v=I.tooltip.replace(/^"+|"+$/g,"");N.setAttribute("title",v)}G.replaceChild(N,x),N.appendChild(x),_.info("\u{1F517} Wrapped node in
    tag for:",h,I.url)})}catch(b){_.error("\u274C Error injecting clickable links:",b)}qt.insertTitle(p,"statediagramTitleText",u?.titleTopMargin??25,a.db.getDiagramTitle()),te(p,E,q,u?.useMaxWidth??!0)},"draw"),qe={getClasses:Ne,draw:ve,getDir:Bt};var mt=new Map,U=0;function Yt(t="",e=0,s="",a=gt){let r=s!==null&&s.length>0?`${a}${s}`:"";return`${Se}-${t}${r}-${e}`}c(Yt,"stateDomId");var Oe=c((t,e,s,a,r,u,S,f)=>{_.trace("items",e),e.forEach(p=>{switch(p.stmt){case V:Q(t,p,s,a,r,u,S,f);break;case z:Q(t,p,s,a,r,u,S,f);break;case et:{Q(t,p.state1,s,a,r,u,S,f),Q(t,p.state2,s,a,r,u,S,f);let m=S==="neo",E={id:"edge"+U,start:p.state1.id,end:p.state2.id,arrowhead:"normal",arrowTypeEnd:m?"arrow_barb_neo":"arrow_barb",style:Lt,labelStyle:"",label:Y.sanitizeText(p.description??"",L()),arrowheadStyle:It,labelpos:"c",labelType:Rt,thickness:Nt,classes:wt,look:S};r.push(E),U++}break}})},"setupDoc"),fe=c((t,e="TB")=>{let s=e;if(t.doc)for(let a of t.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir");function yt(t,e,s){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(r=>{let u=s.get(r);u&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...u.styles])}));let a=t.find(r=>r.id===e.id);a?Object.assign(a,e):t.push(e)}c(yt,"insertOrUpdateNode");function we(t){return t?.classes?.join(" ")??""}c(we,"getClassesFromDbInfo");function Ge(t){return t?.styles??[]}c(Ge,"getStylesFromDbInfo");var Q=c((t,e,s,a,r,u,S,f)=>{let p=e.id,m=s.get(p),E=we(m),b=Ge(m),I=L();if(_.info("dataFetcher parsedItem",e,m,b),p!=="root"){let D=pt;e.start===!0?D=re:e.start===!1&&(D=ne),e.type!==z&&(D=e.type),mt.get(p)||mt.set(p,{id:p,shape:D,description:Y.sanitizeText(p,I),cssClasses:`${E} ${le}`,cssStyles:b});let h=mt.get(p);e.description&&(Array.isArray(h.description)?(h.shape=ft,h.description.push(e.description)):h.description?.length&&h.description.length>0?(h.shape=ft,h.description===p?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=pt,h.description=e.description),h.description=Y.sanitizeTextOrArray(h.description,I)),h.description?.length===1&&h.shape===ft&&(h.type==="group"?h.shape=Ot:h.shape=pt),!h.type&&e.doc&&(_.info("Setting cluster for XCX",p,fe(e)),h.type="group",h.isGroup=!0,h.dir=fe(e),h.shape=e.type===St?vt:Ot,h.cssClasses=`${h.cssClasses} ${he} ${u?ue:""}`);let R={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:p,dir:h.dir,domId:Yt(p,U),type:h.type,isGroup:h.type==="group",padding:8,rx:10,ry:10,look:S,labelType:"markdown"};if(R.shape===vt&&(R.label=""),t&&t.id!=="root"&&(_.trace("Setting node ",p," to be child of its parent ",t.id),R.parentId=t.id),R.centerLabel=!0,e.note){let x={labelStyle:"",shape:ae,label:e.note.text,labelType:"markdown",cssClasses:de,cssStyles:[],cssCompiledStyles:[],id:p+pe+"-"+U,domId:Yt(p,U,$t),type:h.type,isGroup:h.type==="group",padding:I.flowchart?.padding,look:S,position:e.note.position},G=p+Pt,N={labelStyle:"",shape:oe,label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:p+Pt,domId:Yt(p,U,Gt),type:"group",isGroup:!0,padding:16,look:S,position:e.note.position};U++,N.id=G,x.parentId=G,yt(a,N,f),yt(a,x,f),yt(a,R,f);let $=p,v=x.id;e.note.position==="left of"&&($=x.id,v=p),r.push({id:$+"-"+v,start:$,end:v,arrowhead:"none",arrowTypeEnd:"",style:Lt,labelStyle:"",classes:ce,arrowheadStyle:It,labelpos:"c",labelType:Rt,thickness:Nt,look:S})}else yt(a,R,f)}e.doc&&(_.trace("Adding nodes children "),Oe(e,e.doc,s,a,r,!u,S,f))},"dataFetcher"),ye=c(()=>{mt.clear(),U=0},"reset");var C={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Te=c(()=>new Map,"newClassesList"),Ee=c(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Tt=c(t=>JSON.parse(JSON.stringify(t)),"clone"),_e=class{constructor(e){this.version=e;this.nodes=[];this.edges=[];this.rootDoc=[];this.classes=Te();this.documents={root:Ee()};this.currentDocument=this.documents.root;this.startEndCount=0;this.dividerCnt=0;this.links=new Map;this.getAccTitle=jt;this.setAccTitle=Ht;this.getAccDescription=zt;this.setAccDescription=Wt;this.setDiagramTitle=Kt;this.getDiagramTitle=Xt;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{c(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let r of Array.isArray(e)?e:e.doc)switch(r.stmt){case V:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case et:this.addRelation(r.state1,r.state2,r.description);break;case ee:this.addStyleClass(r.id.trim(),r.classes);break;case se:this.handleStyleDef(r);break;case ie:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),a=L();ye(),Q(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,a.look,this.classes);for(let r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){let s=e.id.trim().split(","),a=e.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let S=r.trim();this.addState(S),u=this.getState(S)}u&&(u.styles=a.map(S=>S.replace(/;/g,"")?.trim()))}}setRootDoc(e){_.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,s,a){if(s.stmt===et){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===V&&(s.id===C.START_NODE?(s.id=e.id+(a?"_start":"_end"),s.start=a):s.id=s.id.trim()),s.stmt!==W&&s.stmt!==V||!s.doc)return;let r=[],u=[];for(let S of s.doc)if(S.type===St){let f=Tt(S);f.doc=Tt(u),r.push(f),u=[]}else u.push(S);if(r.length>0&&u.length>0){let S={stmt:V,id:Jt(),type:"divider",doc:Tt(u)};r.push(Tt(S)),s.doc=r}s.doc.forEach(S=>this.docTranslator(s,S,!0))}getRootDocV2(){return this.docTranslator({id:W,stmt:W},{id:W,stmt:W,doc:this.rootDoc},!0),{id:W,doc:this.rootDoc}}addState(e,s=z,a=void 0,r=void 0,u=void 0,S=void 0,f=void 0,p=void 0){let m=e?.trim();if(!this.currentDocument.states.has(m))_.info("Adding state ",m,r),this.currentDocument.states.set(m,{stmt:V,id:m,descriptions:[],type:s,doc:a,note:u,classes:[],styles:[],textStyles:[]});else{let E=this.currentDocument.states.get(m);if(!E)throw new Error(`State not found: ${m}`);E.doc||(E.doc=a),E.type||(E.type=s)}if(r&&(_.info("Setting state description",m,r),(Array.isArray(r)?r:[r]).forEach(b=>this.addDescription(m,b.trim()))),u){let E=this.currentDocument.states.get(m);if(!E)throw new Error(`State not found: ${m}`);E.note=u,E.note.text=Y.sanitizeText(E.note.text,L())}S&&(_.info("Setting state classes",m,S),(Array.isArray(S)?S:[S]).forEach(b=>this.setCssClass(m,b.trim()))),f&&(_.info("Setting state styles",m,f),(Array.isArray(f)?f:[f]).forEach(b=>this.setStyle(m,b.trim()))),p&&(_.info("Setting state styles",m,f),(Array.isArray(p)?p:[p]).forEach(b=>this.setTextStyle(m,b.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Ee()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Te(),e||(this.links=new Map,Ut())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){_.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,a){this.links.set(e,{url:s,tooltip:a}),_.warn("Adding link",e,s,a)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===C.START_NODE?(this.startEndCount++,`${C.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",s=z){return e===C.START_NODE?C.START_TYPE:s}endIdIfNeeded(e=""){return e===C.END_NODE?(this.startEndCount++,`${C.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",s=z){return e===C.END_NODE?C.END_TYPE:s}addRelationObjs(e,s,a=""){let r=this.startIdIfNeeded(e.id.trim()),u=this.startTypeIfNeeded(e.id.trim(),e.type),S=this.startIdIfNeeded(s.id.trim()),f=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(S,f,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:S,relationTitle:Y.sanitizeText(a,L())})}addRelation(e,s,a){if(typeof e=="object"&&typeof s=="object")this.addRelationObjs(e,s,a);else if(typeof e=="string"&&typeof s=="string"){let r=this.startIdIfNeeded(e.trim()),u=this.startTypeIfNeeded(e),S=this.endIdIfNeeded(s.trim()),f=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(S,f),this.currentDocument.relations.push({id1:r,id2:S,relationTitle:a?Y.sanitizeText(a,L()):void 0})}}addDescription(e,s){let a=this.currentDocument.states.get(e),r=s.startsWith(":")?s.replace(":","").trim():s;a?.descriptions?.push(Y.sanitizeText(r,L()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let a=this.classes.get(e);s&&a&&s.split(C.STYLECLASS_SEP).forEach(r=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(C.COLOR_KEYWORD).exec(r)){let f=u.replace(C.FILL_KEYWORD,C.BG_FILL).replace(C.COLOR_KEYWORD,C.FILL_KEYWORD);a.textStyles.push(f)}a.styles.push(u)})}getClasses(){return this.classes}setCssClass(e,s){e.split(",").forEach(a=>{let r=this.getState(a);if(!r){let u=a.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(e,s){this.getState(e)?.styles?.push(s)}setTextStyle(e,s){this.getState(e)?.textStyles?.push(s)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt==="dir")}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(e){let s=this.getDirectionStatement();s?s.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=L();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Bt(this.getRootDocV2())}}getConfig(){return L().state}};var Pe=c(t=>` +defs [id$="-barbEnd"] { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: ${t.strokeWidth||1}; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: ${t.strokeWidth||1}; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: ${t.strokeWidth||1}px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: ${t.strokeWidth||1}px; +} +[id$="-barbEnd"] { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: ${t.strokeWidth||1}px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground?t.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: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +[id$="-dependencyStart"], [id$="-dependencyEnd"] { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: ${t.strokeWidth||1}; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} + +[data-look="neo"].statediagram-cluster rect { + fill: ${t.mainBkg}; + stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder}; + stroke-width: ${t.strokeWidth??1}; +} +[data-look="neo"].statediagram-cluster rect.outer { + rx: ${t.radius}px; + ry: ${t.radius}px; + filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"} +} +`,"getStyles"),gs=Pe;export{Ye as a,qe as b,_e as c,gs as d}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LII3EMHJ.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LII3EMHJ.mjs new file mode 100644 index 00000000000..8668003dceb --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LII3EMHJ.mjs @@ -0,0 +1 @@ +import{a as c}from"./chunk-KNLZD3CH.mjs";import{z as p}from"./chunk-67TQ5CYL.mjs";import{h as l}from"./chunk-7W6UQGC5.mjs";import{a as o,d as m}from"./chunk-AQ6EADP3.mjs";var a=m(c(),1);var x=o((r,t)=>{let e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let n in t.attrs)e.attr(n,t.attrs[n]);return t.class&&e.attr("class",t.class),e},"drawRect"),g=o((r,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),f=o((r,t)=>{let e=t.text.replace(p," "),n=r.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 s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),n},"drawText"),E=o((r,t,e,n)=>{let s=r.append("image");s.attr("x",t),s.attr("y",e);let i=(0,a.sanitizeUrl)(n);s.attr("xlink:href",i)},"drawImage"),h=o((r,t,e,n)=>{let s=r.append("use");s.attr("x",t),s.attr("y",e);let i=(0,a.sanitizeUrl)(n);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),u=o(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),G=o(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),T=o(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{x as a,g as b,f as c,E as d,h as e,u as f,G as g,T as h}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LRIF4GLE.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LRIF4GLE.mjs new file mode 100644 index 00000000000..421dba21913 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-LRIF4GLE.mjs @@ -0,0 +1 @@ +import{_ as s}from"./chunk-67TQ5CYL.mjs";import{h as e}from"./chunk-7W6UQGC5.mjs";import{a as n}from"./chunk-AQ6EADP3.mjs";var d=n(t=>{let{securityLevel:m}=s(),o=e("body");if(m==="sandbox"){let c=e(`#i${t}`).node()?.contentDocument??document;o=e(c.body)}return o.select(`#${t}`)},"selectSvgElement");export{d as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-QA3QBVWF.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-QA3QBVWF.mjs new file mode 100644 index 00000000000..2cdc9b7c73a --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-QA3QBVWF.mjs @@ -0,0 +1,2 @@ +import{a as Ct}from"./chunk-KNLZD3CH.mjs";import{G as j,I as D,L as gt,a as ot,k as xt}from"./chunk-67TQ5CYL.mjs";import{$ as Ft,G as lt,J as dt,K as ht,L as bt,M as wt,N as At,O as Ot,P as St,Q as Bt,R as Pt,S as Mt,T as Wt,U as Et,V as Dt,W as Lt,X as It,Y as Tt,Z as Rt,_ as $t,b as P,h as yt}from"./chunk-7W6UQGC5.mjs";import{a as f,d as Qt}from"./chunk-AQ6EADP3.mjs";var Jt=Qt(Ct(),1);function Nt(t){return Number.isSafeInteger(t)&&t>=0}f(Nt,"isLength");function U(t){return t!=null&&typeof t!="function"&&Nt(t.length)}f(U,"isArrayLike");function kt(t){return t==="__proto__"}f(kt,"isUnsafeProperty");function d(t){return t==null||typeof t!="object"&&typeof t!="function"}f(d,"isPrimitive");function H(t){return Object.getOwnPropertySymbols(t).filter(r=>Object.prototype.propertyIsEnumerable.call(t,r))}f(H,"getSymbols");function l(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}f(l,"getTag");var L="[object RegExp]",h="[object String]",w="[object Number]",A="[object Boolean]",O="[object Arguments]",I="[object Symbol]",T="[object Date]",R="[object Map]",$="[object Set]",q="[object Array]";var F="[object ArrayBuffer]",M="[object Object]";var N="[object DataView]",K="[object Uint8Array]",V="[object Uint8ClampedArray]",X="[object Uint16Array]",Y="[object Uint32Array]";var J="[object Int8Array]",Z="[object Int16Array]",v="[object Int32Array]";var G="[object Float32Array]",Q="[object Float64Array]";function W(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}f(W,"isTypedArray");function zt(t,r){return E(t,void 0,t,new Map,r)}f(zt,"cloneDeepWith");function E(t,r,o,e=new Map,i=void 0){let s=i?.(t,r,o,e);if(s!==void 0)return s;if(d(t))return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){let n=new Array(t.length);e.set(t,n);for(let a=0;a{let n=r?.(o,e,i,s);if(n!==void 0)return n;if(typeof t=="object"){if(l(t)===M&&typeof t.constructor!="function"){let a={};return s.set(t,a),u(a,t,i,s),a}switch(Object.prototype.toString.call(t)){case w:case h:case A:{let a=new t.constructor(t?.valueOf());return u(a,t),a}case O:{let a={};return u(a,t),a.length=t.length,a[Symbol.iterator]=t[Symbol.iterator],a}default:return}}})}f(_t,"cloneDeepWith");function nt(t){return _t(t)}f(nt,"cloneDeep");function k(t){return t!==null&&typeof t=="object"&&l(t)==="[object Arguments]"}f(k,"isArguments");function z(t){return typeof t=="object"&&t!==null}f(z,"isObjectLike");function jt(t){return z(t)&&U(t)}f(jt,"isArrayLikeObject");function Ut(t){return Array.isArray(t)}f(Ut,"isArray");function S(t,r){if(typeof t!="function"||r!=null&&typeof r!="function")throw new TypeError("Expected a function");let o=f(function(...i){let s=r?r.apply(this,i):i[0],n=o.cache;if(n.has(s))return n.get(s);let a=t.apply(this,i);return o.cache=n.set(s,a)||n,a},"memoized"),e=S.Cache||Map;return o.cache=new e,o}f(S,"memoize");S.Cache=Map;function Ht(){}f(Ht,"noop");function qt(t){let r=t?.constructor,o=typeof r=="function"?r.prototype:Object.prototype;return t===o}f(qt,"isPrototype");function b(t){return W(t)}f(b,"isTypedArray");function rr(t){if(d(t))return t;let r=l(t);if(!er(t))return{};if(Ut(t)){let e=Array.from(t);return t.length>0&&typeof t[0]=="string"&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}if(b(t)){let e=t,i=e.constructor;return new i(e.buffer,e.byteOffset,e.length)}if(r===F)return new ArrayBuffer(t.byteLength);if(r===N){let e=t,i=e.buffer,s=e.byteOffset,n=e.byteLength,a=new ArrayBuffer(n),p=new Uint8Array(i,s,n);return new Uint8Array(a).set(p),new DataView(a)}if(r===A||r===w||r===h){let e=t.constructor,i=new e(t.valueOf());return r===h?nr(i,t):it(i,t),i}if(r===T)return new Date(Number(t));if(r===L){let e=t,i=new RegExp(e.source,e.flags);return i.lastIndex=e.lastIndex,i}if(r===I)return Object(Symbol.prototype.valueOf.call(t));if(r===R){let e=t,i=new Map;return e.forEach((s,n)=>{i.set(n,s)}),i}if(r===$){let e=t,i=new Set;return e.forEach(s=>{i.add(s)}),i}if(r===O){let e=t,i={};return it(i,e),i.length=e.length,i[Symbol.iterator]=e[Symbol.iterator],i}let o={};return ir(o,t),it(o,t),or(o,t),o}f(rr,"clone");function er(t){switch(l(t)){case O:case q:case F:case N:case A:case T:case G:case Q:case J:case Z:case v:case R:case w:case M:case L:case $:case h:case I:case K:case V:case X:case Y:return!0;default:return!1}}f(er,"isCloneableObject");function it(t,r){for(let o in r)Object.hasOwn(r,o)&&(t[o]=r[o])}f(it,"copyOwnProperties");function or(t,r){let o=Object.getOwnPropertySymbols(r);for(let e=0;e=o)&&(t[e]=r[e])}f(nr,"cloneStringObjectProperties");function ir(t,r){let o=Object.getPrototypeOf(r);o!==null&&typeof r.constructor=="function"&&Object.setPrototypeOf(t,o)}f(ir,"copyPrototype");function C(t){if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){let o=t[Symbol.toStringTag];return o==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${o}]`}let r=t;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}f(C,"isPlainObject");function Kt(t){if(d(t))return t;if(Array.isArray(t)||W(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);let r=Object.getPrototypeOf(t);if(r==null)return Object.assign(Object.create(r),t);let o=r.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new o(t);if(t instanceof RegExp){let e=new o(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new o(t.buffer.slice(0));if(t instanceof Error){let e;return t instanceof AggregateError?e=new o(t.errors,t.message,{cause:t.cause}):e=new o(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}if(typeof File<"u"&&t instanceof File)return new o([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){let e=Object.create(r);return Object.assign(e,t)}return t}f(Kt,"clone");function Vt(t,...r){let o=r.slice(0,-1),e=r[r.length-1],i=t;for(let s=0;s"u"||!Buffer.isBuffer(t))&&!b(t)&&!k(t)?!1:t.length===0;if(typeof t=="object"){if(t instanceof Map||t instanceof Set)return t.size===0;let r=Object.keys(t);return qt(t)?r.filter(o=>o!=="constructor").length===0:r.length===0}return!0}f(fr,"isEmpty");var sr="\u200B",ar={curveBasis:bt,curveBasisClosed:wt,curveBasisOpen:At,curveBumpX:dt,curveBumpY:ht,curveBundle:Ot,curveCardinalClosed:Bt,curveCardinalOpen:Pt,curveCardinal:St,curveCatmullRomClosed:Wt,curveCatmullRomOpen:Et,curveCatmullRom:Mt,curveLinear:lt,curveLinearClosed:Dt,curveMonotoneX:Lt,curveMonotoneY:It,curveNatural:Tt,curveStep:Rt,curveStepAfter:Ft,curveStepBefore:$t},pr=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,cr=f(function(t,r){let o=Zt(t,/(?:init\b)|(?:initialize\b)/),e={};if(Array.isArray(o)){let n=o.map(a=>a.args);xt(n),e=ot(e,[...n])}else e=o.args;if(!e)return;let i=gt(t,r),s="config";return e[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),e[i]=e[s],delete e[s]),e},"detectInit"),Zt=f(function(t,r=null){try{let o=new RegExp(`[%]{2}(?![{]${pr.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(o,"").replace(/'/gm,'"'),P.debug(`Detecting diagram directive${r!==null?" type:"+r:""} based on the text:${t}`);let e,i=[];for(;(e=D.exec(t))!==null;)if(e.index===D.lastIndex&&D.lastIndex++,e&&!r||r&&e[1]?.match(r)||r&&e[2]?.match(r)){let s=e[1]?e[1]:e[2],n=e[3]?e[3].trim():e[4]?JSON.parse(e[4].trim()):null;i.push({type:s,args:n})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(o){return P.error(`ERROR: ${o.message} - Unable to parse directive type: '${r}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),Bo=f(function(t){return t.replace(D,"")},"removeDirectives"),mr=f(function(t,r){for(let[o,e]of r.entries())if(e.match(t))return o;return-1},"isSubstringInArray");function ur(t,r){if(!t)return r;let o=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return ar[o]??r}f(ur,"interpolateToCurve");function xr(t,r){let o=t.trim();if(o)return r.securityLevel!=="loose"?(0,Jt.sanitizeUrl)(o):o}f(xr,"formatUrl");var gr=f((t,...r)=>{let o=t.split("."),e=o.length-1,i=o[e],s=window;for(let n=0;n{o+=vt(i,r),r=i});let e=o/2;return at(t,e)}f(yr,"traverseEdge");function lr(t){return t.length===1?t[0]:yr(t)}f(lr,"calcLabelPosition");var Xt=f((t,r=2)=>{let o=Math.pow(10,r);return Math.round(t*o)/o},"roundNumber"),at=f((t,r)=>{let o,e=r;for(let i of t){if(o){let s=vt(i,o);if(s===0)return o;if(s=1)return{x:i.x,y:i.y};if(n>0&&n<1)return{x:Xt((1-n)*o.x+n*i.x,5),y:Xt((1-n)*o.y+n*i.y,5)}}}o=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),dr=f((t,r,o)=>{P.info(`our points ${JSON.stringify(r)}`),r[0]!==o&&(r=r.reverse());let i=at(r,25),s=t?10:5,n=Math.atan2(r[0].y-i.y,r[0].x-i.x),a={x:0,y:0};return a.x=Math.sin(n)*s+(r[0].x+i.x)/2,a.y=-Math.cos(n)*s+(r[0].y+i.y)/2,a},"calcCardinalityPosition");function hr(t,r,o){let e=structuredClone(o);P.info("our points",e),r!=="start_left"&&r!=="start_right"&&e.reverse();let i=25+t,s=at(e,i),n=10+t*.5,a=Math.atan2(e[0].y-s.y,e[0].x-s.x),p={x:0,y:0};return r==="start_left"?(p.x=Math.sin(a+Math.PI)*n+(e[0].x+s.x)/2,p.y=-Math.cos(a+Math.PI)*n+(e[0].y+s.y)/2):r==="end_right"?(p.x=Math.sin(a-Math.PI)*n+(e[0].x+s.x)/2-5,p.y=-Math.cos(a-Math.PI)*n+(e[0].y+s.y)/2-5):r==="end_left"?(p.x=Math.sin(a)*n+(e[0].x+s.x)/2-5,p.y=-Math.cos(a)*n+(e[0].y+s.y)/2-5):(p.x=Math.sin(a)*n+(e[0].x+s.x)/2,p.y=-Math.cos(a)*n+(e[0].y+s.y)/2),p}f(hr,"calcTerminalLabelPosition");function br(t){let r="",o="";for(let e of t)e!==void 0&&(e.startsWith("color:")||e.startsWith("text-align:")?o=o+e+";":r=r+e+";");return{style:r,labelStyle:o}}f(br,"getStylesFromArray");var Yt=0,wr=f(()=>(Yt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Yt),"generateId");function Ar(t){let r="",o="0123456789abcdef",e=o.length;for(let i=0;iAr(t.length),"random"),Sr=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Br=f(function(t,r){let o=r.text.replace(j.lineBreakRegex," "),[,e]=ct(r.fontSize),i=t.append("text");i.attr("x",r.x),i.attr("y",r.y),i.style("text-anchor",r.anchor),i.style("font-family",r.fontFamily),i.style("font-size",e),i.style("font-weight",r.fontWeight),i.attr("fill",r.fill),r.class!==void 0&&i.attr("class",r.class);let s=i.append("tspan");return s.attr("x",r.x+r.textMargin*2),s.attr("fill",r.fill),s.text(o),i},"drawSimpleText"),Pr=S((t,r,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},o),j.lineBreakRegex.test(t)))return t;let e=t.split(" ").filter(Boolean),i=[],s="";return e.forEach((n,a)=>{let p=et(`${n} `,o),c=et(s,o);if(p>r){let{hyphenatedStrings:y,remainingWord:g}=Mr(n,r,"-",o);i.push(s,...y),s=g}else c+p>=r?(i.push(s),s=n):s=[s,n].filter(Boolean).join(" ");a+1===e.length&&i.push(s)}),i.filter(n=>n!=="").join(o.joinWith)},(t,r,o)=>`${t}${r}${o.fontSize}${o.fontWeight}${o.fontFamily}${o.joinWith}`),Mr=S((t,r,o="-",e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},e);let i=[...t],s=[],n="";return i.forEach((a,p)=>{let c=`${n}${a}`;if(et(c,e)>=r){let m=p+1,y=i.length===m,g=`${c}${o}`;s.push(y?c:g),n=""}else n=c}),{hyphenatedStrings:s,remainingWord:n}},(t,r,o="-",e)=>`${t}${r}${o}${e.fontSize}${e.fontWeight}${e.fontFamily}`);function Wr(t,r){return pt(t,r).height}f(Wr,"calculateTextHeight");function et(t,r){return pt(t,r).width}f(et,"calculateTextWidth");var pt=S((t,r)=>{let{fontSize:o=12,fontFamily:e="Arial",fontWeight:i=400}=r;if(!t)return{width:0,height:0};let[,s]=ct(o),n=["sans-serif",e],a=t.split(j.lineBreakRegex),p=[],c=yt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};let x=c.append("svg");for(let y of n){let g=0,B={width:0,height:0,lineHeight:0};for(let Gt of a){let mt=Sr();mt.text=Gt||sr;let ut=Br(x,mt).style("font-size",s).style("font-weight",i).style("font-family",y),_=(ut._groups||ut)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");B.width=Math.round(Math.max(B.width,_.width)),g=Math.round(_.height),B.height+=g,B.lineHeight=Math.round(Math.max(B.lineHeight,g))}p.push(B)}x.remove();let m=isNaN(p[1].height)||isNaN(p[1].width)||isNaN(p[1].lineHeight)||p[0].height>p[1].height&&p[0].width>p[1].width&&p[0].lineHeight>p[1].lineHeight?0:1;return p[m]},(t,r)=>`${t}${r.fontSize}${r.fontWeight}${r.fontFamily}`),st=class{constructor(r=!1,o){this.count=0;this.count=o?o.length:0,this.next=r?()=>this.count++:()=>Date.now()}static{f(this,"InitIDGenerator")}},rt,Er=f(function(t){return rt=rt||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),rt.innerHTML=t,unescape(rt.textContent)},"entityDecode");function Po(t){return"str"in t}f(Po,"isDetailedError");var Dr=f((t,r,o,e)=>{if(!e)return;let i=t.node()?.getBBox();i&&t.append("text").text(e).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-o).attr("class",r)},"insertTitle"),ct=f(t=>{if(typeof t=="number")return[t,t+"px"];let r=parseInt(t??"",10);return Number.isNaN(r)?[void 0,void 0]:t===String(r)?[r,t+"px"]:[r,t]},"parseFontSize");function Lr(t,r){return ft({},t,r)}f(Lr,"cleanAndMerge");var Mo={assignWithDepth:ot,wrapLabel:Pr,calculateTextHeight:Wr,calculateTextWidth:et,calculateTextDimensions:pt,cleanAndMerge:Lr,detectInit:cr,detectDirective:Zt,isSubstringInArray:mr,interpolateToCurve:ur,calcLabelPosition:lr,calcCardinalityPosition:dr,calcTerminalLabelPosition:hr,formatUrl:xr,getStylesFromArray:br,generateId:wr,random:Or,runFunc:gr,entityDecode:Er,insertTitle:Dr,isLabelCoordinateInPath:Ir,parseFontSize:ct,InitIDGenerator:st},Wo=f(function(t){let r=t;return r=r.replace(/style.*:\S*#.*;/g,function(o){return o.substring(0,o.length-1)}),r=r.replace(/classDef.*:\S*#.*;/g,function(o){return o.substring(0,o.length-1)}),r=r.replace(/#\w+;/g,function(o){let e=o.substring(1,o.length-1);return/^\+?\d+$/.test(e)?"\uFB02\xB0\xB0"+e+"\xB6\xDF":"\uFB02\xB0"+e+"\xB6\xDF"}),r},"encodeEntities"),Eo=f(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities");var Do=f((t,r,{counter:o=0,prefix:e,suffix:i},s)=>s||`${e?`${e}_`:""}${t}_${r}_${o}${i?`_${i}`:""}`,"getEdgeId");function Lo(t){return t??null}f(Lo,"handleUndefinedAttr");function Ir(t,r){let o=Math.round(t.x),e=Math.round(t.y),i=r.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return i.includes(o.toString())||i.includes(e.toString())}f(Ir,"isLabelCoordinateInPath");export{rr as a,fr as b,sr as c,Bo as d,ur as e,br as f,wr as g,Or as h,Pr as i,Wr as j,et as k,pt as l,Po as m,ct as n,Lr as o,Mo as p,Wo as q,Eo as r,Do as s,Lo as t}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RERM46MO.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RERM46MO.mjs new file mode 100644 index 00000000000..3491dc17c45 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RERM46MO.mjs @@ -0,0 +1 @@ +import{a as t,b as u,c as n,d as s,e as o,g as l,h as d,r as h,t as m}from"./chunk-4R4BOZG6.mjs";import{a}from"./chunk-AQ6EADP3.mjs";var A=class extends m{static{a(this,"ArchitectureTokenBuilder")}static{t(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},C=class extends h{static{a(this,"ArchitectureValueConverter")}static{t(this,"ArchitectureValueConverter")}runCustomConverter(c,r,i){if(c.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(c.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(c.name==="ARCH_TITLE"){let e=r.replace(/^\[|]$/g,"").trim();return(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"').replace(/\\'/g,"'")),e.trim()}}},v={parser:{TokenBuilder:t(()=>new A,"TokenBuilder"),ValueConverter:t(()=>new C,"ValueConverter")}};function p(c=o){let r=s(n(c),l),i=s(u({shared:r}),d,v);return r.ServiceRegistry.register(i),{shared:r,Architecture:i}}a(p,"createArchitectureServices");t(p,"createArchitectureServices");export{v as a,p as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RG4AUYOV.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RG4AUYOV.mjs new file mode 100644 index 00000000000..7d45a790b26 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RG4AUYOV.mjs @@ -0,0 +1,206 @@ +import{a as ot}from"./chunk-AZZRMDJM.mjs";import{h as it}from"./chunk-LII3EMHJ.mjs";import{a as at}from"./chunk-6764PJDD.mjs";import{a as ut}from"./chunk-ZXARS5L4.mjs";import{b as nt,c as lt}from"./chunk-VU6ZFW4Y.mjs";import{p as ee,s as rt}from"./chunk-QA3QBVWF.mjs";import{A as He,C as V,G as v,S as qe,T as Je,U as Ze,V as $e,W as et,X as tt,Y as st,_ as F,y as Xe}from"./chunk-67TQ5CYL.mjs";import{b as Z,h as $}from"./chunk-7W6UQGC5.mjs";import{a as g}from"./chunk-AQ6EADP3.mjs";var Ve=(function(){var t=g(function(O,c,h,d){for(h=h||{},d=O.length;d--;h[O[d]]=c);return h},"o"),i=[1,18],r=[1,19],a=[1,20],n=[1,41],o=[1,26],u=[1,42],p=[1,24],m=[1,25],f=[1,32],_=[1,33],fe=[1,34],k=[1,45],me=[1,35],Ae=[1,36],ke=[1,37],Ce=[1,38],ye=[1,27],Ee=[1,28],Te=[1,29],De=[1,30],Fe=[1,31],C=[1,44],y=[1,46],E=[1,43],T=[1,47],Be=[1,9],b=[1,8,9],se=[1,58],ie=[1,59],re=[1,60],ae=[1,61],ne=[1,62],Ne=[1,63],Se=[1,64],N=[1,8,9,41],Pe=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],le=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ue=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],oe=[1,103],z=[1,121],Y=[1,117],K=[1,113],j=[1,119],W=[1,114],Q=[1,115],X=[1,116],H=[1,118],q=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ce=[12,39],_e=[1,8,9,39,41,44,46],he=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],L=[1,8,9,22,50,60,61,82,86,87,88,89,90],xe={trace:g(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,classLiteralName:17,DOT:18,className: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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[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],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,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],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:g(function(c,h,d,l,A,e,J){var s=e.length-1;switch(A){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:r,37:a,38:22,42:n,43:23,46:o,48:u,51:p,52:m,54:f,56:_,57:fe,60:k,62:me,63:Ae,64:ke,65:Ce,75:ye,76:Ee,78:Te,82:De,83:Fe,86:C,100:y,102:E,103:T},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(b,[2,19],{22:[1,50]}),t(b,[2,21]),t(b,[2,22]),t(b,[2,23]),t(b,[2,24]),t(b,[2,25]),t(b,[2,26]),t(b,[2,27]),t(b,[2,28]),t(b,[2,29]),t(b,[2,30]),{34:[1,51]},{36:[1,52]},t(b,[2,33]),t(b,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:se,69:ie,70:re,71:ae,72:ne,73:Ne,74:Se}),{39:[1,65]},t(N,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(b,[2,65]),t(b,[2,66]),{16:69,60:k,86:C,100:y,102:E},{16:39,17:40,19:70,60:k,86:C,100:y,102:E,103:T},{16:39,17:40,19:71,60:k,86:C,100:y,102:E,103:T},{16:39,17:40,19:72,60:k,86:C,100:y,102:E,103:T},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:k,86:C,100:y,102:E,103:T},{13:Pe,55:76},{58:78,60:[1,79]},t(b,[2,76]),t(b,[2,77]),t(b,[2,78]),t(b,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:k,86:C,100:y,102:E,103:T}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:k,86:C,100:y,102:E,103:T},{16:39,17:40,19:87,60:k,86:C,100:y,102:E,103:T},t(le,[2,133]),t(le,[2,134]),t(le,[2,135]),t(le,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[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,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:r,37:a,42:n,46:o,48:u,51:p,52:m,54:f,56:_,57:fe,60:k,62:me,63:Ae,64:ke,65:Ce,75:ye,76:Ee,78:Te,82:De,83:Fe,86:C,100:y,102:E,103:T}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:r,37:a,38:22,42:n,43:23,46:o,48:u,51:p,52:m,54:f,56:_,57:fe,60:k,62:me,63:Ae,64:ke,65:Ce,75:ye,76:Ee,78:Te,82:De,83:Fe,86:C,100:y,102:E,103:T},t(b,[2,20]),t(b,[2,31]),t(b,[2,32]),{13:[1,91],16:39,17:40,19:90,60:k,86:C,100:y,102:E,103:T},{53:92,66:56,67:57,68:se,69:ie,70:re,71:ae,72:ne,73:Ne,74:Se},t(b,[2,64]),{67:93,73:Ne,74:Se},t(ue,[2,83],{66:94,68:se,69:ie,70:re,71:ae,72:ne}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:u,54:f,56:_},{16:100,60:k,86:C,100:y,102:E},{41:[1,102],45:101,51:oe},{16:104,60:k,86:C,100:y,102:E},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:j,84:111,85:112,86:W,87:Q,88:X,89:H,90:q},{60:[1,122]},{13:Pe,55:123},t(N,[2,72]),t(N,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:j,84:111,85:112,86:W,87:Q,88:X,89:H,90:q},t(Ge,[2,74]),{16:39,17:40,19:126,60:k,86:C,100:y,102:E,103:T},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(ce,[2,9],{16:85,17:86,15:130,18:[1,129],60:k,86:C,100:y,102:E,103:T}),t(ce,[2,10]),t(_e,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(he,[2,67]),{16:39,17:40,19:133,60:k,86:C,100:y,102:E,103:T},{13:[1,135],16:39,17:40,19:134,60:k,86:C,100:y,102:E,103:T},t(ue,[2,82],{66:136,68:se,69:ie,70:re,71:ae,72:ne}),t(ue,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:u,54:f,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(N,[2,48],{39:[1,142]}),{41:[1,143]},t(N,[2,50]),{41:[2,61],45:144,51:oe},{47:[1,145]},{16:39,17:40,19:146,60:k,86:C,100:y,102:E,103:T},t(b,[2,91],{13:[1,147]}),t(b,[2,93],{13:[1,149],77:[1,148]}),t(b,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(b,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:z,50:Y,60:K,82:j,86:W,87:Q,88:X,89:H,90:q}),t(L,[2,109]),t(L,[2,111]),t(L,[2,112]),t(L,[2,113]),t(L,[2,114]),t(L,[2,115]),t(L,[2,116]),t(L,[2,117]),t(L,[2,118]),t(L,[2,119]),t(b,[2,106]),t(N,[2,71]),t(b,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:k,86:C,100:y,102:E,103:T},t(ce,[2,12]),t(_e,[2,56]),{1:[2,4]},t(he,[2,69]),t(he,[2,68]),{16:39,17:40,19:158,60:k,86:C,100:y,102:E,103:T},t(ue,[2,80]),t(N,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:u,54:f,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:u,54:f,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:u,54:f,56:_},{45:163,51:oe},t(N,[2,49]),{41:[2,62]},t(N,[2,52],{39:[1,164]}),t(b,[2,60]),t(b,[2,92]),t(b,[2,94]),t(b,[2,95],{77:[1,165]}),t(b,[2,98]),t(b,[2,99],{13:[1,166]}),t(b,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:j,84:169,85:112,86:W,87:Q,88:X,89:H,90:q},t(L,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(ce,[2,11]),t(he,[2,70]),t(N,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:oe},t(b,[2,96]),t(b,[2,100]),t(b,[2,102]),t(b,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:z,50:Y,60:K,82:j,86:W,87:Q,88:X,89:H,90:q}),t(_e,[2,8]),t(N,[2,51]),{41:[1,175]},t(N,[2,54]),t(b,[2,104]),t(N,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:g(function(c,h){if(h.recoverable)this.trace(c);else{var d=new Error(c);throw d.hash=h,d}},"parseError"),parse:g(function(c){var h=this,d=[0],l=[],A=[null],e=[],J=this.table,s="",pe=0,Ke=0,je=0,gt=2,We=1,bt=e.slice.call(arguments,1),D=Object.create(this.lexer),M={yy:{}};for(var ve in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ve)&&(M.yy[ve]=this.yy[ve]);D.setInput(c,M.yy),M.yy.lexer=D,M.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Ie=D.yylloc;e.push(Ie);var ft=D.options&&D.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Et(S){d.length=d.length-2*S,A.length=A.length-S,e.length=e.length-S}g(Et,"popStack");function mt(){var S;return S=l.pop()||D.lex()||We,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}g(mt,"lex");for(var B,Oe,w,x,Tt,Me,G={},de,I,Qe,ge;;){if(w=d[d.length-1],this.defaultActions[w]?x=this.defaultActions[w]:((B===null||typeof B>"u")&&(B=mt()),x=J[w]&&J[w][B]),typeof x>"u"||!x.length||!x[0]){var we="";ge=[];for(de in J[w])this.terminals_[de]&&de>gt&&ge.push("'"+this.terminals_[de]+"'");D.showPosition?we="Parse error on line "+(pe+1)+`: +`+D.showPosition()+` +Expecting `+ge.join(", ")+", got '"+(this.terminals_[B]||B)+"'":we="Parse error on line "+(pe+1)+": Unexpected "+(B==We?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(we,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Ie,expected:ge})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+B);switch(x[0]){case 1:d.push(B),A.push(D.yytext),e.push(D.yylloc),d.push(x[1]),B=null,Oe?(B=Oe,Oe=null):(Ke=D.yyleng,s=D.yytext,pe=D.yylineno,Ie=D.yylloc,je>0&&je--);break;case 2:if(I=this.productions_[x[1]][1],G.$=A[A.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},ft&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Me=this.performAction.apply(G,[s,Ke,pe,M.yy,x[1],A,e].concat(bt)),typeof Me<"u")return Me;I&&(d=d.slice(0,-1*I*2),A=A.slice(0,-1*I),e=e.slice(0,-1*I)),d.push(this.productions_[x[1]][0]),A.push(G.$),e.push(G._$),Qe=J[d[d.length-2]][d[d.length-1]],d.push(Qe);break;case 3:return!0}}return!0},"parse")},dt=(function(){var O={EOF:1,parseError:g(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:g(function(c,h){return this.yy=h||this.yy||{},this._input=c,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:g(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var h=c.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),c},"input"),unput:g(function(c){var h=c.length,d=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=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 A=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===l.length?this.yylloc.first_column:0)+l[l.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(c){this.unput(this.match.slice(c))},"less"),pastInput:g(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var c=this.pastInput(),h=new Array(c.length+1).join("-");return c+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:g(function(c,h){var d,l,A;if(this.options.backtrack_lexer&&(A={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&&(A.yylloc.range=this.yylloc.range.slice(0))),l=c[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var e in A)this[e]=A[e];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,h,d,l;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),e=0;eh[0].length)){if(h=d,l=e,this.options.backtrack_lexer){if(c=this.test_match(d,A[e]),c!==!1)return c;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(c=this.test_match(h,A[l]),c!==!1?c:!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:g(function(){var h=this.next();return h||this.lex()},"lex"),begin:g(function(h){this.conditionStack.push(h)},"begin"),popState:g(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:g(function(h){this.begin(h)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(h,d,l,A){var e=A;switch(l){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;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 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;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:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98: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,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}};return O})();xe.lexer=dt;function Le(){this.yy={}}return g(Le,"Parser"),Le.prototype=xe,xe.Parser=Le,new Le})();Ve.parser=Ve;var Dt=Ve;var ct=["#","+","~","-",""],te=class{static{g(this,"ClassMember")}constructor(i,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let a=He(i,F());this.parseMember(a)}getDisplayDetails(){let i=this.visibility+V(this.id);this.memberType==="method"&&(i+=`(${V(this.parameters.trim())})`,this.returnType&&(i+=" : "+V(this.returnType))),i=i.trim();let r=this.parseClassifier();return{displayText:i,cssStyle:r}}parseMember(i){let r="";if(this.memberType==="method"){let o=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(o){let u=o[1]?o[1].trim():"";if(ct.includes(u)&&(this.visibility=u),this.id=o[2],this.parameters=o[3]?o[3].trim():"",r=o[4]?o[4].trim():"",this.returnType=o[5]?o[5].trim():"",r===""){let p=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(p)&&(r=p,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=i.length,o=i.substring(0,1),u=i.substring(n-1);ct.includes(o)&&(this.visibility=o),/[$*]/.exec(u)&&(r=u),this.id=i.substring(this.visibility===""?0:1,r===""?n:n-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let a=`${this.visibility?"\\"+this.visibility:""}${V(this.id)}${this.memberType==="method"?`(${V(this.parameters)})${this.returnType?" : "+V(this.returnType):""}`:""}`;this.text=a.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 be="classId-",ht=0,P=g(t=>v.sanitizeText(t,F()),"sanitizeText"),pt=class t{constructor(){this.relations=[];this.classes=new Map;this.styleClasses=new Map;this.notes=new Map;this.interfaces=[];this.namespaces=new Map;this.namespaceCounter=0;this.namespaceStack=[];this.diagramId="";this.functions=[];this.lineType={LINE:0,DOTTED_LINE:1};this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4};this.setupToolTips=g(i=>{let r=it();$(i).select("svg").selectAll("g").filter(function(){return $(this).attr("title")!==null}).on("mouseover",o=>{let u=$(o.currentTarget),p=u.attr("title");if(!p)return;let m=o.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(Xe.sanitize(p)).style("left",`${window.scrollX+m.left+m.width/2}px`).style("top",`${window.scrollY+m.bottom+4}px`),u.classed("hover",!0)}).on("mouseout",o=>{r.transition().duration(500).style("opacity",0),$(o.currentTarget).classed("hover",!1)})},"setupToolTips");this.direction="TB";this.setAccTitle=Je;this.getAccTitle=Ze;this.setAccDescription=$e;this.getAccDescription=et;this.setDiagramTitle=tt;this.getDiagramTitle=st;this.getConfig=g(()=>F().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.popNamespace=this.popNamespace.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{g(this,"ClassDB")}splitClassNameAndType(i){let r=v.sanitizeText(i,F()),a="",n=r;if(r.indexOf("~")>0){let o=r.split("~");n=P(o[0]),a=P(o[1])}return{className:n,type:a}}setClassLabel(i,r){let a=v.sanitizeText(i,F());r&&(r=P(r));let{className:n}=this.splitClassNameAndType(a);this.classes.get(n).label=r,this.classes.get(n).text=`${r}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(i){let r=v.sanitizeText(i,F()),{className:a,type:n}=this.splitClassNameAndType(r);if(this.classes.has(a))return;let o=v.sanitizeText(a,F());this.classes.set(o,{id:o,type:n,label:o,text:`${o}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:be+o+"-"+ht}),ht++}addInterface(i,r){let a={id:`interface${this.interfaces.length}`,label:i,classId:r};this.interfaces.push(a)}setDiagramId(i){this.diagramId=i}lookUpDomId(i){let r=v.sanitizeText(i,F());if(this.classes.has(r)){let a=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${a}`:a}throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",qe()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(i){let r=typeof i=="number"?`note${i}`:i;return this.notes.get(r)}getNotes(){return this.notes}addRelation(i){Z.debug("Adding relation: "+JSON.stringify(i));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!r.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!r.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=v.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=v.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,r){let a=this.splitClassNameAndType(i).className;this.classes.get(a).annotations.push(r)}addMember(i,r){this.addClass(i);let a=this.splitClassNameAndType(i).className,n=this.classes.get(a);if(typeof r=="string"){let o=r.trim();o.startsWith("<<")&&o.endsWith(">>")?n.annotations.push(P(o.substring(2,o.length-2))):o.indexOf(")")>0?n.methods.push(new te(o,"method")):o&&n.members.push(new te(o,"attribute"))}}addMembers(i,r){Array.isArray(r)&&(r.reverse(),r.forEach(a=>this.addMember(i,a)))}addNote(i,r){let a=this.notes.size,n={id:`note${a}`,class:r,text:i,index:a};return this.notes.set(n.id,n),n.id}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),P(i.trim())}setCssClass(i,r){i.split(",").forEach(a=>{let n=a;/\d/.exec(a[0])&&(n=be+n);let o=this.classes.get(n);o&&(o.cssClasses+=" "+r)})}defineClass(i,r){for(let a of i){let n=this.styleClasses.get(a);n===void 0&&(n={id:a,styles:[],textStyles:[]},this.styleClasses.set(a,n)),r&&r.forEach(o=>{if(/color/.exec(o)){let u=o.replace("fill","bgFill");n.textStyles.push(u)}n.styles.push(o)}),this.classes.forEach(o=>{o.cssClasses.includes(a)&&o.styles.push(...r.flatMap(u=>u.split(",")))})}}setTooltip(i,r){i.split(",").forEach(a=>{r!==void 0&&(this.classes.get(a).tooltip=P(r))})}getTooltip(i,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,r,a){let n=F();i.split(",").forEach(o=>{let u=o;/\d/.exec(o[0])&&(u=be+u);let p=this.classes.get(u);p&&(p.link=ee.formatUrl(r,n),n.securityLevel==="sandbox"?p.linkTarget="_top":typeof a=="string"?p.linkTarget=P(a):p.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,r,a){i.split(",").forEach(n=>{this.setClickFunc(n,r,a),this.classes.get(n).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,r,a){let n=v.sanitizeText(i,F());if(F().securityLevel!=="loose"||r===void 0)return;let u=n;if(this.classes.has(u)){let p=[];if(typeof a=="string"){p=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m{let m=this.lookUpDomId(u),f=document.querySelector(`[id="${m}"]`);f!==null&&f.addEventListener("click",()=>{ee.runFunc(r,...p)},!1)})}}bindFunctions(i){this.functions.forEach(r=>{r(i)})}escapeHtml(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(i){this.direction=i}static resolveQualifiedId(i,r){let a=r.at(-1);return a?`${a}.${i}`:i}static getAncestorIds(i){let r=i.split("."),a=new Array(r.length);a[0]=r[0];for(let n=1;n0?o[u-1]:void 0,f=u===o.length-1,_=f&&r?r:n[u];this.namespaces.has(p)?f&&(this.namespaces.get(p).explicit=!0):this.namespaces.set(p,this.createNamespaceNode(p,_,m,f)),m&&this.linkParentChild(m,p)}return a}popNamespace(){this.namespaceStack.pop()}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,r,a){if(this.namespaces.has(i)){for(let n of r){let{className:o}=this.splitClassNameAndType(n),u=this.getClass(o);u.parent=i,this.namespaces.get(i).classes.set(o,u)}for(let n of a){let o=this.getNote(n);o.parent=i,this.namespaces.get(i).notes.set(n,o)}}}setCssStyle(i,r){let a=this.classes.get(i);if(!(!r||!a))for(let n of r)n.includes(",")?a.styles.push(...n.split(",")):a.styles.push(n)}getArrowMarker(i){let r;switch(i){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}resolveExplicitAncestor(i){let r=i;for(;r;){let a=this.namespaces.get(r);if(!a)return;if(a.explicit)return r;r=a.parent}}getData(){let i=[],r=[],a=F(),n=a.class?.hierarchicalNamespaces??!0;for(let u of this.namespaces.values()){if(!n&&!u.explicit)continue;let p={id:u.id,label:n?u.label:u.id,isGroup:!0,padding:a.class.padding??16,shape:"rect",cssStyles:[],look:a.look,parentId:n?u.parent:void 0};i.push(p)}for(let u of this.classes.values()){let p=n?u.parent:this.resolveExplicitAncestor(u.parent),m={...u,type:void 0,isGroup:!1,parentId:p,look:a.look};i.push(m)}for(let u of this.notes.values()){let p=n?u.parent:this.resolveExplicitAncestor(u.parent),m={id:u.id,label:u.text,isGroup:!1,shape:"note",padding:a.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${a.themeVariables.noteBkgColor}`,`stroke: ${a.themeVariables.noteBorderColor}`],look:a.look,parentId:p,labelType:"markdown"};i.push(m);let f=this.classes.get(u.class)?.id;if(f){let _={id:`edgeNote${u.index}`,start:u.id,end:f,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:a.look};r.push(_)}}for(let u of this.interfaces){let p={id:u.id,label:u.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:a.look};i.push(p)}let o=0;for(let u of this.relations){o++;let p={id:rt(u.id1,u.id2,{prefix:"id",counter:o}),start:u.id1,end:u.id2,type:"normal",label:u.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(u.relation.type1),arrowTypeEnd:this.getArrowMarker(u.relation.type2),startLabelRight:u.relationTitle1==="none"?"":u.relationTitle1,endLabelLeft:u.relationTitle2==="none"?"":u.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:u.style||"",pattern:u.relation.lineType==1?"dashed":"solid",look:a.look,labelType:"markdown"};r.push(p)}return{nodes:i,edges:r,other:{},config:a,direction:this.getDirection()}}};var At=g(t=>`g.classGroup text { + fill: ${t.nodeBorder||t.classText}; + stroke: none; + font-family: ${t.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span { + color: ${t.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${t.clusterBkg}; + stroke: ${t.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span { + color: ${t.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${t.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${t.noteTextColor}; +} +.edgeLabel .label rect { + fill: ${t.mainBkg}; +} +.label text { + fill: ${t.classText}; +} + +.labelBkg { + background: ${t.mainBkg}; +} +.edgeLabel .label span { + background: ${t.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: ${t.strokeWidth}; + } + + +.divider { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.classGroup line { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${t.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${t.lineColor}; + stroke-width: ${t.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopEnd"], .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} + ${ot()} +`,"getStyles"),Yt=At;var kt=g((t,i="TB")=>{if(!t.doc)return i;let r=i;for(let a of t.doc)a.stmt==="dir"&&(r=a.value);return r},"getDir"),Ct=g(function(t,i){return i.db.getClasses()},"getClasses"),yt=g(async function(t,i,r,a){Z.info("REF0:"),Z.info("Drawing class diagram (v3)",i);let{securityLevel:n,state:o,layout:u}=F();a.db.setDiagramId(i);let p=a.db.getData(),m=at(i,n);p.type=a.type,p.layoutAlgorithm=lt(u),p.nodeSpacing=o?.nodeSpacing||50,p.rankSpacing=o?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=i,await nt(p,m);let f=8;ee.insertTitle(m,"classDiagramTitleText",o?.titleTopMargin??25,a.db.getDiagramTitle()),ut(m,f,"classDiagram",o?.useMaxWidth??!0)},"draw"),Zt={getClasses:Ct,draw:yt,getDir:kt};export{Dt as a,pt as b,Yt as c,Zt as d}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RKZBBQEN.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RKZBBQEN.mjs new file mode 100644 index 00000000000..da7021382cc --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RKZBBQEN.mjs @@ -0,0 +1 @@ +import{a as o,b as s,c as l,d as n,e as d,g as m,o as c,r as p,t as T}from"./chunk-4R4BOZG6.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var u=class extends T{static{i(this,"TreemapTokenBuilder")}static{o(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},v=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,g=class extends p{static{i(this,"TreemapValueConverter")}static{o(this,"TreemapValueConverter")}runCustomConverter(r,e,t){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR")return e.substring(1,e.length-1);if(r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=v.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}};function f(r){let e=r.validation.TreemapValidator,t=r.validation.ValidationRegistry;if(t){let a={Treemap:e.checkSingleRoot.bind(e)};t.register(a,e)}}i(f,"registerValidationChecks");o(f,"registerValidationChecks");var h=class{static{i(this,"TreemapValidator")}static{o(this,"TreemapValidator")}checkSingleRoot(r,e){let t;for(let a of r.TreemapRows)a.item&&(t===void 0&&a.indent===void 0?t=0:a.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):t!==void 0&&t>=parseInt(a.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},C={parser:{TokenBuilder:o(()=>new u,"TokenBuilder"),ValueConverter:o(()=>new g,"ValueConverter")},validation:{TreemapValidator:o(()=>new h,"TreemapValidator")}};function V(r=d){let e=n(l(r),m),t=n(s({shared:e}),c,C);return e.ServiceRegistry.register(t),f(t),{shared:e,Treemap:t}}i(V,"createTreemapServices");o(V,"createTreemapServices");export{C as a,V as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RLI5ZMPA.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RLI5ZMPA.mjs new file mode 100644 index 00000000000..94a4567916f --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-RLI5ZMPA.mjs @@ -0,0 +1 @@ +import{a as r,b as l,c,d,e as v,g as u,i as E,s as m,t as S}from"./chunk-4R4BOZG6.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var k=class extends S{static{i(this,"EventModelingTokenBuilder")}static{r(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},y=new Set(["cmd","command"]),h=new Set(["evt","event"]),s=new Set(["rmo","readmodel"]),M=new Set(["pcr","processor"]),T=new Set(["ui"]);function g(e){let t=e.validation.EventModelingValidator,o=e.validation.ValidationRegistry;if(o){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};o.register(n,t)}}i(g,"registerValidationChecks");r(g,"registerValidationChecks");var C=class{static{i(this,"EventModelingValidator")}static{r(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(y.has(e.modelEntityType)?this.validateSources(e,new Set([...T,...M]),"command","ui or processor",t):h.has(e.modelEntityType)?this.validateSources(e,y,"event","command",t):s.has(e.modelEntityType)?this.validateSources(e,h,"read model","event",t):M.has(e.modelEntityType)?this.validateSources(e,s,"processor","read model",t):T.has(e.modelEntityType)&&this.validateSources(e,s,"ui","read model",t))}validateSources(e,t,o,n,p){for(let V of e.sourceFrames){let a=V.ref;a!==void 0&&!t.has(a.modelEntityType)&&p("error",`A ${o} can only receive input from a ${n}, not from '${a.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},w={parser:{TokenBuilder:r(()=>new k,"TokenBuilder"),ValueConverter:r(()=>new m,"ValueConverter")},validation:{EventModelingValidator:r(()=>new C,"EventModelingValidator")}};function F(e=v){let t=d(c(e),u),o=d(l({shared:t}),E,w);return t.ServiceRegistry.register(o),g(o),{shared:t,EventModel:o}}i(F,"createEventModelingServices");r(F,"createEventModelingServices");export{w as a,F as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T2UQINTJ.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T2UQINTJ.mjs new file mode 100644 index 00000000000..6cc52162991 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T2UQINTJ.mjs @@ -0,0 +1 @@ +import{_ as c}from"./chunk-67TQ5CYL.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var u=i(t=>{let{handDrawnSeed:s}=c();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:s}},"solidStateFill"),p=i(t=>{let s=h([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:s,stylesArray:[...s]}},"compileStyles"),h=i(t=>{let s=new Map;return t.forEach(o=>{let[n,r]=o.split(":");s.set(n.trim(),r?.trim())}),s},"styles2Map"),g=i(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),m=i(t=>{let{stylesArray:s}=p(t),o=[],n=[],r=[],l=[];return s.forEach(e=>{let a=e[0];g(a)?o.push(e.join(":")+" !important"):(n.push(e.join(":")+" !important"),a.includes("stroke")&&r.push(e.join(":")+" !important"),a==="fill"&&l.push(e.join(":")+" !important"))}),{labelStyles:o.join(";"),nodeStyles:n.join(";"),stylesArray:s,borderStyles:r,backgroundStyles:l}},"styles2String"),S=i((t,s)=>{let{themeVariables:o,handDrawnSeed:n}=c(),{nodeBorder:r,mainBkg:l}=o,{stylesMap:e}=p(t);return Object.assign({roughness:.7,fill:e.get("fill")||l,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:n,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:d(e.get("stroke-dasharray"))},s)},"userNodeOverrides"),d=i(t=>{if(!t)return[0,0];let s=t.trim().split(/\s+/).map(Number);if(s.length===1){let r=isNaN(s[0])?0:s[0];return[r,r]}let o=isNaN(s[0])?0:s[0],n=isNaN(s[1])?0:s[1];return[o,n]},"getStrokeDashArray");export{u as a,p as b,g as c,m as d,S as e}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T5OCTHI4.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T5OCTHI4.mjs new file mode 100644 index 00000000000..0a9ebe60592 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-T5OCTHI4.mjs @@ -0,0 +1 @@ +import{a as i}from"./chunk-AQ6EADP3.mjs";var s=class{constructor(t){this.init=t;this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{s as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UP6H54XL.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UP6H54XL.mjs new file mode 100644 index 00000000000..3d829ca91ba --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UP6H54XL.mjs @@ -0,0 +1 @@ +import{a as r,b as l,c as s,d,e as n,g as u,q as i,r as c}from"./chunk-4R4BOZG6.mjs";import{a as o}from"./chunk-AQ6EADP3.mjs";var m=class extends c{static{o(this,"WardleyValueConverter")}static{r(this,"WardleyValueConverter")}runCustomConverter(t,e,a){switch(t.name.toUpperCase()){case"LINK_LABEL":return e.substring(1).trim();default:return}}},v={parser:{ValueConverter:r(()=>new m,"ValueConverter")}};function y(t=n){let e=d(s(t),u),a=d(l({shared:e}),i,v);return e.ServiceRegistry.register(a),{shared:e,Wardley:a}}o(y,"createWardleyServices");r(y,"createWardleyServices");export{v as a,y as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UXSXWOXI.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UXSXWOXI.mjs new file mode 100644 index 00000000000..ee21739a47c --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UXSXWOXI.mjs @@ -0,0 +1 @@ +import{a as e,b as c,c as n,d as a,e as i,g as u,l as d,s as l,t as s}from"./chunk-4R4BOZG6.mjs";import{a as t}from"./chunk-AQ6EADP3.mjs";var m=class extends s{static{t(this,"PacketTokenBuilder")}static{e(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},v={parser:{TokenBuilder:e(()=>new m,"TokenBuilder"),ValueConverter:e(()=>new l,"ValueConverter")}};function p(k=i){let r=a(n(k),u),o=a(c({shared:r}),d,v);return r.ServiceRegistry.register(o),{shared:r,Packet:o}}t(p,"createPacketServices");e(p,"createPacketServices");export{v as a,p as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UY5QBCOK.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UY5QBCOK.mjs new file mode 100644 index 00000000000..6b71d3f3715 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-UY5QBCOK.mjs @@ -0,0 +1 @@ +import{n as p}from"./chunk-QA3QBVWF.mjs";import{_ as s,j as m}from"./chunk-67TQ5CYL.mjs";import{a as o}from"./chunk-AQ6EADP3.mjs";var d=o(({flowchart:n})=>{let i=n?.subGraphTitleMargin?.top??0,e=n?.subGraphTitleMargin?.bottom??0,r=i+e;return{subGraphTitleTopMargin:i,subGraphTitleBottomMargin:e,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins");async function G(n,i){let e=n.getElementsByTagName("img");if(!e||e.length===0)return;let r=i.replace(/]*>/g,"").trim()==="";await Promise.all([...e].map(t=>new Promise(g=>{function a(){if(t.style.display="flex",t.style.flexDirection="column",r){let c=s().fontSize?s().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[f=m.fontSize]=p(c),l=f*u+"px";t.style.minWidth=l,t.style.maxWidth=l}else t.style.width="100%";g(t)}o(a,"setupImage"),setTimeout(()=>{t.complete&&a()}),t.addEventListener("error",a),t.addEventListener("load",a)})))}o(G,"configureLabelImages");export{G as a,d as b}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-VU6ZFW4Y.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-VU6ZFW4Y.mjs new file mode 100644 index 00000000000..98a262d9ba6 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-VU6ZFW4Y.mjs @@ -0,0 +1 @@ +import{b as c,c as y,d as u,e as h}from"./chunk-7J6CGLKN.mjs";import{a as f,e as g,g as L}from"./chunk-KGFNY3KK.mjs";import{e as m}from"./chunk-QA3QBVWF.mjs";import{G as l,t as p}from"./chunk-67TQ5CYL.mjs";import{b as i}from"./chunk-7W6UQGC5.mjs";import{a as o}from"./chunk-AQ6EADP3.mjs";var w={common:l,getConfig:p,insertCluster:g,insertEdge:u,insertEdgeLabel:c,insertMarkers:h,insertNode:L,interpolateToCurve:m,labelHelper:f,log:i,positionEdgeLabel:y};var a={},H=o(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),S=o(()=>{H([{name:"dagre",loader:o(async()=>await import("./dagre-ND4H6XIP.mjs"),"loader")},{name:"cose-bilkent",loader:o(async()=>await import("./cose-bilkent-UX7MHV2Q.mjs"),"loader")}])},"registerDefaultLayoutLoaders");S();var P=o(async(t,r)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let A=e.domId||e.id;e.domId=`${t.diagramId}-${A}`}let n=a[t.layoutAlgorithm],x=await n.loader(),{theme:d,themeVariables:D}=t.config,{useGradient:F,gradientStart:$,gradientStop:I}=D,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${d?.includes("dark")?"#FFFFFF":"#000000"}`),F){let e=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",$).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",I).attr("stop-opacity",1)}return x.render(t,r,w,{algorithm:n.algorithm})},"render"),M=o((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{H as a,P as b,M as c}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-W44A43WB.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-W44A43WB.mjs new file mode 100644 index 00000000000..8b8f8727293 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-W44A43WB.mjs @@ -0,0 +1,14 @@ +import{a as o}from"./chunk-AQ6EADP3.mjs";var $a=typeof global=="object"&&global&&global.Object===Object&&global,$r=$a;var Ya=typeof self=="object"&&self&&self.Object===Object&&self,Va=$r||Ya||Function("return this")(),b=Va;var Za=b.Symbol,v=Za;var Kt=Object.prototype,Ja=Kt.hasOwnProperty,Xa=Kt.toString,Nr=v?v.toStringTag:void 0;function Qa(r){var t=Ja.call(r,Nr),e=r[Nr];try{r[Nr]=void 0;var a=!0}catch{}var f=Xa.call(r);return a&&(t?r[Nr]=e:delete r[Nr]),f}o(Qa,"getRawTag");var Wt=Qa;var ka=Object.prototype,rf=ka.toString;function tf(r){return rf.call(r)}o(tf,"objectToString");var Ht=tf;var ef="[object Null]",of="[object Undefined]",zt=v?v.toStringTag:void 0;function af(r){return r==null?r===void 0?of:ef:zt&&zt in Object(r)?Wt(r):Ht(r)}o(af,"baseGetTag");var C=af;function ff(r){return r!=null&&typeof r=="object"}o(ff,"isObjectLike");var _=ff;var nf="[object Symbol]";function sf(r){return typeof r=="symbol"||_(r)&&C(r)==nf}o(sf,"isSymbol");var M=sf;function pf(r,t){for(var e=-1,a=r==null?0:r.length,f=Array(a);++e0){if(++t>=Xf)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}o(rn,"shortOut");var pe=rn;function tn(r){return function(){return r}}o(tn,"constant");var V=tn;var en=(function(){try{var r=j(Object,"defineProperty");return r({},"",{}),r}catch{}})(),hr=en;var on=hr?function(r,t){return hr(r,"toString",{configurable:!0,enumerable:!1,value:V(t),writable:!0})}:E,ue=on;var an=pe(ue),Jr=an;function fn(r,t){for(var e=-1,a=r==null?0:r.length;++e-1}o(mn,"arrayIncludes");var ce=mn;var ln=9007199254740991,dn=/^(?:0|[1-9]\d*)$/;function cn(r,t){var e=typeof r;return t=t??ln,!!t&&(e=="number"||e!="symbol"&&dn.test(r))&&r>-1&&r%1==0&&r-1&&r%1==0&&r<=An}o(Tn,"isLength");var gr=Tn;function wn(r){return r!=null&&gr(r.length)&&!U(r)}o(wn,"isArrayLike");var O=wn;function Sn(r,t,e){if(!g(e))return!1;var a=typeof t;return(a=="number"?O(e)&&Z(t,e.length):a=="string"&&t in e)?R(e[t],r):!1}o(Sn,"isIterateeCall");var q=Sn;function Pn(r){return Q(function(t,e){var a=-1,f=e.length,n=f>1?e[f-1]:void 0,i=f>2?e[2]:void 0;for(n=r.length>3&&typeof n=="function"?(f--,n):void 0,i&&q(e[0],e[1],i)&&(n=f<3?void 0:n,f=1),t=Object(t);++a-1}o(Ji,"listCacheHas");var Be=Ji;function Xi(r,t){var e=this.__data__,a=er(e,r);return a<0?(++this.size,e.push([r,t])):e[a][1]=t,this}o(Xi,"listCacheSet");var De=Xi;function vr(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t0&&e(s)?t>1?Xe(s,t-1,e,a,f):Ar(f,s):a||(f[f.length]=s)}return f}o(Xe,"baseFlatten");var Tr=Xe;function _s(r){var t=r==null?0:r.length;return t?Tr(r,1):[]}o(_s,"flatten");var Mt=_s;function vs(r){return Jr(kr(r,void 0,Mt),r+"")}o(vs,"flatRest");var Qe=vs;var Os=tt(Object.getPrototypeOf,Object),wr=Os;var As="[object Object]",Ts=Function.prototype,ws=Object.prototype,ke=Ts.toString,Ss=ws.hasOwnProperty,Ps=ke.call(Object);function Cs(r){if(!_(r)||C(r)!=As)return!1;var t=wr(r);if(t===null)return!0;var e=Ss.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ke.call(e)==Ps}o(Cs,"isPlainObject");var ro=Cs;var Is="\\ud800-\\udfff",Es="\\u0300-\\u036f",js="\\ufe20-\\ufe2f",Ls="\\u20d0-\\u20ff",Ms=Es+js+Ls,Fs="\\ufe0e\\ufe0f",Rs="\\u200d",Ns=RegExp("["+Rs+Is+Ms+Fs+"]");function Bs(r){return Ns.test(r)}o(Bs,"hasUnicode");var to=Bs;function Ds(r,t,e,a){var f=-1,n=r==null?0:r.length;for(a&&n&&(e=r[++f]);++fs))return!1;var u=n.get(r),m=n.get(t);if(u&&m)return u==t&&m==r;var d=-1,c=!0,w=e&Du?new xt:void 0;for(n.set(r,t),n.set(t,r);++d2?t[2]:void 0;for(f&&q(t[0],t[1],f)&&(a=1);++e-1?f[n?t[i]:i]:void 0}}o(Vm,"createFind");var ca=Vm;var Zm=Math.max;function Jm(r,t,e){var a=r==null?0:r.length;if(!a)return-1;var f=e==null?0:re(e);return f<0&&(f=Zm(a+f,0)),Qr(r,S(t,3),f)}o(Jm,"findIndex");var xa=Jm;var Xm=ca(xa),Qm=Xm;function km(r,t){var e=-1,a=O(r)?Array(r.length):[];return pr(r,function(f,n,i){a[++e]=t(f,n,i)}),a}o(km,"baseMap");var St=km;function rl(r,t){var e=l(r)?G:St;return e(r,S(t,3))}o(rl,"map");var tl=rl;function el(r,t){return r==null?r:jr(r,Mr(t),L)}o(el,"forIn");var ol=el;function al(r,t){return r&&Lr(r,Mr(t))}o(al,"forOwn");var fl=al;function nl(r,t){return r>t}o(nl,"baseGt");var ha=nl;var il=Object.prototype,sl=il.hasOwnProperty;function pl(r,t){return r!=null&&sl.call(r,t)}o(pl,"baseHas");var ga=pl;function ul(r,t){return r!=null&&Ot(r,t,ga)}o(ul,"has");var ml=ul;var ll="[object String]";function dl(r){return typeof r=="string"||!l(r)&&_(r)&&C(r)==ll}o(dl,"isString");var ba=dl;function cl(r,t){return G(t,function(e){return r[e]})}o(cl,"baseValues");var ya=cl;function xl(r){return r==null?[]:ya(r,y(r))}o(xl,"values");var Kr=xl;var hl="[object Map]",gl="[object Set]",bl=Object.prototype,yl=bl.hasOwnProperty;function _l(r){if(r==null)return!0;if(O(r)&&(l(r)||typeof r=="string"||typeof r.splice=="function"||B(r)||tr(r)||N(r)))return!r.length;var t=F(r);if(t==hl||t==gl)return!r.size;if(k(r))return!br(r).length;for(var e in r)if(yl.call(r,e))return!1;return!0}o(_l,"isEmpty");var Pt=_l;function vl(r){return r===void 0}o(vl,"isUndefined");var ur=vl;function Ol(r,t){return rt||n&&i&&p&&!s&&!u||a&&i&&p||!e&&p||!f)return 1;if(!a&&!n&&!u&&r=s)return p;var u=e[a];return p*(u=="desc"?-1:1)}}return r.index-t.index}o(Dl,"compareMultiple");var Ta=Dl;function Gl(r,t,e){t.length?t=G(t,function(n){return l(n)?function(i){return ir(i,n.length===1?n[0]:n)}:n}):t=[E];var a=-1;t=G(t,rr(S));var f=St(r,function(n,i,s){var p=G(t,function(u){return u(n)});return{criteria:p,index:++a,value:n}});return Oa(f,function(n,i){return Ta(n,i,e)})}o(Gl,"baseOrderBy");var wa=Gl;var Ul=Tt("length"),Sa=Ul;var Ca="\\ud800-\\udfff",Kl="\\u0300-\\u036f",Wl="\\ufe20-\\ufe2f",Hl="\\u20d0-\\u20ff",zl=Kl+Wl+Hl,ql="\\ufe0e\\ufe0f",$l="["+Ca+"]",Rt="["+zl+"]",Nt="\\ud83c[\\udffb-\\udfff]",Yl="(?:"+Rt+"|"+Nt+")",Ia="[^"+Ca+"]",Ea="(?:\\ud83c[\\udde6-\\uddff]){2}",ja="[\\ud800-\\udbff][\\udc00-\\udfff]",Vl="\\u200d",La=Yl+"?",Ma="["+ql+"]?",Zl="(?:"+Vl+"(?:"+[Ia,Ea,ja].join("|")+")"+Ma+La+")*",Jl=Ma+La+Zl,Xl="(?:"+[Ia+Rt+"?",Rt,Ea,ja,$l].join("|")+")",Pa=RegExp(Nt+"(?="+Nt+")|"+Xl+Jl,"g");function Ql(r){for(var t=Pa.lastIndex=0;Pa.test(r);)++t;return t}o(Ql,"unicodeSize");var Fa=Ql;function kl(r){return to(r)?Fa(r):Sa(r)}o(kl,"stringSize");var Ra=kl;function rd(r,t){return va(r,t,function(e,a){return At(r,a)})}o(rd,"basePick");var Na=rd;var td=Qe(function(r,t){return r==null?{}:Na(r,t)}),ed=td;var od=Math.ceil,ad=Math.max;function fd(r,t,e,a){for(var f=-1,n=ad(od((t-r)/(e||1)),0),i=Array(n);n--;)i[a?n:++f]=r,r+=e;return i}o(fd,"baseRange");var Ba=fd;function nd(r){return function(t,e,a){return a&&typeof a!="number"&&q(t,e,a)&&(e=a=void 0),t=xr(t),e===void 0?(e=t,t=0):e=xr(e),a=a===void 0?t1&&q(r,t[0],t[1])?t=[]:e>2&&q(t[0],t[1],t[2])&&(t=[t[0]]),wa(r,Tr(t,1),[])}),hd=xd;var gd=1/0,bd=sr&&1/Er(new sr([,-0]))[1]==gd?function(r){return new sr(r)}:se,Ua=bd;var yd=200;function _d(r,t,e){var a=-1,f=ce,n=r.length,i=!0,s=[],p=s;if(e)i=!1,f=la;else if(n>=yd){var u=t?null:Ua(r);if(u)return Er(u);i=!1,f=ht,p=new xt}else p=t?[]:s;r:for(;++a1?f.setNode(n,e):f.setNode(n)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=cr,this._children[t]={},this._children[cr][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 e=o(a=>this.removeEdge(this._edgeObjs[a]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],D(this.children(t),a=>{this.setParent(a)}),delete this._children[t]),D(y(this._in[t]),e),delete this._in[t],delete this._preds[t],D(y(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ur(e))e=cr;else{e+="";for(var a=e;!ur(a);a=this.parent(a))if(a===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==cr)return e}}children(t){if(ur(t)&&(t=cr),this._isCompound){var e=this._children[t];if(e)return y(e)}else{if(t===cr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return y(e)}successors(t){var e=this._sucs[t];if(e)return y(e)}neighbors(t){var e=this.predecessors(t);if(e)return Dt(e,this.successors(t))}isLeaf(t){var e;return this.isDirected()?e=this.successors(t):e=this.neighbors(t),e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var a=this;D(this._nodes,function(i,s){t(s)&&e.setNode(s,i)}),D(this._edgeObjs,function(i){e.hasNode(i.v)&&e.hasNode(i.w)&&e.setEdge(i,a.edge(i))});var f={};function n(i){var s=a.parent(i);return s===void 0||e.hasNode(s)?(f[i]=s,s):s in f?f[s]:n(s)}return o(n,"findParent"),this._isCompound&&D(e.nodes(),function(i){e.setParent(i,n(i))}),e}setDefaultEdgeLabel(t){return U(t)||(t=V(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Kr(this._edgeObjs)}setPath(t,e){var a=this,f=arguments;return Bt(t,function(n,i){return f.length>1?a.setEdge(n,i,e):a.setEdge(n,i),i}),this}setEdge(){var t,e,a,f,n=!1,i=arguments[0];typeof i=="object"&&i!==null&&"v"in i?(t=i.v,e=i.w,a=i.name,arguments.length===2&&(f=arguments[1],n=!0)):(t=i,e=arguments[1],a=arguments[3],arguments.length>2&&(f=arguments[2],n=!0)),t=""+t,e=""+e,ur(a)||(a=""+a);var s=Wr(this._isDirected,t,e,a);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return n&&(this._edgeLabels[s]=f),this;if(!ur(a)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=n?f:this._defaultEdgeLabelFn(t,e,a);var p=Ed(this._isDirected,t,e,a);return t=p.v,e=p.w,Object.freeze(p),this._edgeObjs[s]=p,za(this._preds[e],t),za(this._sucs[t],e),this._in[e][s]=p,this._out[t][s]=p,this._edgeCount++,this}edge(t,e,a){var f=arguments.length===1?Gt(this._isDirected,arguments[0]):Wr(this._isDirected,t,e,a);return this._edgeLabels[f]}hasEdge(t,e,a){var f=arguments.length===1?Gt(this._isDirected,arguments[0]):Wr(this._isDirected,t,e,a);return Object.prototype.hasOwnProperty.call(this._edgeLabels,f)}removeEdge(t,e,a){var f=arguments.length===1?Gt(this._isDirected,arguments[0]):Wr(this._isDirected,t,e,a),n=this._edgeObjs[f];return n&&(t=n.v,e=n.w,delete this._edgeLabels[f],delete this._edgeObjs[f],qa(this._preds[e],t),qa(this._sucs[t],e),delete this._in[e][f],delete this._out[t][f],this._edgeCount--),this}inEdges(t,e){var a=this._in[t];if(a){var f=Kr(a);return e?Fr(f,function(n){return n.v===e}):f}}outEdges(t,e){var a=this._out[t];if(a){var f=Kr(a);return e?Fr(f,function(n){return n.w===e}):f}}nodeEdges(t,e){var a=this.inEdges(t,e);if(a)return a.concat(this.outEdges(t,e))}};Hr.prototype._nodeCount=0;Hr.prototype._edgeCount=0;function za(r,t){r[t]?r[t]++:r[t]=1}o(za,"incrementOrInitEntry");function qa(r,t){--r[t]||delete r[t]}o(qa,"decrementOrRemoveEntry");function Wr(r,t,e,a){var f=""+t,n=""+e;if(!r&&f>n){var i=f;f=n,n=i}return f+Ha+n+Ha+(ur(a)?Id:a)}o(Wr,"edgeArgsToId");function Ed(r,t,e,a){var f=""+t,n=""+e;if(!r&&f>n){var i=f;f=n,n=i}var s={v:f,w:n};return a&&(s.name=a),s}o(Ed,"edgeArgsToObj");function Gt(r,t){return Wr(r,t.v,t.w,t.name)}o(Gt,"edgeObjToId");export{l as a,V as b,Mt as c,Pu as d,ju as e,Lm as f,Rm as g,Hm as h,D as i,Fr as j,Qm as k,tl as l,ol as m,fl as n,ml as o,Kr as p,ur as q,Tl as r,Pl as s,Il as t,jl as u,Ml as v,ed as w,sd as x,Bt as y,cd as z,hd as A,Td as B,Pd as C,Hr as D}; +/*! Bundled license information: + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -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 + *) +*/ diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-ZXARS5L4.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-ZXARS5L4.mjs new file mode 100644 index 00000000000..64dadb21fe6 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/chunk-ZXARS5L4.mjs @@ -0,0 +1 @@ +import{O as c}from"./chunk-67TQ5CYL.mjs";import{b as h}from"./chunk-7W6UQGC5.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var y=i((t,e,o,n)=>{t.attr("class",o);let{width:r,height:m,x:s,y:b}=w(t,e);c(t,m,r,n);let u=x(s,b,r,m,e);t.attr("viewBox",u),h.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),w=i((t,e)=>{let o=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+e*2,height:o.height+e*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),x=i((t,e,o,n,r)=>`${t-r} ${e-r} ${o} ${n}`,"createViewBox");export{y as a}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-KGZ6W3CR.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-KGZ6W3CR.mjs new file mode 100644 index 00000000000..d3b18d8f8b6 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-KGZ6W3CR.mjs @@ -0,0 +1 @@ +import{a,b as o,c as e,d as t}from"./chunk-RG4AUYOV.mjs";import"./chunk-AZZRMDJM.mjs";import"./chunk-LII3EMHJ.mjs";import"./chunk-6764PJDD.mjs";import"./chunk-ZXARS5L4.mjs";import"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import"./chunk-67TQ5CYL.mjs";import"./chunk-7W6UQGC5.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var n={parser:a,get db(){return new o},renderer:t,styles:e,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-v2-72OJOZXJ.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-v2-72OJOZXJ.mjs new file mode 100644 index 00000000000..d3b18d8f8b6 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/classDiagram-v2-72OJOZXJ.mjs @@ -0,0 +1 @@ +import{a,b as o,c as e,d as t}from"./chunk-RG4AUYOV.mjs";import"./chunk-AZZRMDJM.mjs";import"./chunk-LII3EMHJ.mjs";import"./chunk-6764PJDD.mjs";import"./chunk-ZXARS5L4.mjs";import"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import"./chunk-67TQ5CYL.mjs";import"./chunk-7W6UQGC5.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var n={parser:a,get db(){return new o},renderer:t,styles:e,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/cose-bilkent-UX7MHV2Q.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/cose-bilkent-UX7MHV2Q.mjs new file mode 100644 index 00000000000..27a14f62ad5 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/cose-bilkent-UX7MHV2Q.mjs @@ -0,0 +1 @@ +import{a as $}from"./chunk-3SSMPTDK.mjs";import{b as B,h as it}from"./chunk-7W6UQGC5.mjs";import{a as A,b as Q,d as ft}from"./chunk-AQ6EADP3.mjs";var q=Q((k,K)=>{"use strict";A((function(M,v){typeof k=="object"&&typeof K=="object"?K.exports=v():typeof define=="function"&&define.amd?define([],v):typeof k=="object"?k.layoutBase=v():M.layoutBase=v()}),"webpackUniversalModuleDefinition")(k,function(){return(function(m){var M={};function v(n){if(M[n])return M[n].exports;var e=M[n]={i:n,l:!1,exports:{}};return m[n].call(e.exports,e,e.exports,v),e.l=!0,e.exports}return A(v,"__webpack_require__"),v.m=m,v.c=M,v.i=function(n){return n},v.d=function(n,e,t){v.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:t})},v.n=function(n){var e=n&&n.__esModule?A(function(){return n.default},"getDefault"):A(function(){return n},"getModuleExports");return v.d(e,"a",e),e},v.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},v.p="",v(v.s=26)})([(function(m,M,v){"use strict";function n(){}A(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,m.exports=n}),(function(m,M,v){"use strict";var n=v(2),e=v(8),t=v(9);function r(u,o,p){n.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=u,this.target=o}A(r,"LEdge"),r.prototype=Object.create(n.prototype);for(var a in n)r[a]=n[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(u,o){for(var p=this.getOtherEnd(u),i=o.getGraphManager().getRoot();;){if(p.getOwner()==o)return p;if(p.getOwner()==i)break;p=p.getOwner().getParent()}return null},r.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},m.exports=r}),(function(m,M,v){"use strict";function n(e){this.vGraphObject=e}A(n,"LGraphObject"),m.exports=n}),(function(m,M,v){"use strict";var n=v(2),e=v(10),t=v(13),r=v(0),a=v(16),u=v(4);function o(i,h,l,d){l==null&&d==null&&(d=h),n.call(this,d),i.graphManager!=null&&(i=i.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=i,l!=null&&h!=null?this.rect=new t(h.x,h.y,l.width,l.height):this.rect=new t}A(o,"LNode"),o.prototype=Object.create(n.prototype);for(var p in n)o[p]=n[p];o.prototype.getEdges=function(){return this.edges},o.prototype.getChild=function(){return this.child},o.prototype.getOwner=function(){return this.owner},o.prototype.getWidth=function(){return this.rect.width},o.prototype.setWidth=function(i){this.rect.width=i},o.prototype.getHeight=function(){return this.rect.height},o.prototype.setHeight=function(i){this.rect.height=i},o.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},o.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},o.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},o.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},o.prototype.getRect=function(){return this.rect},o.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},o.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},o.prototype.setRect=function(i,h){this.rect.x=i.x,this.rect.y=i.y,this.rect.width=h.width,this.rect.height=h.height},o.prototype.setCenter=function(i,h){this.rect.x=i-this.rect.width/2,this.rect.y=h-this.rect.height/2},o.prototype.setLocation=function(i,h){this.rect.x=i,this.rect.y=h},o.prototype.moveBy=function(i,h){this.rect.x+=i,this.rect.y+=h},o.prototype.getEdgeListToNode=function(i){var h=[],l,d=this;return d.edges.forEach(function(y){if(y.target==i){if(y.source!=d)throw"Incorrect edge source!";h.push(y)}}),h},o.prototype.getEdgesBetween=function(i){var h=[],l,d=this;return d.edges.forEach(function(y){if(!(y.source==d||y.target==d))throw"Incorrect edge source and/or target";(y.target==i||y.source==i)&&h.push(y)}),h},o.prototype.getNeighborsList=function(){var i=new Set,h=this;return h.edges.forEach(function(l){if(l.source==h)i.add(l.target);else{if(l.target!=h)throw"Incorrect incidency!";i.add(l.source)}}),i},o.prototype.withChildren=function(){var i=new Set,h,l;if(i.add(this),this.child!=null)for(var d=this.child.getNodes(),y=0;yh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},o.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},o.prototype.transform=function(i){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var l=this.rect.y;l>r.WORLD_BOUNDARY?l=r.WORLD_BOUNDARY:l<-r.WORLD_BOUNDARY&&(l=-r.WORLD_BOUNDARY);var d=new u(h,l),y=i.inverseTransformPoint(d);this.setLocation(y.x,y.y)},o.prototype.getLeft=function(){return this.rect.x},o.prototype.getRight=function(){return this.rect.x+this.rect.width},o.prototype.getTop=function(){return this.rect.y},o.prototype.getBottom=function(){return this.rect.y+this.rect.height},o.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},m.exports=o}),(function(m,M,v){"use strict";function n(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}A(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},m.exports=n}),(function(m,M,v){"use strict";var n=v(2),e=v(10),t=v(0),r=v(6),a=v(3),u=v(1),o=v(13),p=v(12),i=v(11);function h(d,y,T){n.call(this,T),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,y!=null&&y instanceof r?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}A(h,"LGraph"),h.prototype=Object.create(n.prototype);for(var l in n)h[l]=n[l];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(d,y,T){if(y==null&&T==null){var c=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(c)>-1)throw"Node already in graph!";return c.owner=this,this.getNodes().push(c),c}else{var D=d;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(y.owner==T.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=T.owner?null:(D.source=y,D.target=T,D.isInterGraph=!1,this.getEdges().push(D),y.edges.push(D),T!=y&&T.edges.push(D),D)}},h.prototype.remove=function(d){var y=d;if(d instanceof a){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=y.edges.slice(),c,D=T.length,E=0;E-1&&g>-1))throw"Source and/or target doesn't know this edge!";c.source.edges.splice(s,1),c.target!=c.source&&c.target.edges.splice(g,1);var O=c.source.owner.getEdges().indexOf(c);if(O==-1)throw"Not in owner's edge list!";c.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var d=e.MAX_VALUE,y=e.MAX_VALUE,T,c,D,E=this.getNodes(),O=E.length,s=0;sT&&(d=T),y>c&&(y=c)}return d==e.MAX_VALUE?null:(E[0].getParent().paddingLeft!=null?D=E[0].getParent().paddingLeft:D=this.margin,this.left=y-D,this.top=d-D,new p(this.left,this.top))},h.prototype.updateBounds=function(d){for(var y=e.MAX_VALUE,T=-e.MAX_VALUE,c=e.MAX_VALUE,D=-e.MAX_VALUE,E,O,s,g,f,L=this.nodes,N=L.length,I=0;IE&&(y=E),Ts&&(c=s),DE&&(y=E),Ts&&(c=s),D=this.nodes.length){var N=0;T.forEach(function(I){I.owner==d&&N++}),N==this.nodes.length&&(this.isConnected=!0)}},m.exports=h}),(function(m,M,v){"use strict";var n,e=v(1);function t(r){n=v(5),this.layout=r,this.graphs=[],this.edges=[]}A(t,"LGraphManager"),t.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),u=this.add(r,a);return this.setRootGraph(u),this.rootGraph},t.prototype.add=function(r,a,u,o,p){if(u==null&&o==null&&p==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{p=u,o=a,u=r;var i=o.getOwner(),h=p.getOwner();if(!(i!=null&&i.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(i==h)return u.isInterGraph=!1,i.add(u,o,p);if(u.isInterGraph=!0,u.source=o,u.target=p,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},t.prototype.remove=function(r){if(r instanceof n){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(a.getEdges());for(var o,p=u.length,i=0;i=r.getRight()?a[0]+=Math.min(r.getX()-t.getX(),t.getRight()-r.getRight()):r.getX()<=t.getX()&&r.getRight()>=t.getRight()&&(a[0]+=Math.min(t.getX()-r.getX(),r.getRight()-t.getRight())),t.getY()<=r.getY()&&t.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-t.getY(),t.getBottom()-r.getBottom()):r.getY()<=t.getY()&&r.getBottom()>=t.getBottom()&&(a[1]+=Math.min(t.getY()-r.getY(),r.getBottom()-t.getBottom()));var p=Math.abs((r.getCenterY()-t.getCenterY())/(r.getCenterX()-t.getCenterX()));r.getCenterY()===t.getCenterY()&&r.getCenterX()===t.getCenterX()&&(p=1);var i=p*a[0],h=a[1]/p;a[0]i)return a[0]=u,a[1]=l,a[2]=p,a[3]=L,!1;if(op)return a[0]=h,a[1]=o,a[2]=g,a[3]=i,!1;if(up?(a[0]=y,a[1]=T,C=!0):(a[0]=d,a[1]=l,C=!0):S===F&&(u>p?(a[0]=h,a[1]=l,C=!0):(a[0]=c,a[1]=T,C=!0)),-_===F?p>u?(a[2]=f,a[3]=L,G=!0):(a[2]=g,a[3]=s,G=!0):_===F&&(p>u?(a[2]=O,a[3]=s,G=!0):(a[2]=N,a[3]=L,G=!0)),C&&G)return!1;if(u>p?o>i?(w=this.getCardinalDirection(S,F,4),x=this.getCardinalDirection(_,F,2)):(w=this.getCardinalDirection(-S,F,3),x=this.getCardinalDirection(-_,F,1)):o>i?(w=this.getCardinalDirection(-S,F,1),x=this.getCardinalDirection(-_,F,3)):(w=this.getCardinalDirection(S,F,2),x=this.getCardinalDirection(_,F,4)),!C)switch(w){case 1:Y=l,P=u+-E/F,a[0]=P,a[1]=Y;break;case 2:P=c,Y=o+D*F,a[0]=P,a[1]=Y;break;case 3:Y=T,P=u+E/F,a[0]=P,a[1]=Y;break;case 4:P=y,Y=o+-D*F,a[0]=P,a[1]=Y;break}if(!G)switch(x){case 1:U=s,X=p+-R/F,a[2]=X,a[3]=U;break;case 2:X=N,U=i+I*F,a[2]=X,a[3]=U;break;case 3:U=L,X=p+R/F,a[2]=X,a[3]=U;break;case 4:X=f,U=i+-I*F,a[2]=X,a[3]=U;break}}return!1},e.getCardinalDirection=function(t,r,a){return t>r?a:1+a%4},e.getIntersection=function(t,r,a,u){if(u==null)return this.getIntersection2(t,r,a);var o=t.x,p=t.y,i=r.x,h=r.y,l=a.x,d=a.y,y=u.x,T=u.y,c=void 0,D=void 0,E=void 0,O=void 0,s=void 0,g=void 0,f=void 0,L=void 0,N=void 0;return E=h-p,s=o-i,f=i*p-o*h,O=T-d,g=l-y,L=y*d-l*T,N=E*g-O*s,N===0?null:(c=(s*L-g*f)/N,D=(O*f-E*L)/N,new n(c,D))},e.angleOfVector=function(t,r,a,u){var o=void 0;return t!==a?(o=Math.atan((u-r)/(a-t)),a0?1:e<0?-1:0},n.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},n.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},m.exports=n}),(function(m,M,v){"use strict";function n(){}A(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,m.exports=n}),(function(m,M,v){"use strict";var n=(function(){function o(p,i){for(var h=0;h"u"?"undefined":n(t);return t==null||r!="object"&&r!="function"},m.exports=e}),(function(m,M,v){"use strict";function n(l){if(Array.isArray(l)){for(var d=0,y=Array(l.length);d0&&d;){for(E.push(s[0]);E.length>0&&d;){var g=E[0];E.splice(0,1),D.add(g);for(var f=g.getEdges(),c=0;c-1&&s.splice(R,1)}D=new Set,O=new Map}}return l},h.prototype.createDummyNodesForBendpoints=function(l){for(var d=[],y=l.source,T=this.graphManager.calcLowestCommonAncestor(l.source,l.target),c=0;c0){for(var T=this.edgeToDummyNodes.get(y),c=0;c=0&&d.splice(L,1);var N=O.getNeighborsList();N.forEach(function(C){if(y.indexOf(C)<0){var G=T.get(C),S=G-1;S==1&&g.push(C),T.set(C,S)}})}y=y.concat(g),(d.length==1||d.length==2)&&(c=!0,D=d[0])}return D},h.prototype.setGraphManager=function(l){this.graphManager=l},m.exports=h}),(function(m,M,v){"use strict";function n(){}A(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},m.exports=n}),(function(m,M,v){"use strict";var n=v(4);function e(t,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}A(e,"Transform"),e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/a),r},e.prototype.transformY=function(t){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/a),r},e.prototype.inverseTransformX=function(t){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/a),r},e.prototype.inverseTransformY=function(t){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/a),r},e.prototype.inverseTransformPoint=function(t){var r=new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return r},m.exports=e}),(function(m,M,v){"use strict";function n(i){if(Array.isArray(i)){for(var h=0,l=Array(i.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(i-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(i>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(i-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},o.prototype.calcSpringForces=function(){for(var i=this.getAllEdges(),h,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,d,y,T,c=this.getAllNodes(),D;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&i&&this.updateGrid(),D=new Set,l=0;lE||D>E)&&(i.gravitationForceX=-this.gravityConstant*y,i.gravitationForceY=-this.gravityConstant*T)):(E=h.getEstimatedSize()*this.compoundGravityRangeFactor,(c>E||D>E)&&(i.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,i.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},o.prototype.isConverged=function(){var i,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),i=this.totalDisplacement=c.length||E>=c[0].length)){for(var O=0;Oo},"_defaultCompareFunction")}]),a})();m.exports=r}),(function(m,M,v){"use strict";var n=(function(){function r(a,u){for(var o=0;o2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,r),this.sequence1=a,this.sequence2=u,this.match_score=o,this.mismatch_penalty=p,this.gap_penalty=i,this.iMax=a.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;a--){var u=this.listeners[a];u.event===t&&u.callback===r&&this.listeners.splice(a,1)}},e.emit=function(t,r){for(var a=0;a{"use strict";A((function(M,v){typeof Z=="object"&&typeof z=="object"?z.exports=v(q()):typeof define=="function"&&define.amd?define(["layout-base"],v):typeof Z=="object"?Z.coseBase=v(q()):M.coseBase=v(M.layoutBase)}),"webpackUniversalModuleDefinition")(Z,function(m){return(function(M){var v={};function n(e){if(v[e])return v[e].exports;var t=v[e]={i:e,l:!1,exports:{}};return M[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return A(n,"__webpack_require__"),n.m=M,n.c=v,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?A(function(){return e.default},"getDefault"):A(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)})([(function(M,v){M.exports=m}),(function(M,v,n){"use strict";var e=n(0).FDLayoutConstants;function t(){}A(t,"CoSEConstants");for(var r in e)t[r]=e[r];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,M.exports=t}),(function(M,v,n){"use strict";var e=n(0).FDLayoutEdge;function t(a,u,o){e.call(this,a,u,o)}A(t,"CoSEEdge"),t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];M.exports=t}),(function(M,v,n){"use strict";var e=n(0).LGraph;function t(a,u,o){e.call(this,a,u,o)}A(t,"CoSEGraph"),t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];M.exports=t}),(function(M,v,n){"use strict";var e=n(0).LGraphManager;function t(a){e.call(this,a)}A(t,"CoSEGraphManager"),t.prototype=Object.create(e.prototype);for(var r in e)t[r]=e[r];M.exports=t}),(function(M,v,n){"use strict";var e=n(0).FDLayoutNode,t=n(0).IMath;function r(u,o,p,i){e.call(this,u,o,p,i)}A(r,"CoSENode"),r.prototype=Object.create(e.prototype);for(var a in e)r[a]=e[a];r.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},r.prototype.propogateDisplacementToChildren=function(u,o){for(var p=this.getChild().getNodes(),i,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var g=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(L){return g.has(L)});this.graphManager.setAllNodesToApplyGravitation(f),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%p.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),g=this.nodesWithGravity.filter(function(N){return s.has(N)});this.graphManager.setAllNodesToApplyGravitation(g),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var f=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(f,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),g={},f=0;f1){var C;for(C=0;CL&&(L=Math.floor(R.y)),I=Math.floor(R.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(i.WORLD_CENTER_X-R.x/2,i.WORLD_CENTER_Y-R.y/2))},E.radialLayout=function(s,g,f){var L=Math.max(this.maxDiagonalInTree(s),o.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(g,null,0,359,0,L);var N=c.calculateBounds(s),I=new D;I.setDeviceOrgX(N.getMinX()),I.setDeviceOrgY(N.getMinY()),I.setWorldOrgX(f.x),I.setWorldOrgY(f.y);for(var R=0;R1;){var b=U[0];U.splice(0,1);var V=w.indexOf(b);V>=0&&w.splice(V,1),Y--,x--}g!=null?X=(w.indexOf(U[0])+1)%Y:X=0;for(var H=Math.abs(L-f)/x,W=X;P!=x;W=++W%Y){var et=w[W].getOtherEnd(s);if(et!=g){var rt=(f+P*H)%360,gt=(rt+H)%360;E.branchRadialLayout(et,s,rt,gt,N+I,I),P++}}},E.maxDiagonalInTree=function(s){for(var g=y.MIN_VALUE,f=0;fg&&(g=N)}return g},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var s=this,g={};this.memberGroups={},this.idToDummyNode={};for(var f=[],L=this.graphManager.getAllNodes(),N=0;N"u"&&(g[C]=[]),g[C]=g[C].concat(I)}Object.keys(g).forEach(function(G){if(g[G].length>1){var S="DummyCompound_"+G;s.memberGroups[S]=g[G];var _=g[G][0].getParent(),F=new a(s.graphManager);F.id=S,F.paddingLeft=_.paddingLeft||0,F.paddingRight=_.paddingRight||0,F.paddingBottom=_.paddingBottom||0,F.paddingTop=_.paddingTop||0,s.idToDummyNode[S]=F;var w=s.getGraphManager().add(s.newGraph(),F),x=_.getChild();x.add(F);for(var P=0;P=0;s--){var g=this.compoundOrder[s],f=g.id,L=g.paddingLeft,N=g.paddingTop;this.adjustLocations(this.tiledMemberPack[f],g.rect.x,g.rect.y,L,N)}},E.prototype.repopulateZeroDegreeMembers=function(){var s=this,g=this.tiledZeroDegreePack;Object.keys(g).forEach(function(f){var L=s.idToDummyNode[f],N=L.paddingLeft,I=L.paddingTop;s.adjustLocations(g[f],L.rect.x,L.rect.y,N,I)})},E.prototype.getToBeTiled=function(s){var g=s.id;if(this.toBeTiled[g]!=null)return this.toBeTiled[g];var f=s.getChild();if(f==null)return this.toBeTiled[g]=!1,!1;for(var L=f.getNodes(),N=0;N0)return this.toBeTiled[g]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[g]=!1,!1}return this.toBeTiled[g]=!0,!0},E.prototype.getNodeDegree=function(s){for(var g=s.id,f=s.getEdges(),L=0,N=0;NG&&(G=_.rect.height)}f+=G+s.verticalPadding}},E.prototype.tileCompoundMembers=function(s,g){var f=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var N=g[L];f.tiledMemberPack[L]=f.tileNodes(s[L],N.paddingLeft+N.paddingRight),N.rect.width=f.tiledMemberPack[L].width,N.rect.height=f.tiledMemberPack[L].height})},E.prototype.tileNodes=function(s,g){var f=o.TILING_PADDING_VERTICAL,L=o.TILING_PADDING_HORIZONTAL,N={rows:[],rowWidth:[],rowHeight:[],width:0,height:g,verticalPadding:f,horizontalPadding:L};s.sort(function(C,G){return C.rect.width*C.rect.height>G.rect.width*G.rect.height?-1:C.rect.width*C.rect.height0&&(R+=s.horizontalPadding),s.rowWidth[f]=R,s.width0&&(C+=s.verticalPadding);var G=0;C>s.rowHeight[f]&&(G=s.rowHeight[f],s.rowHeight[f]=C,G=s.rowHeight[f]-G),s.height+=G,s.rows[f].push(g)},E.prototype.getShortestRowIndex=function(s){for(var g=-1,f=Number.MAX_VALUE,L=0;Lf&&(g=L,f=s.rowWidth[L]);return g},E.prototype.canAddHorizontal=function(s,g,f){var L=this.getShortestRowIndex(s);if(L<0)return!0;var N=s.rowWidth[L];if(N+s.horizontalPadding+g<=s.width)return!0;var I=0;s.rowHeight[L]0&&(I=f+s.verticalPadding-s.rowHeight[L]);var R;s.width-N>=g+s.horizontalPadding?R=(s.height+I)/(N+g+s.horizontalPadding):R=(s.height+I)/s.width,I=f+s.verticalPadding;var C;return s.widthI&&g!=f){L.splice(-1,1),s.rows[f].push(N),s.rowWidth[g]=s.rowWidth[g]-I,s.rowWidth[f]=s.rowWidth[f]+I,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,C=0;CR&&(R=L[C].height);g>0&&(R+=s.verticalPadding);var G=s.rowHeight[g]+s.rowHeight[f];s.rowHeight[g]=R,s.rowHeight[f]0)for(var x=N;x<=I;x++)w[0]+=this.grid[x][R-1].length+this.grid[x][R].length-1;if(I0)for(var x=R;x<=C;x++)w[3]+=this.grid[N-1][x].length+this.grid[N][x].length-1;for(var P=y.MAX_VALUE,Y,X,U=0;U{"use strict";A((function(M,v){typeof j=="object"&&typeof tt=="object"?tt.exports=v(J()):typeof define=="function"&&define.amd?define(["cose-base"],v):typeof j=="object"?j.cytoscapeCoseBilkent=v(J()):M.cytoscapeCoseBilkent=v(M.coseBase)}),"webpackUniversalModuleDefinition")(j,function(m){return(function(M){var v={};function n(e){if(v[e])return v[e].exports;var t=v[e]={i:e,l:!1,exports:{}};return M[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return A(n,"__webpack_require__"),n.m=M,n.c=v,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?A(function(){return e.default},"getDefault"):A(function(){return e},"getModuleExports");return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)})([(function(M,v){M.exports=m}),(function(M,v,n){"use strict";var e=n(0).layoutBase.LayoutConstants,t=n(0).layoutBase.FDLayoutConstants,r=n(0).CoSEConstants,a=n(0).CoSELayout,u=n(0).CoSENode,o=n(0).layoutBase.PointD,p=n(0).layoutBase.DimensionD,i={ready:A(function(){},"ready"),stop:A(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(T,c){var D={};for(var E in T)D[E]=T[E];for(var E in c)D[E]=c[E];return D}A(h,"extend");function l(T){this.options=h(i,T),d(this.options)}A(l,"_CoSELayout");var d=A(function(c){c.nodeRepulsion!=null&&(r.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=c.nodeRepulsion),c.idealEdgeLength!=null&&(r.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=c.idealEdgeLength),c.edgeElasticity!=null&&(r.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=c.edgeElasticity),c.nestingFactor!=null&&(r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.nestingFactor),c.gravity!=null&&(r.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=c.gravity),c.numIter!=null&&(r.MAX_ITERATIONS=t.MAX_ITERATIONS=c.numIter),c.gravityRange!=null&&(r.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=c.gravityRange),c.gravityCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.gravityCompound),c.gravityRangeCompound!=null&&(r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.gravityRangeCompound),c.initialEnergyOnIncremental!=null&&(r.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.initialEnergyOnIncremental),c.quality=="draft"?e.QUALITY=0:c.quality=="proof"?e.QUALITY=2:e.QUALITY=1,r.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=c.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!c.randomize,r.ANIMATE=t.ANIMATE=e.ANIMATE=c.animate,r.TILE=c.tile,r.TILING_PADDING_VERTICAL=typeof c.tilingPaddingVertical=="function"?c.tilingPaddingVertical.call():c.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof c.tilingPaddingHorizontal=="function"?c.tilingPaddingHorizontal.call():c.tilingPaddingHorizontal},"getUserOptions");l.prototype.run=function(){var T,c,D=this.options,E=this.idToLNode={},O=this.layout=new a,s=this;s.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var g=O.newGraphManager();this.gm=g;var f=this.options.eles.nodes(),L=this.options.eles.edges();this.root=g.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),O);for(var N=0;N0){var C;C=D.getGraphManager().add(D.newGraph(),f),this.processChildrenList(C,g,D)}}},l.prototype.stop=function(){return this.stopped=!0,this};var y=A(function(c){c("layout","cose-bilkent",l)},"register");typeof cytoscape<"u"&&y(cytoscape),M.exports=y})])})});var ot=ft(nt(),1);$.use(ot.default);function ct(m,M){m.forEach(v=>{let n={id:v.id,labelText:v.label,height:v.height,width:v.width,padding:v.padding??0};Object.keys(v).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(n[e]=v[e])}),M.add({group:"nodes",data:n,position:{x:v.x??0,y:v.y??0}})})}A(ct,"addNodes");function pt(m,M){m.forEach(v=>{let n={id:v.id,source:v.start,target:v.end};Object.keys(v).forEach(e=>{["id","start","end"].includes(e)||(n[e]=v[e])}),M.add({group:"edges",data:n})})}A(pt,"addEdges");function st(m){return new Promise(M=>{let v=it("body").append("div").attr("id","cy").attr("style","display:none"),n=$({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});v.remove(),ct(m.nodes,n),pt(m.edges,n),n.nodes().forEach(function(t){t.layoutDimensions=()=>{let r=t.data();return{w:r.width,h:r.height}}});let e={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(e).run(),n.ready(t=>{B.info("Cytoscape ready",t),M(n)})})}A(st,"createCytoscapeInstance");function at(m){return m.nodes().map(M=>{let v=M.data(),n=M.position(),e={id:v.id,x:n.x,y:n.y};return Object.keys(v).forEach(t=>{t!=="id"&&(e[t]=v[t])}),e})}A(at,"extractPositionedNodes");function ht(m){return m.edges().map(M=>{let v=M.data(),n=M._private.rscratch,e={id:v.id,source:v.source,target:v.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(v).forEach(t=>{["id","source","target"].includes(t)||(e[t]=v[t])}),e})}A(ht,"extractPositionedEdges");async function lt(m,M){B.debug("Starting cose-bilkent layout algorithm");try{dt(m);let v=await st(m),n=at(v),e=ht(v);return B.debug(`Layout completed: ${n.length} nodes, ${e.length} edges`),{nodes:n,edges:e}}catch(v){throw B.error("Error in cose-bilkent layout algorithm:",v),v}}A(lt,"executeCoseBilkentLayout");function dt(m){if(!m)throw new Error("Layout data is required");if(!m.config)throw new Error("Configuration is required in layout data");if(!m.rootNode)throw new Error("Root node is required");if(!m.nodes||!Array.isArray(m.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(m.edges))throw new Error("Edges array is required in layout data");return!0}A(dt,"validateLayoutData");var ut=A(async(m,M,{insertCluster:v,insertEdge:n,insertEdgeLabel:e,insertMarkers:t,insertNode:r,log:a,positionEdgeLabel:u},{algorithm:o})=>{let p={},i={},h=M.select("g");t(h,m.markers,m.type,m.diagramId);let l=h.insert("g").attr("class","subgraphs"),d=h.insert("g").attr("class","edgePaths"),y=h.insert("g").attr("class","edgeLabels"),T=h.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(m.nodes.map(async E=>{if(E.isGroup){let O={...E};i[E.id]=O,p[E.id]=O,await v(l,E)}else{let O={...E};p[E.id]=O;let s=await r(T,E,{config:m.config,dir:m.direction||"TB"}),g=s.node().getBBox();O.width=g.width,O.height=g.height,O.domId=s,a.debug(`Node ${E.id} dimensions: ${g.width}x${g.height}`)}})),a.debug("Running cose-bilkent layout algorithm");let c={...m,nodes:m.nodes.map(E=>{let O=p[E.id];return{...E,width:O.width,height:O.height}})},D=await lt(c,m.config);a.debug("Positioning nodes based on layout results"),D.nodes.forEach(E=>{let O=p[E.id];O?.domId&&(O.domId.attr("transform",`translate(${E.x}, ${E.y})`),O.x=E.x,O.y=E.y,a.debug(`Positioned node ${O.id} at center (${E.x}, ${E.y})`))}),D.edges.forEach(E=>{let O=m.edges.find(s=>s.id===E.id);O&&(O.points=[{x:E.startX,y:E.startY},{x:E.midX,y:E.midY},{x:E.endX,y:E.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(m.edges.map(async E=>{let O=await e(y,E),s=p[E.start??""],g=p[E.end??""];if(s&&g){let f=D.edges.find(L=>L.id===E.id);if(f){a.debug("APA01 positionedEdge",f);let L={...E},N=n(d,L,i,m.type,s,g,m.diagramId);u(L,N)}else{let L={...E,points:[{x:s.x||0,y:s.y||0},{x:g.x||0,y:g.y||0}]},N=n(d,L,i,m.type,s,g,m.diagramId);u(L,N)}}})),a.debug("Cose-bilkent rendering completed")},"render");var xt=ut;export{xt as render}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/dagre-ND4H6XIP.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/dagre-ND4H6XIP.mjs new file mode 100644 index 00000000000..33d457e5e94 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/dagre-ND4H6XIP.mjs @@ -0,0 +1,4 @@ +import{a as q}from"./chunk-KRXBNO2N.mjs";import{D as C,d as V,l as k,q as y}from"./chunk-W44A43WB.mjs";import{a as _,b as L,c as M,d as F,e as U}from"./chunk-7J6CGLKN.mjs";import{b as G,e as T,f as A,g as Y,h as H,i as j,j as O}from"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import{b as R}from"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{_ as B}from"./chunk-67TQ5CYL.mjs";import{b as i}from"./chunk-7W6UQGC5.mjs";import{a as g}from"./chunk-AQ6EADP3.mjs";function b(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:re(e),edges:se(e)};return y(e.graph())||(t.value=V(e.graph())),t}g(b,"write");function re(e){return k(e.nodes(),function(t){var n=e.node(t),a=e.parent(t),s={v:t};return y(n)||(s.value=n),y(a)||(s.parent=a),s})}g(re,"writeNodes");function se(e){return k(e.edges(),function(t){var n=e.edge(t),a={v:t.v,w:t.w};return y(t.name)||(a.name=t.name),y(n)||(a.value=n),a})}g(se,"writeEdges");var c=new Map,X=new Map,Q=new Map,W=g(()=>{X.clear(),Q.clear(),c.clear()},"clear"),J=g((e,t)=>{let n=X.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),ae=g((e,t)=>{let n=X.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||J(e.v,t)||J(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Z=g((e,t,n,a)=>{i.warn("Copying children of ",e,"root",a,"data",t.node(e),a);let s=t.children(e)||[];e!==a&&s.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)Z(o,t,n,a);else{let l=t.node(o);i.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(i.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",a,"data",t.node(e),a),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));let u=t.edges(o);i.debug("Copying Edges",u),u.forEach(d=>{i.info("Edge",d);let h=t.edge(d.v,d.w,d.name);i.info("Edge data",h,a);try{ae(d,a)?(i.info("Copying as ",d.v,d.w,h,d.name),n.setEdge(d.v,d.w,h,d.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",a," clusterId:",e)}catch(m){i.error(m)}})}i.debug("Removing node",o),t.removeNode(o)})},"copy"),$=g((e,t)=>{let n=t.children(e),a=[...n];for(let s of n)Q.set(s,e),a=[...a,...$(s,t)];return a},"extractDescendants");var ce=g((e,t,n)=>{let a=e.edges().filter(d=>d.v===t||d.w===t),s=e.edges().filter(d=>d.v===n||d.w===n),o=a.map(d=>({v:d.v===t?n:d.v,w:d.w===t?t:d.w})),l=s.map(d=>({v:d.v,w:d.w}));return o.filter(d=>l.some(h=>d.v===h.v&&d.w===h.w))},"findCommonEdges"),x=g((e,t,n)=>{let a=t.children(e);if(i.trace("Searching children of id ",e,a),a.length<1)return e;let s;for(let o of a){let l=x(o,t,n),u=ce(t,n,l);if(l)if(u.length>0)s=l;else return l}return s},"findNonClusterChild"),K=g(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),I=g((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",x(n,e,n)),X.set(n,$(n,e)),c.set(n,{id:x(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){let a=e.children(n),s=e.edges();a.length>0?(i.debug("Cluster identified",n,X),s.forEach(o=>{let l=J(o.v,n),u=J(o.w,n);l^u&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",X.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,X)});for(let n of c.keys()){let a=c.get(n).id,s=e.parent(a);s!==n&&c.has(s)&&!c.get(s).externalConnections&&(c.get(n).id=s)}e.edges().forEach(function(n){let a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let s=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),s=K(n.v),o=K(n.w),e.removeEdge(n.v,n.w,n.name),s!==n.v){let l=e.parent(s);c.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){let l=e.parent(o);c.get(l).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",s,o,n.name),e.setEdge(s,o,a,n.name)}}),i.warn("Adjusted Graph",b(e)),ee(e,0),i.trace(c)},"adjustClustersAndEdges"),ee=g((e,t)=>{if(i.warn("extractor - ",t,b(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),a=!1;for(let s of n){let o=e.children(s);a=a||o.length>0}if(!a){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(let s of n)if(i.debug("Extracting node",s,c,c.has(s)&&!c.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!c.has(s))i.debug("Not a cluster",s,t);else if(!c.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){i.warn("Cluster without external connections, without a parent and with children",s,t);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(s)?.clusterData?.dir&&(l=c.get(s).clusterData.dir,i.warn("Fixing dir",c.get(s).clusterData.dir,l));let u=new C({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",b(e)),Z(s,e,u,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:c.get(s).clusterData,label:c.get(s).label,graph:u}),i.warn("New graph after copy node: (",s,")",b(u)),i.debug("Old graph after copy",b(e))}else i.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!c.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(let s of n){let o=e.node(s);i.warn(" Now next level",s,o),o?.clusterNode&&ee(o.graph,t+1)}},"extractor"),ne=g((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{let s=e.children(a),o=ne(e,s);n=[...n,...o]}),n},"sorter"),te=g(e=>ne(e,e.children()),"sortNodesByHierarchy");var ie=g(async(e,t,n,a,s,o)=>{i.warn("Graph in recursive render:XAX",b(t),s);let l=t.graph().rankdir;i.trace("Dir in recursive render - dir:",l);let u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));let d=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),m=u.insert("g").attr("class","edgeLabels"),p=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){let r=t.node(f);if(s!==void 0){let w=JSON.parse(JSON.stringify(s.clusterData));i.trace(`Setting data for parent cluster XXX + Node.id = `,f,` + data=`,w.height,` +Parent cluster`,s.height),t.setNode(s.id,w),t.parent(f)||(i.trace("Setting parent",f,s.id),t.setParent(f,s.id,w))}if(i.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),r?.clusterNode){i.info("Cluster identified XBX",f,r.width,t.node(f));let{ranksep:w,nodesep:E}=t.graph();r.graph.setGraph({...r.graph.graph(),ranksep:w+25,nodesep:E});let N=await ie(p,r.graph,n,a,t.node(f),o),D=N.elem;G(r,D),r.diff=N.diff||0,i.info("New compound node after recursive render XAX",f,"width",r.width,"height",r.height),H(D,r)}else t.children(f).length>0?(i.trace("Cluster - the non recursive path XBX",f,r.id,r,r.width,"Graph:",t),i.trace(x(r.id,t)),c.set(r.id,{id:x(r.id,t),node:r})):(i.trace("Node - the non recursive path XAX",f,p,t.node(f),l),await Y(p,t.node(f),{config:o,dir:l}))})),await g(async()=>{let f=t.edges().map(async function(r){let w=t.edge(r.v,r.w,r.name);i.info("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),i.info("Edge "+r.v+" -> "+r.w+": ",r," ",JSON.stringify(t.edge(r))),i.info("Fix",c,"ids:",r.v,r.w,"Translating: ",c.get(r.v),c.get(r.w)),await L(m,w)});await Promise.all(f)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(b(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),q(t),i.info("Graph after layout:",JSON.stringify(b(t)));let P=0,{subGraphTitleTotalMargin:S}=R(o);return await Promise.all(te(t).map(async function(f){let r=t.node(f);if(i.info("Position XBX => "+f+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode)r.y+=S,i.info("A tainted cluster node XBX1",f,r.id,r.width,r.height,r.x,r.y,t.parent(f)),c.get(r.id).node=r,O(r);else if(t.children(f).length>0){i.info("A pure cluster node XBX1",f,r.id,r.x,r.y,r.width,r.height,t.parent(f)),r.height+=S,t.node(r.parentId);let w=r?.padding/2||0,E=r?.labelBBox?.height||0,N=E-w||0;i.debug("OffsetY",N,"labelHeight",E,"halfPadding",w),await T(d,r),c.get(r.id).node=r}else{let w=t.node(r.parentId);r.y+=S/2,i.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",w,w?.offsetY,r),O(r)}})),t.edges().forEach(function(f){let r=t.edge(f);i.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(r),r),r.points.forEach(D=>D.y+=S/2);let w=t.node(f.v);var E=t.node(f.w);let N=F(h,r,c,n,w,E,a);M(r,N)}),t.nodes().forEach(function(f){let r=t.node(f);i.info(f,r.type,r.diff),r.isGroup&&(P=r.diff)}),i.warn("Returning from recursive render XAX",u,P),{elem:u,diff:P}},"recursiveRender"),Se=g(async(e,t)=>{let n=new C({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{}}),a=t.select("g");U(a,e.markers,e.type,e.diagramId),j(),_(),A(),W(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){let l=o.start,u=l+"---"+l+"---1",d=l+"---"+l+"---2",h=n.node(l);n.setNode(u,{domId:u,id:u,parentId:h.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,h.parentId),n.setNode(d,{domId:d,id:d,parentId:h.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(d,h.parentId);let m=structuredClone(o),p=structuredClone(o),v=structuredClone(o);m.label="",m.arrowTypeEnd="none",m.endLabelLeft="",m.endLabelRight="",m.startLabelLeft="",m.id=l+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=l+"-cyclic-special-mid",v.label="",v.startLabelRight="",v.startLabelLeft="",v.arrowTypeStart="none",h.isGroup&&(m.fromCluster=l,v.toCluster=l),v.id=l+"-cyclic-special-2",v.arrowTypeStart="none",n.setEdge(l,u,m,l+"-cyclic-special-0"),n.setEdge(u,d,p,l+"-cyclic-special-1"),n.setEdge(d,l,v,l+"-cyc"u"&&(y.yylloc={});var be=y.yylloc;e.push(be);var et=y.options&&y.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(k){c.length=c.length-2*k,b.length=b.length-k,e.length=e.length-k}h(at,"popStack");function tt(){var k;return k=r.pop()||y.lex()||Ie,typeof k!="number"&&(k instanceof Array&&(r=k,k=r.pop()),k=a.symbols_[k]||k),k}h(tt,"lex");for(var g,fe,D,_,ot,ye,w={},te,E,ve,ie;;){if(D=c[c.length-1],this.defaultActions[D]?_=this.defaultActions[D]:((g===null||typeof g>"u")&&(g=tt()),_=Z[D]&&Z[D][g]),typeof _>"u"||!_.length||!_[0]){var ge="";ie=[];for(te in Z[D])this.terminals_[te]&&te>Je&&ie.push("'"+this.terminals_[te]+"'");y.showPosition?ge="Parse error on line "+(ee+1)+`: +`+y.showPosition()+` +Expecting `+ie.join(", ")+", got '"+(this.terminals_[g]||g)+"'":ge="Parse error on line "+(ee+1)+": Unexpected "+(g==Ie?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(ge,{text:y.match,token:this.terminals_[g]||g,line:y.yylineno,loc:be,expected:ie})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+g);switch(_[0]){case 1:c.push(g),b.push(y.yytext),e.push(y.yylloc),c.push(_[1]),g=null,fe?(g=fe,fe=null):(Re=y.yyleng,t=y.yytext,ee=y.yylineno,be=y.yylloc,xe>0&&xe--);break;case 2:if(E=this.productions_[_[1]][1],w.$=b[b.length-E],w._$={first_line:e[e.length-(E||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(E||1)].first_column,last_column:e[e.length-1].last_column},et&&(w._$.range=[e[e.length-(E||1)].range[0],e[e.length-1].range[1]]),ye=this.performAction.apply(w,[t,Re,ee,v.yy,_[1],b,e].concat($e)),typeof ye<"u")return ye;E&&(c=c.slice(0,-1*E*2),b=b.slice(0,-1*E),e=e.slice(0,-1*E)),c.push(this.productions_[_[1]][0]),b.push(w.$),e.push(w._$),ve=Z[c[c.length-2]][c[c.length-1]],c.push(ve);break;case 3:return!0}}return!0},"parse")},qe=(function(){var C={EOF:1,parseError:h(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:h(function(n,a){return this.yy=a||this.yy||{},this._input=n,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:h(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.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),n},"input"),unput:h(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.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:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(n){this.unput(this.match.slice(n))},"less"),pastInput:h(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:h(function(n,a){var c,r,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))),r=n[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var e in b)this[e]=b[e];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,c,r;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),e=0;ea[0].length)){if(a=c,r=e,this.options.backtrack_lexer){if(n=this.test_match(c,b[e]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,b[r]),n!==!1?n:!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:h(function(){var a=this.next();return a||this.lex()},"lex"),begin:h(function(a){this.conditionStack.push(a)},"begin"),popState:h(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:h(function(a){this.begin(a)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(a,c,r,b){var e=b;switch(r){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 72;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 61;case 25:return 58;case 26:return 58;case 27:return 62;case 28:break;case 29:return this.popState(),19;break;case 30:return c.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 65;case 42:return 67;case 43:return 67;case 44:return 67;case 45:return 65;case 46:return 65;case 47:return 66;case 48:return 66;case 49:return 66;case 50:return 66;case 51:return 66;case 52:return 67;case 53:return 66;case 54:return 67;case 55:return 68;case 56:return 68;case 57:return 51;case 58:return 68;case 59:return 68;case 60:return 68;case 61:return 52;case 62:return 48;case 63:return 68;case 64:return 65;case 65:return 66;case 66:return 67;case 67:return 69;case 68:return 70;case 69:return 71;case 70:return 71;case 71:return 70;case 72:return 70;case 73:return 70;case 74:return 41;case 75:return 47;case 76:return 40;case 77:return c.yytext[0];case 78: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,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],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,69,70,71,72,73,76,77,78],inclusive:!0}}};return C})();ue.lexer=qe;function de(){this.yy={}}return h(de,"Parser"),de.prototype=ue,ue.Parser=de,new de})();ke.parser=ke;var Qe=ke;var se=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=we;this.getAccTitle=Me;this.setAccDescription=Be;this.getAccDescription=Fe;this.setDiagramTitle=Ye;this.getDiagramTitle=Pe;this.getConfig=h(()=>M().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{h(this,"ErDB")}addEntity(s,o=""){return this.entities.has(s)?!this.entities.get(s)?.alias&&o&&(this.entities.get(s).alias=o,R.info(`Add alias '${o}' to entity '${s}'`)):(this.entities.set(s,{id:`entity-${s}-${this.entities.size}`,label:s,attributes:[],alias:o,shape:"erBox",look:M().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),R.info("Added new entity :",s)),this.entities.get(s)}getEntity(s){return this.entities.get(s)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(s,o){let u=this.addEntity(s),l;for(l=o.length-1;l>=0;l--)o[l].keys||(o[l].keys=[]),o[l].comment||(o[l].comment=""),u.attributes.push(o[l]),R.debug("Added attribute ",o[l].name)}addRelationship(s,o,u,l){let p=this.entities.get(s),f=this.entities.get(u);if(!p||!f)return;let d={entityA:p.id,roleA:o,entityB:f.id,relSpec:l};this.relationships.push(d),R.debug("Added new relationship :",d)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(s){this.direction=s}getCompiledStyles(s){let o=[];for(let u of s){let l=this.classes.get(u);l?.styles&&(o=[...o,...l.styles??[]].map(p=>p.trim())),l?.textStyles&&(o=[...o,...l.textStyles??[]].map(p=>p.trim()))}return o}addCssStyles(s,o){for(let u of s){let l=this.entities.get(u);if(!o||!l)return;for(let p of o)l.cssStyles.push(p)}}addClass(s,o){s.forEach(u=>{let l=this.classes.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.classes.set(u,l)),o&&o.forEach(function(p){if(/color/.exec(p)){let f=p.replace("fill","bgFill");l.textStyles.push(f)}l.styles.push(p)})})}setClass(s,o){for(let u of s){let l=this.entities.get(u);if(l)for(let p of o)l.cssClasses+=" "+p}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Ve()}getData(){let s=[],o=[],u=M(),l=0;for(let f of this.entities.keys()){let d=this.entities.get(f);d&&(d.cssCompiledStyles=this.getCompiledStyles(d.cssClasses.split(" ")),d.colorIndex=l++,s.push(d))}let p=0;for(let f of this.relationships){let d={id:Ke(f.entityA,f.entityB,{prefix:"id",counter:p++}),type:"normal",curve:"basis",start:f.entityA,end:f.entityB,label:f.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:f.relSpec.cardB.toLowerCase(),arrowTypeEnd:f.relSpec.cardA.toLowerCase(),pattern:f.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:u.look,labelType:"markdown"};o.push(d)}return{nodes:s,edges:o,other:{},config:u,direction:"TB"}}};var _e={};it(_e,{draw:()=>st});var st=h(async function(i,s,o,u){R.info("REF0:"),R.info("Drawing er diagram (unified)",s);let{securityLevel:l,er:p,layout:f}=M(),d=u.db.getData(),m=je(s,l);d.type=u.type,d.layoutAlgorithm=Ze(f),d.config.flowchart.nodeSpacing=p?.nodeSpacing||140,d.config.flowchart.rankSpacing=p?.rankSpacing||80,d.direction=u.db.getDirection();let{config:W}=d,{look:Q}=W;Q==="neo"?d.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:d.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],d.diagramId=s,await Ue(d,m),d.layoutAlgorithm==="elk"&&m.select(".edges").lower();let T=m.selectAll('[id*="-background"]');Array.from(T).length>0&&T.each(function(){let B=ze(this),x=B.attr("id").replace("-background",""),S=m.select(`#${CSS.escape(x)}`);if(!S.empty()){let I=S.attr("transform");B.attr("transform",I)}});let X=8;Ge.insertTitle(m,"erDiagramTitleText",p?.titleTopMargin??25,u.db.getDiagramTitle()),We(m,X,"erDiagram",p?.useMaxWidth??!0)},"draw");var Xe=h((i,s)=>{let o=Le,u=o(i,"r"),l=o(i,"g"),p=o(i,"b");return De(u,l,p,s)},"fade"),re=new Set(["redux-color","redux-dark-color"]),rt=h(i=>{let{theme:s,look:o,bkgColorArray:u,borderColorArray:l}=i;if(!re.has(s))return"";let p=u?.length>0,f="";for(let d=0;d{let{look:s,theme:o,erEdgeLabelBackground:u,strokeWidth:l}=i;return` + ${rt(i)} + .entityBox { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${i.tertiaryColor}; + opacity: 0.7; + background-color: ${i.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${re.has(o)&&u?u:Xe(i.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${re.has(o)&&u?u:i.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${re.has(o)&&u?u:i.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${i.textColor}; + } + + .edgeLabel .label { + fill: ${i.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${i.fontFamily}; + color: ${i.nodeTextColor||i.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${i.mainBkg}; + stroke: ${i.nodeBorder}; + stroke-width: ${s==="neo"?l:"1px"}; + } + + .relationshipLine { + stroke: ${i.lineColor}; + stroke-width: ${s==="neo"?l:"1px"}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${i.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${Xe(i.tertiaryColor,.5)}; + } +`},"getStyles"),He=nt;var It={parser:Qe,get db(){return new se},renderer:_e,styles:He};export{It as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs new file mode 100644 index 00000000000..bb0a799d5ae --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs @@ -0,0 +1,162 @@ +import{a as o1}from"./chunk-AZZRMDJM.mjs";import{a as s1,b as i1}from"./chunk-7FYTHRHK.mjs";import{h as t1}from"./chunk-LII3EMHJ.mjs";import{a as n1}from"./chunk-6764PJDD.mjs";import{a as l1}from"./chunk-ZXARS5L4.mjs";import{b as a1,c as u1}from"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import{d as r1}from"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import{p as Ge,s as Qe}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{$ as at,G as Yt,S as Ht,T as qt,U as Xt,V as Qt,W as Jt,X as Zt,Y as $t,_ as $,aa as e1,b as jt,c as zt,y as Kt}from"./chunk-67TQ5CYL.mjs";import{b as Q,h as Xe}from"./chunk-7W6UQGC5.mjs";import{a as g}from"./chunk-AQ6EADP3.mjs";var m1="flowchart-",Je=class{constructor(){this.vertexCounter=0;this.config=$();this.diagramId="";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=qt;this.setAccDescription=Qt;this.setDiagramTitle=Zt;this.getAccTitle=Xt;this.getAccDescription=Jt;this.getDiagramTitle=$t;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{g(this,"FlowDB")}sanitizeText(i){return Yt.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(let n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,r,a,c,p,o={},k){if(!i||i.trim().length===0)return;let u;if(k!==void 0){let E;k.includes(` +`)?E=k+` +`:E=`{ +`+k+` +}`,u=i1(E,{schema:s1})}let A=this.edges.find(E=>E.id===i);if(A){let E=u;E?.animate!==void 0&&(A.animate=E.animate),E?.animation!==void 0&&(A.animation=E.animation),E?.curve!==void 0&&(A.interpolate=E.curve);return}let F,b=this.vertices.get(i);if(b===void 0&&(n===void 0&&r===void 0&&a!==void 0&&a!==null&&Q.warn(`Style applied to unknown node "${i}". This may indicate a typo. The node will be created automatically.`),b={id:i,labelType:"text",domId:m1+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,b)),this.vertexCounter++,n!==void 0?(this.config=$(),F=this.sanitizeText(n.text.trim()),b.labelType=n.type,F.startsWith('"')&&F.endsWith('"')&&(F=F.substring(1,F.length-1)),b.text=F):b.text===void 0&&(b.text=i),r!==void 0&&(b.type=r),a?.forEach(E=>{b.styles.push(E)}),c?.forEach(E=>{b.classes.push(E)}),p!==void 0&&(b.dir=p),b.props===void 0?b.props=o:o!==void 0&&Object.assign(b.props,o),u!==void 0){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes("_"))throw new Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!r1(u.shape))throw new Error(`No such shape: ${u.shape}.`);b.type=u?.shape}u?.label&&(b.text=u?.label,b.labelType=this.sanitizeNodeLabelType(u?.labelType)),u?.icon&&(b.icon=u?.icon,!u.label?.trim()&&b.text===i&&(b.text="")),u?.form&&(b.form=u?.form),u?.pos&&(b.pos=u?.pos),u?.img&&(b.img=u?.img,!u.label?.trim()&&b.text===i&&(b.text="")),u?.constraint&&(b.constraint=u.constraint),u.w&&(b.assetWidth=Number(u.w)),u.h&&(b.assetHeight=Number(u.h))}}addSingleLink(i,n,r,a){let o={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};Q.info("abc78 Got edge...",o);let k=r.text;if(k!==void 0&&(o.text=this.sanitizeText(k.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"')&&(o.text=o.text.substring(1,o.text.length-1)),o.labelType=this.sanitizeNodeLabelType(k.type)),r!==void 0&&(o.type=r.type,o.stroke=r.stroke,o.length=r.length>10?10:r.length),a&&!this.edges.some(u=>u.id===a))o.id=a,o.isUserDefinedId=!0;else{let u=this.edges.filter(A=>A.start===o.start&&A.end===o.end);u.length===0?o.id=Qe(o.start,o.end,{counter:0,prefix:"L"}):o.id=Qe(o.start,o.end,{counter:u.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))Q.info("Pushing edge..."),this.edges.push(o);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(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,r){let a=this.isLinkData(r)?r.id.replace("@",""):void 0;Q.info("addLink",i,n,a);for(let c of i)for(let p of n){let o=c===i[i.length-1],k=p===n[0];o&&k?this.addSingleLink(c,p,r,a):this.addSingleLink(c,p,r,void 0)}}updateLinkInterpolate(i,n){i.forEach(r=>{r==="default"?this.edges.defaultInterpolate=n:this.edges[r].interpolate=n})}updateLink(i,n){i.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} 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.)`);r==="default"?this.edges.defaultStyle=n:(this.edges[r].style=n,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(a=>a?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(i,n){let r=n.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(a=>{let c=this.classes.get(a);c===void 0&&(c={id:a,styles:[],textStyles:[]},this.classes.set(a,c)),r?.forEach(p=>{if(/color/.exec(p)){let o=p.replace("fill","bgFill");c.textStyles.push(o)}c.styles.push(p)})})}setDirection(i){this.direction=i.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(let r of i.split(",")){let a=this.vertices.get(r);a&&a.classes.push(n);let c=this.edges.find(o=>o.id===r);c&&c.classes.push(n);let p=this.subGraphLookup.get(r);p&&p.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(let r of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,n)}}setClickFun(i,n,r){if($().securityLevel!=="loose"||n===void 0)return;let a=[];if(typeof r=="string"){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let p=0;p{let p=this.lookUpDomId(i),o=document.querySelector(`[id="${p}"]`);o!==null&&o.addEventListener("click",()=>{Ge.runFunc(n,...a)},!1)}))}setLink(i,n,r){i.split(",").forEach(a=>{let c=this.vertices.get(a);c!==void 0&&(c.link=Ge.formatUrl(n,this.config),c.linkTarget=r)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,r){i.split(",").forEach(a=>{this.setClickFun(a,n,r)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){let n=t1();Xe(i).select("svg").selectAll("g.node").on("mouseover",c=>{let p=Xe(c.currentTarget),o=p.attr("title");if(o===null)return;let k=c.currentTarget?.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(p.attr("title")).style("left",window.scrollX+k.left+(k.right-k.left)/2+"px").style("top",window.scrollY+k.bottom+"px"),n.html(Kt.sanitize(o)),p.classed("hover",!0)}).on("mouseout",c=>{n.transition().duration(500).style("opacity",0),Xe(c.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=$(),Ht()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,r){let a=i.text.trim(),c=r.text;i===r&&/\s/.exec(r.text)&&(a=void 0);let o=g(b=>{let E={boolean:{},number:{},string:{}},B=[],L;return{nodeList:b.filter(function(Y){let de=typeof Y;return Y.stmt&&Y.stmt==="dir"?(L=Y.value,!1):Y.trim()===""?!1:de in E?E[de].hasOwnProperty(Y)?!1:E[de][Y]=!0:B.includes(Y)?!1:B.push(Y)}),dir:L}},"uniq")(n.flat()),k=o.nodeList,u=o.dir,A=$().flowchart??{};if(u=u??(A.inheritDir?this.getDirection()??$().direction??void 0:void 0),this.version==="gen-1")for(let b=0;b2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let a=0,c=1;for(;a=0){let o=this.indexNodes2(i,p);if(o.result)return{result:!0,count:c+o.count};c=c+o.count}a=a+1}return{result:!1,count:c}}getDepthFirstPos(i){return this.posCrossRef[i]}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(i){let n=i.trim(),r="arrow_open";switch(n[0]){case"<":r="arrow_point",n=n.slice(1);break;case"x":r="arrow_cross",n=n.slice(1);break;case"o":r="arrow_circle",n=n.slice(1);break}let a="normal";return n.includes("=")&&(a="thick"),n.includes(".")&&(a="dotted"),{type:r,stroke:a}}countChar(i,n){let r=n.length,a=0;for(let c=0;c":a="arrow_point",n.startsWith("<")&&(a="double_"+a,r=r.slice(1));break;case"o":a="arrow_circle",n.startsWith("o")&&(a="double_"+a,r=r.slice(1));break}let c="normal",p=r.length-1;r.startsWith("=")&&(c="thick"),r.startsWith("~")&&(c="invisible");let o=this.countChar(".",r);return o&&(c="dotted",p=o),{type:a,stroke:c,length:p}}destructLink(i,n){let r=this.destructEndLink(i),a;if(n){if(a=this.destructStartLink(n),a.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=r.type;else{if(a.type!==r.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=r.length,a}return r}exists(i,n){for(let r of i)if(r.nodes.includes(n))return!0;return!1}makeUniq(i,n){let r=[];return i.nodes.forEach((a,c)=>{this.exists(n,a)||r.push(i.nodes[c])}),{nodes:r}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,n){return i.find(r=>r.id===n)}destructEdgeType(i){let n="none",r="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":r=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),r=n;break}return{arrowTypeStart:n,arrowTypeEnd:r}}addNodeFromVertex(i,n,r,a,c,p){let o=r.get(i.id),k=a.get(i.id)??!1,u=this.findNode(n,i.id);if(u)u.cssStyles=i.styles,u.cssCompiledStyles=this.getCompiledStyles(i.classes),u.cssClasses=i.classes.join(" ");else{let A={id:i.id,label:i.text,labelType:i.labelType,labelStyle:"",parentId:o,padding:c.flowchart?.padding||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:p,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint};k?n.push({...A,isGroup:!0,shape:"rect"}):n.push({...A,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let n=[];for(let r of i){let a=this.classes.get(r);a?.styles&&(n=[...n,...a.styles??[]].map(c=>c.trim())),a?.textStyles&&(n=[...n,...a.textStyles??[]].map(c=>c.trim()))}return n}getData(){let i=$(),n=[],r=[],a=this.getSubGraphs(),c=new Map,p=new Map;for(let u=a.length-1;u>=0;u--){let A=a[u];A.nodes.length>0&&p.set(A.id,!0);for(let F of A.nodes)c.set(F,A.id)}for(let u=a.length-1;u>=0;u--){let A=a[u];n.push({id:A.id,label:A.title,labelStyle:"",labelType:A.labelType,parentId:c.get(A.id),padding:8,cssCompiledStyles:this.getCompiledStyles(A.classes),cssClasses:A.classes.join(" "),shape:"rect",dir:A.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(u=>{this.addNodeFromVertex(u,n,c,p,i,i.look||"classic")});let k=this.getEdges();return k.forEach((u,A)=>{let{arrowTypeStart:F,arrowTypeEnd:b}=this.destructEdgeType(u.type),E=[...k.defaultStyle??[]];u.style&&E.push(...u.style);let B={id:Qe(u.start,u.end,{counter:A,prefix:"L"},u.id),isUserDefinedId:u.isUserDefinedId,start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelType:u.labelType,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":F,arrowTypeEnd:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":b,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(u.classes),labelStyle:E,style:E,pattern:u.stroke,look:i.look,animate:u.animate,animation:u.animation,curve:u.interpolate||this.edges.defaultInterpolate||i.flowchart?.curve};r.push(B)}),{nodes:n,edges:r,other:{},config:i}}defaultConfig(){return e1.flowchart}};var y1=g(function(s,i){return i.db.getClasses()},"getClasses"),D1=g(async function(s,i,n,r){Q.info("REF0:"),Q.info("Drawing state diagram (v2)",i);let{securityLevel:a,flowchart:c,layout:p}=$();r.db.setDiagramId(i),Q.debug("Before getData: ");let o=r.db.getData();Q.debug("Data: ",o);let k=n1(i,a),u=r.db.getDirection();o.type=r.type,o.layoutAlgorithm=u1(p),o.layoutAlgorithm==="dagre"&&p==="elk"&&Q.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."),o.direction=u,o.nodeSpacing=c?.nodeSpacing||50,o.rankSpacing=c?.rankSpacing||50,o.markers=["point","circle","cross"],o.diagramId=i,Q.debug("REF1:",o),await a1(o,k);let A=o.config.flowchart?.diagramPadding??8;Ge.insertTitle(k,"flowchartTitleText",c?.titleTopMargin||0,r.db.getDiagramTitle()),l1(k,A,"flowchart",c?.useMaxWidth||!1)},"draw"),c1={getClasses:y1,draw:D1};var ut=(function(){var s=g(function(be,h,d,f){for(d=d||{},f=be.length;f--;d[be[f]]=h);return d},"o"),i=[1,4],n=[1,3],r=[1,5],a=[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,125],c=[2,2],p=[1,13],o=[1,14],k=[1,15],u=[1,16],A=[1,23],F=[1,25],b=[1,26],E=[1,27],B=[1,50],L=[1,49],Re=[1,29],Y=[1,30],de=[1,31],Pe=[1,32],Me=[1,33],v=[1,45],w=[1,47],I=[1,43],N=[1,48],R=[1,44],G=[1,51],P=[1,46],M=[1,52],O=[1,53],Oe=[1,34],Ue=[1,35],We=[1,36],je=[1,37],ze=[1,38],pe=[1,58],T=[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,125],ee=[1,62],te=[1,61],se=[1,63],ye=[8,9,11,75,77,78],ot=[1,79],De=[1,92],Ce=[1,97],Ee=[1,96],Te=[1,93],Se=[1,89],xe=[1,95],Fe=[1,91],Be=[1,98],_e=[1,94],Le=[1,99],Ve=[1,90],ge=[8,9,10,11,40,75,77,78],W=[8,9,10,11,40,46,75,77,78],H=[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],ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ve=[44,60,89,102,105,106,109,111,114,115,116],ht=[1,122],dt=[1,123],Ke=[1,125],Ye=[1,124],pt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ft=[1,134],bt=[1,148],gt=[1,149],kt=[1,150],At=[1,151],mt=[1,136],yt=[1,138],Dt=[1,142],Ct=[1,143],Et=[1,144],Tt=[1,145],St=[1,146],xt=[1,147],Ft=[1,152],Bt=[1,153],_t=[1,132],Lt=[1,133],Vt=[1,140],vt=[1,135],wt=[1,139],It=[1,137],Ze=[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,125],Nt=[1,155],Rt=[1,157],_=[8,9,11],q=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],m=[1,177],j=[1,173],z=[1,174],y=[1,178],D=[1,175],C=[1,176],we=[77,116,119],S=[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],Gt=[10,106],fe=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],ie=[1,248],re=[1,246],ne=[1,250],ae=[1,244],ue=[1,245],le=[1,247],oe=[1,249],ce=[1,251],Ie=[1,269],Pt=[8,9,11,106],Z=[8,9,10,11,60,84,105,106,109,110,111,112],$e={trace:g(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,direction_td:125,$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",125:"direction_td"},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],[33,1]],performAction:g(function(h,d,f,l,x,e,ke){var t=e.length-1;switch(x){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 183:this.$=e[t];break;case 11:l.setDirection("TB"),this.$="TB";break;case 12:l.setDirection(e[t-1]),this.$=e[t-1];break;case 27:this.$=e[t-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=l.addSubGraph(e[t-6],e[t-1],e[t-4]);break;case 34:this.$=l.addSubGraph(e[t-3],e[t-1],e[t-3]);break;case 35:this.$=l.addSubGraph(void 0,e[t-1],void 0);break;case 37:this.$=e[t].trim(),l.setAccTitle(this.$);break;case 38:case 39:this.$=e[t].trim(),l.setAccDescription(this.$);break;case 43:this.$=e[t-1]+e[t];break;case 44:this.$=e[t];break;case 45:l.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),l.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 46:l.addLink(e[t-2].stmt,e[t],e[t-1]),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 47:l.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 48:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 49:l.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),this.$={stmt:e[t-1],nodes:e[t-1],shapeData:e[t]};break;case 50:this.$={stmt:e[t],nodes:e[t]};break;case 51:this.$=[e[t]];break;case 52:l.addVertex(e[t-5][e[t-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4]),this.$=e[t-5].concat(e[t]);break;case 53:this.$=e[t-4].concat(e[t]);break;case 54:this.$=e[t];break;case 55:this.$=e[t-2],l.setClass(e[t-2],e[t]);break;case 56:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"square");break;case 57:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"doublecircle");break;case 58:this.$=e[t-5],l.addVertex(e[t-5],e[t-2],"circle");break;case 59:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"ellipse");break;case 60:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"stadium");break;case 61:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"subroutine");break;case 62:this.$=e[t-7],l.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]]));break;case 63:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"cylinder");break;case 64:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"round");break;case 65:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"diamond");break;case 66:this.$=e[t-5],l.addVertex(e[t-5],e[t-2],"hexagon");break;case 67:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"odd");break;case 68:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"trapezoid");break;case 69:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"inv_trapezoid");break;case 70:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"lean_right");break;case 71:this.$=e[t-3],l.addVertex(e[t-3],e[t-1],"lean_left");break;case 72:this.$=e[t],l.addVertex(e[t]);break;case 73:e[t-1].text=e[t],this.$=e[t-1];break;case 74:case 75:e[t-2].text=e[t-1],this.$=e[t-2];break;case 76:this.$=e[t];break;case 77:var V=l.destructLink(e[t],e[t-2]);this.$={type:V.type,stroke:V.stroke,length:V.length,text:e[t-1]};break;case 78:var V=l.destructLink(e[t],e[t-2]);this.$={type:V.type,stroke:V.stroke,length:V.length,text:e[t-1],id:e[t-3]};break;case 79:this.$={text:e[t],type:"text"};break;case 80:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 81:this.$={text:e[t],type:"string"};break;case 82:this.$={text:e[t],type:"markdown"};break;case 83:var V=l.destructLink(e[t]);this.$={type:V.type,stroke:V.stroke,length:V.length};break;case 84:var V=l.destructLink(e[t]);this.$={type:V.type,stroke:V.stroke,length:V.length,id:e[t-1]};break;case 85:this.$=e[t-1];break;case 86:this.$={text:e[t],type:"text"};break;case 87:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 88:this.$={text:e[t],type:"string"};break;case 89:case 104:this.$={text:e[t],type:"markdown"};break;case 101:this.$={text:e[t],type:"text"};break;case 102:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 103:this.$={text:e[t],type:"text"};break;case 105:this.$=e[t-4],l.addClass(e[t-2],e[t]);break;case 106:this.$=e[t-4],l.setClass(e[t-2],e[t]);break;case 107:case 115:this.$=e[t-1],l.setClickEvent(e[t-1],e[t]);break;case 108:case 116:this.$=e[t-3],l.setClickEvent(e[t-3],e[t-2]),l.setTooltip(e[t-3],e[t]);break;case 109:this.$=e[t-2],l.setClickEvent(e[t-2],e[t-1],e[t]);break;case 110:this.$=e[t-4],l.setClickEvent(e[t-4],e[t-3],e[t-2]),l.setTooltip(e[t-4],e[t]);break;case 111:this.$=e[t-2],l.setLink(e[t-2],e[t]);break;case 112:this.$=e[t-4],l.setLink(e[t-4],e[t-2]),l.setTooltip(e[t-4],e[t]);break;case 113:this.$=e[t-4],l.setLink(e[t-4],e[t-2],e[t]);break;case 114:this.$=e[t-6],l.setLink(e[t-6],e[t-4],e[t]),l.setTooltip(e[t-6],e[t-2]);break;case 117:this.$=e[t-1],l.setLink(e[t-1],e[t]);break;case 118:this.$=e[t-3],l.setLink(e[t-3],e[t-2]),l.setTooltip(e[t-3],e[t]);break;case 119:this.$=e[t-3],l.setLink(e[t-3],e[t-2],e[t]);break;case 120:this.$=e[t-5],l.setLink(e[t-5],e[t-4],e[t]),l.setTooltip(e[t-5],e[t-2]);break;case 121:this.$=e[t-4],l.addVertex(e[t-2],void 0,void 0,e[t]);break;case 122:this.$=e[t-4],l.updateLink([e[t-2]],e[t]);break;case 123:this.$=e[t-4],l.updateLink(e[t-2],e[t]);break;case 124:this.$=e[t-8],l.updateLinkInterpolate([e[t-6]],e[t-2]),l.updateLink([e[t-6]],e[t]);break;case 125:this.$=e[t-8],l.updateLinkInterpolate(e[t-6],e[t-2]),l.updateLink(e[t-6],e[t]);break;case 126:this.$=e[t-6],l.updateLinkInterpolate([e[t-4]],e[t]);break;case 127:this.$=e[t-6],l.updateLinkInterpolate(e[t-4],e[t]);break;case 128:case 130:this.$=[e[t]];break;case 129:case 131:e[t-2].push(e[t]),this.$=e[t-2];break;case 133:this.$=e[t-1]+e[t];break;case 181:this.$=e[t];break;case 182:this.$=e[t-1]+""+e[t];break;case 184:this.$=e[t-1]+""+e[t];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;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:n,12:r},{1:[3]},s(a,c,{5:6}),{4:7,9:i,10:n,12:r},{4:8,9:i,10:n,12:r},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:p,9:o,10:k,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:A,33:24,34:F,36:b,38:E,42:28,43:39,44:B,45:40,47:41,60:L,84:Re,85:Y,86:de,87:Pe,88:Me,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O,121:Oe,122:Ue,123:We,124:je,125:ze},s(a,[2,9]),s(a,[2,10]),s(a,[2,11]),{8:[1,55],9:[1,56],10:pe,15:54,18:57},s(T,[2,3]),s(T,[2,4]),s(T,[2,5]),s(T,[2,6]),s(T,[2,7]),s(T,[2,8]),{8:ee,9:te,11:se,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:ee,9:te,11:se,21:68},{8:ee,9:te,11:se,21:69},{8:ee,9:te,11:se,21:70},{8:ee,9:te,11:se,21:71},{8:ee,9:te,11:se,21:72},{8:ee,9:te,10:[1,73],11:se,21:74},s(T,[2,36]),{35:[1,75]},{37:[1,76]},s(T,[2,39]),s(ye,[2,50],{18:77,39:78,10:pe,40:ot}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:De,44:Ce,60:Ee,80:[1,87],89:Te,95:[1,84],97:[1,85],101:86,105:Se,106:xe,109:Fe,111:Be,114:_e,115:Le,116:Ve,120:88},s(T,[2,185]),s(T,[2,186]),s(T,[2,187]),s(T,[2,188]),s(T,[2,189]),s(ge,[2,51]),s(ge,[2,54],{46:[1,100]}),s(W,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:L,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:v,102:w,105:I,106:N,109:R,111:G,114:P,115:M,116:O}),s(H,[2,181]),s(H,[2,142]),s(H,[2,143]),s(H,[2,144]),s(H,[2,145]),s(H,[2,146]),s(H,[2,147]),s(H,[2,148]),s(H,[2,149]),s(H,[2,150]),s(H,[2,151]),s(H,[2,152]),s(a,[2,12]),s(a,[2,18]),s(a,[2,19]),{9:[1,114]},s(ct,[2,26],{18:115,10:pe}),s(T,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},s(T,[2,40]),s(T,[2,41]),s(T,[2,42]),s(ve,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:ht,81:dt,116:Ke,119:Ye},{75:[1,126],77:[1,127]},s(pt,[2,83]),s(T,[2,28]),s(T,[2,29]),s(T,[2,30]),s(T,[2,31]),s(T,[2,32]),{10:ft,12:bt,14:gt,27:kt,28:128,32:At,44:mt,60:yt,75:Dt,80:[1,130],81:[1,131],83:141,84:Ct,85:Et,86:Tt,87:St,88:xt,89:Ft,90:Bt,91:129,105:_t,109:Lt,111:Vt,114:vt,115:wt,116:It},s(Ze,c,{5:154}),s(T,[2,37]),s(T,[2,38]),s(ye,[2,48],{44:Nt}),s(ye,[2,49],{18:156,10:pe,40:Rt}),s(ge,[2,44]),{44:B,47:158,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},{44:B,47:163,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},s(_,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},s(_,[2,115],{120:168,10:[1,167],14:De,44:Ce,60:Ee,89:Te,105:Se,106:xe,109:Fe,111:Be,114:_e,115:Le,116:Ve}),s(_,[2,117],{10:[1,169]}),s(q,[2,183]),s(q,[2,170]),s(q,[2,171]),s(q,[2,172]),s(q,[2,173]),s(q,[2,174]),s(q,[2,175]),s(q,[2,176]),s(q,[2,177]),s(q,[2,178]),s(q,[2,179]),s(q,[2,180]),{44:B,47:170,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},{30:171,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:179,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:181,50:[1,180],67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:182,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:183,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:184,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{109:[1,185]},{30:186,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:187,65:[1,188],67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:189,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:190,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{30:191,67:m,80:j,81:z,82:172,116:y,117:D,118:C},s(H,[2,182]),s(a,[2,20]),s(ct,[2,25]),s(ye,[2,46],{39:192,18:193,10:pe,40:ot}),s(ve,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{77:[1,197],79:198,116:Ke,119:Ye},s(we,[2,79]),s(we,[2,81]),s(we,[2,82]),s(we,[2,168]),s(we,[2,169]),{76:199,79:121,80:ht,81:dt,116:Ke,119:Ye},s(pt,[2,84]),{8:ee,9:te,10:ft,11:se,12:bt,14:gt,21:201,27:kt,29:[1,200],32:At,44:mt,60:yt,75:Dt,83:141,84:Ct,85:Et,86:Tt,87:St,88:xt,89:Ft,90:Bt,91:202,105:_t,109:Lt,111:Vt,114:vt,115:wt,116:It},s(S,[2,101]),s(S,[2,103]),s(S,[2,104]),s(S,[2,157]),s(S,[2,158]),s(S,[2,159]),s(S,[2,160]),s(S,[2,161]),s(S,[2,162]),s(S,[2,163]),s(S,[2,164]),s(S,[2,165]),s(S,[2,166]),s(S,[2,167]),s(S,[2,90]),s(S,[2,91]),s(S,[2,92]),s(S,[2,93]),s(S,[2,94]),s(S,[2,95]),s(S,[2,96]),s(S,[2,97]),s(S,[2,98]),s(S,[2,99]),s(S,[2,100]),{6:11,7:12,8:p,9:o,10:k,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:A,32:[1,203],33:24,34:F,36:b,38:E,42:28,43:39,44:B,45:40,47:41,60:L,84:Re,85:Y,86:de,87:Pe,88:Me,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O,121:Oe,122:Ue,123:We,124:je,125:ze},{10:pe,18:204},{44:[1,205]},s(ge,[2,43]),{10:[1,206],44:B,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:113,114:P,115:M,116:O},{10:[1,207]},{10:[1,208],106:[1,209]},s(Gt,[2,128]),{10:[1,210],44:B,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:113,114:P,115:M,116:O},{10:[1,211],44:B,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:113,114:P,115:M,116:O},{80:[1,212]},s(_,[2,109],{10:[1,213]}),s(_,[2,111],{10:[1,214]}),{80:[1,215]},s(q,[2,184]),{80:[1,216],98:[1,217]},s(ge,[2,55],{113:113,44:B,60:L,89:v,102:w,105:I,106:N,109:R,111:G,114:P,115:M,116:O}),{31:[1,218],67:m,82:219,116:y,117:D,118:C},s(fe,[2,86]),s(fe,[2,88]),s(fe,[2,89]),s(fe,[2,153]),s(fe,[2,154]),s(fe,[2,155]),s(fe,[2,156]),{49:[1,220],67:m,82:219,116:y,117:D,118:C},{30:221,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{51:[1,222],67:m,82:219,116:y,117:D,118:C},{53:[1,223],67:m,82:219,116:y,117:D,118:C},{55:[1,224],67:m,82:219,116:y,117:D,118:C},{57:[1,225],67:m,82:219,116:y,117:D,118:C},{60:[1,226]},{64:[1,227],67:m,82:219,116:y,117:D,118:C},{66:[1,228],67:m,82:219,116:y,117:D,118:C},{30:229,67:m,80:j,81:z,82:172,116:y,117:D,118:C},{31:[1,230],67:m,82:219,116:y,117:D,118:C},{67:m,69:[1,231],71:[1,232],82:219,116:y,117:D,118:C},{67:m,69:[1,234],71:[1,233],82:219,116:y,117:D,118:C},s(ye,[2,45],{18:156,10:pe,40:Rt}),s(ye,[2,47],{44:Nt}),s(ve,[2,75]),s(ve,[2,74]),{62:[1,235],67:m,82:219,116:y,117:D,118:C},s(ve,[2,77]),s(we,[2,80]),{77:[1,236],79:198,116:Ke,119:Ye},{30:237,67:m,80:j,81:z,82:172,116:y,117:D,118:C},s(Ze,c,{5:238}),s(S,[2,102]),s(T,[2,35]),{43:239,44:B,45:40,47:41,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},{10:pe,18:240},{10:ie,60:re,84:ne,92:241,105:ae,107:242,108:243,109:ue,110:le,111:oe,112:ce},{10:ie,60:re,84:ne,92:252,104:[1,253],105:ae,107:242,108:243,109:ue,110:le,111:oe,112:ce},{10:ie,60:re,84:ne,92:254,104:[1,255],105:ae,107:242,108:243,109:ue,110:le,111:oe,112:ce},{105:[1,256]},{10:ie,60:re,84:ne,92:257,105:ae,107:242,108:243,109:ue,110:le,111:oe,112:ce},{44:B,47:258,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},s(_,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},s(_,[2,116]),s(_,[2,118],{10:[1,262]}),s(_,[2,119]),s(W,[2,56]),s(fe,[2,87]),s(W,[2,57]),{51:[1,263],67:m,82:219,116:y,117:D,118:C},s(W,[2,64]),s(W,[2,59]),s(W,[2,60]),s(W,[2,61]),{109:[1,264]},s(W,[2,63]),s(W,[2,65]),{66:[1,265],67:m,82:219,116:y,117:D,118:C},s(W,[2,67]),s(W,[2,68]),s(W,[2,70]),s(W,[2,69]),s(W,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(ve,[2,78]),{31:[1,266],67:m,82:219,116:y,117:D,118:C},{6:11,7:12,8:p,9:o,10:k,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:A,32:[1,267],33:24,34:F,36:b,38:E,42:28,43:39,44:B,45:40,47:41,60:L,84:Re,85:Y,86:de,87:Pe,88:Me,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O,121:Oe,122:Ue,123:We,124:je,125:ze},s(ge,[2,53]),{43:268,44:B,45:40,47:41,60:L,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O},s(_,[2,121],{106:Ie}),s(Pt,[2,130],{108:270,10:ie,60:re,84:ne,105:ae,109:ue,110:le,111:oe,112:ce}),s(Z,[2,132]),s(Z,[2,134]),s(Z,[2,135]),s(Z,[2,136]),s(Z,[2,137]),s(Z,[2,138]),s(Z,[2,139]),s(Z,[2,140]),s(Z,[2,141]),s(_,[2,122],{106:Ie}),{10:[1,271]},s(_,[2,123],{106:Ie}),{10:[1,272]},s(Gt,[2,129]),s(_,[2,105],{106:Ie}),s(_,[2,106],{113:113,44:B,60:L,89:v,102:w,105:I,106:N,109:R,111:G,114:P,115:M,116:O}),s(_,[2,110]),s(_,[2,112],{10:[1,273]}),s(_,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:ee,9:te,11:se,21:278},s(T,[2,34]),s(ge,[2,52]),{10:ie,60:re,84:ne,105:ae,107:279,108:243,109:ue,110:le,111:oe,112:ce},s(Z,[2,133]),{14:De,44:Ce,60:Ee,89:Te,101:280,105:Se,106:xe,109:Fe,111:Be,114:_e,115:Le,116:Ve,120:88},{14:De,44:Ce,60:Ee,89:Te,101:281,105:Se,106:xe,109:Fe,111:Be,114:_e,115:Le,116:Ve,120:88},{98:[1,282]},s(_,[2,120]),s(W,[2,58]),{30:283,67:m,80:j,81:z,82:172,116:y,117:D,118:C},s(W,[2,66]),s(Ze,c,{5:284}),s(Pt,[2,131],{108:270,10:ie,60:re,84:ne,105:ae,109:ue,110:le,111:oe,112:ce}),s(_,[2,126],{120:168,10:[1,285],14:De,44:Ce,60:Ee,89:Te,105:Se,106:xe,109:Fe,111:Be,114:_e,115:Le,116:Ve}),s(_,[2,127],{120:168,10:[1,286],14:De,44:Ce,60:Ee,89:Te,105:Se,106:xe,109:Fe,111:Be,114:_e,115:Le,116:Ve}),s(_,[2,114]),{31:[1,287],67:m,82:219,116:y,117:D,118:C},{6:11,7:12,8:p,9:o,10:k,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:A,32:[1,288],33:24,34:F,36:b,38:E,42:28,43:39,44:B,45:40,47:41,60:L,84:Re,85:Y,86:de,87:Pe,88:Me,89:v,102:w,105:I,106:N,109:R,111:G,113:42,114:P,115:M,116:O,121:Oe,122:Ue,123:We,124:je,125:ze},{10:ie,60:re,84:ne,92:289,105:ae,107:242,108:243,109:ue,110:le,111:oe,112:ce},{10:ie,60:re,84:ne,92:290,105:ae,107:242,108:243,109:ue,110:le,111:oe,112:ce},s(W,[2,62]),s(T,[2,33]),s(_,[2,124],{106:Ie}),s(_,[2,125],{106:Ie})],defaultActions:{},parseError:g(function(h,d){if(d.recoverable)this.trace(h);else{var f=new Error(h);throw f.hash=d,f}},"parseError"),parse:g(function(h){var d=this,f=[0],l=[],x=[null],e=[],ke=this.table,t="",V=0,Mt=0,Ot=0,b1=2,Ut=1,g1=e.slice.call(arguments,1),U=Object.create(this.lexer),Ae={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(Ae.yy[tt]=this.yy[tt]);U.setInput(h,Ae.yy),Ae.yy.lexer=U,Ae.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var st=U.yylloc;e.push(st);var k1=U.options&&U.options.ranges;typeof Ae.yy.parseError=="function"?this.parseError=Ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function T1(X){f.length=f.length-2*X,x.length=x.length-X,e.length=e.length-X}g(T1,"popStack");function A1(){var X;return X=l.pop()||U.lex()||Ut,typeof X!="number"&&(X instanceof Array&&(l=X,X=l.pop()),X=d.symbols_[X]||X),X}g(A1,"lex");for(var K,it,me,J,S1,rt,Ne={},He,he,Wt,qe;;){if(me=f[f.length-1],this.defaultActions[me]?J=this.defaultActions[me]:((K===null||typeof K>"u")&&(K=A1()),J=ke[me]&&ke[me][K]),typeof J>"u"||!J.length||!J[0]){var nt="";qe=[];for(He in ke[me])this.terminals_[He]&&He>b1&&qe.push("'"+this.terminals_[He]+"'");U.showPosition?nt="Parse error on line "+(V+1)+`: +`+U.showPosition()+` +Expecting `+qe.join(", ")+", got '"+(this.terminals_[K]||K)+"'":nt="Parse error on line "+(V+1)+": Unexpected "+(K==Ut?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(nt,{text:U.match,token:this.terminals_[K]||K,line:U.yylineno,loc:st,expected:qe})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+me+", token: "+K);switch(J[0]){case 1:f.push(K),x.push(U.yytext),e.push(U.yylloc),f.push(J[1]),K=null,it?(K=it,it=null):(Mt=U.yyleng,t=U.yytext,V=U.yylineno,st=U.yylloc,Ot>0&&Ot--);break;case 2:if(he=this.productions_[J[1]][1],Ne.$=x[x.length-he],Ne._$={first_line:e[e.length-(he||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(he||1)].first_column,last_column:e[e.length-1].last_column},k1&&(Ne._$.range=[e[e.length-(he||1)].range[0],e[e.length-1].range[1]]),rt=this.performAction.apply(Ne,[t,Mt,V,Ae.yy,J[1],x,e].concat(g1)),typeof rt<"u")return rt;he&&(f=f.slice(0,-1*he*2),x=x.slice(0,-1*he),e=e.slice(0,-1*he)),f.push(this.productions_[J[1]][0]),x.push(Ne.$),e.push(Ne._$),Wt=ke[f[f.length-2]][f[f.length-1]],f.push(Wt);break;case 3:return!0}}return!0},"parse")},f1=(function(){var be={EOF:1,parseError:g(function(d,f){if(this.yy.parser)this.yy.parser.parseError(d,f);else throw new Error(d)},"parseError"),setInput:g(function(h,d){return this.yy=d||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:g(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var d=h.match(/(?:\r\n?|\n).*/g);return d?(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:g(function(h){var d=h.length,f=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=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 x=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===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(h){this.unput(this.match.slice(h))},"less"),pastInput:g(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:g(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:g(function(){var h=this.pastInput(),d=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:g(function(h,d){var f,l,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),l=h[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.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],f=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var e in x)this[e]=x[e];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,d,f,l;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),e=0;ed[0].length)){if(d=f,l=e,this.options.backtrack_lexer){if(h=this.test_match(f,x[e]),h!==!1)return h;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(h=this.test_match(d,x[l]),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:g(function(){var d=this.next();return d||this.lex()},"lex"),begin:g(function(d){this.conditionStack.push(d)},"begin"),popState:g(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:g(function(d){this.begin(d)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(d,f,l,x){var e=x;switch(l){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"),f.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let ke=/\n\s*/g;return f.yytext=f.yytext.replace(ke,"
    "),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 d.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return d.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return d.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 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;break;case 70:return this.pushState("edgeText"),75;break;case 71:return 119;case 72:return this.popState(),77;break;case 73:return this.pushState("thickEdgeText"),75;break;case 74:return 119;case 75:return this.popState(),77;break;case 76:return this.pushState("dottedEdgeText"),75;break;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;break;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;break;case 82:return this.popState(),55;break;case 83:return this.pushState("text"),54;break;case 84:return this.popState(),57;break;case 85:return this.pushState("text"),56;break;case 86:return 58;case 87:return this.pushState("text"),67;break;case 88:return this.popState(),64;break;case 89:return this.pushState("text"),63;break;case 90:return this.popState(),49;break;case 91:return this.pushState("text"),48;break;case 92:return this.popState(),69;break;case 93:return this.popState(),71;break;case 94:return 117;case 95:return this.pushState("trapText"),68;break;case 96:return this.pushState("trapText"),70;break;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;break;case 109:return this.pushState("text"),62;break;case 110:return this.popState(),51;break;case 111:return this.pushState("text"),50;break;case 112:return this.popState(),31;break;case 113:return this.pushState("text"),29;break;case 114:return this.popState(),66;break;case 115:return this.pushState("text"),65;break;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120: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]*)/,/^(?:.*direction\s+TD[^\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,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],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,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};return be})();$e.lexer=f1;function et(){this.yy={}}return g(et,"Parser"),et.prototype=$e,$e.Parser=et,new et})();ut.parser=ut;var lt=ut;var h1=Object.assign({},lt);h1.parse=s=>{let i=s.replace(/}\s*\n/g,`} +`);return lt.parse(i)};var d1=h1;var C1=g((s,i)=>{let n=zt,r=n(s,"r"),a=n(s,"g"),c=n(s,"b");return jt(r,a,c,i)},"fade"),E1=g(s=>`.label { + font-family: ${s.fontFamily}; + color: ${s.nodeTextColor||s.textColor}; + } + .cluster-label text { + fill: ${s.titleColor}; + } + .cluster-label span { + color: ${s.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${s.nodeTextColor||s.textColor}; + color: ${s.nodeTextColor||s.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${s.mainBkg}; + stroke: ${s.nodeBorder}; + stroke-width: ${s.strokeWidth??1}px; + } + .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: ${s.lineColor} !important; + stroke-width: 0; + stroke: ${s.lineColor}; + } + + .arrowheadPath { + fill: ${s.arrowheadColor}; + } + + .edgePath .path { + stroke: ${s.lineColor}; + stroke-width: ${s.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${s.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${C1(s.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${s.clusterBkg}; + stroke: ${s.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${s.titleColor}; + } + + .cluster span { + color: ${s.titleColor}; + } + /* .cluster div { + color: ${s.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${s.fontFamily}; + font-size: 12px; + background: ${s.tertiaryColor}; + border: 1px solid ${s.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${s.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${s.edgeLabelBackground}; + p { + background-color: ${s.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${s.edgeLabelBackground}; + fill: ${s.edgeLabelBackground}; + } + text-align: center; + } + ${o1()} +`,"getStyles"),p1=E1;var ns={parser:d1,get db(){return new Je},renderer:c1,styles:p1,init:g(s=>{s.flowchart||(s.flowchart={}),s.layout&&at({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,at({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{ns as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs new file mode 100644 index 00000000000..899e9217175 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs @@ -0,0 +1,292 @@ +import{p as $e}from"./chunk-QA3QBVWF.mjs";import{a as ii}from"./chunk-KNLZD3CH.mjs";import{G as oe,O as ce,S as le,T as ue,U as de,V as fe,W as he,X as me,Y as ke,_ as nt}from"./chunk-67TQ5CYL.mjs";import{A as Me,B as Ot,C as Ft,D as Ee,a as ae,b as et,d as ye,e as pe,f as ge,g as xe,h as pt,i as be,o as Te,p as $t,q as Yt,r as Lt,s as It,t as At,u as ve,v as we,w as _e,x as De,y as Se,z as Ce}from"./chunk-7W6UQGC5.mjs";import{a as o,b as wt,d as ot}from"./chunk-AQ6EADP3.mjs";var Le=wt((Pt,Vt)=>{"use strict";(function(t,i){typeof Pt=="object"&&typeof Vt<"u"?Vt.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=i()})(Pt,(function(){"use strict";var t="day";return function(i,a,r){var s=o(function(D){return D.add(4-D.isoWeekday(),t)},"a"),u=a.prototype;u.isoWeekYear=function(){return s(this).year()},u.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),t);var S,P,C,W,R=s(this),z=(S=this.isoWeekYear(),P=this.$u,C=(P?r.utc:r)().year(S).startOf("year"),W=4-C.isoWeekday(),C.isoWeekday()>4&&(W+=7),C.add(W,t));return R.diff(z,"week")+1},u.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var x=u.startOf;u.startOf=function(D,S){var P=this.$utils(),C=!!P.u(S)||S;return P.p(D)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):x.bind(this)(D,S)}}}))});var Ie=wt((Nt,zt)=>{"use strict";(function(t,i){typeof Nt=="object"&&typeof zt<"u"?zt.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=i()})(Nt,(function(){"use strict";var t={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"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,r=/\d\d/,s=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,x={},D=o(function(v){return(v=+v)+(v>68?1900:2e3)},"a"),S=o(function(v){return function(k){this[v]=+k}},"f"),P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(k){if(!k||k==="Z")return 0;var O=k.match(/([+-]|\d\d)/g),L=60*O[1]+(+O[2]||0);return L===0?0:O[0]==="+"?-L:L})(v)}],C=o(function(v){var k=x[v];return k&&(k.indexOf?k:k.s.concat(k.f))},"u"),W=o(function(v,k){var O,L=x.meridiem;if(L){for(var G=1;G<=24;G+=1)if(v.indexOf(L(G,0,k))>-1){O=G>12;break}}else O=v===(k?"pm":"PM");return O},"d"),R={A:[u,function(v){this.afternoon=W(v,!1)}],a:[u,function(v){this.afternoon=W(v,!0)}],Q:[a,function(v){this.month=3*(v-1)+1}],S:[a,function(v){this.milliseconds=100*+v}],SS:[r,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,S("seconds")],ss:[s,S("seconds")],m:[s,S("minutes")],mm:[s,S("minutes")],H:[s,S("hours")],h:[s,S("hours")],HH:[s,S("hours")],hh:[s,S("hours")],D:[s,S("day")],DD:[r,S("day")],Do:[u,function(v){var k=x.ordinal,O=v.match(/\d+/);if(this.day=O[0],k)for(var L=1;L<=31;L+=1)k(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[s,S("week")],ww:[r,S("week")],M:[s,S("month")],MM:[r,S("month")],MMM:[u,function(v){var k=C("months"),O=(C("monthsShort")||k.map((function(L){return L.slice(0,3)}))).indexOf(v)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[u,function(v){var k=C("months").indexOf(v)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,S("year")],YY:[r,function(v){this.year=D(v)}],YYYY:[/\d{4}/,S("year")],Z:P,ZZ:P};function z(v){var k,O;k=v,O=x&&x.formats;for(var L=(v=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(I,f,y){var p=y&&y.toUpperCase();return f||O[y]||t[y]||O[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(T,g,c){return g||c.slice(1)}))}))).match(i),G=L.length,X=0;X-1)return new Date((h==="X"?1e3:1)*l);var n=z(h)(l),F=n.year,e=n.month,_=n.day,A=n.hours,$=n.minutes,Y=n.seconds,H=n.milliseconds,V=n.zone,N=n.week,U=new Date,st=_||(F||e?1:U.getDate()),rt=F||U.getFullYear(),lt=0;F&&!e||(lt=e>0?e-1:U.getMonth());var kt,yt=A||0,j=$||0,at=Y||0,K=H||0;return V?new Date(Date.UTC(rt,lt,st,yt,j,at,K+60*V.offset*1e3)):m?new Date(Date.UTC(rt,lt,st,yt,j,at,K)):(kt=new Date(rt,lt,st,yt,j,at,K),N&&(kt=w(kt).week(N).toDate()),kt)}catch{return new Date("")}})(E,M,b,O),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),y&&E!=this.format(M)&&(this.$d=new Date("")),x={}}else if(M instanceof Array)for(var T=M.length,g=1;g<=T;g+=1){d[1]=M[g-1];var c=O.apply(this,d);if(c.isValid()){this.$d=c.$d,this.$L=c.$L,this.init();break}g===T&&(this.$d=new Date(""))}else G.call(this,X)}}}))});var Ae=wt((Rt,Ht)=>{"use strict";(function(t,i){typeof Rt=="object"&&typeof Ht<"u"?Ht.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=i()})(Rt,(function(){"use strict";return function(t,i){var a=i.prototype,r=a.format;a.format=function(s){var u=this,x=this.$locale();if(!this.isValid())return r.bind(this)(s);var D=this.$utils(),S=(s||"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(P){switch(P){case"Q":return Math.ceil((u.$M+1)/3);case"Do":return x.ordinal(u.$D);case"gggg":return u.weekYear();case"GGGG":return u.isoWeekYear();case"wo":return x.ordinal(u.week(),"W");case"w":case"ww":return D.s(u.week(),P==="w"?1:2,"0");case"W":case"WW":return D.s(u.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return D.s(String(u.$H===0?24:u.$H),P==="k"?1:2,"0");case"X":return Math.floor(u.$d.getTime()/1e3);case"x":return u.$d.getTime();case"z":return"["+u.offsetName()+"]";case"zzz":return"["+u.offsetName("long")+"]";default:return P}}));return r.bind(this)(S)}}}))});var Qe=wt((ie,ne)=>{"use strict";(function(t,i){typeof ie=="object"&&typeof ne<"u"?ne.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_duration=i()})(ie,(function(){"use strict";var t,i,a=1e3,r=6e4,s=36e5,u=864e5,x=/\[([^\]]+)]|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,D=31536e6,S=2628e6,P=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,C={years:D,months:S,days:u,hours:s,minutes:r,seconds:a,milliseconds:1,weeks:6048e5},W=o(function(E){return E instanceof G},"c"),R=o(function(E,b,d){return new G(E,d,b.$l)},"f"),z=o(function(E){return i.p(E)+"s"},"m"),v=o(function(E){return E<0},"l"),k=o(function(E){return v(E)?Math.ceil(E):Math.floor(E)},"$"),O=o(function(E){return Math.abs(E)},"y"),L=o(function(E,b){return E?v(E)?{negative:!0,format:""+O(E)+b}:{negative:!1,format:""+E+b}:{negative:!1,format:""}},"v"),G=(function(){function E(d,M,I){var f=this;if(this.$d={},this.$l=I,d===void 0&&(this.$ms=0,this.parseFromMilliseconds()),M)return R(d*C[z(M)],this);if(typeof d=="number")return this.$ms=d,this.parseFromMilliseconds(),this;if(typeof d=="object")return Object.keys(d).forEach((function(T){f.$d[z(T)]=d[T]})),this.calMilliseconds(),this;if(typeof d=="string"){var y=d.match(P);if(y){var p=y.slice(2).map((function(T){return T!=null?Number(T):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}o(E,"l");var b=E.prototype;return b.calMilliseconds=function(){var d=this;this.$ms=Object.keys(this.$d).reduce((function(M,I){return M+(d.$d[I]||0)*C[I]}),0)},b.parseFromMilliseconds=function(){var d=this.$ms;this.$d.years=k(d/D),d%=D,this.$d.months=k(d/S),d%=S,this.$d.days=k(d/u),d%=u,this.$d.hours=k(d/s),d%=s,this.$d.minutes=k(d/r),d%=r,this.$d.seconds=k(d/a),d%=a,this.$d.milliseconds=d},b.toISOString=function(){var d=L(this.$d.years,"Y"),M=L(this.$d.months,"M"),I=+this.$d.days||0;this.$d.weeks&&(I+=7*this.$d.weeks);var f=L(I,"D"),y=L(this.$d.hours,"H"),p=L(this.$d.minutes,"M"),T=this.$d.seconds||0;this.$d.milliseconds&&(T+=this.$d.milliseconds/1e3,T=Math.round(1e3*T)/1e3);var g=L(T,"S"),c=d.negative||M.negative||f.negative||y.negative||p.negative||g.negative,l=y.format||p.format||g.format?"T":"",h=(c?"-":"")+"P"+d.format+M.format+f.format+l+y.format+p.format+g.format;return h==="P"||h==="-P"?"P0D":h},b.toJSON=function(){return this.toISOString()},b.format=function(d){var M=d||"YYYY-MM-DDTHH:mm:ss",I={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return M.replace(x,(function(f,y){return y||String(I[f])}))},b.as=function(d){return this.$ms/C[z(d)]},b.get=function(d){var M=this.$ms,I=z(d);return I==="milliseconds"?M%=1e3:M=I==="weeks"?k(M/C[I]):this.$d[I],M||0},b.add=function(d,M,I){var f;return f=M?d*C[z(M)]:W(d)?d.$ms:R(d,this).$ms,R(this.$ms+f*(I?-1:1),this)},b.subtract=function(d,M){return this.add(d,M,!0)},b.locale=function(d){var M=this.clone();return M.$l=d,M},b.clone=function(){return R(this.$ms,this)},b.humanize=function(d){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!d)},b.valueOf=function(){return this.asMilliseconds()},b.milliseconds=function(){return this.get("milliseconds")},b.asMilliseconds=function(){return this.as("milliseconds")},b.seconds=function(){return this.get("seconds")},b.asSeconds=function(){return this.as("seconds")},b.minutes=function(){return this.get("minutes")},b.asMinutes=function(){return this.as("minutes")},b.hours=function(){return this.get("hours")},b.asHours=function(){return this.as("hours")},b.days=function(){return this.get("days")},b.asDays=function(){return this.as("days")},b.weeks=function(){return this.get("weeks")},b.asWeeks=function(){return this.as("weeks")},b.months=function(){return this.get("months")},b.asMonths=function(){return this.as("months")},b.years=function(){return this.get("years")},b.asYears=function(){return this.as("years")},E})(),X=o(function(E,b,d){return E.add(b.years()*d,"y").add(b.months()*d,"M").add(b.days()*d,"d").add(b.hours()*d,"h").add(b.minutes()*d,"m").add(b.seconds()*d,"s").add(b.milliseconds()*d,"ms")},"p");return function(E,b,d){t=d,i=d().$utils(),d.duration=function(f,y){var p=d.locale();return R(f,{$l:p},y)},d.isDuration=W;var M=b.prototype.add,I=b.prototype.subtract;b.prototype.add=function(f,y){return W(f)?X(this,f,1):M.bind(this)(f,y)},b.prototype.subtract=function(f,y){return W(f)?X(this,f,-1):I.bind(this)(f,y)}}}))});var Wt=(function(){var t=o(function(g,c,l,h){for(l=l||{},h=g.length;h--;l[g[h]]=c);return l},"o"),i=[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],a=[1,26],r=[1,27],s=[1,28],u=[1,29],x=[1,30],D=[1,31],S=[1,32],P=[1,33],C=[1,34],W=[1,9],R=[1,10],z=[1,11],v=[1,12],k=[1,13],O=[1,14],L=[1,15],G=[1,16],X=[1,19],E=[1,20],b=[1,21],d=[1,22],M=[1,23],I=[1,25],f=[1,35],y={trace:o(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:o(function(c,l,h,m,w,n,F){var e=n.length-1;switch(w){case 1:return n[e-1];case 2:this.$=[];break;case 3:n[e-1].push(n[e]),this.$=n[e-1];break;case 4:case 5:this.$=n[e];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(n[e].substr(11)),this.$=n[e].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=n[e].substr(18);break;case 19:m.TopAxis(),this.$=n[e].substr(8);break;case 20:m.setAxisFormat(n[e].substr(11)),this.$=n[e].substr(11);break;case 21:m.setTickInterval(n[e].substr(13)),this.$=n[e].substr(13);break;case 22:m.setExcludes(n[e].substr(9)),this.$=n[e].substr(9);break;case 23:m.setIncludes(n[e].substr(9)),this.$=n[e].substr(9);break;case 24:m.setTodayMarker(n[e].substr(12)),this.$=n[e].substr(12);break;case 27:m.setDiagramTitle(n[e].substr(6)),this.$=n[e].substr(6);break;case 28:this.$=n[e].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=n[e].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(n[e].substr(8)),this.$=n[e].substr(8);break;case 33:m.addTask(n[e-1],n[e]),this.$="task";break;case 34:this.$=n[e-1],m.setClickEvent(n[e-1],n[e],null);break;case 35:this.$=n[e-2],m.setClickEvent(n[e-2],n[e-1],n[e]);break;case 36:this.$=n[e-2],m.setClickEvent(n[e-2],n[e-1],null),m.setLink(n[e-2],n[e]);break;case 37:this.$=n[e-3],m.setClickEvent(n[e-3],n[e-2],n[e-1]),m.setLink(n[e-3],n[e]);break;case 38:this.$=n[e-2],m.setClickEvent(n[e-2],n[e],null),m.setLink(n[e-2],n[e-1]);break;case 39:this.$=n[e-3],m.setClickEvent(n[e-3],n[e-1],n[e]),m.setLink(n[e-3],n[e-2]);break;case 40:this.$=n[e-1],m.setLink(n[e-1],n[e]);break;case 41:case 47:this.$=n[e-1]+" "+n[e];break;case 42:case 43:case 45:this.$=n[e-2]+" "+n[e-1]+" "+n[e];break;case 44:case 46:this.$=n[e-3]+" "+n[e-2]+" "+n[e-1]+" "+n[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:a,13:r,14:s,15:u,16:x,17:D,18:S,19:18,20:P,21:C,22:W,23:R,24:z,25:v,26:k,27:O,28:L,29:G,30:X,31:E,33:b,35:d,36:M,37:24,38:I,40:f},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:a,13:r,14:s,15:u,16:x,17:D,18:S,19:18,20:P,21:C,22:W,23:R,24:z,25:v,26:k,27:O,28:L,29:G,30:X,31:E,33:b,35:d,36:M,37:24,38:I,40:f},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:o(function(c,l){if(l.recoverable)this.trace(c);else{var h=new Error(c);throw h.hash=l,h}},"parseError"),parse:o(function(c){var l=this,h=[0],m=[],w=[null],n=[],F=this.table,e="",_=0,A=0,$=0,Y=2,H=1,V=n.slice.call(arguments,1),N=Object.create(this.lexer),U={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(U.yy[st]=this.yy[st]);N.setInput(c,U.yy),U.yy.lexer=N,U.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var rt=N.yylloc;n.push(rt);var lt=N.options&&N.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function kt(q){h.length=h.length-2*q,w.length=w.length-q,n.length=n.length-q}o(kt,"popStack");function yt(){var q;return q=m.pop()||N.lex()||H,typeof q!="number"&&(q instanceof Array&&(m=q,q=m.pop()),q=l.symbols_[q]||q),q}o(yt,"lex");for(var j,at,K,Z,Hi,Mt,ut={},Tt,tt,re,vt;;){if(K=h[h.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((j===null||typeof j>"u")&&(j=yt()),Z=F[K]&&F[K][j]),typeof Z>"u"||!Z.length||!Z[0]){var Et="";vt=[];for(Tt in F[K])this.terminals_[Tt]&&Tt>Y&&vt.push("'"+this.terminals_[Tt]+"'");N.showPosition?Et="Parse error on line "+(_+1)+`: +`+N.showPosition()+` +Expecting `+vt.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Et="Parse error on line "+(_+1)+": Unexpected "+(j==H?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(Et,{text:N.match,token:this.terminals_[j]||j,line:N.yylineno,loc:rt,expected:vt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+j);switch(Z[0]){case 1:h.push(j),w.push(N.yytext),n.push(N.yylloc),h.push(Z[1]),j=null,at?(j=at,at=null):(A=N.yyleng,e=N.yytext,_=N.yylineno,rt=N.yylloc,$>0&&$--);break;case 2:if(tt=this.productions_[Z[1]][1],ut.$=w[w.length-tt],ut._$={first_line:n[n.length-(tt||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(tt||1)].first_column,last_column:n[n.length-1].last_column},lt&&(ut._$.range=[n[n.length-(tt||1)].range[0],n[n.length-1].range[1]]),Mt=this.performAction.apply(ut,[e,A,_,U.yy,Z[1],w,n].concat(V)),typeof Mt<"u")return Mt;tt&&(h=h.slice(0,-1*tt*2),w=w.slice(0,-1*tt),n=n.slice(0,-1*tt)),h.push(this.productions_[Z[1]][0]),w.push(ut.$),n.push(ut._$),re=F[h[h.length-2]][h[h.length-1]],h.push(re);break;case 3:return!0}}return!0},"parse")},p=(function(){var g={EOF:1,parseError:o(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:o(function(c,l){return this.yy=l||this.yy||{},this._input=c,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:o(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var l=c.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:o(function(c){var l=c.length,h=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var m=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),h.length-1&&(this.yylineno-=h.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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(c){this.unput(this.match.slice(c))},"less"),pastInput:o(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var c=this.pastInput(),l=new Array(c.length+1).join("-");return c+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:o(function(c,l){var h,m,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))),m=c[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],h=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var n in w)this[n]=w[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,l,h,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),n=0;nl[0].length)){if(l=h,m=n,this.options.backtrack_lexer){if(c=this.test_match(h,w[n]),c!==!1)return c;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(c=this.test_match(l,w[m]),c!==!1?c:!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:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,h,m,w){var n=w;switch(m){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 g})();y.lexer=p;function T(){this.yy={}}return o(T,"Parser"),T.prototype=y,y.Parser=T,new T})();Wt.parser=Wt;var Ye=Wt;var We=ot(ii(),1),Q=ot(ae(),1),Pe=ot(Le(),1),Ve=ot(Ie(),1),Ne=ot(Ae(),1);Q.default.extend(Pe.default);Q.default.extend(Ve.default);Q.default.extend(Ne.default);var Oe={friday:5,saturday:6},J="",Xt="",Ut,Zt="",gt=[],xt=[],qt=new Map,Qt=[],St=[],ht="",Kt="",ze=["active","done","crit","milestone","vert"],Jt=[],dt="",bt=!1,te=!1,ee="sunday",Ct="saturday",jt=0,ni=o(function(){Qt=[],St=[],ht="",Jt=[],_t=0,Gt=void 0,Dt=void 0,B=[],J="",Xt="",Kt="",Ut=void 0,Zt="",gt=[],xt=[],bt=!1,te=!1,jt=0,qt=new Map,dt="",le(),ee="sunday",Ct="saturday"},"clear"),si=o(function(t){dt=t},"setDiagramId"),ri=o(function(t){Xt=t},"setAxisFormat"),ai=o(function(){return Xt},"getAxisFormat"),oi=o(function(t){Ut=t},"setTickInterval"),ci=o(function(){return Ut},"getTickInterval"),li=o(function(t){Zt=t},"setTodayMarker"),ui=o(function(){return Zt},"getTodayMarker"),di=o(function(t){J=t},"setDateFormat"),fi=o(function(){bt=!0},"enableInclusiveEndDates"),hi=o(function(){return bt},"endDatesAreInclusive"),mi=o(function(){te=!0},"enableTopAxis"),ki=o(function(){return te},"topAxisEnabled"),yi=o(function(t){Kt=t},"setDisplayMode"),pi=o(function(){return Kt},"getDisplayMode"),gi=o(function(){return J},"getDateFormat"),xi=o(function(t){gt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),bi=o(function(){return gt},"getIncludes"),Ti=o(function(t){xt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),vi=o(function(){return xt},"getExcludes"),wi=o(function(){return qt},"getLinks"),_i=o(function(t){ht=t,Qt.push(t)},"addSection"),Di=o(function(){return Qt},"getSections"),Si=o(function(){let t=Fe(),i=10,a=0;for(;!t&&aD))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[i,x]},"fixTaskDates"),Bt=o(function(t,i,a){if(a=a.trim(),o(D=>{let S=D.trim();return S==="x"||S==="X"},"isTimestampFormat")(i)&&/^\d+$/.test(a))return new Date(Number(a));let u=/^after\s+(?[\d\w- ]+)/.exec(a);if(u!==null){let D=null;for(let P of u.groups.ids.split(" ")){let C=ct(P);C!==void 0&&(!D||C.endTime>D.endTime)&&(D=C)}if(D)return D.endTime;let S=new Date;return S.setHours(0,0,0,0),S}let x=(0,Q.default)(a,i.trim(),!0);if(x.isValid())return x.toDate();{et.debug("Invalid date:"+a),et.debug("With date format:"+i.trim());let D=new Date(a);if(D===void 0||isNaN(D.getTime())||D.getFullYear()<-1e4||D.getFullYear()>1e4)throw new Error("Invalid date:"+a);return D}},"getStartDate"),je=o(function(t){let i=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return i!==null?[Number.parseFloat(i[1]),i[2]]:[NaN,"ms"]},"parseDuration"),Be=o(function(t,i,a,r=!1){a=a.trim();let u=/^until\s+(?[\d\w- ]+)/.exec(a);if(u!==null){let C=null;for(let R of u.groups.ids.split(" ")){let z=ct(R);z!==void 0&&(!C||z.startTime{window.open(a,"_self")}),qt.set(r,a))}),Xe(t,"clickable")},"setLink"),Xe=o(function(t,i){t.split(",").forEach(function(a){let r=ct(a);r!==void 0&&r.classes.push(i)})},"setClass"),Fi=o(function(t,i,a){if(nt().securityLevel!=="loose"||i===void 0)return;let r=[];if(typeof a=="string"){r=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u{$e.runFunc(i,...r)})},"setClickFun"),Ue=o(function(t,i){Jt.push(function(){let a=dt?`${dt}-${t}`:t,r=document.querySelector(`[id="${a}"]`);r!==null&&r.addEventListener("click",function(){i()})},function(){let a=dt?`${dt}-${t}`:t,r=document.querySelector(`[id="${a}-text"]`);r!==null&&r.addEventListener("click",function(){i()})})},"pushFun"),Wi=o(function(t,i,a){t.split(",").forEach(function(r){Fi(r,i,a)}),Xe(t,"clickable")},"setClickEvent"),Pi=o(function(t){Jt.forEach(function(i){i(t)})},"bindFunctions"),Ze={getConfig:o(()=>nt().gantt,"getConfig"),clear:ni,setDateFormat:di,getDateFormat:gi,enableInclusiveEndDates:fi,endDatesAreInclusive:hi,enableTopAxis:mi,topAxisEnabled:ki,setAxisFormat:ri,getAxisFormat:ai,setTickInterval:oi,getTickInterval:ci,setTodayMarker:li,getTodayMarker:ui,setAccTitle:ue,getAccTitle:de,setDiagramTitle:me,getDiagramTitle:ke,setDiagramId:si,setDisplayMode:yi,getDisplayMode:pi,setAccDescription:fe,getAccDescription:he,addSection:_i,getSections:Di,getTasks:Si,addTask:Ii,findTaskById:ct,addTaskOrg:Ai,setIncludes:xi,getIncludes:bi,setExcludes:Ti,getExcludes:vi,setClickEvent:Wi,setLink:Oi,getLinks:wi,bindFunctions:Pi,parseDuration:je,isInvalidDate:Re,setWeekday:Ci,getWeekday:Mi,setWeekend:Ei};function qe(t,i,a){let r=!0;for(;r;)r=!1,a.forEach(function(s){let u="^\\s*"+s+"\\s*$",x=new RegExp(u);t[0].match(x)&&(i[s]=!0,t.shift(1),r=!0)})}o(qe,"getTaskTags");var mt=ot(ae(),1),Je=ot(Qe(),1);mt.default.extend(Je.default);var Vi=o(function(){et.debug("Something is calling, setConf, remove the call")},"setConf"),Ke={monday:we,tuesday:_e,wednesday:De,thursday:Se,friday:Ce,saturday:Me,sunday:ve},Ni=o((t,i)=>{let a=[...t].map(()=>-1/0),r=[...t].sort((u,x)=>u.startTime-x.startTime||u.order-x.order),s=0;for(let u of r)for(let x=0;x=a[x]){a[x]=u.endTime,u.order=x+i,x>s&&(s=x);break}return s},"getMaxIntersections"),it,se=1e4,zi=o(function(t,i,a,r){let s=nt().gantt;r.db.setDiagramId(i);let u=nt().securityLevel,x;u==="sandbox"&&(x=pt("#i"+i));let D=u==="sandbox"?pt(x.nodes()[0].contentDocument.body):pt("body"),S=u==="sandbox"?x.nodes()[0].contentDocument:document,P=S.getElementById(i);it=P.parentElement.offsetWidth,it===void 0&&(it=1200),s.useWidth!==void 0&&(it=s.useWidth);let C=r.db.getTasks(),W=[];for(let f of C)W.push(f.type);W=I(W);let R={},z=2*s.topPadding;if(r.db.getDisplayMode()==="compact"||s.displayMode==="compact"){let f={};for(let p of C)f[p.section]===void 0?f[p.section]=[p]:f[p.section].push(p);let y=0;for(let p of Object.keys(f)){let T=Ni(f[p],y)+1;y+=T,z+=T*(s.barHeight+s.barGap),R[p]=T}}else{z+=C.length*(s.barHeight+s.barGap);for(let f of W)R[f]=C.filter(y=>y.type===f).length}P.setAttribute("viewBox","0 0 "+it+" "+z);let v=D.select(`[id="${i}"]`),k=Ee().domain([pe(C,function(f){return f.startTime}),ye(C,function(f){return f.endTime})]).rangeRound([0,it-s.leftPadding-s.rightPadding]);function O(f,y){let p=f.startTime,T=y.startTime,g=0;return p>T?g=1:pe.vert===_.vert?0:e.vert?1:-1);let m=[...new Set(f.map(e=>e.order))].map(e=>f.find(_=>_.order===e));v.append("g").selectAll("rect").data(m).enter().append("rect").attr("x",0).attr("y",function(e,_){return _=e.order,_*y+p-2}).attr("width",function(){return l-s.rightPadding/2}).attr("height",y).attr("class",function(e){for(let[_,A]of W.entries())if(e.type===A)return"section section"+_%s.numberSectionStyles;return"section section0"}).enter();let w=v.append("g").selectAll("rect").data(f).enter(),n=r.db.getLinks();if(w.append("rect").attr("id",function(e){return i+"-"+e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?k(e.startTime)+T+.5*(k(e.endTime)-k(e.startTime))-.5*g:k(e.startTime)+T}).attr("y",function(e,_){return _=e.order,e.vert?s.gridLineStartPadding:_*y+p}).attr("width",function(e){return e.milestone?g:e.vert?.08*g:k(e.renderEndTime||e.endTime)-k(e.startTime)}).attr("height",function(e){return e.vert?C.length*(s.barHeight+s.barGap)+s.barHeight*2:g}).attr("transform-origin",function(e,_){return _=e.order,(k(e.startTime)+T+.5*(k(e.endTime)-k(e.startTime))).toString()+"px "+(_*y+p+.5*g).toString()+"px"}).attr("class",function(e){let _="task",A="";e.classes.length>0&&(A=e.classes.join(" "));let $=0;for(let[H,V]of W.entries())e.type===V&&($=H%s.numberSectionStyles);let Y="";return e.active?e.crit?Y+=" activeCrit":Y=" active":e.done?e.crit?Y=" doneCrit":Y=" done":e.crit&&(Y+=" crit"),Y.length===0&&(Y=" task"),e.milestone&&(Y=" milestone "+Y),e.vert&&(Y=" vert "+Y),Y+=$,Y+=" "+A,_+Y}),w.append("text").attr("id",function(e){return i+"-"+e.id+"-text"}).text(function(e){return e.task}).attr("font-size",s.fontSize).attr("x",function(e){let _=k(e.startTime),A=k(e.renderEndTime||e.endTime);if(e.milestone&&(_+=.5*(k(e.endTime)-k(e.startTime))-.5*g,A=_+g),e.vert)return k(e.startTime)+T;let $=this.getBBox().width;return $>A-_?A+$+1.5*s.leftPadding>l?_+T-5:A+T+5:(A-_)/2+_+T}).attr("y",function(e,_){return e.vert?s.gridLineStartPadding+C.length*(s.barHeight+s.barGap)+60:(_=e.order,_*y+s.barHeight/2+(s.fontSize/2-2)+p)}).attr("text-height",g).attr("class",function(e){let _=k(e.startTime),A=k(e.endTime);e.milestone&&(A=_+g);let $=this.getBBox().width,Y="";e.classes.length>0&&(Y=e.classes.join(" "));let H=0;for(let[N,U]of W.entries())e.type===U&&(H=N%s.numberSectionStyles);let V="";return e.active&&(e.crit?V="activeCritText"+H:V="activeText"+H),e.done?e.crit?V=V+" doneCritText"+H:V=V+" doneText"+H:e.crit&&(V=V+" critText"+H),e.milestone&&(V+=" milestoneText"),e.vert&&(V+=" vertText"),$>A-_?A+$+1.5*s.leftPadding>l?Y+" taskTextOutsideLeft taskTextOutside"+H+" "+V:Y+" taskTextOutsideRight taskTextOutside"+H+" "+V+" width-"+$:Y+" taskText taskText"+H+" "+V+" width-"+$}),nt().securityLevel==="sandbox"){let e;e=pt("#i"+i);let _=e.nodes()[0].contentDocument;w.filter(function(A){return n.has(A.id)}).each(function(A){var $=_.querySelector("#"+CSS.escape(i+"-"+A.id)),Y=_.querySelector("#"+CSS.escape(i+"-"+A.id+"-text"));let H=$.parentNode;var V=_.createElement("a");V.setAttribute("xlink:href",n.get(A.id)),V.setAttribute("target","_top"),H.appendChild(V),V.appendChild($),V.appendChild(Y)})}}o(G,"drawRects");function X(f,y,p,T,g,c,l,h){if(l.length===0&&h.length===0)return;let m,w;for(let{startTime:$,endTime:Y}of c)(m===void 0||$w)&&(w=Y);if(!m||!w)return;if((0,mt.default)(w).diff((0,mt.default)(m),"year")>5){et.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=r.db.getDateFormat(),F=[],e=null,_=(0,mt.default)(m);for(;_.valueOf()<=w;)r.db.isInvalidDate(_,n,l,h)?e?e.end=_:e={start:_,end:_}:e&&(F.push(e),e=null),_=_.add(1,"d");v.append("g").selectAll("rect").data(F).enter().append("rect").attr("id",$=>i+"-exclude-"+$.start.format("YYYY-MM-DD")).attr("x",$=>k($.start.startOf("day"))+p).attr("y",s.gridLineStartPadding).attr("width",$=>k($.end.endOf("day"))-k($.start.startOf("day"))).attr("height",g-y-s.gridLineStartPadding).attr("transform-origin",function($,Y){return(k($.start)+p+.5*(k($.end)-k($.start))).toString()+"px "+(Y*f+.5*g).toString()+"px"}).attr("class","exclude-range")}o(X,"drawExcludeDays");function E(f,y,p,T){if(p<=0||f>y)return 1/0;let g=y-f,c=mt.default.duration({[T??"day"]:p}).asMilliseconds();return c<=0?1/0:Math.ceil(g/c)}o(E,"getEstimatedTickCount");function b(f,y,p,T){let g=r.db.getDateFormat(),c=r.db.getAxisFormat(),l;c?l=c:g==="D"?l="%d":l=s.axisFormat??"%Y-%m-%d";let h=xe(k).tickSize(-T+y+s.gridLineStartPadding).tickFormat(Ft(l)),w=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||s.tickInterval);if(w!==null){let n=parseInt(w[1],10);if(isNaN(n)||n<=0)et.warn(`Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`);else{let F=w[2],e=r.db.getWeekday()||s.weekday,_=k.domain(),A=_[0],$=_[1],Y=E(A,$,n,F);if(Y>se)et.warn(`The tick interval "${n}${F}" would generate ${Y} ticks, which exceeds the maximum allowed (${se}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(F){case"millisecond":h.ticks($t.every(n));break;case"second":h.ticks(Yt.every(n));break;case"minute":h.ticks(Lt.every(n));break;case"hour":h.ticks(It.every(n));break;case"day":h.ticks(At.every(n));break;case"week":h.ticks(Ke[e].every(n));break;case"month":h.ticks(Ot.every(n));break}}}if(v.append("g").attr("class","grid").attr("transform","translate("+f+", "+(T-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||s.topAxis){let n=ge(k).tickSize(-T+y+s.gridLineStartPadding).tickFormat(Ft(l));if(w!==null){let F=parseInt(w[1],10);if(isNaN(F)||F<=0)et.warn(`Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`);else{let e=w[2],_=r.db.getWeekday()||s.weekday,A=k.domain(),$=A[0],Y=A[1];if(E($,Y,F,e)<=se)switch(e){case"millisecond":n.ticks($t.every(F));break;case"second":n.ticks(Yt.every(F));break;case"minute":n.ticks(Lt.every(F));break;case"hour":n.ticks(It.every(F));break;case"day":n.ticks(At.every(F));break;case"week":n.ticks(Ke[_].every(F));break;case"month":n.ticks(Ot.every(F));break}}}v.append("g").attr("class","grid").attr("transform","translate("+f+", "+y+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}o(b,"makeGrid");function d(f,y){let p=0,T=Object.keys(R).map(g=>[g,R[g]]);v.append("g").selectAll("text").data(T).enter().append(function(g){let c=g[0].split(oe.lineBreakRegex),l=-(c.length-1)/2,h=S.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("dy",l+"em");for(let[m,w]of c.entries()){let n=S.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=w,h.appendChild(n)}return h}).attr("x",10).attr("y",function(g,c){if(c>0)for(let l=0;l` + .mermaid-main-font { + font-family: ${t.fontFamily}; + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${t.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + /* Done task text displayed outside the bar sits against the diagram background, + not against the done-task bar, so it must use the outside/contrast color. */ + .doneText0.taskTextOutsideLeft, + .doneText0.taskTextOutsideRight, + .doneText1.taskTextOutsideLeft, + .doneText1.taskTextOutsideRight, + .doneText2.taskTextOutsideLeft, + .doneText2.taskTextOutsideRight, + .doneText3.taskTextOutsideLeft, + .doneText3.taskTextOutsideRight { + fill: ${t.taskTextOutsideColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.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: ${t.taskTextDarkColor} !important; + } + + /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */ + .doneCritText0.taskTextOutsideLeft, + .doneCritText0.taskTextOutsideRight, + .doneCritText1.taskTextOutsideLeft, + .doneCritText1.taskTextOutsideRight, + .doneCritText2.taskTextOutsideLeft, + .doneCritText2.taskTextOutsideRight, + .doneCritText3.taskTextOutsideLeft, + .doneCritText3.taskTextOutsideRight { + fill: ${t.taskTextOutsideColor} !important; + } + + .vert { + stroke: ${t.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${t.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: ${t.fontFamily}; + } +`,"getStyles"),ei=Ri;var kn={parser:Ye,db:Ze,renderer:ti,styles:ei};export{kn as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/gitGraphDiagram-S2ZK5IYY.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/gitGraphDiagram-S2ZK5IYY.mjs new file mode 100644 index 00000000000..6442f1a5b44 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/gitGraphDiagram-S2ZK5IYY.mjs @@ -0,0 +1,106 @@ +import{a as fe}from"./chunk-T5OCTHI4.mjs";import{a as pe}from"./chunk-JQRUD6KW.mjs";import{a as le}from"./chunk-2T2R6R2M.mjs";import"./chunk-UP6H54XL.mjs";import"./chunk-UXSXWOXI.mjs";import"./chunk-C62D2QBJ.mjs";import"./chunk-CEXFNPSA.mjs";import"./chunk-RERM46MO.mjs";import"./chunk-J5EP6P6S.mjs";import"./chunk-RLI5ZMPA.mjs";import"./chunk-2UTLFMKG.mjs";import"./chunk-RKZBBQEN.mjs";import{h as de,o as he,p as ge}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{G as E,S as te,T as re,U as ne,V as oe,W as ae,X as se,Y as ie,_ as S,ca as ce,j as ee,t as q}from"./chunk-67TQ5CYL.mjs";import{b as B,h as me}from"./chunk-7W6UQGC5.mjs";import"./chunk-KGYTTC2M.mjs";import"./chunk-4R4BOZG6.mjs";import{a as h}from"./chunk-AQ6EADP3.mjs";var $={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4};var De=ee.gitGraph,v=h(()=>he({...De,...q().gitGraph}),"getConfig"),m=new fe(()=>{let e=v(),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:{}}});function Z(){return de({length:7})}h(Z,"getID");function Le(e,t){let r=Object.create(null);return e.reduce((a,s)=>{let c=t(s);return r[c]||(r[c]=!0,a.push(s)),a},[])}h(Le,"uniqBy");var Ge=h(function(e){m.records.direction=e},"setDirection"),Pe=h(function(e){B.debug("options str",e),e=e?.trim(),e=e||"{}";try{m.records.options=JSON.parse(e)}catch(t){B.error("error while parsing gitGraph options",t.message)}},"setOptions"),Oe=h(function(){return m.records.options},"getOptions"),Re=h(function(e){let t=e.msg,r=e.id,a=e.type,s=e.tags;B.info("commit",t,r,a,s),B.debug("Entering commit:",t,r,a,s);let c=v();r=E.sanitizeText(r,c),t=E.sanitizeText(t,c),s=s?.map(n=>E.sanitizeText(n,c));let o={id:r||m.records.seq+"-"+Z(),message:t,seq:m.records.seq++,type:a??$.NORMAL,tags:s??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};m.records.head=o,B.info("main branch",c.mainBranchName),m.records.commits.has(o.id)&&B.warn(`Commit ID ${o.id} already exists`),m.records.commits.set(o.id,o),m.records.branches.set(m.records.currBranch,o.id),B.debug("in pushCommit "+o.id)},"commit"),ve=h(function(e){let t=e.name,r=e.order;if(t=E.sanitizeText(t,v()),m.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}")`);m.records.branches.set(t,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(t,{name:t,order:r}),$e(t),B.debug("in createBranch")},"branch"),Ae=h(e=>{let t=e.branch,r=e.id,a=e.type,s=e.tags,c=v();t=E.sanitizeText(t,c),r&&(r=E.sanitizeText(r,c));let o=m.records.branches.get(m.records.currBranch),n=m.records.branches.get(t),d=o?m.records.commits.get(o):void 0,l=n?m.records.commits.get(n):void 0;if(d&&l&&d.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(m.records.currBranch===t){let i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},i}if(d===void 0||!d){let i=new Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw i.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},i}if(!m.records.branches.has(t)){let i=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw i.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},i}if(l===void 0||!l){let i=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw i.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},i}if(d===l){let i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},i}if(r&&m.records.commits.has(r)){let i=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw i.hash={text:`merge ${t} ${r} ${a} ${s?.join(" ")}`,token:`merge ${t} ${r} ${a} ${s?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${a} ${s?.join(" ")}`]},i}let p=n||"",g={id:r||`${m.records.seq}-${Z()}`,message:`merged branch ${t} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,p],branch:m.records.currBranch,type:$.MERGE,customType:a,customId:!!r,tags:s??[]};m.records.head=g,m.records.commits.set(g.id,g),m.records.branches.set(m.records.currBranch,g.id),B.debug(m.records.branches),B.debug("in mergeBranch")},"merge"),Ie=h(function(e){let t=e.id,r=e.targetId,a=e.tags,s=e.parent;B.debug("Entering cherryPick:",t,r,a);let c=v();if(t=E.sanitizeText(t,c),r=E.sanitizeText(r,c),a=a?.map(d=>E.sanitizeText(d,c)),s=E.sanitizeText(s,c),!t||!m.records.commits.has(t)){let d=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw d.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},d}let o=m.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(o.parents)&&o.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let n=o.branch;if(o.type===$.MERGE&&!s)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||!m.records.commits.has(r)){if(n===m.records.currBranch){let g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},g}let d=m.records.branches.get(m.records.currBranch);if(d===void 0||!d){let g=new Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},g}let l=m.records.commits.get(d);if(l===void 0||!l){let g=new Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},g}let p={id:m.records.seq+"-"+Z(),message:`cherry-picked ${o?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,o.id],branch:m.records.currBranch,type:$.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${o.id}${o.type===$.MERGE?`|parent:${s}`:""}`]};m.records.head=p,m.records.commits.set(p.id,p),m.records.branches.set(m.records.currBranch,p.id),B.debug(m.records.branches),B.debug("in cherryPick")}},"cherryPick"),$e=h(function(e){if(e=E.sanitizeText(e,v()),m.records.branches.has(e)){m.records.currBranch=e;let t=m.records.branches.get(m.records.currBranch);t===void 0||!t?m.records.head=null:m.records.head=m.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");function ye(e,t,r){let a=e.indexOf(t);a===-1?e.push(r):e.splice(a,1,r)}h(ye,"upsert");function ue(e){let t=e.reduce((s,c)=>s.seq>c.seq?s:c,e[0]),r="";e.forEach(function(s){s===t?r+=" *":r+=" |"});let a=[r,t.id,t.seq];for(let s in m.records.branches)m.records.branches.get(s)===t.id&&a.push(s);if(B.debug(a.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let s=m.records.commits.get(t.parents[0]);ye(e,t,s),t.parents[1]&&e.push(m.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let s=m.records.commits.get(t.parents[0]);ye(e,t,s)}}e=Le(e,s=>s.id),ue(e)}h(ue,"prettyPrintCommitHistory");var He=h(function(){B.debug(m.records.commits);let e=xe()[0];ue([e])},"prettyPrint"),Se=h(function(){m.reset(),te()},"clear"),_e=h(function(){return[...m.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"),qe=h(function(){return m.records.branches},"getBranches"),We=h(function(){return m.records.commits},"getCommits"),xe=h(function(){let e=[...m.records.commits.values()];return e.forEach(function(t){B.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),Ne=h(function(){return m.records.currBranch},"getCurrentBranch"),je=h(function(){return m.records.direction},"getDirection"),Fe=h(function(){return m.records.head},"getHead"),F={commitType:$,getConfig:v,setDirection:Ge,setOptions:Pe,getOptions:Oe,commit:Re,branch:ve,merge:Ae,cherryPick:Ie,checkout:$e,prettyPrint:He,clear:Se,getBranchesAsObjArray:_e,getBranches:qe,getCommits:We,getCommitsArray:xe,getCurrentBranch:Ne,getDirection:je,getHead:Fe,setAccTitle:re,getAccTitle:ne,getAccDescription:ae,setAccDescription:oe,setDiagramTitle:se,getDiagramTitle:ie};var ze=h((e,t)=>{pe(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)Ye(r,t)},"populate"),Ye=h((e,t)=>{let a={Commit:h(s=>t.commit(Ve(s)),"Commit"),Branch:h(s=>t.branch(Ke(s)),"Branch"),Merge:h(s=>t.merge(Ue(s)),"Merge"),Checkout:h(s=>t.checkout(Ze(s)),"Checkout"),CherryPicking:h(s=>t.cherryPick(Xe(s)),"CherryPicking")}[e.$type];a?a(e):B.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ve=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?$[e.type]:$.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ke=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?$[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ze=h(e=>e.branch,"parseCheckout"),Xe=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),be={parse:h(async e=>{let t=await le("gitGraph",e);B.debug(t),ze(t,F)},"parse")};var O=10,R=40,D=4,G=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,J=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),I=h((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),w=new Map,T=new Map,z=30,W=new Map,Y=[],P=0,y="LR",Qe=h(()=>{w.clear(),T.clear(),W.clear(),P=0,Y=[],y="LR"},"clear"),Ce=h(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(a=>{let s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=a.trim(),t.appendChild(s)}),t},"drawText"),ke=h(e=>{let t,r,a;return y==="BT"?(r=h((s,c)=>s<=c,"comparisonFunc"),a=1/0):(r=h((s,c)=>s>=c,"comparisonFunc"),a=0),e.forEach(s=>{let c=y==="TB"||y=="BT"?T.get(s)?.y:T.get(s)?.x;c!==void 0&&r(c,a)&&(t=s,a=c)}),t},"findClosestParent"),et=h(e=>{let t="",r=1/0;return e.forEach(a=>{let s=T.get(a).y;s<=r&&(t=a,r=s)}),t||void 0},"findClosestParentBT"),tt=h((e,t,r)=>{let a=r,s=r,c=[];e.forEach(o=>{let n=t.get(o);if(!n)throw new Error(`Commit not found for key ${o}`);n.parents.length?(a=nt(n),s=Math.max(a,s)):c.push(n),ot(n,a)}),a=s,c.forEach(o=>{at(o,a,r)}),e.forEach(o=>{let n=t.get(o);if(n?.parents.length){let d=et(n.parents);a=T.get(d).y-R,a<=s&&(s=a);let l=w.get(n.branch).pos,p=a-O;T.set(n.id,{x:l,y:p})}})},"setParallelBTPos"),rt=h(e=>{let t=ke(e.parents.filter(a=>a!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=T.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),nt=h(e=>rt(e)+R,"calculateCommitPosition"),ot=h((e,t)=>{let r=w.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let a=r.pos,s=t+O;return T.set(e.id,{x:a,y:s}),{x:a,y:s}},"setCommitPosition"),at=h((e,t,r)=>{let a=w.get(e.branch);if(!a)throw new Error(`Branch not found for commit ${e.id}`);let s=t+r,c=a.pos;T.set(e.id,{x:c,y:s})},"setRootPosition"),st=h((e,t,r,a,s,c)=>{let{theme:o}=S(),n=V.has(o??""),d=J.has(o??""),l=Je.has(o??"");if(c===$.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(n?3:0)).attr("y",r.y-10+(n?3:0)).attr("width",n?14:20).attr("height",n?14:20).attr("class",`commit ${t.id} commit-highlight${I(s,A,d)} ${a}-outer`),e.append("rect").attr("x",r.x-6+(n?2:0)).attr("y",r.y-6+(n?2:0)).attr("width",n?8:12).attr("height",n?8:12).attr("class",`commit ${t.id} commit${I(s,A,d)} ${a}-inner`);else if(c===$.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",n?7:10).attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",n?2.5:2.75).attr("fill",l?"#000000":"#fff").attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",n?2.5:2.75).attr("fill",l?"#000000":"#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",l?"#000000":"#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",l?"#000000":"#fff").attr("class",`commit ${t.id} ${a}`);else{let p=e.append("circle");if(p.attr("cx",r.x),p.attr("cy",r.y),p.attr("r",n?7:10),p.attr("class",`commit ${t.id} commit${I(s,A,d)}`),c===$.MERGE){let g=e.append("circle");g.attr("cx",r.x),g.attr("cy",r.y),g.attr("r",n?5:6),g.attr("class",`commit ${a} ${t.id} commit${I(s,A,d)}`)}if(c===$.REVERSE){let g=e.append("path"),i=n?4:5;g.attr("d",`M ${r.x-i},${r.y-i}L${r.x+i},${r.y+i}M${r.x-i},${r.y+i}L${r.x+i},${r.y-i}`).attr("class",`commit ${a} ${t.id} commit${I(s,A,d)}`)}}},"drawCommitBullet"),it=h((e,t,r,a,s)=>{if(t.type!==$.CHERRY_PICK&&(t.customId&&t.type===$.MERGE||t.type!==$.MERGE)&&s.showCommitLabel){let c=e.append("g"),o=c.insert("rect").attr("class","commit-label-bkg"),n=c.append("text").attr("x",a).attr("y",r.y+25).attr("class","commit-label").text(t.id),d=n.node()?.getBBox();if(d&&(o.attr("x",r.posWithOffset-d.width/2-G).attr("y",r.y+13.5).attr("width",d.width+2*G).attr("height",d.height+2*G),y==="TB"||y==="BT"?(o.attr("x",r.x-(d.width+4*D+5)).attr("y",r.y-12),n.attr("x",r.x-(d.width+4*D)).attr("y",r.y+d.height-12)):n.attr("x",r.posWithOffset-d.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")n.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let l=-7.5-(d.width+10)/25*9.5,p=10+d.width/25*8.5;c.attr("transform","translate("+l+", "+p+") rotate(-45, "+a+", "+r.y+")")}}},"drawCommitLabel"),ct=h((e,t,r,a)=>{if(t.tags.length>0){let s=0,c=0,o=0,n=[];for(let d of t.tags.reverse()){let l=e.insert("polygon"),p=e.append("circle"),g=e.append("text").attr("y",r.y-16-s).attr("class","tag-label").text(d),i=g.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");c=Math.max(c,i.width),o=Math.max(o,i.height),g.attr("x",r.posWithOffset-i.width/2),n.push({tag:g,hole:p,rect:l,yOffset:s}),s+=20}for(let{tag:d,hole:l,rect:p,yOffset:g}of n){let i=o/2,u=r.y-19.2-g;if(p.attr("class","tag-label-bkg").attr("points",` + ${a-c/2-D/2},${u+G} + ${a-c/2-D/2},${u-G} + ${r.posWithOffset-c/2-D},${u-i-G} + ${r.posWithOffset+c/2+D},${u-i-G} + ${r.posWithOffset+c/2+D},${u+i+G} + ${r.posWithOffset-c/2-D},${u+i+G}`),l.attr("cy",u).attr("cx",a-c/2+D/2).attr("r",1.5).attr("class","tag-hole"),y==="TB"||y==="BT"){let f=a+g;p.attr("class","tag-label-bkg").attr("points",` + ${r.x},${f+2} + ${r.x},${f-2} + ${r.x+O},${f-i-2} + ${r.x+O+c+4},${f-i-2} + ${r.x+O+c+4},${f+i+2} + ${r.x+O},${f+i+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+a+")"),l.attr("cx",r.x+D/2).attr("cy",f).attr("transform","translate(12,12) rotate(45, "+r.x+","+a+")"),d.attr("x",r.x+5).attr("y",f+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+a+")")}}}},"drawCommitTags"),mt=h(e=>{switch(e.customType??e.type){case $.NORMAL:return"commit-normal";case $.REVERSE:return"commit-reverse";case $.HIGHLIGHT:return"commit-highlight";case $.MERGE:return"commit-merge";case $.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dt=h((e,t,r,a)=>{let s={x:0,y:0};if(e.parents.length>0){let c=ke(e.parents);if(c){let o=a.get(c)??s;return t==="TB"?o.y+R:t==="BT"?(a.get(e.id)??s).y-R:o.x+R}}else return t==="TB"?z:t==="BT"?(a.get(e.id)??s).y-R:0;return 0},"calculatePosition"),ht=h((e,t,r)=>{let a=y==="BT"&&r?t:t+O,s=w.get(e.branch)?.pos,c=y==="TB"||y==="BT"?w.get(e.branch)?.pos:a;if(c===void 0||s===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let o=V.has(S().theme??""),n=y==="TB"||y==="BT"?a:s+(o?X/2+1:-2);return{x:c,y:n,posWithOffset:a}},"getCommitPosition"),Be=h((e,t,r,a)=>{let s=e.append("g").attr("class","commit-bullets"),c=e.append("g").attr("class","commit-labels"),o=y==="TB"||y==="BT"?z:0,n=[...t.keys()],d=a.parallelCommits??!1,l=h((g,i)=>{let u=t.get(g)?.seq,f=t.get(i)?.seq;return u!==void 0&&f!==void 0?u-f:0},"sortKeys"),p=n.sort(l);y==="BT"&&(d&&tt(p,t,o),p=p.reverse()),p.forEach(g=>{let i=t.get(g);if(!i)throw new Error(`Commit not found for key ${g}`);d&&(o=dt(i,y,o,T));let u=ht(i,o,d);if(r){let f=mt(i),x=i.customType??i.type,b=w.get(i.branch)?.index??0;st(s,i,u,f,b,x),it(c,i,u,o,a),ct(c,i,u,o)}y==="TB"||y==="BT"?T.set(i.id,{x:u.x,y:u.posWithOffset}):T.set(i.id,{x:u.posWithOffset,y:u.y}),o=y==="BT"&&d?o+R:o+R+O,o>P&&(P=o)})},"drawCommits"),gt=h((e,t,r,a,s)=>{let o=(y==="TB"||y==="BT"?r.xl.branch===o,"isOnBranchToGetCurve"),d=h(l=>l.seq>e.seq&&l.seqd(l)&&n(l))},"shouldRerouteArrow"),N=h((e,t,r=0)=>{let a=e+Math.abs(e-t)/2;if(r>5)return a;if(Y.every(o=>Math.abs(o-a)>=10))return Y.push(a),a;let c=Math.abs(e-t);return N(e,t-c/5,r+1)},"findLane"),lt=h((e,t,r,a)=>{let{theme:s}=S(),c=J.has(s??""),o=T.get(t.id),n=T.get(r.id);if(o===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let d=gt(t,r,o,n,a),l="",p="",g=0,i=0,u=w.get(r.branch)?.index;r.type===$.MERGE&&t.id!==r.parents[0]&&(u=w.get(t.branch)?.index);let f;if(d){l="A 10 10, 0, 0, 0,",p="A 10 10, 0, 0, 1,",g=10,i=10;let x=o.yn.x&&(l="A 20 20, 0, 0, 0,",p="A 20 20, 0, 0, 1,",g=20,i=20,r.type===$.MERGE&&t.id!==r.parents[0]?f=`M ${o.x} ${o.y} L ${o.x} ${n.y-g} ${p} ${o.x-i} ${n.y} L ${n.x} ${n.y}`:f=`M ${o.x} ${o.y} L ${n.x+g} ${o.y} ${l} ${n.x} ${o.y+i} L ${n.x} ${n.y}`),o.x===n.x&&(f=`M ${o.x} ${o.y} L ${n.x} ${n.y}`)):y==="BT"?(o.xn.x&&(l="A 20 20, 0, 0, 0,",p="A 20 20, 0, 0, 1,",g=20,i=20,r.type===$.MERGE&&t.id!==r.parents[0]?f=`M ${o.x} ${o.y} L ${o.x} ${n.y+g} ${l} ${o.x-i} ${n.y} L ${n.x} ${n.y}`:f=`M ${o.x} ${o.y} L ${n.x+g} ${o.y} ${p} ${n.x} ${o.y-i} L ${n.x} ${n.y}`),o.x===n.x&&(f=`M ${o.x} ${o.y} L ${n.x} ${n.y}`)):(o.yn.y&&(r.type===$.MERGE&&t.id!==r.parents[0]?f=`M ${o.x} ${o.y} L ${n.x-g} ${o.y} ${l} ${n.x} ${o.y-i} L ${n.x} ${n.y}`:f=`M ${o.x} ${o.y} L ${o.x} ${n.y+g} ${p} ${o.x+i} ${n.y} L ${n.x} ${n.y}`),o.y===n.y&&(f=`M ${o.x} ${o.y} L ${n.x} ${n.y}`));if(f===void 0)throw new Error("Line definition not found");e.append("path").attr("d",f).attr("class","arrow arrow"+I(u,A,c))},"drawArrow"),pt=h((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(a=>{let s=t.get(a);s.parents&&s.parents.length>0&&s.parents.forEach(c=>{lt(r,t.get(c),s,t)})})},"drawArrows"),ft=h((e,t,r,a)=>{let{look:s,theme:c,themeVariables:o}=S(),{dropShadow:n,THEME_COLOR_LIMIT:d}=o,l=V.has(c??""),p=J.has(c??""),g=e.append("g");t.forEach((i,u)=>{let f=I(u,l?d:A,p),x=w.get(i.name)?.pos;if(x===void 0)throw new Error(`Position not found for branch ${i.name}`);let b=y==="TB"||y==="BT"?x:l?x+X/2+1:x-2,C=g.append("line");C.attr("x1",0),C.attr("y1",b),C.attr("x2",P),C.attr("y2",b),C.attr("class","branch branch"+f),y==="TB"?(C.attr("y1",z),C.attr("x1",x),C.attr("y2",P),C.attr("x2",x)):y==="BT"&&(C.attr("y1",P),C.attr("x1",x),C.attr("y2",z),C.attr("x2",x)),Y.push(b);let K=i.name,_=Ce(K),M=g.insert("rect"),L=g.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+f);L.node().appendChild(_);let k=_.getBBox(),Q=l?0:4,j=l?16:0,H=l?X:0;s==="neo"&&M.attr("data-look","neo"),M.attr("class","branchLabelBkg label"+f).attr("style",s==="neo"?`filter:${l?`url(#${a}-drop-shadow)`:n}`:"").attr("rx",Q).attr("ry",Q).attr("x",-k.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-k.height/2+10).attr("width",k.width+18+j).attr("height",k.height+4+H),L.attr("transform","translate("+(-k.width-14-(r.rotateCommitLabel===!0?30:0)+j/2)+", "+(b-k.height/2-2)+")"),y==="TB"?(M.attr("x",x-k.width/2-10).attr("y",0),L.attr("transform","translate("+(x-k.width/2-5)+", 0)"),l&&(M.attr("transform",`translate(${-j/2-3}, ${-H-10})`),L.attr("transform","translate("+(x-k.width/2-5)+", "+(-H*2+7)+")"))):y==="BT"?(M.attr("x",x-k.width/2-10).attr("y",P),L.attr("transform","translate("+(x-k.width/2-5)+", "+P+")"),l&&(M.attr("transform",`translate(${-j/2-3}, ${H+10})`),L.attr("transform","translate("+(x-k.width/2-5)+", "+(P+H*2+4)+")"))):M.attr("transform","translate(-19, "+(b-12-H/2)+")")})},"drawBranches"),yt=h(function(e,t,r,a,s){return w.set(e,{pos:t,index:r}),t+=50+(s?40:0)+(y==="TB"||y==="BT"?a.width/2:0),t},"setBranchPosition"),$t=h(function(e,t,r,a){Qe(),B.debug("in gitgraph renderer",e+` +`,"id:",t,r);let s=a.db;if(!s.getConfig){B.error("getConfig method is not available on db");return}let c=s.getConfig(),o=c.rotateCommitLabel??!1;W=s.getCommits();let n=s.getBranchesAsObjArray();y=s.getDirection();let d=me(`[id="${t}"]`),{look:l,theme:p,themeVariables:g}=S(),{useGradient:i,gradientStart:u,gradientStop:f,filterColor:x}=g;if(i){let C=d.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");C.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),C.append("stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}l==="neo"&&V.has(p??"")&&d.append("defs").append("filter").attr("id",t+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",x);let b=0;n.forEach((C,K)=>{let _=Ce(C.name),M=d.append("g"),U=M.insert("g").attr("class","branchLabel"),L=U.insert("g").attr("class","label branch-label");L.node()?.appendChild(_);let k=_.getBBox();b=yt(C.name,b,K,k,o),L.remove(),U.remove(),M.remove()}),Be(d,W,!1,c),c.showBranches&&ft(d,n,c,t),pt(d,W),Be(d,W,!0,c),ge.insertTitle(d,"gitTitleText",c.titleTopMargin??0,s.getDiagramTitle()),ce(void 0,d,c.diagramPadding,c.useMaxWidth)},"draw"),we={draw:$t};var Te=8,Ee=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),ut=new Set(["redux-color","redux-dark-color"]),xt=new Set(["neo","neo-dark"]),bt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Bt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),Ct=h(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let a=0;a{let t=q(),{theme:r,themeVariables:a}=t,{borderColorArray:s}=a,c=Ee.has(r);if(xt.has(r)){let o="";for(let n=0;n`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%Te;return` + .branch-label${t} { fill: ${e["gitBranchLabel"+r]}; } + .commit${t} { stroke: ${e["git"+r]}; fill: ${e["git"+r]}; } + .commit-highlight${t} { stroke: ${e["gitInv"+r]}; fill: ${e["gitInv"+r]}; } + .label${t} { fill: ${e["git"+r]}; } + .arrow${t} { stroke: ${e["git"+r]}; } + `}).join(` +`)}`,"normalTheme"),Tt=h(e=>{let t=q(),{theme:r}=t,a=Bt.has(r);return` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + ${a?kt(e):wt(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${a?"4 2":"2"}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${a?e.nodeBorder:e.commitLabelColor}; ${a?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${a?"transparent":e.commitLabelBackground}; opacity: ${a?"":.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${a?e.mainBkg:e.tagLabelBackground}; stroke: ${a?e.nodeBorder:e.tagLabelBorder}; ${a?`filter:${e.dropShadow}`:""} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${a?e.mainBkg:e.primaryColor}; + fill: ${a?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${a?e.mainBkg:e.primaryColor}; + fill: ${a?e.mainBkg:e.primaryColor}; + stroke-width: ${a?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${a?e.mainBkg:e.primaryColor}; + fill: ${a?e.mainBkg:e.primaryColor}; + } + + .arrow { + /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ + stroke-width: ${Ee.has(r)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},"getStyles"),Me=Tt;var or={parser:be,db:F,renderer:we,styles:Me};export{or as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/journeyDiagram-M6C3CM3L.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/journeyDiagram-M6C3CM3L.mjs new file mode 100644 index 00000000000..83a58ebea4e --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/journeyDiagram-M6C3CM3L.mjs @@ -0,0 +1,139 @@ +import{a as xt}from"./chunk-AZZRMDJM.mjs";import{a as pt,b as gt,c as mt,f as U}from"./chunk-LII3EMHJ.mjs";import"./chunk-KNLZD3CH.mjs";import{O as ot,S as lt,T as ct,U as ht,V as ut,W as yt,X as ft,Y as dt,_ as P}from"./chunk-67TQ5CYL.mjs";import{F as G,h as z}from"./chunk-7W6UQGC5.mjs";import{a as s}from"./chunk-AQ6EADP3.mjs";var Z=(function(){var t=s(function(h,i,r,o){for(r=r||{},o=h.length;o--;r[h[o]]=i);return r},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],d=[1,10],n=[1,11],u=[1,12],p=[1,13],c=[1,14],g={trace:s(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:s(function(i,r,o,y,f,l,_){var k=l.length-1;switch(f){case 1:return l[k-1];case 2:this.$=[];break;case 3:l[k-1].push(l[k]),this.$=l[k-1];break;case 4:case 5:this.$=l[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(l[k].substr(6)),this.$=l[k].substr(6);break;case 9:this.$=l[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=l[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(l[k].substr(8)),this.$=l[k].substr(8);break;case 13:y.addTask(l[k-1],l[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:d,14:n,16:u,17:p,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:d,14:n,16:u,17:p,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(i,r){if(r.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=r,o}},"parseError"),parse:s(function(i){var r=this,o=[0],y=[],f=[null],l=[],_=this.table,k="",E=0,it=0,rt=0,St=2,st=1,Mt=l.slice.call(arguments,1),b=Object.create(this.lexer),A={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(A.yy[Y]=this.yy[Y]);b.setInput(i,A.yy),A.yy.lexer=b,A.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;l.push(q);var Ct=b.options&&b.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ut(w){o.length=o.length-2*w,f.length=f.length-w,l.length=l.length-w}s(Ut,"popStack");function Et(){var w;return w=y.pop()||b.lex()||st,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=r.symbols_[w]||w),w}s(Et,"lex");for(var v,D,F,T,Zt,H,V={},j,M,at,W;;){if(F=o[o.length-1],this.defaultActions[F]?T=this.defaultActions[F]:((v===null||typeof v>"u")&&(v=Et()),T=_[F]&&_[F][v]),typeof T>"u"||!T.length||!T[0]){var X="";W=[];for(j in _[F])this.terminals_[j]&&j>St&&W.push("'"+this.terminals_[j]+"'");b.showPosition?X="Parse error on line "+(E+1)+`: +`+b.showPosition()+` +Expecting `+W.join(", ")+", got '"+(this.terminals_[v]||v)+"'":X="Parse error on line "+(E+1)+": Unexpected "+(v==st?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(X,{text:b.match,token:this.terminals_[v]||v,line:b.yylineno,loc:q,expected:W})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+v);switch(T[0]){case 1:o.push(v),f.push(b.yytext),l.push(b.yylloc),o.push(T[1]),v=null,D?(v=D,D=null):(it=b.yyleng,k=b.yytext,E=b.yylineno,q=b.yylloc,rt>0&&rt--);break;case 2:if(M=this.productions_[T[1]][1],V.$=f[f.length-M],V._$={first_line:l[l.length-(M||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(M||1)].first_column,last_column:l[l.length-1].last_column},Ct&&(V._$.range=[l[l.length-(M||1)].range[0],l[l.length-1].range[1]]),H=this.performAction.apply(V,[k,it,E,A.yy,T[1],f,l].concat(Mt)),typeof H<"u")return H;M&&(o=o.slice(0,-1*M*2),f=f.slice(0,-1*M),l=l.slice(0,-1*M)),o.push(this.productions_[T[1]][0]),f.push(V.$),l.push(V._$),at=_[o[o.length-2]][o[o.length-1]],o.push(at);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(r,o){if(this.yy.parser)this.yy.parser.parseError(r,o);else throw new Error(r)},"parseError"),setInput:s(function(i,r){return this.yy=r||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var r=i.length,o=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;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),o.length-1&&(this.yylineno-=o.length-1);var f=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:o?(o.length===y.length?this.yylloc.first_column:0)+y[y.length-o.length].length-o[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+r+"^"},"showPosition"),test_match:s(function(i,r){var o,y,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),y=i[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+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],o=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var l in f)this[l]=f[l];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,o,y;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),l=0;lr[0].length)){if(r=o,y=l,this.options.backtrack_lexer){if(i=this.test_match(o,f[l]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,f[y]),i!==!1?i:!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:s(function(){var r=this.next();return r||this.lex()},"lex"),begin:s(function(r){this.conditionStack.push(r)},"begin"),popState:s(function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),pushState:s(function(r){this.begin(r)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(r,o,y,f){var l=f;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 h})();g.lexer=m;function x(){this.yy={}}return s(x,"Parser"),x.prototype=g,g.Parser=x,new x})();Z.parser=Z;var kt=Z;var L="",J=[],B=[],N=[],Pt=s(function(){J.length=0,B.length=0,L="",N.length=0,lt()},"clear"),It=s(function(t){L=t,J.push(t)},"addSection"),At=s(function(){return J},"getSections"),Ft=s(function(){let t=bt(),e=100,a=0;for(;!t&&a{a.people&&t.push(...a.people)}),[...new Set(t)].sort()},"updateActors"),Lt=s(function(t,e){let a=e.substr(1).split(":"),d=0,n=[];a.length===1?(d=Number(a[0]),n=[]):(d=Number(a[0]),n=a[1].split(","));let u=n.map(c=>c.trim()),p={section:L,type:L,people:u,task:t,score:d};N.push(p)},"addTask"),Rt=s(function(t){let e={section:L,type:L,description:t,task:t,classes:[]};B.push(e)},"addTaskOrg"),bt=s(function(){let t=s(function(a){return N[a].processed},"compileTask"),e=!0;for(let[a,d]of N.entries())t(a),e=e&&d.processed;return e},"compileTasks"),Bt=s(function(){return Vt()},"getActors"),K={getConfig:s(()=>P().journey,"getConfig"),clear:Pt,setDiagramTitle:ft,getDiagramTitle:dt,setAccTitle:ct,getAccTitle:ht,setAccDescription:ut,getAccDescription:yt,addSection:It,getSections:At,getTasks:Ft,addTask:Lt,addTaskOrg:Rt,getActors:Bt};var Nt=s(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + font-family: ${t.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } + ${xt()} +`,"getStyles"),_t=Nt;var tt=s(function(t,e){return pt(t,e)},"drawRect"),jt=s(function(t,e){let d=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(g){let m=G().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function p(g){let m=G().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(p,"sad");function c(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(c,"ambivalent"),e.score>3?u(n):e.score<3?p(n):c(n),d},"drawFace"),vt=s(function(t,e){let a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),wt=s(function(t,e){return mt(t,e)},"drawText"),Wt=s(function(t,e){function a(n,u,p,c,g){return n+","+u+" "+(n+p)+","+u+" "+(n+p)+","+(u+c-g)+" "+(n+p-g*1.2)+","+(u+c)+" "+n+","+(u+c)}s(a,"genPoints");let d=t.append("polygon");d.attr("points",a(e.x,e.y,50,20,7)),d.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,wt(t,e)},"drawLabel"),zt=s(function(t,e,a){let d=t.append("g"),n=U();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),n.height=a.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,tt(d,n),Tt(a)(e.text,d,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),Q=-1,Ot=s(function(t,e,a,d){let n=e.x+a.width/2,u=t.append("g");Q++,u.append("line").attr("id",d+"-task"+Q).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),jt(u,{cx:n,cy:300+(5-e.score)*30,score:e.score});let c=U();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=a.width,c.height=a.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,tt(u,c);let g=e.x+14;e.people.forEach(m=>{let x=e.actors[m].color,h={cx:g,cy:e.y,r:7,fill:x,stroke:"#000",title:m,pos:e.actors[m].position};vt(u,h),g+=10}),Tt(a)(e.task,u,c.x,c.y,c.width,c.height,{class:"task"},a,e.colour)},"drawTask"),Yt=s(function(t,e){gt(t,e)},"drawBackgroundRect"),Tt=(function(){function t(n,u,p,c,g,m,x,h){let i=u.append("text").attr("x",p+g/2).attr("y",c+m/2+5).style("font-color",h).style("text-anchor","middle").text(n);d(i,x)}s(t,"byText");function e(n,u,p,c,g,m,x,h,i){let{taskFontSize:r,taskFontFamily:o}=h,y=n.split(//gi);for(let f=0;f{let u=C[n].color,p={cx:20,cy:d,r:7,fill:u,stroke:"#000",pos:C[n].position};R.drawCircle(t,p);let c=t.append("text").attr("visibility","hidden").text(n),g=c.node().getBoundingClientRect().width;c.remove();let m=[];if(g<=a)m=[n];else{let x=n.split(" "),h="";c=t.append("text").attr("visibility","hidden"),x.forEach(i=>{let r=h?`${h} ${i}`:i;if(c.text(r),c.node().getBoundingClientRect().width>a){if(h&&m.push(h),h=i,c.text(i),c.node().getBoundingClientRect().width>a){let y="";for(let f of i)y+=f,c.text(y+"-"),c.node().getBoundingClientRect().width>a&&(m.push(y.slice(0,-1)+"-"),y=f);h=y}}else h=r}),h&&m.push(h),c.remove()}m.forEach((x,h)=>{let i={x:40,y:d+7+h*20,fill:"#666",text:x,textMargin:e.boxTextMargin??5},o=R.drawText(t,i).node().getBoundingClientRect().width;o>O&&o>e.leftMargin-o&&(O=o)}),d+=Math.max(20,m.length*20)})}s(Ht,"drawActorLegend");var S=P().journey,I=0,Xt=s(function(t,e,a,d){let n=P(),u=n.journey.titleColor,p=n.journey.titleFontSize,c=n.journey.titleFontFamily,g=n.securityLevel,m;g==="sandbox"&&(m=z("#i"+e));let x=g==="sandbox"?z(m.nodes()[0].contentDocument.body):z("body");$.init();let h=x.select("#"+e);R.initGraphics(h,e);let i=d.db.getTasks(),r=d.db.getDiagramTitle(),o=d.db.getActors();for(let E in C)delete C[E];let y=0;o.forEach(E=>{C[E]={color:S.actorColours[y%S.actorColours.length],position:y},y++}),Ht(h),I=S.leftMargin+O,$.insert(0,0,I,Object.keys(C).length*50),Gt(h,i,0,e);let f=$.getBounds();r&&h.append("text").text(r).attr("x",I).attr("font-size",p).attr("font-weight","bold").attr("y",25).attr("fill",u).attr("font-family",c);let l=f.stopy-f.starty+2*S.diagramMarginY,_=I+f.stopx+2*S.diagramMarginX;ot(h,l,_,S.useMaxWidth),h.append("line").attr("x1",I).attr("y1",S.height*4).attr("x2",_-I-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");let k=r?70:0;h.attr("viewBox",`${f.startx} -25 ${_} ${l+k}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",l+k+25)},"draw"),$={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,a,d){t[e]===void 0?t[e]=a:t[e]=d(a,t[e])},"updateVal"),updateBounds:s(function(t,e,a,d){let n=P().journey,u=this,p=0;function c(g){return s(function(x){p++;let h=u.sequenceItems.length-p+1;u.updateVal(x,"starty",e-h*n.boxMargin,Math.min),u.updateVal(x,"stopy",d+h*n.boxMargin,Math.max),u.updateVal($.data,"startx",t-h*n.boxMargin,Math.min),u.updateVal($.data,"stopx",a+h*n.boxMargin,Math.max),g!=="activation"&&(u.updateVal(x,"startx",t-h*n.boxMargin,Math.min),u.updateVal(x,"stopx",a+h*n.boxMargin,Math.max),u.updateVal($.data,"starty",e-h*n.boxMargin,Math.min),u.updateVal($.data,"stopy",d+h*n.boxMargin,Math.max))},"updateItemBounds")}s(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:s(function(t,e,a,d){let n=Math.min(t,a),u=Math.max(t,a),p=Math.min(e,d),c=Math.max(e,d);this.updateVal($.data,"startx",n,Math.min),this.updateVal($.data,"starty",p,Math.min),this.updateVal($.data,"stopx",u,Math.max),this.updateVal($.data,"stopy",c,Math.max),this.updateBounds(n,p,u,c)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},et=S.sectionFills,$t=S.sectionColours,Gt=s(function(t,e,a,d){let n=P().journey,u="",p=n.height*2+n.diagramMarginY,c=a+p,g=0,m="#CCC",x="black",h=0;for(let[i,r]of e.entries()){if(u!==r.section){m=et[g%et.length],h=g%et.length,x=$t[g%$t.length];let y=0,f=r.section;for(let _=i;_(C[f]&&(y[f]=C[f]),y),{});r.x=i*n.taskMargin+i*n.width+I,r.y=c,r.width=n.diagramMarginX,r.height=n.diagramMarginY,r.colour=x,r.fill=m,r.num=h,r.actors=o,R.drawTask(t,r,n,d),$.insert(r.x,r.y,r.x+r.width+n.taskMargin,450)}},"drawTasks"),nt={setConf:Dt,draw:Xt};var be={parser:kt,db:K,renderer:nt,styles:_t,init:s(t=>{nt.setConf(t.journey),K.clear()},"init")};export{be as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/katex-K3KEBU37.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/katex-K3KEBU37.mjs new file mode 100644 index 00000000000..06505d0f64e --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/katex-K3KEBU37.mjs @@ -0,0 +1,261 @@ +import{a as d}from"./chunk-AQ6EADP3.mjs";var h0=class r{static{d(this,"SourceLocation")}constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new r(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}},d0=class r{static{d(this,"Token")}constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new r(t,h0.range(this,e))}},z=class r{static{d(this,"ParseError")}constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,u=t&&t.loc;if(u&&u.start<=u.end){var h=u.lexer.input;n=u.start,s=u.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&\u0332"),v;n>15?v="\u2026"+h.slice(n-15,n):v=h.slice(0,n);var b;s+15":">","<":"<",'"':""","'":"'"},Sa=/[&><"']/g;function Ma(r){return String(r).replace(Sa,e=>ka[e])}d(Ma,"escape");var wr=d(function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},"getBaseElem"),za=d(function(e){var t=wr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},"isCharacterBox"),Aa=d(function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},"assert"),Ta=d(function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},"protocolFromUrl"),V={deflt:ya,escape:Ma,hyphenate:wa,getBaseElem:wr,isCharacterBox:za,protocolFromUrl:Ta},qe={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:d(r=>"#"+r,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:d((r,e)=>(e.push(r),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:d(r=>Math.max(0,r),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:d(r=>Math.max(0,r),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:d(r=>Math.max(0,r),"processor"),cli:"-e, --max-expand ",cliProcessor:d(r=>r==="Infinity"?1/0:parseInt(r),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};function Ba(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}d(Ba,"getDefaultValue");var me=class{static{d(this,"Settings")}constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in qe)if(qe.hasOwnProperty(t)){var a=qe[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:Ba(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new z("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=V.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}},k0=class{static{d(this,"Style")}constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return S0[Da[this.id]]}sub(){return S0[Ca[this.id]]}fracNum(){return S0[Na[this.id]]}fracDen(){return S0[qa[this.id]]}cramp(){return S0[Ra[this.id]]}text(){return S0[Ea[this.id]]}isTight(){return this.size>=2}},St=0,Ee=1,re=2,q0=3,ce=4,v0=5,ae=6,s0=7,S0=[new k0(St,0,!1),new k0(Ee,0,!0),new k0(re,1,!1),new k0(q0,1,!0),new k0(ce,2,!1),new k0(v0,2,!0),new k0(ae,3,!1),new k0(s0,3,!0)],Da=[ce,v0,ce,v0,ae,s0,ae,s0],Ca=[v0,v0,v0,v0,s0,s0,s0,s0],Na=[re,q0,ce,v0,ae,s0,ae,s0],qa=[q0,q0,v0,v0,s0,s0,s0,s0],Ra=[Ee,Ee,q0,q0,v0,v0,s0,s0],Ea=[St,Ee,re,q0,re,q0,re,q0],E={DISPLAY:S0[St],TEXT:S0[re],SCRIPT:S0[ce],SCRIPTSCRIPT:S0[ae]},mt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ia(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}d(Ia,"scriptFromCodepoint");var Re=[];mt.forEach(r=>r.blocks.forEach(e=>Re.push(...e)));function kr(r){for(var e=0;e=Re[e]&&r<=Re[e+1])return!0;return!1}d(kr,"supportedCodepoint");var te=80,Oa=d(function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),Fa=d(function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),Ha=d(function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),La=d(function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),Pa=d(function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),Ga=d(function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Va=d(function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},"sqrtTall"),Ua=d(function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Oa(t,te);break;case"sqrtSize1":n=Fa(t,te);break;case"sqrtSize2":n=Ha(t,te);break;case"sqrtSize3":n=La(t,te);break;case"sqrtSize4":n=Pa(t,te);break;case"sqrtTall":n=Va(t,te,a)}return n},"sqrtPath"),Ya=d(function(e,t){switch(e){case"\u239C":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"\u239F":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23A2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23A5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23AA":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23D0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},"innerPath"),Yt={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Xa=d(function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),W0=class{static{d(this,"DocumentFragment")}constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText(),"toText");return this.children.map(e).join("")}},M0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},we={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Xt={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function $a(r,e){M0[r]=e}d($a,"setFontMetrics");function Mt(r,e,t){if(!M0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=M0[e][a];if(!n&&r[0]in Xt&&(a=Xt[r[0]].charCodeAt(0),n=M0[e][a]),!n&&t==="text"&&kr(a)&&(n=M0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}d(Mt,"getCharacterMetrics");var Qe={};function Wa(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Qe[e]){var t=Qe[e]={cssEmPerMu:we.quad[e]/18};for(var a in we)we.hasOwnProperty(a)&&(t[a]=we[a][e])}return Qe[e]}d(Wa,"getGlobalMetrics");var ja=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],$t=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Wt=d(function(e,t){return t.size<2?e:ja[e-1][t.size-1]},"sizeAtStyle"),Ie=class r{static{d(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||r.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=$t[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new r(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Wt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:$t[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Wt(r.BASESIZE,e);return this.size===t&&this.textSize===r.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==r.BASESIZE?["sizing","reset-size"+this.size,"size"+r.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Wa(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Ie.BASESIZE=6;var ct={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Za={ex:!0,em:!0,mu:!0},Sr=d(function(e){return typeof e!="string"&&(e=e.unit),e in ct||e in Za||e==="ex"},"validUnit"),Q=d(function(e,t){var a;if(e.unit in ct)a=ct[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new z("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},"calculateSize"),T=d(function(e){return+e.toFixed(4)+"em"},"makeEm"),V0=d(function(e){return e.filter(t=>t).join(" ")},"createClass"),Mr=d(function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},"initNode"),zr=d(function(e){var t=document.createElement(e);t.className=V0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,Ar=d(function(e){var t="<"+e;this.classes.length&&(t+=' class="'+V.escape(V0(this.classes))+'"');var a="";for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=V.hyphenate(n)+":"+this.style[n]+";");a&&(t+=' style="'+V.escape(a)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(Ka.test(s))throw new z("Invalid attribute name '"+s+"'");t+=" "+s+'="'+V.escape(this.attributes[s])+'"'}t+=">";for(var u=0;u",t},"toMarkup"),j0=class{static{d(this,"Span")}constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Mr.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return zr.call(this,"span")}toMarkup(){return Ar.call(this,"span")}},de=class{static{d(this,"Anchor")}constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Mr.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return zr.call(this,"a")}toMarkup(){return Ar.call(this,"a")}},dt=class{static{d(this,"Img")}constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+V.escape(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=T(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=V0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=V.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+V.escape(a)+'"');var s=V.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}},w0=class{static{d(this,"SvgNode")}constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n':''}},fe=class{static{d(this,"LineNode")}constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}d(Qa,"assertSpan");var _a={bin:1,close:1,inner:1,open:1,punct:1,rel:1},e1={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},W={math:{},text:{}};function i(r,e,t,a,n,s){W[r][n]={font:e,group:t,replace:a},s&&a&&(W[r][a]=W[r][n])}d(i,"defineSymbol");var l="math",S="text",o="main",f="ams",j="accent-token",C="bin",l0="close",ne="inner",R="mathord",e0="op-token",f0="open",Ve="punct",p="rel",O0="spacing",g="textord";i(l,o,p,"\u2261","\\equiv",!0);i(l,o,p,"\u227A","\\prec",!0);i(l,o,p,"\u227B","\\succ",!0);i(l,o,p,"\u223C","\\sim",!0);i(l,o,p,"\u22A5","\\perp");i(l,o,p,"\u2AAF","\\preceq",!0);i(l,o,p,"\u2AB0","\\succeq",!0);i(l,o,p,"\u2243","\\simeq",!0);i(l,o,p,"\u2223","\\mid",!0);i(l,o,p,"\u226A","\\ll",!0);i(l,o,p,"\u226B","\\gg",!0);i(l,o,p,"\u224D","\\asymp",!0);i(l,o,p,"\u2225","\\parallel");i(l,o,p,"\u22C8","\\bowtie",!0);i(l,o,p,"\u2323","\\smile",!0);i(l,o,p,"\u2291","\\sqsubseteq",!0);i(l,o,p,"\u2292","\\sqsupseteq",!0);i(l,o,p,"\u2250","\\doteq",!0);i(l,o,p,"\u2322","\\frown",!0);i(l,o,p,"\u220B","\\ni",!0);i(l,o,p,"\u221D","\\propto",!0);i(l,o,p,"\u22A2","\\vdash",!0);i(l,o,p,"\u22A3","\\dashv",!0);i(l,o,p,"\u220B","\\owns");i(l,o,Ve,".","\\ldotp");i(l,o,Ve,"\u22C5","\\cdotp");i(l,o,g,"#","\\#");i(S,o,g,"#","\\#");i(l,o,g,"&","\\&");i(S,o,g,"&","\\&");i(l,o,g,"\u2135","\\aleph",!0);i(l,o,g,"\u2200","\\forall",!0);i(l,o,g,"\u210F","\\hbar",!0);i(l,o,g,"\u2203","\\exists",!0);i(l,o,g,"\u2207","\\nabla",!0);i(l,o,g,"\u266D","\\flat",!0);i(l,o,g,"\u2113","\\ell",!0);i(l,o,g,"\u266E","\\natural",!0);i(l,o,g,"\u2663","\\clubsuit",!0);i(l,o,g,"\u2118","\\wp",!0);i(l,o,g,"\u266F","\\sharp",!0);i(l,o,g,"\u2662","\\diamondsuit",!0);i(l,o,g,"\u211C","\\Re",!0);i(l,o,g,"\u2661","\\heartsuit",!0);i(l,o,g,"\u2111","\\Im",!0);i(l,o,g,"\u2660","\\spadesuit",!0);i(l,o,g,"\xA7","\\S",!0);i(S,o,g,"\xA7","\\S");i(l,o,g,"\xB6","\\P",!0);i(S,o,g,"\xB6","\\P");i(l,o,g,"\u2020","\\dag");i(S,o,g,"\u2020","\\dag");i(S,o,g,"\u2020","\\textdagger");i(l,o,g,"\u2021","\\ddag");i(S,o,g,"\u2021","\\ddag");i(S,o,g,"\u2021","\\textdaggerdbl");i(l,o,l0,"\u23B1","\\rmoustache",!0);i(l,o,f0,"\u23B0","\\lmoustache",!0);i(l,o,l0,"\u27EF","\\rgroup",!0);i(l,o,f0,"\u27EE","\\lgroup",!0);i(l,o,C,"\u2213","\\mp",!0);i(l,o,C,"\u2296","\\ominus",!0);i(l,o,C,"\u228E","\\uplus",!0);i(l,o,C,"\u2293","\\sqcap",!0);i(l,o,C,"\u2217","\\ast");i(l,o,C,"\u2294","\\sqcup",!0);i(l,o,C,"\u25EF","\\bigcirc",!0);i(l,o,C,"\u2219","\\bullet",!0);i(l,o,C,"\u2021","\\ddagger");i(l,o,C,"\u2240","\\wr",!0);i(l,o,C,"\u2A3F","\\amalg");i(l,o,C,"&","\\And");i(l,o,p,"\u27F5","\\longleftarrow",!0);i(l,o,p,"\u21D0","\\Leftarrow",!0);i(l,o,p,"\u27F8","\\Longleftarrow",!0);i(l,o,p,"\u27F6","\\longrightarrow",!0);i(l,o,p,"\u21D2","\\Rightarrow",!0);i(l,o,p,"\u27F9","\\Longrightarrow",!0);i(l,o,p,"\u2194","\\leftrightarrow",!0);i(l,o,p,"\u27F7","\\longleftrightarrow",!0);i(l,o,p,"\u21D4","\\Leftrightarrow",!0);i(l,o,p,"\u27FA","\\Longleftrightarrow",!0);i(l,o,p,"\u21A6","\\mapsto",!0);i(l,o,p,"\u27FC","\\longmapsto",!0);i(l,o,p,"\u2197","\\nearrow",!0);i(l,o,p,"\u21A9","\\hookleftarrow",!0);i(l,o,p,"\u21AA","\\hookrightarrow",!0);i(l,o,p,"\u2198","\\searrow",!0);i(l,o,p,"\u21BC","\\leftharpoonup",!0);i(l,o,p,"\u21C0","\\rightharpoonup",!0);i(l,o,p,"\u2199","\\swarrow",!0);i(l,o,p,"\u21BD","\\leftharpoondown",!0);i(l,o,p,"\u21C1","\\rightharpoondown",!0);i(l,o,p,"\u2196","\\nwarrow",!0);i(l,o,p,"\u21CC","\\rightleftharpoons",!0);i(l,f,p,"\u226E","\\nless",!0);i(l,f,p,"\uE010","\\@nleqslant");i(l,f,p,"\uE011","\\@nleqq");i(l,f,p,"\u2A87","\\lneq",!0);i(l,f,p,"\u2268","\\lneqq",!0);i(l,f,p,"\uE00C","\\@lvertneqq");i(l,f,p,"\u22E6","\\lnsim",!0);i(l,f,p,"\u2A89","\\lnapprox",!0);i(l,f,p,"\u2280","\\nprec",!0);i(l,f,p,"\u22E0","\\npreceq",!0);i(l,f,p,"\u22E8","\\precnsim",!0);i(l,f,p,"\u2AB9","\\precnapprox",!0);i(l,f,p,"\u2241","\\nsim",!0);i(l,f,p,"\uE006","\\@nshortmid");i(l,f,p,"\u2224","\\nmid",!0);i(l,f,p,"\u22AC","\\nvdash",!0);i(l,f,p,"\u22AD","\\nvDash",!0);i(l,f,p,"\u22EA","\\ntriangleleft");i(l,f,p,"\u22EC","\\ntrianglelefteq",!0);i(l,f,p,"\u228A","\\subsetneq",!0);i(l,f,p,"\uE01A","\\@varsubsetneq");i(l,f,p,"\u2ACB","\\subsetneqq",!0);i(l,f,p,"\uE017","\\@varsubsetneqq");i(l,f,p,"\u226F","\\ngtr",!0);i(l,f,p,"\uE00F","\\@ngeqslant");i(l,f,p,"\uE00E","\\@ngeqq");i(l,f,p,"\u2A88","\\gneq",!0);i(l,f,p,"\u2269","\\gneqq",!0);i(l,f,p,"\uE00D","\\@gvertneqq");i(l,f,p,"\u22E7","\\gnsim",!0);i(l,f,p,"\u2A8A","\\gnapprox",!0);i(l,f,p,"\u2281","\\nsucc",!0);i(l,f,p,"\u22E1","\\nsucceq",!0);i(l,f,p,"\u22E9","\\succnsim",!0);i(l,f,p,"\u2ABA","\\succnapprox",!0);i(l,f,p,"\u2246","\\ncong",!0);i(l,f,p,"\uE007","\\@nshortparallel");i(l,f,p,"\u2226","\\nparallel",!0);i(l,f,p,"\u22AF","\\nVDash",!0);i(l,f,p,"\u22EB","\\ntriangleright");i(l,f,p,"\u22ED","\\ntrianglerighteq",!0);i(l,f,p,"\uE018","\\@nsupseteqq");i(l,f,p,"\u228B","\\supsetneq",!0);i(l,f,p,"\uE01B","\\@varsupsetneq");i(l,f,p,"\u2ACC","\\supsetneqq",!0);i(l,f,p,"\uE019","\\@varsupsetneqq");i(l,f,p,"\u22AE","\\nVdash",!0);i(l,f,p,"\u2AB5","\\precneqq",!0);i(l,f,p,"\u2AB6","\\succneqq",!0);i(l,f,p,"\uE016","\\@nsubseteqq");i(l,f,C,"\u22B4","\\unlhd");i(l,f,C,"\u22B5","\\unrhd");i(l,f,p,"\u219A","\\nleftarrow",!0);i(l,f,p,"\u219B","\\nrightarrow",!0);i(l,f,p,"\u21CD","\\nLeftarrow",!0);i(l,f,p,"\u21CF","\\nRightarrow",!0);i(l,f,p,"\u21AE","\\nleftrightarrow",!0);i(l,f,p,"\u21CE","\\nLeftrightarrow",!0);i(l,f,p,"\u25B3","\\vartriangle");i(l,f,g,"\u210F","\\hslash");i(l,f,g,"\u25BD","\\triangledown");i(l,f,g,"\u25CA","\\lozenge");i(l,f,g,"\u24C8","\\circledS");i(l,f,g,"\xAE","\\circledR");i(S,f,g,"\xAE","\\circledR");i(l,f,g,"\u2221","\\measuredangle",!0);i(l,f,g,"\u2204","\\nexists");i(l,f,g,"\u2127","\\mho");i(l,f,g,"\u2132","\\Finv",!0);i(l,f,g,"\u2141","\\Game",!0);i(l,f,g,"\u2035","\\backprime");i(l,f,g,"\u25B2","\\blacktriangle");i(l,f,g,"\u25BC","\\blacktriangledown");i(l,f,g,"\u25A0","\\blacksquare");i(l,f,g,"\u29EB","\\blacklozenge");i(l,f,g,"\u2605","\\bigstar");i(l,f,g,"\u2222","\\sphericalangle",!0);i(l,f,g,"\u2201","\\complement",!0);i(l,f,g,"\xF0","\\eth",!0);i(S,o,g,"\xF0","\xF0");i(l,f,g,"\u2571","\\diagup");i(l,f,g,"\u2572","\\diagdown");i(l,f,g,"\u25A1","\\square");i(l,f,g,"\u25A1","\\Box");i(l,f,g,"\u25CA","\\Diamond");i(l,f,g,"\xA5","\\yen",!0);i(S,f,g,"\xA5","\\yen",!0);i(l,f,g,"\u2713","\\checkmark",!0);i(S,f,g,"\u2713","\\checkmark");i(l,f,g,"\u2136","\\beth",!0);i(l,f,g,"\u2138","\\daleth",!0);i(l,f,g,"\u2137","\\gimel",!0);i(l,f,g,"\u03DD","\\digamma",!0);i(l,f,g,"\u03F0","\\varkappa");i(l,f,f0,"\u250C","\\@ulcorner",!0);i(l,f,l0,"\u2510","\\@urcorner",!0);i(l,f,f0,"\u2514","\\@llcorner",!0);i(l,f,l0,"\u2518","\\@lrcorner",!0);i(l,f,p,"\u2266","\\leqq",!0);i(l,f,p,"\u2A7D","\\leqslant",!0);i(l,f,p,"\u2A95","\\eqslantless",!0);i(l,f,p,"\u2272","\\lesssim",!0);i(l,f,p,"\u2A85","\\lessapprox",!0);i(l,f,p,"\u224A","\\approxeq",!0);i(l,f,C,"\u22D6","\\lessdot");i(l,f,p,"\u22D8","\\lll",!0);i(l,f,p,"\u2276","\\lessgtr",!0);i(l,f,p,"\u22DA","\\lesseqgtr",!0);i(l,f,p,"\u2A8B","\\lesseqqgtr",!0);i(l,f,p,"\u2251","\\doteqdot");i(l,f,p,"\u2253","\\risingdotseq",!0);i(l,f,p,"\u2252","\\fallingdotseq",!0);i(l,f,p,"\u223D","\\backsim",!0);i(l,f,p,"\u22CD","\\backsimeq",!0);i(l,f,p,"\u2AC5","\\subseteqq",!0);i(l,f,p,"\u22D0","\\Subset",!0);i(l,f,p,"\u228F","\\sqsubset",!0);i(l,f,p,"\u227C","\\preccurlyeq",!0);i(l,f,p,"\u22DE","\\curlyeqprec",!0);i(l,f,p,"\u227E","\\precsim",!0);i(l,f,p,"\u2AB7","\\precapprox",!0);i(l,f,p,"\u22B2","\\vartriangleleft");i(l,f,p,"\u22B4","\\trianglelefteq");i(l,f,p,"\u22A8","\\vDash",!0);i(l,f,p,"\u22AA","\\Vvdash",!0);i(l,f,p,"\u2323","\\smallsmile");i(l,f,p,"\u2322","\\smallfrown");i(l,f,p,"\u224F","\\bumpeq",!0);i(l,f,p,"\u224E","\\Bumpeq",!0);i(l,f,p,"\u2267","\\geqq",!0);i(l,f,p,"\u2A7E","\\geqslant",!0);i(l,f,p,"\u2A96","\\eqslantgtr",!0);i(l,f,p,"\u2273","\\gtrsim",!0);i(l,f,p,"\u2A86","\\gtrapprox",!0);i(l,f,C,"\u22D7","\\gtrdot");i(l,f,p,"\u22D9","\\ggg",!0);i(l,f,p,"\u2277","\\gtrless",!0);i(l,f,p,"\u22DB","\\gtreqless",!0);i(l,f,p,"\u2A8C","\\gtreqqless",!0);i(l,f,p,"\u2256","\\eqcirc",!0);i(l,f,p,"\u2257","\\circeq",!0);i(l,f,p,"\u225C","\\triangleq",!0);i(l,f,p,"\u223C","\\thicksim");i(l,f,p,"\u2248","\\thickapprox");i(l,f,p,"\u2AC6","\\supseteqq",!0);i(l,f,p,"\u22D1","\\Supset",!0);i(l,f,p,"\u2290","\\sqsupset",!0);i(l,f,p,"\u227D","\\succcurlyeq",!0);i(l,f,p,"\u22DF","\\curlyeqsucc",!0);i(l,f,p,"\u227F","\\succsim",!0);i(l,f,p,"\u2AB8","\\succapprox",!0);i(l,f,p,"\u22B3","\\vartriangleright");i(l,f,p,"\u22B5","\\trianglerighteq");i(l,f,p,"\u22A9","\\Vdash",!0);i(l,f,p,"\u2223","\\shortmid");i(l,f,p,"\u2225","\\shortparallel");i(l,f,p,"\u226C","\\between",!0);i(l,f,p,"\u22D4","\\pitchfork",!0);i(l,f,p,"\u221D","\\varpropto");i(l,f,p,"\u25C0","\\blacktriangleleft");i(l,f,p,"\u2234","\\therefore",!0);i(l,f,p,"\u220D","\\backepsilon");i(l,f,p,"\u25B6","\\blacktriangleright");i(l,f,p,"\u2235","\\because",!0);i(l,f,p,"\u22D8","\\llless");i(l,f,p,"\u22D9","\\gggtr");i(l,f,C,"\u22B2","\\lhd");i(l,f,C,"\u22B3","\\rhd");i(l,f,p,"\u2242","\\eqsim",!0);i(l,o,p,"\u22C8","\\Join");i(l,f,p,"\u2251","\\Doteq",!0);i(l,f,C,"\u2214","\\dotplus",!0);i(l,f,C,"\u2216","\\smallsetminus");i(l,f,C,"\u22D2","\\Cap",!0);i(l,f,C,"\u22D3","\\Cup",!0);i(l,f,C,"\u2A5E","\\doublebarwedge",!0);i(l,f,C,"\u229F","\\boxminus",!0);i(l,f,C,"\u229E","\\boxplus",!0);i(l,f,C,"\u22C7","\\divideontimes",!0);i(l,f,C,"\u22C9","\\ltimes",!0);i(l,f,C,"\u22CA","\\rtimes",!0);i(l,f,C,"\u22CB","\\leftthreetimes",!0);i(l,f,C,"\u22CC","\\rightthreetimes",!0);i(l,f,C,"\u22CF","\\curlywedge",!0);i(l,f,C,"\u22CE","\\curlyvee",!0);i(l,f,C,"\u229D","\\circleddash",!0);i(l,f,C,"\u229B","\\circledast",!0);i(l,f,C,"\u22C5","\\centerdot");i(l,f,C,"\u22BA","\\intercal",!0);i(l,f,C,"\u22D2","\\doublecap");i(l,f,C,"\u22D3","\\doublecup");i(l,f,C,"\u22A0","\\boxtimes",!0);i(l,f,p,"\u21E2","\\dashrightarrow",!0);i(l,f,p,"\u21E0","\\dashleftarrow",!0);i(l,f,p,"\u21C7","\\leftleftarrows",!0);i(l,f,p,"\u21C6","\\leftrightarrows",!0);i(l,f,p,"\u21DA","\\Lleftarrow",!0);i(l,f,p,"\u219E","\\twoheadleftarrow",!0);i(l,f,p,"\u21A2","\\leftarrowtail",!0);i(l,f,p,"\u21AB","\\looparrowleft",!0);i(l,f,p,"\u21CB","\\leftrightharpoons",!0);i(l,f,p,"\u21B6","\\curvearrowleft",!0);i(l,f,p,"\u21BA","\\circlearrowleft",!0);i(l,f,p,"\u21B0","\\Lsh",!0);i(l,f,p,"\u21C8","\\upuparrows",!0);i(l,f,p,"\u21BF","\\upharpoonleft",!0);i(l,f,p,"\u21C3","\\downharpoonleft",!0);i(l,o,p,"\u22B6","\\origof",!0);i(l,o,p,"\u22B7","\\imageof",!0);i(l,f,p,"\u22B8","\\multimap",!0);i(l,f,p,"\u21AD","\\leftrightsquigarrow",!0);i(l,f,p,"\u21C9","\\rightrightarrows",!0);i(l,f,p,"\u21C4","\\rightleftarrows",!0);i(l,f,p,"\u21A0","\\twoheadrightarrow",!0);i(l,f,p,"\u21A3","\\rightarrowtail",!0);i(l,f,p,"\u21AC","\\looparrowright",!0);i(l,f,p,"\u21B7","\\curvearrowright",!0);i(l,f,p,"\u21BB","\\circlearrowright",!0);i(l,f,p,"\u21B1","\\Rsh",!0);i(l,f,p,"\u21CA","\\downdownarrows",!0);i(l,f,p,"\u21BE","\\upharpoonright",!0);i(l,f,p,"\u21C2","\\downharpoonright",!0);i(l,f,p,"\u21DD","\\rightsquigarrow",!0);i(l,f,p,"\u21DD","\\leadsto");i(l,f,p,"\u21DB","\\Rrightarrow",!0);i(l,f,p,"\u21BE","\\restriction");i(l,o,g,"\u2018","`");i(l,o,g,"$","\\$");i(S,o,g,"$","\\$");i(S,o,g,"$","\\textdollar");i(l,o,g,"%","\\%");i(S,o,g,"%","\\%");i(l,o,g,"_","\\_");i(S,o,g,"_","\\_");i(S,o,g,"_","\\textunderscore");i(l,o,g,"\u2220","\\angle",!0);i(l,o,g,"\u221E","\\infty",!0);i(l,o,g,"\u2032","\\prime");i(l,o,g,"\u25B3","\\triangle");i(l,o,g,"\u0393","\\Gamma",!0);i(l,o,g,"\u0394","\\Delta",!0);i(l,o,g,"\u0398","\\Theta",!0);i(l,o,g,"\u039B","\\Lambda",!0);i(l,o,g,"\u039E","\\Xi",!0);i(l,o,g,"\u03A0","\\Pi",!0);i(l,o,g,"\u03A3","\\Sigma",!0);i(l,o,g,"\u03A5","\\Upsilon",!0);i(l,o,g,"\u03A6","\\Phi",!0);i(l,o,g,"\u03A8","\\Psi",!0);i(l,o,g,"\u03A9","\\Omega",!0);i(l,o,g,"A","\u0391");i(l,o,g,"B","\u0392");i(l,o,g,"E","\u0395");i(l,o,g,"Z","\u0396");i(l,o,g,"H","\u0397");i(l,o,g,"I","\u0399");i(l,o,g,"K","\u039A");i(l,o,g,"M","\u039C");i(l,o,g,"N","\u039D");i(l,o,g,"O","\u039F");i(l,o,g,"P","\u03A1");i(l,o,g,"T","\u03A4");i(l,o,g,"X","\u03A7");i(l,o,g,"\xAC","\\neg",!0);i(l,o,g,"\xAC","\\lnot");i(l,o,g,"\u22A4","\\top");i(l,o,g,"\u22A5","\\bot");i(l,o,g,"\u2205","\\emptyset");i(l,f,g,"\u2205","\\varnothing");i(l,o,R,"\u03B1","\\alpha",!0);i(l,o,R,"\u03B2","\\beta",!0);i(l,o,R,"\u03B3","\\gamma",!0);i(l,o,R,"\u03B4","\\delta",!0);i(l,o,R,"\u03F5","\\epsilon",!0);i(l,o,R,"\u03B6","\\zeta",!0);i(l,o,R,"\u03B7","\\eta",!0);i(l,o,R,"\u03B8","\\theta",!0);i(l,o,R,"\u03B9","\\iota",!0);i(l,o,R,"\u03BA","\\kappa",!0);i(l,o,R,"\u03BB","\\lambda",!0);i(l,o,R,"\u03BC","\\mu",!0);i(l,o,R,"\u03BD","\\nu",!0);i(l,o,R,"\u03BE","\\xi",!0);i(l,o,R,"\u03BF","\\omicron",!0);i(l,o,R,"\u03C0","\\pi",!0);i(l,o,R,"\u03C1","\\rho",!0);i(l,o,R,"\u03C3","\\sigma",!0);i(l,o,R,"\u03C4","\\tau",!0);i(l,o,R,"\u03C5","\\upsilon",!0);i(l,o,R,"\u03D5","\\phi",!0);i(l,o,R,"\u03C7","\\chi",!0);i(l,o,R,"\u03C8","\\psi",!0);i(l,o,R,"\u03C9","\\omega",!0);i(l,o,R,"\u03B5","\\varepsilon",!0);i(l,o,R,"\u03D1","\\vartheta",!0);i(l,o,R,"\u03D6","\\varpi",!0);i(l,o,R,"\u03F1","\\varrho",!0);i(l,o,R,"\u03C2","\\varsigma",!0);i(l,o,R,"\u03C6","\\varphi",!0);i(l,o,C,"\u2217","*",!0);i(l,o,C,"+","+");i(l,o,C,"\u2212","-",!0);i(l,o,C,"\u22C5","\\cdot",!0);i(l,o,C,"\u2218","\\circ",!0);i(l,o,C,"\xF7","\\div",!0);i(l,o,C,"\xB1","\\pm",!0);i(l,o,C,"\xD7","\\times",!0);i(l,o,C,"\u2229","\\cap",!0);i(l,o,C,"\u222A","\\cup",!0);i(l,o,C,"\u2216","\\setminus",!0);i(l,o,C,"\u2227","\\land");i(l,o,C,"\u2228","\\lor");i(l,o,C,"\u2227","\\wedge",!0);i(l,o,C,"\u2228","\\vee",!0);i(l,o,g,"\u221A","\\surd");i(l,o,f0,"\u27E8","\\langle",!0);i(l,o,f0,"\u2223","\\lvert");i(l,o,f0,"\u2225","\\lVert");i(l,o,l0,"?","?");i(l,o,l0,"!","!");i(l,o,l0,"\u27E9","\\rangle",!0);i(l,o,l0,"\u2223","\\rvert");i(l,o,l0,"\u2225","\\rVert");i(l,o,p,"=","=");i(l,o,p,":",":");i(l,o,p,"\u2248","\\approx",!0);i(l,o,p,"\u2245","\\cong",!0);i(l,o,p,"\u2265","\\ge");i(l,o,p,"\u2265","\\geq",!0);i(l,o,p,"\u2190","\\gets");i(l,o,p,">","\\gt",!0);i(l,o,p,"\u2208","\\in",!0);i(l,o,p,"\uE020","\\@not");i(l,o,p,"\u2282","\\subset",!0);i(l,o,p,"\u2283","\\supset",!0);i(l,o,p,"\u2286","\\subseteq",!0);i(l,o,p,"\u2287","\\supseteq",!0);i(l,f,p,"\u2288","\\nsubseteq",!0);i(l,f,p,"\u2289","\\nsupseteq",!0);i(l,o,p,"\u22A8","\\models");i(l,o,p,"\u2190","\\leftarrow",!0);i(l,o,p,"\u2264","\\le");i(l,o,p,"\u2264","\\leq",!0);i(l,o,p,"<","\\lt",!0);i(l,o,p,"\u2192","\\rightarrow",!0);i(l,o,p,"\u2192","\\to");i(l,f,p,"\u2271","\\ngeq",!0);i(l,f,p,"\u2270","\\nleq",!0);i(l,o,O0,"\xA0","\\ ");i(l,o,O0,"\xA0","\\space");i(l,o,O0,"\xA0","\\nobreakspace");i(S,o,O0,"\xA0","\\ ");i(S,o,O0,"\xA0"," ");i(S,o,O0,"\xA0","\\space");i(S,o,O0,"\xA0","\\nobreakspace");i(l,o,O0,null,"\\nobreak");i(l,o,O0,null,"\\allowbreak");i(l,o,Ve,",",",");i(l,o,Ve,";",";");i(l,f,C,"\u22BC","\\barwedge",!0);i(l,f,C,"\u22BB","\\veebar",!0);i(l,o,C,"\u2299","\\odot",!0);i(l,o,C,"\u2295","\\oplus",!0);i(l,o,C,"\u2297","\\otimes",!0);i(l,o,g,"\u2202","\\partial",!0);i(l,o,C,"\u2298","\\oslash",!0);i(l,f,C,"\u229A","\\circledcirc",!0);i(l,f,C,"\u22A1","\\boxdot",!0);i(l,o,C,"\u25B3","\\bigtriangleup");i(l,o,C,"\u25BD","\\bigtriangledown");i(l,o,C,"\u2020","\\dagger");i(l,o,C,"\u22C4","\\diamond");i(l,o,C,"\u22C6","\\star");i(l,o,C,"\u25C3","\\triangleleft");i(l,o,C,"\u25B9","\\triangleright");i(l,o,f0,"{","\\{");i(S,o,g,"{","\\{");i(S,o,g,"{","\\textbraceleft");i(l,o,l0,"}","\\}");i(S,o,g,"}","\\}");i(S,o,g,"}","\\textbraceright");i(l,o,f0,"{","\\lbrace");i(l,o,l0,"}","\\rbrace");i(l,o,f0,"[","\\lbrack",!0);i(S,o,g,"[","\\lbrack",!0);i(l,o,l0,"]","\\rbrack",!0);i(S,o,g,"]","\\rbrack",!0);i(l,o,f0,"(","\\lparen",!0);i(l,o,l0,")","\\rparen",!0);i(S,o,g,"<","\\textless",!0);i(S,o,g,">","\\textgreater",!0);i(l,o,f0,"\u230A","\\lfloor",!0);i(l,o,l0,"\u230B","\\rfloor",!0);i(l,o,f0,"\u2308","\\lceil",!0);i(l,o,l0,"\u2309","\\rceil",!0);i(l,o,g,"\\","\\backslash");i(l,o,g,"\u2223","|");i(l,o,g,"\u2223","\\vert");i(S,o,g,"|","\\textbar",!0);i(l,o,g,"\u2225","\\|");i(l,o,g,"\u2225","\\Vert");i(S,o,g,"\u2225","\\textbardbl");i(S,o,g,"~","\\textasciitilde");i(S,o,g,"\\","\\textbackslash");i(S,o,g,"^","\\textasciicircum");i(l,o,p,"\u2191","\\uparrow",!0);i(l,o,p,"\u21D1","\\Uparrow",!0);i(l,o,p,"\u2193","\\downarrow",!0);i(l,o,p,"\u21D3","\\Downarrow",!0);i(l,o,p,"\u2195","\\updownarrow",!0);i(l,o,p,"\u21D5","\\Updownarrow",!0);i(l,o,e0,"\u2210","\\coprod");i(l,o,e0,"\u22C1","\\bigvee");i(l,o,e0,"\u22C0","\\bigwedge");i(l,o,e0,"\u2A04","\\biguplus");i(l,o,e0,"\u22C2","\\bigcap");i(l,o,e0,"\u22C3","\\bigcup");i(l,o,e0,"\u222B","\\int");i(l,o,e0,"\u222B","\\intop");i(l,o,e0,"\u222C","\\iint");i(l,o,e0,"\u222D","\\iiint");i(l,o,e0,"\u220F","\\prod");i(l,o,e0,"\u2211","\\sum");i(l,o,e0,"\u2A02","\\bigotimes");i(l,o,e0,"\u2A01","\\bigoplus");i(l,o,e0,"\u2A00","\\bigodot");i(l,o,e0,"\u222E","\\oint");i(l,o,e0,"\u222F","\\oiint");i(l,o,e0,"\u2230","\\oiiint");i(l,o,e0,"\u2A06","\\bigsqcup");i(l,o,e0,"\u222B","\\smallint");i(S,o,ne,"\u2026","\\textellipsis");i(l,o,ne,"\u2026","\\mathellipsis");i(S,o,ne,"\u2026","\\ldots",!0);i(l,o,ne,"\u2026","\\ldots",!0);i(l,o,ne,"\u22EF","\\@cdots",!0);i(l,o,ne,"\u22F1","\\ddots",!0);i(l,o,g,"\u22EE","\\varvdots");i(S,o,g,"\u22EE","\\varvdots");i(l,o,j,"\u02CA","\\acute");i(l,o,j,"\u02CB","\\grave");i(l,o,j,"\xA8","\\ddot");i(l,o,j,"~","\\tilde");i(l,o,j,"\u02C9","\\bar");i(l,o,j,"\u02D8","\\breve");i(l,o,j,"\u02C7","\\check");i(l,o,j,"^","\\hat");i(l,o,j,"\u20D7","\\vec");i(l,o,j,"\u02D9","\\dot");i(l,o,j,"\u02DA","\\mathring");i(l,o,R,"\uE131","\\@imath");i(l,o,R,"\uE237","\\@jmath");i(l,o,g,"\u0131","\u0131");i(l,o,g,"\u0237","\u0237");i(S,o,g,"\u0131","\\i",!0);i(S,o,g,"\u0237","\\j",!0);i(S,o,g,"\xDF","\\ss",!0);i(S,o,g,"\xE6","\\ae",!0);i(S,o,g,"\u0153","\\oe",!0);i(S,o,g,"\xF8","\\o",!0);i(S,o,g,"\xC6","\\AE",!0);i(S,o,g,"\u0152","\\OE",!0);i(S,o,g,"\xD8","\\O",!0);i(S,o,j,"\u02CA","\\'");i(S,o,j,"\u02CB","\\`");i(S,o,j,"\u02C6","\\^");i(S,o,j,"\u02DC","\\~");i(S,o,j,"\u02C9","\\=");i(S,o,j,"\u02D8","\\u");i(S,o,j,"\u02D9","\\.");i(S,o,j,"\xB8","\\c");i(S,o,j,"\u02DA","\\r");i(S,o,j,"\u02C7","\\v");i(S,o,j,"\xA8",'\\"');i(S,o,j,"\u02DD","\\H");i(S,o,j,"\u25EF","\\textcircled");var Tr={"--":!0,"---":!0,"``":!0,"''":!0};i(S,o,g,"\u2013","--",!0);i(S,o,g,"\u2013","\\textendash");i(S,o,g,"\u2014","---",!0);i(S,o,g,"\u2014","\\textemdash");i(S,o,g,"\u2018","`",!0);i(S,o,g,"\u2018","\\textquoteleft");i(S,o,g,"\u2019","'",!0);i(S,o,g,"\u2019","\\textquoteright");i(S,o,g,"\u201C","``",!0);i(S,o,g,"\u201C","\\textquotedblleft");i(S,o,g,"\u201D","''",!0);i(S,o,g,"\u201D","\\textquotedblright");i(l,o,g,"\xB0","\\degree",!0);i(S,o,g,"\xB0","\\degree");i(S,o,g,"\xB0","\\textdegree",!0);i(l,o,g,"\xA3","\\pounds");i(l,o,g,"\xA3","\\mathsterling",!0);i(S,o,g,"\xA3","\\pounds");i(S,o,g,"\xA3","\\textsterling",!0);i(l,f,g,"\u2720","\\maltese");i(S,f,g,"\u2720","\\maltese");var Zt='0123456789/@."';for(ke=0;ke0)return x0(s,v,n,t,u.concat(b));if(c){var x,k;if(c==="boldsymbol"){var w=a1(s,n,t,u,a);x=w.fontName,k=[w.fontClass]}else h?(x=Cr[c].fontName,k=[c]):(x=Te(c,t.fontWeight,t.fontShape),k=[c,t.fontWeight,t.fontShape]);if(Ue(s,x,n).metrics)return x0(s,x,n,t,u.concat(k));if(Tr.hasOwnProperty(s)&&x.slice(0,10)==="Typewriter"){for(var A=[],B=0;B{if(V0(r.classes)!==V0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},"canCombine"),s1=d(r=>{for(var e=0;et&&(t=u.height),u.depth>a&&(a=u.depth),u.maxFontSize>n&&(n=u.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},"sizeElementFromChildren"),o0=d(function(e,t,a,n){var s=new j0(e,t,a,n);return zt(s),s},"makeSpan"),Br=d((r,e,t,a)=>new j0(r,e,t,a),"makeSvgSpan"),l1=d(function(e,t,a){var n=o0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=T(n.height),n.maxFontSize=1,n},"makeLineSpan"),u1=d(function(e,t,a,n){var s=new de(e,t,a,n);return zt(s),s},"makeAnchor"),Dr=d(function(e){var t=new W0(e);return zt(t),t},"makeFragment"),o1=d(function(e,t){return e instanceof W0?o0([],[e],t):e},"wrapFragment"),h1=d(function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,u=1;u{var t=o0(["mspace"],[],e),a=Q(r,e);return t.style.marginRight=T(a),t},"makeGlue"),Te=d(function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},"retrieveTextFontName"),Cr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Nr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},d1=d(function(e,t){var[a,n,s]=Nr[e],u=new z0(a),h=new w0([u],{width:T(n),height:T(s),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=Br(["overlay"],[h],t);return c.height=s,c.style.height=T(s),c.style.width=T(n),c},"staticSvg"),y={fontMap:Cr,makeSymbol:x0,mathsym:r1,makeSpan:o0,makeSvgSpan:Br,makeLineSpan:l1,makeAnchor:u1,makeFragment:Dr,wrapFragment:o1,makeVList:m1,makeOrd:n1,makeGlue:c1,staticSvg:d1,svgData:Nr,tryCombineChars:s1},J={number:3,unit:"mu"},$0={number:4,unit:"mu"},N0={number:5,unit:"mu"},f1={mord:{mop:J,mbin:$0,mrel:N0,minner:J},mop:{mord:J,mop:J,mrel:N0,minner:J},mbin:{mord:$0,mop:$0,mopen:$0,minner:$0},mrel:{mord:N0,mop:N0,mopen:N0,minner:N0},mopen:{},mclose:{mop:J,mbin:$0,mrel:N0,minner:J},mpunct:{mord:J,mop:J,mrel:N0,mopen:J,mclose:J,mpunct:J,minner:J},minner:{mord:J,mop:J,mbin:$0,mrel:N0,mopen:J,mpunct:J,minner:J}},p1={mord:{mop:J},mop:{mord:J,mop:J},mbin:{},mrel:{},mopen:{},mclose:{mop:J},mpunct:{},minner:{mop:J}},qr={},Fe={},He={};function D(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:u}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var N=B.classes[0],q=A.classes[0];N==="mbin"&&g1.includes(q)?B.classes[0]="mord":q==="mbin"&&v1.includes(N)&&(A.classes[0]="mord")},{node:x},k,w),Qt(s,(A,B)=>{var N=pt(B),q=pt(A),O=N&&q?A.hasClass("mtight")?p1[N][q]:f1[N][q]:null;if(O)return y.makeGlue(O,v)},{node:x},k,w),s},"buildExpression"),Qt=d(function r(e,t,a,n,s){n&&e.push(n);for(var u=0;uk=>{e.splice(x+1,0,k),u++})(u)}n&&e.pop()},"traverseNonSpaceNodes"),Rr=d(function(e){return e instanceof W0||e instanceof de||e instanceof j0&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),x1=d(function r(e,t){var a=Rr(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},"getOutermostNode"),pt=d(function(e,t){return e?(t&&(e=x1(e,t)),y1[e.classes[0]]||null):null},"getTypeOfDomTree"),pe=d(function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return E0(t.concat(a))},"makeNullDelimiter"),P=d(function(e,t,a){if(!e)return E0();if(Fe[e.type]){var n=Fe[e.type](e,t);if(a&&t.size!==a.size){n=E0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new z("Got group of unknown type: '"+e.type+"'")},"buildGroup");function Be(r,e){var t=E0(["base"],r,e),a=E0(["strut"]);return a.style.height=T(t.height+t.depth),t.depth&&(a.style.verticalAlign=T(-t.depth)),t.children.unshift(a),t}d(Be,"buildHTMLUnbreakable");function vt(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=r0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],u=[],h=0;h0&&(s.push(Be(u,e)),u=[]),s.push(a[h]));u.length>0&&s.push(Be(u,e));var v;t?(v=Be(r0(t,e,!0)),v.classes=["tag"],s.push(v)):n&&s.push(n);var b=E0(["katex-html"],s);if(b.setAttribute("aria-hidden","true"),v){var x=v.children[0];x.style.height=T(b.height+b.depth),b.depth&&(x.style.verticalAlign=T(-b.depth))}return b}d(vt,"buildHTML");function Er(r){return new W0(r)}d(Er,"newDocumentFragment");var i0=class{static{d(this,"MathNode")}constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=V0(this.classes));for(var a=0;a0&&(e+=' class ="'+V.escape(V0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}},g0=class{static{d(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return V.escape(this.toText())}toText(){return this.text}},gt=class{static{d(this,"SpaceNode")}constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",T(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},M={MathNode:i0,TextNode:g0,SpaceNode:gt,newDocumentFragment:Er},b0=d(function(e,t,a){return W[t][e]&&W[t][e].replace&&e.charCodeAt(0)!==55349&&!(Tr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=W[t][e].replace),new M.TextNode(e)},"makeText"),At=d(function(e){return e.length===1?e[0]:new M.MathNode("mrow",e)},"makeRow"),Tt=d(function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(["\\imath","\\jmath"].includes(s))return null;W[n][s]&&W[n][s].replace&&(s=W[n][s].replace);var u=y.fontMap[a].fontName;return Mt(s,u,n)?y.fontMap[a].variant:null},"getVariant");function tt(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof g0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof g0&&t.text===","}else return!1}d(tt,"isNumberPunctuation");var c0=d(function(e,t,a){if(e.length===1){var n=$(e[0],t);return a&&n instanceof i0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],u,h=0;h=1&&(u.type==="mn"||tt(u))){var v=c.children[0];v instanceof i0&&v.type==="mn"&&(v.children=[...u.children,...v.children],s.pop())}else if(u.type==="mi"&&u.children.length===1){var b=u.children[0];if(b instanceof g0&&b.text==="\u0338"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var x=c.children[0];x instanceof g0&&x.text.length>0&&(x.text=x.text.slice(0,1)+"\u0338"+x.text.slice(1),s.pop())}}}s.push(c),u=c}return s},"buildExpression"),U0=d(function(e,t,a){return At(c0(e,t,a))},"buildExpressionRow"),$=d(function(e,t){if(!e)return new M.MathNode("mrow");if(He[e.type]){var a=He[e.type](e,t);return a}else throw new z("Got group of unknown type: '"+e.type+"'")},"buildGroup");function _t(r,e,t,a,n){var s=c0(r,t),u;s.length===1&&s[0]instanceof i0&&["mrow","mtable"].includes(s[0].type)?u=s[0]:u=new M.MathNode("mrow",s);var h=new M.MathNode("annotation",[new M.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new M.MathNode("semantics",[u,h]),v=new M.MathNode("math",[c]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&v.setAttribute("display","block");var b=n?"katex":"katex-mathml";return y.makeSpan([b],[v])}d(_t,"buildMathML");var Ir=d(function(e){return new Ie({style:e.displayMode?E.DISPLAY:E.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),Or=d(function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=y.makeSpan(a,[e])}return e},"displayWrap"),w1=d(function(e,t,a){var n=Ir(a),s;if(a.output==="mathml")return _t(e,t,n,a.displayMode,!0);if(a.output==="html"){var u=vt(e,n);s=y.makeSpan(["katex"],[u])}else{var h=_t(e,t,n,a.displayMode,!1),c=vt(e,n);s=y.makeSpan(["katex"],[h,c])}return Or(s,a)},"buildTree"),k1=d(function(e,t,a){var n=Ir(a),s=vt(e,n),u=y.makeSpan(["katex"],[s]);return Or(u,a)},"buildHTMLTree"),S1={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},M1=d(function(e){var t=new M.MathNode("mo",[new M.TextNode(S1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},"mathMLnode"),z1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},A1=d(function(e){return e.type==="ordgroup"?e.body.length:1},"groupLength"),T1=d(function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(c)){var v=e,b=A1(v.base),x,k,w;if(b>5)c==="widehat"||c==="widecheck"?(x=420,h=2364,w=.42,k=c+"4"):(x=312,h=2340,w=.34,k="tilde4");else{var A=[1,1,2,2,3,3][b];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][A],x=[0,239,300,360,420][A],w=[0,.24,.3,.3,.36,.42][A],k=c+A):(h=[0,600,1033,2339,2340][A],x=[0,260,286,306,312][A],w=[0,.26,.286,.3,.306,.34][A],k="tilde"+A)}var B=new z0(k),N=new w0([B],{width:"100%",height:T(w),viewBox:"0 0 "+h+" "+x,preserveAspectRatio:"none"});return{span:y.makeSvgSpan([],[N],t),minWidth:0,height:w}}else{var q=[],O=z1[c],[F,U,L]=O,Y=L/1e3,G=F.length,Z,X;if(G===1){var D0=O[3];Z=["hide-tail"],X=[D0]}else if(G===2)Z=["halfarrow-left","halfarrow-right"],X=["xMinYMin","xMaxYMin"];else if(G===3)Z=["brace-left","brace-center","brace-right"],X=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+G+" children.");for(var n0=0;n00&&(n.style.minWidth=T(s)),n},"svgSpan"),B1=d(function(e,t,a,n,s){var u,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(u=y.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(u.style.borderColor=c)}}else{var v=[];/^[bx]cancel$/.test(t)&&v.push(new fe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&v.push(new fe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var b=new w0(v,{width:"100%",height:T(h)});u=y.makeSvgSpan([],[b],s)}return u.height=h,u.style.height=T(h),u},"encloseSpan"),I0={encloseSpan:B1,mathMLnode:M1,svgSpan:T1};function H(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}d(H,"assertNodeType");function Bt(r){var e=Ye(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}d(Bt,"assertSymbolNodeType");function Ye(r){return r&&(r.type==="atom"||e1.hasOwnProperty(r.type))?r:null}d(Ye,"checkSymbolNodeType");var Dt=d((r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=H(r.base,"accent"),t=a.base,r.base=t,n=Qa(P(r,e)),r.base=a):(a=H(r,"accent"),t=a.base);var s=P(t,e.havingCrampedStyle()),u=a.isShifty&&V.isCharacterBox(t),h=0;if(u){var c=V.getBaseElem(t),v=P(c,e.havingCrampedStyle());h=jt(v).skew}var b=a.label==="\\c",x=b?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),k;if(a.isStretchy)k=I0.svgSpan(a,e),k=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:k,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+T(2*h)+")",marginLeft:T(2*h)}:void 0}]},e);else{var w,A;a.label==="\\vec"?(w=y.staticSvg("vec",e),A=y.svgData.vec[1]):(w=y.makeOrd({mode:a.mode,text:a.label},e,"textord"),w=jt(w),w.italic=0,A=w.width,b&&(x+=w.depth)),k=y.makeSpan(["accent-body"],[w]);var B=a.label==="\\textcircled";B&&(k.classes.push("accent-full"),x=s.height);var N=h;B||(N-=A/2),k.style.left=T(N),a.label==="\\textcircled"&&(k.style.top=".2em"),k=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-x},{type:"elem",elem:k}]},e)}var q=y.makeSpan(["mord","accent"],[k],e);return n?(n.children[0]=q,n.height=Math.max(q.height,n.height),n.classes[0]="mord",n):q},"htmlBuilder$a"),Fr=d((r,e)=>{var t=r.isStretchy?I0.mathMLnode(r.label):new M.MathNode("mo",[b0(r.label,r.mode)]),a=new M.MathNode("mover",[$(r.base,e),t]);return a.setAttribute("accent","true"),a},"mathmlBuilder$9"),D1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));D({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:d((r,e)=>{var t=Le(e[0]),a=!D1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},"handler"),htmlBuilder:Dt,mathmlBuilder:Fr});D({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:d((r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},"handler"),htmlBuilder:Dt,mathmlBuilder:Fr});D({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},"handler"),htmlBuilder:d((r,e)=>{var t=P(r.base,e),a=I0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=y.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return y.makeSpan(["mord","accentunder"],[s],e)},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=I0.mathMLnode(r.label),a=new M.MathNode("munder",[$(r.base,e),t]);return a.setAttribute("accentunder","true"),a},"mathmlBuilder")});var De=d(r=>{var e=new M.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e},"paddedNode");D({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=y.wrapFragment(P(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var u;r.below&&(a=e.havingStyle(t.sub()),u=y.wrapFragment(P(r.below,a,e),e),u.classes.push(s+"-arrow-pad"));var h=I0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,v=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(v-=n.depth);var b;if(u){var x=-e.fontMetrics().axisHeight+u.height+.5*h.height+.111;b=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:v},{type:"elem",elem:h,shift:c},{type:"elem",elem:u,shift:x}]},e)}else b=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:v},{type:"elem",elem:h,shift:c}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),y.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(r,e){var t=I0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=De($(r.body,e));if(r.below){var s=De($(r.below,e));a=new M.MathNode("munderover",[t,s,n])}else a=new M.MathNode("mover",[t,n])}else if(r.below){var u=De($(r.below,e));a=new M.MathNode("munder",[t,u])}else a=De(),a=new M.MathNode("mover",[t,a]);return a}});var C1=y.makeSpan;function Hr(r,e){var t=r0(r.body,e,!0);return C1([r.mclass],t,e)}d(Hr,"htmlBuilder$9");function Lr(r,e){var t,a=c0(r.body,e);return r.mclass==="minner"?t=new M.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new M.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new M.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}d(Lr,"mathmlBuilder$8");D({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:_(n),isCharacterBox:V.isCharacterBox(n)}},htmlBuilder:Hr,mathmlBuilder:Lr});var Xe=d(r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"},"binrelClass");D({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Xe(e[0]),body:_(e[1]),isCharacterBox:V.isCharacterBox(e[1])}}});D({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],u;a!=="\\stackrel"?u=Xe(n):u="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:_(n)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:u,body:[c],isCharacterBox:V.isCharacterBox(c)}},htmlBuilder:Hr,mathmlBuilder:Lr});D({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Xe(e[0]),body:_(e[0])}},htmlBuilder(r,e){var t=r0(r.body,e,!0),a=y.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=c0(r.body,e),a=new M.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var N1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},er=d(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),tr=d(r=>r.type==="textord"&&r.text==="@","isStartOfArrow"),q1=d((r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e,"isLabelEnd");function R1(r,e,t){var a=N1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},u=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,u,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var v={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[v],[])}default:return{type:"textord",text:" ",mode:"math"}}}d(R1,"cdArrow");function E1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new z("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(v)>-1)for(var x=0;x<2;x++){for(var k=!0,w=c+1;wAV=|." after @',u[c]);var A=R1(v,b,r),B={type:"styling",body:[A],mode:"math",style:"display"};a.push(B),h=er()}s%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var N=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:N,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}d(E1,"parseCD");D({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=y.wrapFragment(P(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=T(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new M.MathNode("mrow",[$(r.label,e)]);return t=new M.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new M.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});D({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=y.wrapFragment(P(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new M.MathNode("mrow",[$(r.fragment,e)])}});D({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=H(e[0],"ordgroup"),n=a.body,s="",u=0;u=1114111)throw new z("\\@char with invalid code point "+s);return c<=65535?v=String.fromCharCode(c):(c-=65536,v=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:v}}});var Pr=d((r,e)=>{var t=r0(r.body,e.withColor(r.color),!1);return y.makeFragment(t)},"htmlBuilder$8"),Gr=d((r,e)=>{var t=c0(r.body,e.withColor(r.color)),a=new M.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a},"mathmlBuilder$7");D({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=H(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:_(n)}},htmlBuilder:Pr,mathmlBuilder:Gr});D({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=H(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Pr,mathmlBuilder:Gr});D({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&H(n,"size").value}},htmlBuilder(r,e){var t=y.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=T(Q(r.size,e)))),t},mathmlBuilder(r,e){var t=new M.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",T(Q(r.size,e)))),t}});var bt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Vr=d(r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new z("Expected a control sequence",r);return e},"checkControlSequence"),I1=d(r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},"getRHS"),Ur=d((r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)},"letCommand");D({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(bt[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=bt[a.text]),H(e.parseFunction(),"internal");throw new z("Invalid token after macro prefix",a)}});D({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new z("Expected a control sequence",a);for(var s=0,u,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){u=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new z('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new z('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new z("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return u&&c.unshift(u),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:h},t===bt[t]),{type:"internal",mode:e.mode}}});D({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Vr(e.gullet.popToken());e.gullet.consumeSpaces();var n=I1(e);return Ur(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});D({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Vr(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Ur(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var oe=d(function(e,t,a){var n=W.math[e]&&W.math[e].replace,s=Mt(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},"getMetrics"),Ct=d(function(e,t,a,n){var s=a.havingBaseStyle(t),u=y.makeSpan(n.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return u.height*=h,u.depth*=h,u.maxFontSize=s.sizeMultiplier,u},"styleWrap"),Yr=d(function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=T(s),e.height-=s,e.depth+=s},"centerSpan"),O1=d(function(e,t,a,n,s,u){var h=y.makeSymbol(e,"Main-Regular",s,n),c=Ct(h,t,n,u);return a&&Yr(c,n,t),c},"makeSmallDelim"),F1=d(function(e,t,a,n){return y.makeSymbol(e,"Size"+t+"-Regular",a,n)},"mathrmSize"),Xr=d(function(e,t,a,n,s,u){var h=F1(e,t,s,n),c=Ct(y.makeSpan(["delimsizing","size"+t],[h],n),E.TEXT,n,u);return a&&Yr(c,n,E.TEXT),c},"makeLargeDelim"),rt=d(function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=y.makeSpan(["delimsizinginner",n],[y.makeSpan([],[y.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},"makeGlyphSpan"),at=d(function(e,t,a){var n=M0["Size4-Regular"][e.charCodeAt(0)]?M0["Size4-Regular"][e.charCodeAt(0)][4]:M0["Size1-Regular"][e.charCodeAt(0)][4],s=new z0("inner",Ya(e,Math.round(1e3*t))),u=new w0([s],{width:T(n),height:T(t),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=y.makeSvgSpan([],[u],a);return h.height=t,h.style.height=T(t),h.style.width=T(n),{type:"elem",elem:h}},"makeInner"),yt=.008,Ce={type:"kern",size:-1*yt},H1=["|","\\lvert","\\rvert","\\vert"],L1=["\\|","\\lVert","\\rVert","\\Vert"],$r=d(function(e,t,a,n,s,u){var h,c,v,b,x="",k=0;h=v=b=e,c=null;var w="Size1-Regular";e==="\\uparrow"?v=b="\u23D0":e==="\\Uparrow"?v=b="\u2016":e==="\\downarrow"?h=v="\u23D0":e==="\\Downarrow"?h=v="\u2016":e==="\\updownarrow"?(h="\\uparrow",v="\u23D0",b="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",v="\u2016",b="\\Downarrow"):H1.includes(e)?(v="\u2223",x="vert",k=333):L1.includes(e)?(v="\u2225",x="doublevert",k=556):e==="["||e==="\\lbrack"?(h="\u23A1",v="\u23A2",b="\u23A3",w="Size4-Regular",x="lbrack",k=667):e==="]"||e==="\\rbrack"?(h="\u23A4",v="\u23A5",b="\u23A6",w="Size4-Regular",x="rbrack",k=667):e==="\\lfloor"||e==="\u230A"?(v=h="\u23A2",b="\u23A3",w="Size4-Regular",x="lfloor",k=667):e==="\\lceil"||e==="\u2308"?(h="\u23A1",v=b="\u23A2",w="Size4-Regular",x="lceil",k=667):e==="\\rfloor"||e==="\u230B"?(v=h="\u23A5",b="\u23A6",w="Size4-Regular",x="rfloor",k=667):e==="\\rceil"||e==="\u2309"?(h="\u23A4",v=b="\u23A5",w="Size4-Regular",x="rceil",k=667):e==="("||e==="\\lparen"?(h="\u239B",v="\u239C",b="\u239D",w="Size4-Regular",x="lparen",k=875):e===")"||e==="\\rparen"?(h="\u239E",v="\u239F",b="\u23A0",w="Size4-Regular",x="rparen",k=875):e==="\\{"||e==="\\lbrace"?(h="\u23A7",c="\u23A8",b="\u23A9",v="\u23AA",w="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="\u23AB",c="\u23AC",b="\u23AD",v="\u23AA",w="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(h="\u23A7",b="\u23A9",v="\u23AA",w="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(h="\u23AB",b="\u23AD",v="\u23AA",w="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(h="\u23A7",b="\u23AD",v="\u23AA",w="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(h="\u23AB",b="\u23A9",v="\u23AA",w="Size4-Regular");var A=oe(h,w,s),B=A.height+A.depth,N=oe(v,w,s),q=N.height+N.depth,O=oe(b,w,s),F=O.height+O.depth,U=0,L=1;if(c!==null){var Y=oe(c,w,s);U=Y.height+Y.depth,L=2}var G=B+F+U,Z=Math.max(0,Math.ceil((t-G)/(L*q))),X=G+Z*L*q,D0=n.fontMetrics().axisHeight;a&&(D0*=n.sizeMultiplier);var n0=X/2-D0,t0=[];if(x.length>0){var X0=X-B-F,u0=Math.round(X*1e3),y0=Xa(x,Math.round(X0*1e3)),F0=new z0(x,y0),K0=(k/1e3).toFixed(3)+"em",J0=(u0/1e3).toFixed(3)+"em",je=new w0([F0],{width:K0,height:J0,viewBox:"0 0 "+k+" "+u0}),H0=y.makeSvgSpan([],[je],n);H0.height=u0/1e3,H0.style.width=K0,H0.style.height=J0,t0.push({type:"elem",elem:H0})}else{if(t0.push(rt(b,w,s)),t0.push(Ce),c===null){var L0=X-B-F+2*yt;t0.push(at(v,L0,n))}else{var p0=(X-B-F-U)/2+2*yt;t0.push(at(v,p0,n)),t0.push(Ce),t0.push(rt(c,w,s)),t0.push(Ce),t0.push(at(v,p0,n))}t0.push(Ce),t0.push(rt(h,w,s))}var se=n.havingBaseStyle(E.TEXT),Ze=y.makeVList({positionType:"bottom",positionData:n0,children:t0},se);return Ct(y.makeSpan(["delimsizing","mult"],[Ze],se),E.TEXT,n,u)},"makeStackedDelim"),nt=80,it=.08,st=d(function(e,t,a,n,s){var u=Ua(e,n,a),h=new z0(e,u),c=new w0([h],{width:"400em",height:T(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return y.makeSvgSpan(["hide-tail"],[c],s)},"sqrtSvg"),P1=d(function(e,t){var a=t.havingBaseSizing(),n=Kr("\\surd",e*a.sizeMultiplier,Zr,a),s=a.sizeMultiplier,u=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,v=0,b=0,x;return n.type==="small"?(b=1e3+1e3*u+nt,e<1?s=1:e<1.4&&(s=.7),c=(1+u+it)/s,v=(1+u)/s,h=st("sqrtMain",c,b,u,t),h.style.minWidth="0.853em",x=.833/s):n.type==="large"?(b=(1e3+nt)*he[n.size],v=(he[n.size]+u)/s,c=(he[n.size]+u+it)/s,h=st("sqrtSize"+n.size,c,b,u,t),h.style.minWidth="1.02em",x=1/s):(c=e+u+it,v=e+u,b=Math.floor(1e3*e+u)+nt,h=st("sqrtTall",c,b,u,t),h.style.minWidth="0.742em",x=1.056),h.height=v,h.style.height=T(c),{span:h,advanceWidth:x,ruleWidth:(t.fontMetrics().sqrtRuleThickness+u)*s}},"makeSqrtImage"),Wr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],G1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],jr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],he=[0,1.2,1.8,2.4,3],V1=d(function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Wr.includes(e)||jr.includes(e))return Xr(e,t,!1,a,n,s);if(G1.includes(e))return $r(e,he[t],!1,a,n,s);throw new z("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),U1=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Y1=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"stack"}],Zr=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],X1=d(function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),Kr=d(function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),u=s;ut)return a[u]}return a[a.length-1]},"traverseSequence"),Jr=d(function(e,t,a,n,s,u){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var h;jr.includes(e)?h=U1:Wr.includes(e)?h=Zr:h=Y1;var c=Kr(e,t,h,n);return c.type==="small"?O1(e,c.style,a,n,s,u):c.type==="large"?Xr(e,c.size,a,n,s,u):$r(e,t,a,n,s,u)},"makeCustomSizedDelim"),$1=d(function(e,t,a,n,s,u){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,v=5/n.fontMetrics().ptPerEm,b=Math.max(t-h,a+h),x=Math.max(b/500*c,2*b-v);return Jr(e,x,!0,n,s,u)},"makeLeftRightDelim"),R0={sqrtImage:P1,sizedDelim:V1,sizeToMaxHeight:he,customSizedDelim:Jr,leftRightDelim:$1},rr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},W1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function $e(r,e){var t=Ye(r);if(t&&W1.includes(t.text))return t;throw t?new z("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new z("Invalid delimiter type '"+r.type+"'",r)}d($e,"checkDelimiter");D({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:d((r,e)=>{var t=$e(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:rr[r.funcName].size,mclass:rr[r.funcName].mclass,delim:t.text}},"handler"),htmlBuilder:d((r,e)=>r.delim==="."?y.makeSpan([r.mclass]):R0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),"htmlBuilder"),mathmlBuilder:d(r=>{var e=[];r.delim!=="."&&e.push(b0(r.delim,r.mode));var t=new M.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=T(R0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t},"mathmlBuilder")});function ar(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}d(ar,"assertParsed");D({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:d((r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new z("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:$e(e[0],r).text,color:t}},"handler")});D({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:d((r,e)=>{var t=$e(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=H(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},"handler"),htmlBuilder:d((r,e)=>{ar(r);for(var t=r0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,u=0;u{ar(r);var t=c0(r.body,e);if(r.left!=="."){var a=new M.MathNode("mo",[b0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new M.MathNode("mo",[b0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return At(t)},"mathmlBuilder")});D({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:d((r,e)=>{var t=$e(e[0],r);if(!r.parser.leftrightDepth)throw new z("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},"handler"),htmlBuilder:d((r,e)=>{var t;if(r.delim===".")t=pe(e,[]);else{t=R0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?b0("|","text"):b0(r.delim,r.mode),a=new M.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a},"mathmlBuilder")});var Nt=d((r,e)=>{var t=y.wrapFragment(P(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,u=0,h=V.isCharacterBox(r.body);if(a==="sout")s=y.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,u=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=Q({number:.6,unit:"pt"},e),v=Q({number:.35,unit:"ex"},e),b=e.havingBaseSizing();n=n/b.sizeMultiplier;var x=t.height+t.depth+c+v;t.style.paddingLeft=T(x/2+c);var k=Math.floor(1e3*x*n),w=Ga(k),A=new w0([new z0("phase",w)],{width:"400em",height:T(k/1e3),viewBox:"0 0 400000 "+k,preserveAspectRatio:"xMinYMin slice"});s=y.makeSvgSpan(["hide-tail"],[A],e),s.style.height=T(x),u=t.depth+c+v}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var B=0,N=0,q=0;/box/.test(a)?(q=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),B=e.fontMetrics().fboxsep+(a==="colorbox"?0:q),N=B):a==="angl"?(q=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),B=4*q,N=Math.max(0,.25-t.depth)):(B=h?.2:0,N=B),s=I0.encloseSpan(t,a,B,N,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=T(q)):a==="angl"&&q!==.049&&(s.style.borderTopWidth=T(q),s.style.borderRightWidth=T(q)),u=t.depth+N,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var O;if(r.backgroundColor)O=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:t,shift:0}]},e);else{var F=/cancel|phase/.test(a)?["svg-align"]:[];O=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:u,wrapperClasses:F}]},e)}return/cancel/.test(a)&&(O.height=t.height,O.depth=t.depth),/cancel/.test(a)&&!h?y.makeSpan(["mord","cancel-lap"],[O],e):y.makeSpan(["mord"],[O],e)},"htmlBuilder$7"),qt=d((r,e)=>{var t=0,a=new M.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[$(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a},"mathmlBuilder$6");D({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=H(e[0],"color-token").color,u=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:u}},htmlBuilder:Nt,mathmlBuilder:qt});D({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=H(e[0],"color-token").color,u=H(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:u,borderColor:s,body:h}},htmlBuilder:Nt,mathmlBuilder:qt});D({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});D({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:Nt,mathmlBuilder:qt});D({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Qr={};function A0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:u}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new z("{"+r.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext");function Rt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}d(Rt,"getAutoTag");function Y0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:u,colSeparationType:h,autoTag:c,singleRow:v,emptySingleRow:b,maxNumCols:x,leqno:k}=e;if(r.gullet.beginGroup(),v||r.gullet.macros.set("\\cr","\\\\\\relax"),!u){var w=r.gullet.expandMacroAsText("\\arraystretch");if(w==null)u=1;else if(u=parseFloat(w),!u||u<0)throw new z("Invalid \\arraystretch: "+w)}r.gullet.beginGroup();var A=[],B=[A],N=[],q=[],O=c!=null?[]:void 0;function F(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}d(F,"beginRow");function U(){O&&(r.gullet.macros.get("\\df@tag")?(O.push(r.subparse([new d0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):O.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(d(U,"endRow"),F(),q.push(nr(r));;){var L=r.parseExpression(!1,v?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),L={type:"ordgroup",mode:r.mode,body:L},t&&(L={type:"styling",mode:r.mode,style:t,body:[L]}),A.push(L);var Y=r.fetch().text;if(Y==="&"){if(x&&A.length===x){if(v||h)throw new z("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(Y==="\\end"){U(),A.length===1&&L.type==="styling"&&L.body[0].body.length===0&&(B.length>1||!b)&&B.pop(),q.length0&&(F+=.25),v.push({pos:F,isDashed:ye[xe]})}for(d(U,"setHLinePos"),U(u[0]),a=0;a0&&(n0+=O,Gye))for(a=0;a=h)){var _0=void 0;(n>0||e.hskipBeforeAndAfter)&&(_0=V.deflt(p0.pregap,k),_0!==0&&(y0=y.makeSpan(["arraycolsep"],[]),y0.style.width=T(_0),u0.push(y0)));var ee=[];for(a=0;a0){for(var ga=y.makeLineSpan("hline",t,b),ba=y.makeLineSpan("hdashline",t,b),Ke=[{type:"elem",elem:c,shift:0}];v.length>0;){var Vt=v.pop(),Ut=Vt.pos-t0;Vt.isDashed?Ke.push({type:"elem",elem:ba,shift:Ut}):Ke.push({type:"elem",elem:ga,shift:Ut})}c=y.makeVList({positionType:"individualShift",children:Ke},t)}if(K0.length===0)return y.makeSpan(["mord"],[c],t);var Je=y.makeVList({positionType:"individualShift",children:K0},t);return Je=y.makeSpan(["tag"],[Je],t),y.makeFragment([c,Je])},"htmlBuilder"),j1={c:"center ",l:"left ",r:"right "},B0=d(function(e,t){for(var a=[],n=new M.MathNode("mtd",[],["mtr-glue"]),s=new M.MathNode("mtd",[],["mml-eqn-num"]),u=0;u0){var A=e.cols,B="",N=!1,q=0,O=A.length;A[0].type==="separator"&&(k+="top ",q=1),A[A.length-1].type==="separator"&&(k+="bottom ",O-=1);for(var F=q;F0?"left ":"",k+=Z[Z.length-1].length>0?"right ":"";for(var X=1;X-1?"alignat":"align",s=e.envName==="split",u=Y0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:Rt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,v={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var b="",x=0;x0&&w&&(N=1),a[A]={type:"align",align:B,pregap:N,postgap:0}}return u.colSeparationType=w?"align":"alignat",u},"alignedHandler");A0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Ye(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(u){var h=Bt(u),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new z("Unknown column alignment: "+c,u)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Y0(r.parser,s,Et(r.envName))},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new z("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=Y0(r.parser,a,Et(r.envName)),u=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(u).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=Y0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Ye(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(u){var h=Bt(u),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new z("Unknown column alignment: "+c,u)});if(n.length>1)throw new z("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=Y0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new z("{subarray} can contain only one column");return s},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=Y0(r.parser,e,Et(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ea,htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){["gather","gather*"].includes(r.envName)&&We(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Rt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return Y0(r.parser,e,"display")},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ea,htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){We(r);var e={autoTag:Rt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return Y0(r.parser,e,"display")},htmlBuilder:T0,mathmlBuilder:B0});A0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return We(r),E1(r.parser)},htmlBuilder:T0,mathmlBuilder:B0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");D({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new z(r.funcName+" valid only within array environment")}});var ir=Qr;D({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new z("Invalid environment name",n);for(var s="",u=0;u{var t=r.font,a=e.withFont(t);return P(r.body,a)},"htmlBuilder$5"),ra=d((r,e)=>{var t=r.font,a=e.withFont(t);return $(r.body,a)},"mathmlBuilder$4"),sr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};D({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=Le(e[0]),s=a;return s in sr&&(s=sr[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},"handler"),htmlBuilder:ta,mathmlBuilder:ra});D({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:d((r,e)=>{var{parser:t}=r,a=e[0],n=V.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Xe(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}},"handler")});D({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:d((r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,u=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:s,font:h,body:{type:"ordgroup",mode:t.mode,body:u}}},"handler"),htmlBuilder:ta,mathmlBuilder:ra});var aa=d((r,e)=>{var t=e;return r==="display"?t=t.id>=E.SCRIPT.id?t.text():E.DISPLAY:r==="text"&&t.size===E.DISPLAY.size?t=E.TEXT:r==="script"?t=E.SCRIPT:r==="scriptscript"&&(t=E.SCRIPTSCRIPT),t},"adjustStyle"),It=d((r,e)=>{var t=aa(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var u=P(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;u.height=u.height0?A=3*k:A=7*k,B=e.fontMetrics().denom1):(x>0?(w=e.fontMetrics().num2,A=k):(w=e.fontMetrics().num3,A=3*k),B=e.fontMetrics().denom2);var N;if(b){var O=e.fontMetrics().axisHeight;w-u.depth-(O+.5*x){var t=new M.MathNode("mfrac",[$(r.numer,e),$(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=Q(r.barSize,e);t.setAttribute("linethickness",T(a))}var n=aa(r.size,e.style);if(n.size!==e.style.size){t=new M.MathNode("mstyle",[t]);var s=n.size===E.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var u=[];if(r.leftDelim!=null){var h=new M.MathNode("mo",[new M.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),u.push(h)}if(u.push(t),r.rightDelim!=null){var c=new M.MathNode("mo",[new M.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),u.push(c)}return At(u)}return t},"mathmlBuilder$3");D({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],u,h=null,c=null,v="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":u=!0;break;case"\\\\atopfrac":u=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":u=!1,h="(",c=")";break;case"\\\\bracefrac":u=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":u=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":v="display";break;case"\\tfrac":case"\\tbinom":v="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:u,leftDelim:h,rightDelim:c,size:v,barSize:null}},"handler"),htmlBuilder:It,mathmlBuilder:Ot});D({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")});D({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var lr=["display","text","script","scriptscript"],ur=d(function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t},"delimFromValue");D({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=Le(e[0]),u=s.type==="atom"&&s.family==="open"?ur(s.text):null,h=Le(e[1]),c=h.type==="atom"&&h.family==="close"?ur(h.text):null,v=H(e[2],"size"),b,x=null;v.isBlank?b=!0:(x=v.value,b=x.number>0);var k="auto",w=e[3];if(w.type==="ordgroup"){if(w.body.length>0){var A=H(w.body[0],"textord");k=lr[Number(A.text)]}}else w=H(w,"textord"),k=lr[Number(w.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:b,barSize:x,leftDelim:u,rightDelim:c,size:k}},htmlBuilder:It,mathmlBuilder:Ot});D({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:H(e[0],"size").value,token:n}}});D({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=Aa(H(e[1],"infix").size),u=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:u,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:It,mathmlBuilder:Ot});var na=d((r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?P(r.sup,e.havingStyle(t.sup()),e):P(r.sub,e.havingStyle(t.sub()),e),n=H(r.base,"horizBrace")):n=H(r,"horizBrace");var s=P(n.base,e.havingBaseStyle(E.DISPLAY)),u=I0.svgSpan(n,e),h;if(n.isOver?(h=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:u}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=y.makeVList({positionType:"bottom",positionData:s.depth+.1+u.height,children:[{type:"elem",elem:u},{type:"kern",size:.1},{type:"elem",elem:s}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=y.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=y.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return y.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},"htmlBuilder$3"),Z1=d((r,e)=>{var t=I0.mathMLnode(r.label);return new M.MathNode(r.isOver?"mover":"munder",[$(r.base,e),t])},"mathmlBuilder$2");D({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:na,mathmlBuilder:Z1});D({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:d((r,e)=>{var{parser:t}=r,a=e[1],n=H(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:_(a)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:d((r,e)=>{var t=r0(r.body,e,!1);return y.makeAnchor(r.href,[],t,e)},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=U0(r.body,e);return t instanceof i0||(t=new i0("mrow",[t])),t.setAttribute("href",r.href),t},"mathmlBuilder")});D({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:d((r,e)=>{var{parser:t}=r,a=H(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=H(e[0],"raw").string,u=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var v=s.split(","),b=0;b{var t=r0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=y.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},"htmlBuilder"),mathmlBuilder:d((r,e)=>U0(r.body,e),"mathmlBuilder")});D({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:d((r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:_(e[0]),mathml:_(e[1])}},"handler"),htmlBuilder:d((r,e)=>{var t=r0(r.html,e,!1);return y.makeFragment(t)},"htmlBuilder"),mathmlBuilder:d((r,e)=>U0(r.mathml,e),"mathmlBuilder")});var lt=d(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new z("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!Sr(a))throw new z("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a},"sizeData");D({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:d((r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},u={number:0,unit:"em"},h="";if(t[0])for(var c=H(t[0],"raw").string,v=c.split(","),b=0;b{var t=Q(r.height,e),a=0;r.totalheight.number>0&&(a=Q(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=Q(r.width,e));var s={height:T(t+a)};n>0&&(s.width=T(n)),a>0&&(s.verticalAlign=T(-a));var u=new dt(r.src,r.alt,s);return u.height=t,u.depth=a,u},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=new M.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=Q(r.height,e),n=0;if(r.totalheight.number>0&&(n=Q(r.totalheight,e)-a,t.setAttribute("valign",T(-n))),t.setAttribute("height",T(a+n)),r.width.number>0){var s=Q(r.width,e);t.setAttribute("width",T(s))}return t.setAttribute("src",r.src),t},"mathmlBuilder")});D({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=H(e[0],"size");if(t.settings.strict){var s=a[1]==="m",u=n.value.unit==="mu";s?(u||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):u&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return y.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=Q(r.dimension,e);return new M.SpaceNode(t)}});D({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},"handler"),htmlBuilder:d((r,e)=>{var t;r.alignment==="clap"?(t=y.makeSpan([],[P(r.body,e)]),t=y.makeSpan(["inner"],[t],e)):t=y.makeSpan(["inner"],[P(r.body,e)]);var a=y.makeSpan(["fix"],[]),n=y.makeSpan([r.alignment],[t,a],e),s=y.makeSpan(["strut"]);return s.style.height=T(n.height+n.depth),n.depth&&(s.style.verticalAlign=T(-n.depth)),n.children.unshift(s),n=y.makeSpan(["thinbox"],[n],e),y.makeSpan(["mord","vbox"],[n],e)},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=new M.MathNode("mpadded",[$(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t},"mathmlBuilder")});D({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",u=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:u}}});D({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new z("Mismatched "+r.funcName)}});var or=d((r,e)=>{switch(e.style.size){case E.DISPLAY.size:return r.display;case E.TEXT.size:return r.text;case E.SCRIPT.size:return r.script;case E.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}},"chooseMathStyle");D({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:d((r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:_(e[0]),text:_(e[1]),script:_(e[2]),scriptscript:_(e[3])}},"handler"),htmlBuilder:d((r,e)=>{var t=or(r,e),a=r0(t,e,!1);return y.makeFragment(a)},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=or(r,e);return U0(t,e)},"mathmlBuilder")});var ia=d((r,e,t,a,n,s,u)=>{r=y.makeSpan([],[r]);var h=t&&V.isCharacterBox(t),c,v;if(e){var b=P(e,a.havingStyle(n.sup()),a);v={elem:b,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-b.depth)}}if(t){var x=P(t,a.havingStyle(n.sub()),a);c={elem:x,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-x.height)}}var k;if(v&&c){var w=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+u;k=y.makeVList({positionType:"bottom",positionData:w,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:T(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var A=r.height-u;k=y.makeVList({positionType:"top",positionData:A,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(v){var B=r.depth+u;k=y.makeVList({positionType:"bottom",positionData:B,children:[{type:"elem",elem:r},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:T(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var N=[k];if(c&&s!==0&&!h){var q=y.makeSpan(["mspace"],[],a);q.style.marginRight=T(s),N.unshift(q)}return y.makeSpan(["mop","op-limits"],N,a)},"assembleSupSub"),sa=["\\smallint"],ie=d((r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"op"),n=!0):s=H(r,"op");var u=e.style,h=!1;u.size===E.DISPLAY.size&&s.symbol&&!sa.includes(s.name)&&(h=!0);var c;if(s.symbol){var v=h?"Size2-Regular":"Size1-Regular",b="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(b=s.name.slice(1),s.name=b==="oiint"?"\\iint":"\\iiint"),c=y.makeSymbol(s.name,v,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),b.length>0){var x=c.italic,k=y.staticSvg(b+"Size"+(h?"2":"1"),e);c=y.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:k,shift:h?.08:0}]},e),s.name="\\"+b,c.classes.unshift("mop"),c.italic=x}}else if(s.body){var w=r0(s.body,e,!0);w.length===1&&w[0]instanceof m0?(c=w[0],c.classes[0]="mop"):c=y.makeSpan(["mop"],w,e)}else{for(var A=[],B=1;B{var t;if(r.symbol)t=new i0("mo",[b0(r.name,r.mode)]),sa.includes(r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new i0("mo",c0(r.body,e));else{t=new i0("mi",[new g0(r.name.slice(1))]);var a=new i0("mo",[b0("\u2061","text")]);r.parentIsSupSub?t=new i0("mrow",[t,a]):t=Er([t,a])}return t},"mathmlBuilder$1"),K1={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};D({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=K1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},"handler"),htmlBuilder:ie,mathmlBuilder:ve});D({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:d((r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_(a)}},"handler"),htmlBuilder:ie,mathmlBuilder:ve});var J1={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};D({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ie,mathmlBuilder:ve});D({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ie,mathmlBuilder:ve});D({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=J1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ie,mathmlBuilder:ve});var la=d((r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"operatorname"),n=!0):s=H(r,"operatorname");var u;if(s.body.length>0){for(var h=s.body.map(x=>{var k=x.text;return typeof k=="string"?{type:"textord",mode:x.mode,text:k}:x}),c=r0(h,e.withFont("mathrm"),!0),v=0;v{for(var t=c0(r.body,e.withFont("mathrm")),a=!0,n=0;nb.toText()).join("");t=[new M.TextNode(h)]}var c=new M.MathNode("mi",t);c.setAttribute("mathvariant","normal");var v=new M.MathNode("mo",[b0("\u2061","text")]);return r.parentIsSupSub?new M.MathNode("mrow",[c,v]):M.newDocumentFragment([c,v])},"mathmlBuilder");D({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:d((r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:_(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:la,mathmlBuilder:Q1});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Z0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?y.makeFragment(r0(r.body,e,!1)):y.makeSpan(["mord"],r0(r.body,e,!0),e)},mathmlBuilder(r,e){return U0(r.body,e,!0)}});D({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle()),a=y.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return y.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new M.MathNode("mo",[new M.TextNode("\u203E")]);t.setAttribute("stretchy","true");var a=new M.MathNode("mover",[$(r.body,e),t]);return a.setAttribute("accent","true"),a}});D({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:d((r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:_(a)}},"handler"),htmlBuilder:d((r,e)=>{var t=r0(r.body,e.withPhantom(),!1);return y.makeFragment(t)},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=c0(r.body,e);return new M.MathNode("mphantom",t)},"mathmlBuilder")});D({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:d((r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},"handler"),htmlBuilder:d((r,e)=>{var t=y.makeSpan([],[P(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=c0(_(r.body),e),a=new M.MathNode("mphantom",t),n=new M.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n},"mathmlBuilder")});D({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:d((r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},"handler"),htmlBuilder:d((r,e)=>{var t=y.makeSpan(["inner"],[P(r.body,e.withPhantom())]),a=y.makeSpan(["fix"],[]);return y.makeSpan(["mord","rlap"],[t,a],e)},"htmlBuilder"),mathmlBuilder:d((r,e)=>{var t=c0(_(r.body),e),a=new M.MathNode("mphantom",t),n=new M.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n},"mathmlBuilder")});D({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=H(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=P(r.body,e),a=Q(r.dy,e);return y.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new M.MathNode("mpadded",[$(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});D({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});D({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=H(e[0],"size"),u=H(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&H(n,"size").value,width:s.value,height:u.value}},htmlBuilder(r,e){var t=y.makeSpan(["mord","rule"],[],e),a=Q(r.width,e),n=Q(r.height,e),s=r.shift?Q(r.shift,e):0;return t.style.borderRightWidth=T(a),t.style.borderTopWidth=T(n),t.style.bottom=T(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=Q(r.width,e),a=Q(r.height,e),n=r.shift?Q(r.shift,e):0,s=e.color&&e.getColor()||"black",u=new M.MathNode("mspace");u.setAttribute("mathbackground",s),u.setAttribute("width",T(t)),u.setAttribute("height",T(a));var h=new M.MathNode("mpadded",[u]);return n>=0?h.setAttribute("height",T(n)):(h.setAttribute("height",T(n)),h.setAttribute("depth",T(-n))),h.setAttribute("voffset",T(n)),h}});function ua(r,e,t){for(var a=r0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return ua(r.body,t,e)},"htmlBuilder");D({type:"sizing",names:hr,props:{numArgs:0,allowedInText:!0},handler:d((r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:hr.indexOf(a)+1,body:s}},"handler"),htmlBuilder:_1,mathmlBuilder:d((r,e)=>{var t=e.havingSize(r.size),a=c0(r.body,t),n=new M.MathNode("mstyle",a);return n.setAttribute("mathsize",T(t.sizeMultiplier)),n},"mathmlBuilder")});D({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:d((r,e,t)=>{var{parser:a}=r,n=!1,s=!1,u=t[0]&&H(t[0],"ordgroup");if(u)for(var h="",c=0;c{var t=y.makeSpan([],[P(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new M.MathNode("mpadded",[$(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t},"mathmlBuilder")});D({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=y.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+u&&(u=(u+x-t.height-t.depth)/2);var k=c.height-t.height-u-v;t.style.paddingLeft=T(b);var w=y.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+k)},{type:"elem",elem:c},{type:"kern",size:v}]},e);if(r.index){var A=e.havingStyle(E.SCRIPTSCRIPT),B=P(r.index,A,e),N=.6*(w.height-w.depth),q=y.makeVList({positionType:"shift",positionData:-N,children:[{type:"elem",elem:B}]},e),O=y.makeSpan(["root"],[q]);return y.makeSpan(["mord","sqrt"],[O,w],e)}else return y.makeSpan(["mord","sqrt"],[w],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new M.MathNode("mroot",[$(t,e),$(a,e)]):new M.MathNode("msqrt",[$(t,e)])}});var mr={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};D({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),u=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:u,body:s}},htmlBuilder(r,e){var t=mr[r.style],a=e.havingStyle(t).withFont("");return ua(r.body,a,e)},mathmlBuilder(r,e){var t=mr[r.style],a=e.havingStyle(t),n=c0(r.body,a),s=new M.MathNode("mstyle",n),u={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=u[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var e4=d(function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===E.DISPLAY.size||a.alwaysHandleSupSub);return n?ie:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===E.DISPLAY.size||a.limits);return s?la:null}else{if(a.type==="accent")return V.isCharacterBox(a.base)?Dt:null;if(a.type==="horizBrace"){var u=!e.sub;return u===a.isOver?na:null}else return null}else return null},"htmlBuilderDelegate");Z0({type:"supsub",htmlBuilder(r,e){var t=e4(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,u=P(a,e),h,c,v=e.fontMetrics(),b=0,x=0,k=a&&V.isCharacterBox(a);if(n){var w=e.havingStyle(e.style.sup());h=P(n,w,e),k||(b=u.height-w.fontMetrics().supDrop*w.sizeMultiplier/e.sizeMultiplier)}if(s){var A=e.havingStyle(e.style.sub());c=P(s,A,e),k||(x=u.depth+A.fontMetrics().subDrop*A.sizeMultiplier/e.sizeMultiplier)}var B;e.style===E.DISPLAY?B=v.sup1:e.style.cramped?B=v.sup3:B=v.sup2;var N=e.sizeMultiplier,q=T(.5/v.ptPerEm/N),O=null;if(c){var F=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(u instanceof m0||F)&&(O=T(-u.italic))}var U;if(h&&c){b=Math.max(b,B,h.depth+.25*v.xHeight),x=Math.max(x,v.sub2);var L=v.defaultRuleThickness,Y=4*L;if(b-h.depth-(c.height-x)0&&(b+=G,x-=G)}var Z=[{type:"elem",elem:c,shift:x,marginRight:q,marginLeft:O},{type:"elem",elem:h,shift:-b,marginRight:q}];U=y.makeVList({positionType:"individualShift",children:Z},e)}else if(c){x=Math.max(x,v.sub1,c.height-.8*v.xHeight);var X=[{type:"elem",elem:c,marginLeft:O,marginRight:q}];U=y.makeVList({positionType:"shift",positionData:x,children:X},e)}else if(h)b=Math.max(b,B,h.depth+.25*v.xHeight),U=y.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:h,marginRight:q}]},e);else throw new Error("supsub must have either sup or sub.");var D0=pt(u,"right")||"mord";return y.makeSpan([D0],[u,y.makeSpan(["msupsub"],[U])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[$(r.base,e)];r.sub&&s.push($(r.sub,e)),r.sup&&s.push($(r.sup,e));var u;if(t)u=a?"mover":"munder";else if(r.sub)if(r.sup){var v=r.base;v&&v.type==="op"&&v.limits&&e.style===E.DISPLAY||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(e.style===E.DISPLAY||v.limits)?u="munderover":u="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===E.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===E.DISPLAY)?u="munder":u="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===E.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===E.DISPLAY)?u="mover":u="msup"}return new M.MathNode(u,s)}});Z0({type:"atom",htmlBuilder(r,e){return y.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new M.MathNode("mo",[b0(r.text,r.mode)]);if(r.family==="bin"){var a=Tt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var oa={mi:"italic",mn:"normal",mtext:"normal"};Z0({type:"mathord",htmlBuilder(r,e){return y.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new M.MathNode("mi",[b0(r.text,r.mode,e)]),a=Tt(r,e)||"italic";return a!==oa[t.type]&&t.setAttribute("mathvariant",a),t}});Z0({type:"textord",htmlBuilder(r,e){return y.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=b0(r.text,r.mode,e),a=Tt(r,e)||"normal",n;return r.mode==="text"?n=new M.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new M.MathNode("mn",[t]):r.text==="\\prime"?n=new M.MathNode("mo",[t]):n=new M.MathNode("mi",[t]),a!==oa[n.type]&&n.setAttribute("mathvariant",a),n}});var ut={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ot={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Z0({type:"spacing",htmlBuilder(r,e){if(ot.hasOwnProperty(r.text)){var t=ot[r.text].className||"";if(r.mode==="text"){var a=y.makeOrd(r,e,"textord");return a.classes.push(t),a}else return y.makeSpan(["mspace",t],[y.mathsym(r.text,r.mode,e)],e)}else{if(ut.hasOwnProperty(r.text))return y.makeSpan(["mspace",ut[r.text]],[],e);throw new z('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(ot.hasOwnProperty(r.text))t=new M.MathNode("mtext",[new M.TextNode("\xA0")]);else{if(ut.hasOwnProperty(r.text))return new M.MathNode("mspace");throw new z('Unknown type of space "'+r.text+'"')}return t}});var cr=d(()=>{var r=new M.MathNode("mtd",[]);return r.setAttribute("width","50%"),r},"pad");Z0({type:"tag",mathmlBuilder(r,e){var t=new M.MathNode("mtable",[new M.MathNode("mtr",[cr(),new M.MathNode("mtd",[U0(r.body,e)]),cr(),new M.MathNode("mtd",[U0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var dr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},fr={"\\textbf":"textbf","\\textmd":"textmd"},t4={"\\textit":"textit","\\textup":"textup"},pr=d((r,e)=>{var t=r.font;if(t){if(dr[t])return e.withTextFontFamily(dr[t]);if(fr[t])return e.withTextFontWeight(fr[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(t4[t])},"optionsWithFont");D({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:_(n),font:a}},htmlBuilder(r,e){var t=pr(r,e),a=r0(r.body,t,!0);return y.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=pr(r,e);return U0(r.body,t)}});D({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=y.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=y.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return y.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new M.MathNode("mo",[new M.TextNode("\u203E")]);t.setAttribute("stretchy","true");var a=new M.MathNode("munder",[$(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});D({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return y.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new M.MathNode("mpadded",[$(r.body,e)],["vcenter"])}});D({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new z("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=vr(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"\u2423":"\xA0"),"makeVerb"),G0=qr,ha=`[ \r + ]`,r4="\\\\[a-zA-Z@]+",a4="\\\\[^\uD800-\uDFFF]",n4="("+r4+")"+ha+"*",i4=`\\\\( +|[ \r ]+ +?)[ \r ]*`,xt="[\u0300-\u036F]",s4=new RegExp(xt+"+$"),l4="("+ha+"+)|"+(i4+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(xt+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(xt+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+n4)+("|"+a4+")"),Pe=class{static{d(this,"Lexer")}constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(l4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new d0("EOF",new h0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new z("Unexpected character: '"+e[t]+"'",new d0(e[t],new h0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new d0(n,new h0(this,t,this.tokenRegex.lastIndex))}},wt=class{static{d(this,"Namespace")}constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new z("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},u4=_r;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var gr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new z("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=gr[e.text],a==null||a>=t)throw new z("Invalid base-"+t+" digit "+e.text);for(var n;(n=gr[r.future().text])!=null&&n{var n=r.consumeArg().tokens;if(n.length!==1)throw new z("\\newcommand's first argument must be a macro name");var s=n[0].text,u=r.isDefined(s);if(u&&!e)throw new z("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!u&&!t)throw new z("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var h=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var c="",v=r.expandNextToken();v.text!=="]"&&v.text!=="EOF";)c+=v.text,v=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new z("Invalid number of arguments: "+c);h=parseInt(c),n=r.consumeArg().tokens}return u&&a||r.macros.set(s,{tokens:n,numArgs:h}),""},"newcommand");m("\\newcommand",r=>Ft(r,!1,!0,!1));m("\\renewcommand",r=>Ft(r,!0,!1,!1));m("\\providecommand",r=>Ft(r,!0,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),G0[t],W.math[t],W.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");m("\u212C","\\mathscr{B}");m("\u2130","\\mathscr{E}");m("\u2131","\\mathscr{F}");m("\u210B","\\mathscr{H}");m("\u2110","\\mathscr{I}");m("\u2112","\\mathscr{L}");m("\u2133","\\mathscr{M}");m("\u211B","\\mathscr{R}");m("\u212D","\\mathfrak{C}");m("\u210C","\\mathfrak{H}");m("\u2128","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("\xB7","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");m("\\ne","\\neq");m("\u2260","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");m("\u2209","\\notin");m("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");m("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");m("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");m("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");m("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");m("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");m("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");m("\u27C2","\\perp");m("\u203C","\\mathclose{!\\mkern-0.8mu!}");m("\u220C","\\notni");m("\u231C","\\ulcorner");m("\u231D","\\urcorner");m("\u231E","\\llcorner");m("\u231F","\\lrcorner");m("\xA9","\\copyright");m("\xAE","\\textregistered");m("\uFE0F","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");m("\u22EE","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");m("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");m("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var br={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in br?e=br[t]:(t.slice(0,4)==="\\not"||t in W.math&&["bin","rel"].includes(W.math[t].group))&&(e="\\dotsb"),e});var Ht={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Ht?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Ht&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Ht?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new z("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ma=T(M0["Main-Regular"][84][1]-.7*M0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ma+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ma+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("\u2237","\\dblcolon");m("\u2239","\\eqcolon");m("\u2254","\\coloneqq");m("\u2255","\\eqqcolon");m("\u2A74","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");m("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");m("\\imath","\\html@mathml{\\@imath}{\u0131}");m("\\jmath","\\html@mathml{\\@jmath}{\u0237}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");m("\u27E6","\\llbracket");m("\u27E7","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");m("\u2983","\\lBrace");m("\u2984","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");m("\u29B5","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var ca=d(r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,u=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=d(x=>k=>{r&&(k.macros.set("|",u),n.length&&k.macros.set("\\|",h));var w=x;if(!x&&n.length){var A=k.future();A.text==="|"&&(k.popToken(),w=!0)}return{tokens:w?n:a,numArgs:0}},"midMacro");e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var v=e.consumeArg().tokens,b=e.expandTokens([...s,...v,...t]);return e.macros.endGroup(),{tokens:b.reverse(),numArgs:0}},"braketHelper");m("\\bra@ket",ca(!1));m("\\bra@set",ca(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var da={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},kt=class{static{d(this,"MacroExpander")}constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new wt(u4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new Pe(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new d0("EOF",a.loc)),this.pushTokens(n),new d0("",h0.range(t,a))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,u=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++u;else if(s.text==="}"){if(--u,u===-1)throw new z("Extra }",s)}else if(s.text==="EOF")throw new z("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((u===0||u===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(u!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new z("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new z("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new z("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,u=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new z("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...u[+c.text-1]);else throw new z("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new d0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var u=n.replace(/##/g,"");u.indexOf("#"+(s+1))!==-1;)++s;for(var h=new Pe(n,this.settings),c=[],v=h.lex();v.text!=="EOF";)c.push(v),v=h.lex();c.reverse();var b={tokens:c,numArgs:s};return b}return n}isDefined(e){return this.macros.has(e)||G0.hasOwnProperty(e)||W.math.hasOwnProperty(e)||W.text.hasOwnProperty(e)||da.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:G0.hasOwnProperty(e)&&!G0[e].primitive}},yr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ne=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),ht={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},xr={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Ge=class r{static{d(this,"Parser")}constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new kt(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new z("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new d0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(r.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&G0[n.text]&&G0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=W[this.mode][t].group,c=h0.range(e),v;if(_a.hasOwnProperty(h)){var b=h;v={type:"atom",mode:this.mode,family:b,loc:c,text:t}}else v={type:h,mode:this.mode,loc:c,text:t};u=v}else if(t.charCodeAt(0)>=128)this.settings.strict&&(kr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),u={type:"textord",mode:"text",loc:h0.range(e),text:t};else return null;if(this.consume(),s)for(var x=0;x"u"&&(f.yylloc={});var z=f.yylloc;r.push(z);var Se=f.options&&f.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(S){o.length=o.length-2*S,u.length=u.length-S,r.length=r.length-S}c(Ce,"popStack");function $e(){var S;return S=l.pop()||f.lex()||ne,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=n.symbols_[S]||S),S}c($e,"lex");for(var E,W,T,$,Oe,Y,C={},U,D,re,j;;){if(T=o[o.length-1],this.defaultActions[T]?$=this.defaultActions[T]:((E===null||typeof E>"u")&&(E=$e()),$=B[T]&&B[T][E]),typeof $>"u"||!$.length||!$[0]){var Z="";j=[];for(U in B[T])this.terminals_[U]&&U>Ee&&j.push("'"+this.terminals_[U]+"'");f.showPosition?Z="Parse error on line "+(P+1)+`: +`+f.showPosition()+` +Expecting `+j.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(P+1)+": Unexpected "+(E==ne?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:f.match,token:this.terminals_[E]||E,line:f.yylineno,loc:z,expected:j})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch($[0]){case 1:o.push(E),u.push(f.yytext),r.push(f.yylloc),o.push($[1]),E=null,W?(E=W,W=null):(te=f.yyleng,g=f.yytext,P=f.yylineno,z=f.yylloc,ie>0&&ie--);break;case 2:if(D=this.productions_[$[1]][1],C.$=u[u.length-D],C._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},Se&&(C._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(C,[g,te,P,v.yy,$[1],u,r].concat(xe)),typeof Y<"u")return Y;D&&(o=o.slice(0,-1*D*2),u=u.slice(0,-1*D),r=r.slice(0,-1*D)),o.push(this.productions_[$[1]][0]),u.push(C.$),r.push(C._$),re=B[o[o.length-2]][o[o.length-1]],o.push(re);break;case 3:return!0}}return!0},"parse")},ke=(function(){var _={EOF:1,parseError:c(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,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:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var l=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),o.length-1&&(this.yylineno-=o.length-1);var u=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:o?(o.length===l.length?this.yylloc.first_column:0)+l[l.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:c(function(s,n){var o,l,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),l=s[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in u)this[r]=u[r];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,o,l;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),r=0;rn[0].length)){if(n=o,l=r,this.options.backtrack_lexer){if(s=this.test_match(o,u[r]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[l]),s!==!1?s:!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:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,o,l,u){var r=u;switch(l){case 0:return n.getLogger().trace("Found comment",o.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",o.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),n.getLogger().trace("node end ...",o.yytext),"NODE_DEND";break;case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return n.getLogger().trace("Long description:",o.yytext),20;break;case 36:return n.getLogger().trace("Long description:",o.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\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:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return _})();G.lexer=ke;function H(){this.yy={}}return c(H,"Parser"),H.prototype=G,G.Parser=H,new H})();q.parser=q;var ue=q;var k=[];for(let t=0;t<256;++t)k.push((t+256).toString(16).slice(1));function me(t,e=0){return(k[t[e+0]]+k[t[e+1]]+k[t[e+2]]+k[t[e+3]]+"-"+k[t[e+4]]+k[t[e+5]]+"-"+k[t[e+6]]+k[t[e+7]]+"-"+k[t[e+8]]+k[t[e+9]]+"-"+k[t[e+10]]+k[t[e+11]]+k[t[e+12]]+k[t[e+13]]+k[t[e+14]]+k[t[e+15]]).toLowerCase()}c(me,"unsafeStringify");var De=new Uint8Array(16);function J(){return crypto.getRandomValues(De)}c(J,"rng");function Ne(t,e,a){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():_e(t,e,a)}c(Ne,"v4");function _e(t,e,a){t=t||{};let d=t.random??t.rng?.()??J();if(d.length<16)throw new Error("Random bytes length must be >= 16");if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,e){if(a=a||0,a<0||a+16>e.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[a+i]=d[i];return e}return me(d)}c(_e,"_v4");var K=Ne;var fe=12;var N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},V=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this),this.nodeType=N,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{c(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level0?this.nodes[0]:null}addNode(e,a,d,i){L.info("addNode",e,a,d,i);let h=!1;this.nodes.length===0?(this.baseLevel=e,e=0,h=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,h=!1);let m=M(),y=m.mindmap?.padding??O.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}let b={id:this.count++,nodeId:F(a,m),level:e,descr:F(d,m),type:i,children:[],width:m.mindmap?.maxNodeWidth??O.mindmap.maxNodeWidth,padding:y,isRoot:h},x=this.getParent(e);if(x)x.children.push(b),this.nodes.push(b);else if(h)this.nodes.push(b);else throw new Error(`There can be only one root. No parent could be found for ("${b.descr}")`)}getType(e,a){switch(L.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let a=M(),d=this.nodes[this.nodes.length-1];e.icon&&(d.icon=F(e.icon,a)),e.class&&(d.class=F(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(let[d,i]of e.children.entries()){let h=e.level===0?d%(fe-1):a;this.assignSections(i,h)}}flattenNodes(e,a){let d=M(),i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let h=i.join(" "),m=c(b=>{let w=(d.theme?.toLowerCase()??"").includes("redux");switch(b){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return w?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:m(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:h,cssStyles:[],look:d.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(let b of e.children)this.flattenNodes(b,a)}generateEdges(e,a){if(!e.children)return;let d=M();for(let i of e.children){let h="edge";i.section!==void 0&&(h+=` section-edge-${i.section}`);let m=e.level+1;h+=` edge-depth-${m}`;let y={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:d.look,classes:h,depth:e.level,section:i.section};a.push(y),this.generateEdges(i,a)}}getData(){let e=this.getMindmap(),a=M(),i=le().layout!==void 0,h=a;if(i||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};L.debug("getData: mindmapRoot",e,a),this.assignSections(e);let m=[],y=[];this.flattenNodes(e,m),this.generateEdges(e,y),L.debug(`getData: processed ${m.length} nodes and ${y.length} edges`);let b=new Map;for(let x of m)b.set(x.id,{shape:x.shape,width:x.width,height:x.height,padding:x.padding});return{nodes:m,edges:y,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(b),type:"mindmap",diagramId:"mindmap-"+K()}}getLogger(){return L}};var Le=c(async(t,e,a,d)=>{L.debug(`Rendering mindmap diagram +`+t);let i=d.db,h=i.getData(),m=de(e,h.config.securityLevel);if(h.type=d.type,h.layoutAlgorithm=pe(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,!i.getMindmap())return;h.nodes.forEach(p=>{p.shape==="rounded"?(p.radius=15,p.taper=15,p.stroke="none",p.width=0,p.padding=15):p.shape==="circle"?p.padding=10:p.shape==="rect"?(p.width=0,p.padding=10):p.shape==="hexagon"&&(p.width=0,p.height=0)}),await he(h,m);let{themeVariables:b}=ce(),{useGradient:x,gradientStart:w,gradientStop:I}=b;if(x&&w&&I){let p=m.attr("id"),R=m.append("defs").append("linearGradient").attr("id",`${p}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");R.append("stop").attr("offset","0%").attr("stop-color",w).attr("stop-opacity",1),R.append("stop").attr("offset","100%").attr("stop-color",I).attr("stop-opacity",1)}ge(m,h.config.mindmap?.padding??O.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??O.mindmap.useMaxWidth)},"draw"),ye={draw:Le};var we=c(t=>{let{theme:e,look:a}=t,d="";for(let i=0;i{let d="";for(let i=0;i{let{theme:e}=t,a=t.svgId,d=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return` + .edge { + stroke-width: 3; + } + ${we(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .section-root span { + color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + [data-look="neo"].mindmap-node { + filter: ${d}; + } + [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { + fill: ${e?.includes("redux")?t.mainBkg:t.git0}; + } + [data-look="neo"].mindmap-node.section-root .text-inner-tspan { + fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]}; + } + ${t.useGradient&&a&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,a,t.mainBkg):""} +`},"getStyles"),be=Te;var xt={get db(){return new V},renderer:ye,parser:ue,styles:be};export{xt as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/pieDiagram-CU6KROY3.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/pieDiagram-CU6KROY3.mjs new file mode 100644 index 00000000000..241bfa93f54 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/pieDiagram-CU6KROY3.mjs @@ -0,0 +1,30 @@ +import{a as Q}from"./chunk-JQRUD6KW.mjs";import{a as K}from"./chunk-2T2R6R2M.mjs";import"./chunk-UP6H54XL.mjs";import"./chunk-UXSXWOXI.mjs";import"./chunk-C62D2QBJ.mjs";import"./chunk-CEXFNPSA.mjs";import"./chunk-RERM46MO.mjs";import"./chunk-J5EP6P6S.mjs";import"./chunk-RLI5ZMPA.mjs";import"./chunk-2UTLFMKG.mjs";import"./chunk-RKZBBQEN.mjs";import{a as Y}from"./chunk-LRIF4GLE.mjs";import{n as H,o as J}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{O as W,S as _,T as z,U as L,V as I,W as N,X as q,Y as V,_ as U,j as M}from"./chunk-67TQ5CYL.mjs";import{F as w,I as Z,b as p,m as X}from"./chunk-7W6UQGC5.mjs";import"./chunk-KGYTTC2M.mjs";import"./chunk-4R4BOZG6.mjs";import{a as r}from"./chunk-AQ6EADP3.mjs";var ee=M.pie,C={sections:new Map,showData:!1,config:ee},D=C.sections,A=C.showData,ue=structuredClone(ee),Se=r(()=>structuredClone(ue),"getConfig"),he=r(()=>{D=new Map,A=C.showData,_()},"clear"),ye=r(({label:e,value:i})=>{if(i<0)throw new Error(`"${e}" has invalid value: ${i}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,i),p.debug(`added new section: ${e}, with value: ${i}`))},"addSection"),xe=r(()=>D,"getSections"),Pe=r(e=>{A=e},"setShowData"),we=r(()=>A,"getShowData"),u={getConfig:Se,clear:he,setDiagramTitle:q,getDiagramTitle:V,setAccTitle:z,getAccTitle:L,setAccDescription:I,getAccDescription:N,addSection:ye,getSections:xe,setShowData:Pe,getShowData:we};var Ce=r((e,i)=>{Q(e,i),i.setShowData(e.showData),e.sections.map(i.addSection)},"populateDb"),te={parse:r(async e=>{let i=await K("pie",e);p.debug(i),Ce(i,u)},"parse")};var Ae=r(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"),ie=Ae;var Te=r(e=>{let i=[...e.values()].reduce((n,s)=>n+s,0),T=[...e.entries()].map(([n,s])=>({label:n,value:s})).filter(n=>n.value/i*100>=1);return Z().value(n=>n.value).sort(null)(T)},"createPieArcs"),ve=r((e,i,T,v)=>{p.debug(`rendering pie chart +`+e);let n=v.db,s=U(),$=J(n.getConfig(),s.pie),b=40,a=18,d=4,c=450,m=c,S=Y(i),l=S.append("g");l.attr("transform","translate("+m/2+","+c/2+")");let{themeVariables:o}=s,[R]=H(o.pieOuterStrokeWidth);R??=2;let E=$.textPosition,f=Math.min(m,c)/2-b,oe=w().innerRadius(0).outerRadius(f),ne=w().innerRadius(f*E).outerRadius(f*E);l.append("circle").attr("cx",0).attr("cy",0).attr("r",f+R/2).attr("class","pieOuterCircle");let g=n.getSections(),ae=Te(g),se=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12],h=0;g.forEach(t=>{h+=t});let k=ae.filter(t=>(t.data.value/h*100).toFixed(0)!=="0"),y=X(se).domain([...g.keys()]);l.selectAll("mySlices").data(k).enter().append("path").attr("d",oe).attr("fill",t=>y(t.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(k).enter().append("text").text(t=>(t.data.value/h*100).toFixed(0)+"%").attr("transform",t=>"translate("+ne.centroid(t)+")").style("text-anchor","middle").attr("class","slice");let ce=l.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-(c-50)/2).attr("class","pieTitleText"),G=[...g.entries()].map(([t,P])=>({label:t,value:P})),x=l.selectAll(".legend").data(G).enter().append("g").attr("class","legend").attr("transform",(t,P)=>{let j=a+d,fe=j*G.length/2,ge=12*a,De=P*j-fe;return"translate("+ge+","+De+")"});x.append("rect").attr("width",a).attr("height",a).style("fill",t=>y(t.label)).style("stroke",t=>y(t.label)),x.append("text").attr("x",a+d).attr("y",a-d).text(t=>n.getShowData()?`${t.label} [${t.value}]`:t.label);let le=Math.max(...x.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0)),pe=m+b+a+d+le,B=ce.node()?.getBoundingClientRect().width??0,me=m/2-B/2,de=m/2+B/2,F=Math.min(0,me),O=Math.max(pe,de)-F;S.attr("viewBox",`${F} 0 ${O} ${c}`),W(S,c,O,$.useMaxWidth)},"draw"),re={draw:ve};var Ye={parser:te,db:u,renderer:re,styles:ie};export{Ye as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/quadrantDiagram-VICAPDV7.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/quadrantDiagram-VICAPDV7.mjs new file mode 100644 index 00000000000..593d058ca94 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/quadrantDiagram-VICAPDV7.mjs @@ -0,0 +1,7 @@ +import{A as re,O as se,S as oe,T as le,U as de,V as ue,W as ce,X as he,Y as vt,_ as xt,h as ne,j as D}from"./chunk-67TQ5CYL.mjs";import{b as lt,h as mt,o as Dt}from"./chunk-7W6UQGC5.mjs";import{a as r}from"./chunk-AQ6EADP3.mjs";var Et=(function(){var t=r(function(M,o,l,x){for(l=l||{},x=M.length;x--;l[M[x]]=o);return l},"o"),n=[1,3],f=[1,4],u=[1,5],c=[1,6],g=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],i=[55,56,57],P=[2,36],h=[1,37],T=[1,36],b=[1,38],m=[1,35],q=[1,43],p=[1,41],A=[1,45],dt=[1,14],ft=[1,23],pt=[1,18],gt=[1,19],ut=[1,20],kt=[1,21],ct=[1,22],a=[1,24],Bt=[1,25],wt=[1,26],It=[1,27],Ot=[1,28],Wt=[1,29],N=[1,32],R=[1,33],_=[1,34],F=[1,39],Q=[1,40],C=[1,42],L=[1,44],H=[1,63],U=[1,62],v=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Rt=[1,67],Ht=[1,68],Ut=[1,69],jt=[1,70],Xt=[1,71],Mt=[1,72],Yt=[1,73],Gt=[1,74],Kt=[1,75],Zt=[1,76],Jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],Z=[1,91],J=[1,92],$=[1,93],tt=[1,100],et=[1,94],at=[1,97],it=[1,95],nt=[1,96],rt=[1,98],st=[1,99],St=[1,103],$t=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],At={trace:r(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],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(o,l,x,d,k,e,ht){var s=e.length-1;switch(k){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],d.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:d.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:d.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:d.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:d.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:d.setXAxisLeftText(e[s-2]),d.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" \u27F6 ",d.setXAxisLeftText(e[s-1]);break;case 53:d.setXAxisLeftText(e[s]);break;case 54:d.setYAxisBottomText(e[s-2]),d.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" \u27F6 ",d.setYAxisBottomText(e[s-1]);break;case 56:d.setYAxisBottomText(e[s]);break;case 57:d.setQuadrant1Text(e[s]);break;case 58:d.setQuadrant2Text(e[s]);break;case 59:d.setQuadrant3Text(e[s]);break;case 60:d.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:u,56:c,57:g},{1:[3]},{18:n,26:8,27:2,28:f,55:u,56:c,57:g},{18:n,26:9,27:2,28:f,55:u,56:c,57:g},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(i,P,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:T,10:b,12:m,13:q,14:p,15:A,18:dt,25:ft,35:pt,37:gt,39:ut,41:kt,42:ct,48:a,50:Bt,51:wt,52:It,53:Ot,54:Wt,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),t(y,[2,34]),{27:46,55:u,56:c,57:g},t(i,[2,37]),t(i,P,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:h,5:T,10:b,12:m,13:q,14:p,15:A,18:dt,25:ft,35:pt,37:gt,39:ut,41:kt,42:ct,48:a,50:Bt,51:wt,52:It,53:Ot,54:Wt,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,39]),t(i,[2,40]),t(i,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(i,[2,45]),t(i,[2,46]),{18:[1,51]},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:52,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:53,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:54,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:55,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:56,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,10:b,12:m,13:q,14:p,15:A,43:57,58:31,60:N,61:R,63:_,64:F,65:Q,66:C,67:L},{4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,44:[1,58],47:[1,59],58:61,59:60,63:_,64:F,65:Q,66:C,67:L},t(v,[2,64]),t(v,[2,66]),t(v,[2,67]),t(v,[2,70]),t(v,[2,71]),t(v,[2,72]),t(v,[2,73]),t(v,[2,74]),t(v,[2,75]),t(v,[2,76]),t(v,[2,77]),t(v,[2,78]),t(v,[2,79]),t(v,[2,80]),t(v,[2,81]),t(y,[2,35]),t(i,[2,38]),t(i,[2,42]),t(i,[2,43]),t(i,[2,44]),{3:65,4:Nt,5:Rt,6:Ht,7:Ut,8:jt,9:Xt,10:Mt,11:Yt,12:Gt,13:Kt,14:Zt,15:Jt,21:64},t(i,[2,53],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,49:[1,78],63:_,64:F,65:Q,66:C,67:L}),t(i,[2,56],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,49:[1,79],63:_,64:F,65:Q,66:C,67:L}),t(i,[2,57],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,58],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,59],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,60],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(v,[2,65]),t(v,[2,82]),t(v,[2,83]),t(v,[2,84]),{3:83,4:Nt,5:Rt,6:Ht,7:Ut,8:jt,9:Xt,10:Mt,11:Yt,12:Gt,13:Kt,14:Zt,15:Jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(i,[2,52],{58:31,43:84,4:h,5:T,10:b,12:m,13:q,14:p,15:A,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,55],{58:31,43:85,4:h,5:T,10:b,12:m,13:q,14:p,15:A,60:N,61:R,63:_,64:F,65:Q,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:Z,5:J,6:$,8:tt,11:et,13:at,16:90,17:it,18:nt,19:rt,20:st,22:89,23:88},t(w,[2,24]),t(i,[2,51],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,54],{59:60,58:61,4:h,5:T,8:H,10:b,12:m,13:q,14:p,15:A,18:U,63:_,64:F,65:Q,66:C,67:L}),t(i,[2,47],{22:89,16:90,23:101,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st}),{46:[1,102]},t(i,[2,29],{10:St}),t($t,[2,27],{16:104,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(i,[2,49],{10:St}),t(i,[2,48],{22:89,16:90,23:105,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st}),{4:Z,5:J,6:$,8:tt,11:et,13:at,16:90,17:it,18:nt,19:rt,20:st,22:106},t(O,[2,26]),t(i,[2,50],{10:St}),t($t,[2,28],{16:104,4:Z,5:J,6:$,8:tt,11:et,13:at,17:it,18:nt,19:rt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(o,l){if(l.recoverable)this.trace(o);else{var x=new Error(o);throw x.hash=l,x}},"parseError"),parse:r(function(o){var l=this,x=[0],d=[],k=[null],e=[],ht=this.table,s="",yt=0,te=0,ee=0,be=2,ae=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),Y={yy:{}};for(var _t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_t)&&(Y.yy[_t]=this.yy[_t]);E.setInput(o,Y.yy),Y.yy.lexer=E,Y.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Ft=E.yylloc;e.push(Ft);var qe=E.options&&E.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Oe(I){x.length=x.length-2*I,k.length=k.length-I,e.length=e.length-I}r(Oe,"popStack");function ke(){var I;return I=d.pop()||E.lex()||ae,typeof I!="number"&&(I instanceof Array&&(d=I,I=d.pop()),I=l.symbols_[I]||I),I}r(ke,"lex");for(var V,Qt,G,W,We,Ct,ot={},Tt,j,ie,bt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((V===null||typeof V>"u")&&(V=ke()),W=ht[G]&&ht[G][V]),typeof W>"u"||!W.length||!W[0]){var Lt="";bt=[];for(Tt in ht[G])this.terminals_[Tt]&&Tt>be&&bt.push("'"+this.terminals_[Tt]+"'");E.showPosition?Lt="Parse error on line "+(yt+1)+`: +`+E.showPosition()+` +Expecting `+bt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":Lt="Parse error on line "+(yt+1)+": Unexpected "+(V==ae?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(Lt,{text:E.match,token:this.terminals_[V]||V,line:E.yylineno,loc:Ft,expected:bt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+V);switch(W[0]){case 1:x.push(V),k.push(E.yytext),e.push(E.yylloc),x.push(W[1]),V=null,Qt?(V=Qt,Qt=null):(te=E.yyleng,s=E.yytext,yt=E.yylineno,Ft=E.yylloc,ee>0&&ee--);break;case 2:if(j=this.productions_[W[1]][1],ot.$=k[k.length-j],ot._$={first_line:e[e.length-(j||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(j||1)].first_column,last_column:e[e.length-1].last_column},qe&&(ot._$.range=[e[e.length-(j||1)].range[0],e[e.length-1].range[1]]),Ct=this.performAction.apply(ot,[s,te,yt,Y.yy,W[1],k,e].concat(me)),typeof Ct<"u")return Ct;j&&(x=x.slice(0,-1*j*2),k=k.slice(0,-1*j),e=e.slice(0,-1*j)),x.push(this.productions_[W[1]][0]),k.push(ot.$),e.push(ot._$),ie=ht[x[x.length-2]][x[x.length-1]],x.push(ie);break;case 3:return!0}}return!0},"parse")},Te=(function(){var M={EOF:1,parseError:r(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:r(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:r(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:r(function(o){var l=o.length,x=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;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),x.length-1&&(this.yylineno-=x.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:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(o){this.unput(this.match.slice(o))},"less"),pastInput:r(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:r(function(o,l){var x,d,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))),d=o[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+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],x=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var e in k)this[e]=k[e];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,x,d;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),e=0;el[0].length)){if(l=x,d=e,this.options.backtrack_lexer){if(o=this.test_match(x,k[e]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,k[d]),o!==!1?o:!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:r(function(){var l=this.next();return l||this.lex()},"lex"),begin:r(function(l){this.conditionStack.push(l)},"begin"),popState:r(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:r(function(l){this.begin(l)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(l,x,d,k){var e=k;switch(d){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 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52: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,/^(?:[^\x00-\x7F]+)/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,52],inclusive:!0}}};return M})();At.lexer=Te;function Pt(){this.yy={}}return r(Pt,"Parser"),Pt.prototype=At,At.Parser=Pt,new Pt})();Et.parser=Et;var xe=Et;var B=ne(),qt=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{r(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:D.quadrantChart?.chartWidth||500,chartWidth:D.quadrantChart?.chartHeight||500,titlePadding:D.quadrantChart?.titlePadding||10,titleFontSize:D.quadrantChart?.titleFontSize||20,quadrantPadding:D.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:D.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:D.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:D.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:D.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:D.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:D.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:D.quadrantChart?.pointTextPadding||5,pointLabelFontSize:D.quadrantChart?.pointLabelFontSize||12,pointRadius:D.quadrantChart?.pointRadius||5,xAxisPosition:D.quadrantChart?.xAxisPosition||"top",yAxisPosition:D.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:D.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:D.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:B.quadrant1Fill,quadrant2Fill:B.quadrant2Fill,quadrant3Fill:B.quadrant3Fill,quadrant4Fill:B.quadrant4Fill,quadrant1TextFill:B.quadrant1TextFill,quadrant2TextFill:B.quadrant2TextFill,quadrant3TextFill:B.quadrant3TextFill,quadrant4TextFill:B.quadrant4TextFill,quadrantPointFill:B.quadrantPointFill,quadrantPointTextFill:B.quadrantPointTextFill,quadrantXAxisTextFill:B.quadrantXAxisTextFill,quadrantYAxisTextFill:B.quadrantYAxisTextFill,quadrantTitleFill:B.quadrantTitleFill,quadrantInternalBorderStrokeFill:B.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:B.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,lt.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,f){this.classes.set(n,f)}setConfig(n){lt.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){lt.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,f,u,c){let g=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&f?g:0,bottom:n==="bottom"&&f?g:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,i={left:this.config.yAxisPosition==="left"&&u?S:0,right:this.config.yAxisPosition==="right"&&u?S:0},P=this.config.titleFontSize+this.config.titlePadding*2,h={top:c?P:0},T=this.config.quadrantPadding+i.left,b=this.config.quadrantPadding+y.top+h.top,m=this.config.chartWidth-this.config.quadrantPadding*2-i.left-i.right,q=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-h.top,p=m/2,A=q/2;return{xAxisSpace:y,yAxisSpace:i,titleSpace:h,quadrantSpace:{quadrantLeft:T,quadrantTop:b,quadrantWidth:m,quadrantHalfWidth:p,quadrantHeight:q,quadrantHalfHeight:A}}}getAxisLabels(n,f,u,c){let{quadrantSpace:g,titleSpace:y}=c,{quadrantHalfHeight:S,quadrantHeight:i,quadrantLeft:P,quadrantHalfWidth:h,quadrantTop:T,quadrantWidth:b}=g,m=!!this.data.xAxisRightText,q=!!this.data.yAxisTopText,p=[];return this.data.xAxisLeftText&&f&&p.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:P+(m?h/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+i+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&f&&p.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:P+h+(m?h/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+i+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&u&&p.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+P+b+this.config.quadrantPadding,y:T+i-(q?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:q?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&u&&p.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+P+b+this.config.quadrantPadding,y:T+S-(q?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:q?"center":"left",horizontalPos:"top",rotation:-90}),p}getQuadrants(n){let{quadrantSpace:f}=n,{quadrantHalfHeight:u,quadrantLeft:c,quadrantHalfWidth:g,quadrantTop:y}=f,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:c+g,y,width:g,height:u,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:c,y,width:g,height:u,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:c,y:y+u,width:g,height:u,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:c+g,y:y+u,width:g,height:u,fill:this.themeConfig.quadrant4Fill}];for(let i of S)i.text.x=i.x+i.width/2,this.data.points.length===0?(i.text.y=i.y+i.height/2,i.text.horizontalPos="middle"):(i.text.y=i.y+this.config.quadrantTextTopPadding,i.text.horizontalPos="top");return S}getQuadrantPoints(n){let{quadrantSpace:f}=n,{quadrantHeight:u,quadrantLeft:c,quadrantTop:g,quadrantWidth:y}=f,S=Dt().domain([0,1]).range([c,y+c]),i=Dt().domain([0,1]).range([u+g,g]);return this.data.points.map(h=>{let T=this.classes.get(h.className);return T&&(h={...T,...h}),{x:S(h.x),y:i(h.y),fill:h.color??this.themeConfig.quadrantPointFill,radius:h.radius??this.config.pointRadius,text:{text:h.text,fill:this.themeConfig.quadrantPointTextFill,x:S(h.x),y:i(h.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:h.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:h.strokeWidth??"0px"}})}getBorders(n){let f=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantHeight:g,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:i,quadrantWidth:P}=u;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:i,x2:y+P+f,y2:i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+P,y1:i+f,x2:y+P,y2:i+g-f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:i+g,x2:y+P+f,y2:i+g},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:i+f,x2:y,y2:i+g-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:i+f,x2:y+S,y2:i+g-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+f,y1:i+c,x2:y+P-f,y2:i+c}]}getTitle(n){if(n)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 n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),f=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),u=this.config.showTitle&&!!this.data.titleText,c=this.data.points.length>0?"bottom":this.config.xAxisPosition,g=this.calculateSpace(c,n,f,u);return{points:this.getQuadrantPoints(g),quadrants:this.getQuadrants(g),axisLabels:this.getAxisLabels(c,n,f,g),borderLines:this.getBorders(g),title:this.getTitle(u)}}};var K=class extends Error{static{r(this,"InvalidStyleError")}constructor(n,f,u){super(`value for ${n} ${f} is invalid, please use a valid ${u}`),this.name="InvalidStyleError"}};function zt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}r(zt,"validateHexCode");function fe(t){return!/^\d+$/.test(t)}r(fe,"validateNumber");function pe(t){return!/^\d+px$/.test(t)}r(pe,"validateSizeInPixels");var Se=xt();function X(t){return re(t.trim(),Se)}r(X,"textSanitizer");var z=new qt;function Ae(t){z.setData({quadrant1Text:X(t.text)})}r(Ae,"setQuadrant1Text");function Pe(t){z.setData({quadrant2Text:X(t.text)})}r(Pe,"setQuadrant2Text");function _e(t){z.setData({quadrant3Text:X(t.text)})}r(_e,"setQuadrant3Text");function Fe(t){z.setData({quadrant4Text:X(t.text)})}r(Fe,"setQuadrant4Text");function Qe(t){z.setData({xAxisLeftText:X(t.text)})}r(Qe,"setXAxisLeftText");function Ce(t){z.setData({xAxisRightText:X(t.text)})}r(Ce,"setXAxisRightText");function Le(t){z.setData({yAxisTopText:X(t.text)})}r(Le,"setYAxisTopText");function ve(t){z.setData({yAxisBottomText:X(t.text)})}r(ve,"setYAxisBottomText");function Vt(t){let n={};for(let f of t){let[u,c]=f.trim().split(/\s*:\s*/);if(u==="radius"){if(fe(c))throw new K(u,c,"number");n.radius=parseInt(c)}else if(u==="color"){if(zt(c))throw new K(u,c,"hex code");n.color=c}else if(u==="stroke-color"){if(zt(c))throw new K(u,c,"hex code");n.strokeColor=c}else if(u==="stroke-width"){if(pe(c))throw new K(u,c,"number of pixels (eg. 10px)");n.strokeWidth=c}else throw new Error(`style named ${u} is not supported.`)}return n}r(Vt,"parseStyles");function De(t,n,f,u,c){let g=Vt(c);z.addPoints([{x:f,y:u,text:X(t.text),className:n,...g}])}r(De,"addPoint");function Ee(t,n){z.addClass(t,Vt(n))}r(Ee,"addClass");function ze(t){z.setConfig({chartWidth:t})}r(ze,"setWidth");function Ve(t){z.setConfig({chartHeight:t})}r(Ve,"setHeight");function Be(){let t=xt(),{themeVariables:n,quadrantChart:f}=t;return f&&z.setConfig(f),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:vt()}),z.build()}r(Be,"getQuadrantData");var we=r(function(){z.clear(),oe()},"clear"),ge={setWidth:ze,setHeight:Ve,setQuadrant1Text:Ae,setQuadrant2Text:Pe,setQuadrant3Text:_e,setQuadrant4Text:Fe,setXAxisLeftText:Qe,setXAxisRightText:Ce,setYAxisTopText:Le,setYAxisBottomText:ve,parseStyles:Vt,addPoint:De,addClass:Ee,getQuadrantData:Be,clear:we,setAccTitle:le,getAccTitle:de,setDiagramTitle:he,getDiagramTitle:vt,getAccDescription:ce,setAccDescription:ue};var Ie=r((t,n,f,u)=>{function c(a){return a==="top"?"hanging":"middle"}r(c,"getDominantBaseLine");function g(a){return a==="left"?"start":"middle"}r(g,"getTextAnchor");function y(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}r(y,"getTransformation");let S=xt();lt.debug(`Rendering quadrant chart +`+t);let i=S.securityLevel,P;i==="sandbox"&&(P=mt("#i"+n));let T=(i==="sandbox"?mt(P.nodes()[0].contentDocument.body):mt("body")).select(`[id="${n}"]`),b=T.append("g").attr("class","main"),m=S.quadrantChart?.chartWidth??500,q=S.quadrantChart?.chartHeight??500;se(T,q,m,S.quadrantChart?.useMaxWidth??!0),T.attr("viewBox","0 0 "+m+" "+q),u.db.setHeight(q),u.db.setWidth(m);let p=u.db.getQuadrantData(),A=b.append("g").attr("class","quadrants"),dt=b.append("g").attr("class","border"),ft=b.append("g").attr("class","data-points"),pt=b.append("g").attr("class","labels"),gt=b.append("g").attr("class","title");p.title&>.append("text").attr("x",0).attr("y",0).attr("fill",p.title.fill).attr("font-size",p.title.fontSize).attr("dominant-baseline",c(p.title.horizontalPos)).attr("text-anchor",g(p.title.verticalPos)).attr("transform",y(p.title)).text(p.title.text),p.borderLines&&dt.selectAll("line").data(p.borderLines).enter().append("line").attr("x1",a=>a.x1).attr("y1",a=>a.y1).attr("x2",a=>a.x2).attr("y2",a=>a.y2).style("stroke",a=>a.strokeFill).style("stroke-width",a=>a.strokeWidth);let ut=A.selectAll("g.quadrant").data(p.quadrants).enter().append("g").attr("class","quadrant");ut.append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill),ut.append("text").attr("x",0).attr("y",0).attr("fill",a=>a.text.fill).attr("font-size",a=>a.text.fontSize).attr("dominant-baseline",a=>c(a.text.horizontalPos)).attr("text-anchor",a=>g(a.text.verticalPos)).attr("transform",a=>y(a.text)).text(a=>a.text.text),pt.selectAll("g.label").data(p.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(a=>a.text).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>c(a.horizontalPos)).attr("text-anchor",a=>g(a.verticalPos)).attr("transform",a=>y(a));let ct=ft.selectAll("g.data-point").data(p.points).enter().append("g").attr("class","data-point");ct.append("circle").attr("cx",a=>a.x).attr("cy",a=>a.y).attr("r",a=>a.radius).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeColor).attr("stroke-width",a=>a.strokeWidth),ct.append("text").attr("x",0).attr("y",0).text(a=>a.text.text).attr("fill",a=>a.text.fill).attr("font-size",a=>a.text.fontSize).attr("dominant-baseline",a=>c(a.text.horizontalPos)).attr("text-anchor",a=>g(a.text.verticalPos)).attr("transform",a=>y(a.text))},"draw"),ye={draw:Ie};var xa={parser:xe,db:ge,renderer:ye,styles:r(()=>"","styles")};export{xa as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/requirementDiagram-JXO7QTGE.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/requirementDiagram-JXO7QTGE.mjs new file mode 100644 index 00000000000..f12e3abadf8 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/requirementDiagram-JXO7QTGE.mjs @@ -0,0 +1,84 @@ +import{a as et}from"./chunk-6764PJDD.mjs";import{a as st}from"./chunk-ZXARS5L4.mjs";import{b as tt,c as it}from"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import{p as Ze}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{S as Ke,T as je,U as We,V as Ge,W as ze,X as Xe,Y as Je,_ as de,t as Ae}from"./chunk-67TQ5CYL.mjs";import{b as pe}from"./chunk-7W6UQGC5.mjs";import{a as m,c as ut}from"./chunk-AQ6EADP3.mjs";var Ve=(function(){var e=m(function($,s,l,o){for(l=l||{},o=$.length;o--;l[$[o]]=s);return l},"o"),n=[1,3],u=[1,4],h=[1,5],r=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],f=[1,22],b=[2,7],R=[1,26],_=[1,27],I=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],D=[1,24],O=[1,31],w=[1,32],M=[1,30],g=[1,39],E=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Le=[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],be=[27,29],xe=[1,70],De=[1,71],Oe=[1,72],we=[1,73],Me=[1,74],Fe=[1,75],$e=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],ie=[1,86],se=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],ge=[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],Y=[63,64],Pe=[1,101],Ue=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[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],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],j=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],me=[1,115],_e={trace:m(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:m(function(s,l,o,i,p,t,fe){var c=t.length-1;switch(p){case 4:this.$=t[c].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=t[c].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(t[c-3],t[c-4]);break;case 22:i.addRequirement(t[c-5],t[c-6]),i.setClass([t[c-5]],t[c-3]);break;case 23:i.setNewReqId(t[c-2]);break;case 24:i.setNewReqText(t[c-2]);break;case 25:i.setNewReqRisk(t[c-2]);break;case 26:i.setNewReqVerifyMethod(t[c-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(t[c-3]);break;case 43:i.addElement(t[c-5]),i.setClass([t[c-5]],t[c-3]);break;case 44:i.setNewElementType(t[c-2]);break;case 45:i.setNewElementDocRef(t[c-2]);break;case 48:i.addRelationship(t[c-2],t[c],t[c-4]);break;case 49:i.addRelationship(t[c-2],t[c-4],t[c]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=t[c-2],i.defineClass(t[c-1],t[c]);break;case 58:i.setClass(t[c-1],t[c]);break;case 59:i.setClass([t[c-2]],t[c]);break;case 60:case 62:this.$=[t[c]];break;case 61:case 63:this.$=t[c-2].concat([t[c]]);break;case 64:this.$=t[c-2],i.setCssStyle(t[c-1],t[c]);break;case 65:this.$=[t[c]];break;case 66:t[c-2].push(t[c]),this.$=t[c-2];break;case 68:this.$=t[c-1]+t[c];break}},"anonymous"),table:[{3:1,4:2,6:n,9:u,11:h,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:u,11:h,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:n,9:u,11:h,13:r},{1:[2,2]},{4:17,5:f,7:13,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:f,7:42,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:43,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:44,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:45,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:46,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:47,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:48,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:49,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{4:17,5:f,7:50,8:b,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:_,23:I,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:D,72:O,74:w,77:M,89:g,90:E},{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(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:g,90:E},{30:63,33:62,75:P,89:g,90:E},{30:64,33:62,75:P,89:g,90:E},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Le,[2,81]),e(Le,[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(be,[2,79]),e(be,[2,80]),{27:[1,67],29:[1,68]},e(be,[2,85]),e(be,[2,86]),{62:69,65:xe,66:De,67:Oe,68:we,69:Me,70:Fe,71:$e},{62:77,65:xe,66:De,67:Oe,68:we,69:Me,70:Fe,71:$e},{30:78,33:62,75:P,89:g,90:E},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:ce},e(ge,[2,60]),e(ge,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:g,90:E},{5:[1,95]},{30:96,33:62,75:P,89:g,90:E},{5:[1,97]},{30:98,33:62,75:P,89:g,90:E},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:Pe}),{33:103,75:[1,102],89:g,90:E},e(Ue,[2,65],{79:104,75:Z,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:Pe}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:j,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:me},{27:[1,118],76:U},{33:119,89:g,90:E},{33:120,89:g,90:E},{75:Z,78:121,79:82,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:ce},e(ge,[2,61]),e(ge,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:j,40:W},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:me},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Ue,[2,66],{79:104,75:Z,80:ee,81:te,82:ie,83:se,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:g,90:E},{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(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:j,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:me},{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(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:j,40:W},{5:B,28:160,31:Q,34:H,36:K,38:j,40:W},{5:B,28:161,31:Q,34:H,36:K,38:j,40:W},{5:B,28:162,31:Q,34:H,36:K,38:j,40:W},{5:oe,40:he,56:163,57:ue,59:me},{5:oe,40:he,56:164,57:ue,59:me},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[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:m(function(s,l){if(l.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=l,o}},"parseError"),parse:m(function(s){var l=this,o=[0],i=[],p=[null],t=[],fe=this.table,c="",Ee=0,Ye=0,Be=0,lt=2,Qe=1,ct=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(G.yy[Ie]=this.yy[Ie]);y.setInput(s,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Te=y.yylloc;t.push(Te);var ot=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(S){o.length=o.length-2*S,p.length=p.length-S,t.length=t.length-S}m(dt,"popStack");function ht(){var S;return S=i.pop()||y.lex()||Qe,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}m(ht,"lex");for(var k,Ne,z,N,bt,qe,J={},Re,F,He,ye;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((k===null||typeof k>"u")&&(k=ht()),N=fe[z]&&fe[z][k]),typeof N>"u"||!N.length||!N[0]){var Ce="";ye=[];for(Re in fe[z])this.terminals_[Re]&&Re>lt&&ye.push("'"+this.terminals_[Re]+"'");y.showPosition?Ce="Parse error on line "+(Ee+1)+`: +`+y.showPosition()+` +Expecting `+ye.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Ce="Parse error on line "+(Ee+1)+": Unexpected "+(k==Qe?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Ce,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:Te,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+k);switch(N[0]){case 1:o.push(k),p.push(y.yytext),t.push(y.yylloc),o.push(N[1]),k=null,Ne?(k=Ne,Ne=null):(Ye=y.yyleng,c=y.yytext,Ee=y.yylineno,Te=y.yylloc,Be>0&&Be--);break;case 2:if(F=this.productions_[N[1]][1],J.$=p[p.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ot&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),qe=this.performAction.apply(J,[c,Ye,Ee,G.yy,N[1],p,t].concat(ct)),typeof qe<"u")return qe;F&&(o=o.slice(0,-1*F*2),p=p.slice(0,-1*F),t=t.slice(0,-1*F)),o.push(this.productions_[N[1]][0]),p.push(J.$),t.push(J._$),He=fe[o[o.length-2]][o[o.length-1]],o.push(He);break;case 3:return!0}}return!0},"parse")},at=(function(){var $={EOF:1,parseError:m(function(l,o){if(this.yy.parser)this.yy.parser.parseError(l,o);else throw new Error(l)},"parseError"),setInput:m(function(s,l){return this.yy=l||this.yy||{},this._input=s,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:m(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:m(function(s){var l=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var i=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),o.length-1&&(this.yylineno-=o.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:o?(o.length===i.length?this.yylloc.first_column:0)+i[i.length-o.length].length-o[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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:m(function(s){this.unput(this.match.slice(s))},"less"),pastInput:m(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:m(function(s,l){var o,i,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))),i=s[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,l,o,i;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;tl[0].length)){if(l=o,i=t,this.options.backtrack_lexer){if(s=this.test_match(o,p[t]),s!==!1)return s;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(s=this.test_match(l,p[i]),s!==!1?s:!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:m(function(){var l=this.next();return l||this.lex()},"lex"),begin:m(function(l){this.conditionStack.push(l)},"begin"),popState:m(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(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:m(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:m(function(l){this.begin(l)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:m(function(l,o,i,p){var t=p;switch(i){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 o.yytext=o.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 $})();_e.lexer=at;function Se(){this.yy={}}return m(Se,"Parser"),Se.prototype=_e,_e.Parser=Se,new Se})();Ve.parser=Ve;var rt=Ve;var ke=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=je;this.getAccTitle=We;this.setAccDescription=Ge;this.getAccDescription=ze;this.setDiagramTitle=Xe;this.getDiagramTitle=Je;this.getConfig=m(()=>de().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{m(this,"RequirementDB")}getDirection(){return this.direction}setDirection(n){this.direction=n}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(n,u){return this.requirements.has(n)||this.requirements.set(n,{name:n,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(n)}getRequirements(){return this.requirements}setNewReqId(n){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=n)}setNewReqText(n){this.latestRequirement!==void 0&&(this.latestRequirement.text=n)}setNewReqRisk(n){this.latestRequirement!==void 0&&(this.latestRequirement.risk=n)}setNewReqVerifyMethod(n){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=n)}addElement(n){return this.elements.has(n)||(this.elements.set(n,{name:n,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),pe.info("Added new element: ",n)),this.resetLatestElement(),this.elements.get(n)}getElements(){return this.elements}setNewElementType(n){this.latestElement!==void 0&&(this.latestElement.type=n)}setNewElementDocRef(n){this.latestElement!==void 0&&(this.latestElement.docRef=n)}addRelationship(n,u,h){this.relations.push({type:n,src:u,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ke()}setCssStyle(n,u){for(let h of n){let r=this.requirements.get(h)??this.elements.get(h);if(!u||!r)return;for(let a of u)a.includes(",")?r.cssStyles.push(...a.split(",")):r.cssStyles.push(a)}}setClass(n,u){for(let h of n){let r=this.requirements.get(h)??this.elements.get(h);if(r)for(let a of u){r.classes.push(a);let f=this.classes.get(a)?.styles;f&&r.cssStyles.push(...f)}}}defineClass(n,u){for(let h of n){let r=this.classes.get(h);r===void 0&&(r={id:h,styles:[],textStyles:[]},this.classes.set(h,r)),u&&u.forEach(function(a){if(/color/.exec(a)){let f=a.replace("fill","bgFill");r.textStyles.push(f)}r.styles.push(a)}),this.requirements.forEach(a=>{a.classes.includes(h)&&a.cssStyles.push(...u.flatMap(f=>f.split(",")))}),this.elements.forEach(a=>{a.classes.includes(h)&&a.cssStyles.push(...u.flatMap(f=>f.split(",")))})}}getClasses(){return this.classes}getData(){let n=de(),u=[],h=[];for(let r of this.requirements.values()){let a=r;a.id=r.name,a.cssStyles=r.cssStyles,a.cssClasses=r.classes.join(" "),a.shape="requirementBox",a.look=n.look,a.colorIndex=u.length,u.push(a)}for(let r of this.elements.values()){let a=r;a.shape="requirementBox",a.look=n.look,a.id=r.name,a.cssStyles=r.cssStyles,a.cssClasses=r.classes.join(" "),a.colorIndex=u.length,u.push(a)}for(let r of this.relations){let a=0,f=r.type===this.Relationships.CONTAINS,b={id:`${r.src}-${r.dst}-${a}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",f?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:f?"normal":"dashed",arrowTypeStart:f?"requirement_contains":"",arrowTypeEnd:f?"":"requirement_arrow",look:n.look,labelType:"markdown"};h.push(b),a++}return{nodes:u,edges:h,other:{},config:n,direction:this.getDirection()}}};var mt=m(e=>{let n=Ae(),{themeVariables:u,look:h}=n,{bkgColorArray:r,borderColorArray:a}=u;if(!a?.length)return"";let f="";for(let b=0;b{let n=Ae(),{look:u,themeVariables:h}=n,{requirementEdgeLabelBackground:r}=h;return` + ${mt(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: ${u==="neo"?e.strokeWidth:"1px"}; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${e.edgeLabelBackground}; + } + .edgeLabel .label text { + 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: ${r??e.edgeLabelBackground}; + } + +`},"getStyles"),nt=ft;var ve={};ut(ve,{draw:()=>pt});var pt=m(async function(e,n,u,h){pe.info("REF0:"),pe.info("Drawing requirement diagram (unified)",n);let{securityLevel:r,state:a,layout:f,look:b}=de(),R=h.db.getData(),_=et(n,r);R.type=h.type,R.layoutAlgorithm=it(f),R.nodeSpacing=a?.nodeSpacing??50,R.rankSpacing=a?.rankSpacing??50,R.markers=b==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=n,await tt(R,_);let I=8;Ze.insertTitle(_,"requirementDiagramTitleText",a?.titleTopMargin??25,h.db.getDiagramTitle()),st(_,I,"requirementDiagram",a?.useMaxWidth??!0)},"draw");var Mt={parser:rt,get db(){return new ke},renderer:ve,styles:nt};export{Mt as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/sequenceDiagram-VS2MUI6T.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/sequenceDiagram-VS2MUI6T.mjs new file mode 100644 index 00000000000..386204e348d --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/sequenceDiagram-VS2MUI6T.mjs @@ -0,0 +1,162 @@ +import{a as tr}from"./chunk-T5OCTHI4.mjs";import{a as $e,b as je}from"./chunk-7FYTHRHK.mjs";import{a as Je,b as Ze,d as Kt,e as Ft,f as lt,g as Pt}from"./chunk-LII3EMHJ.mjs";import{c as Qe,n as ae,p as X}from"./chunk-QA3QBVWF.mjs";import{a as xr}from"./chunk-KNLZD3CH.mjs";import{$ as Xe,A as St,B as We,D as Q,E as mt,F as re,G as k,O as Ke,S as Fe,T as se,U as qe,V as He,W as ze,X as Ue,Y as Ge,_ as $,a as Ye,t as wt}from"./chunk-67TQ5CYL.mjs";import{b as j,h as kt}from"./chunk-7W6UQGC5.mjs";import{a as x,d as gr}from"./chunk-AQ6EADP3.mjs";var ne=(function(){var e=x(function(ut,w,C,P){for(C=C||{},P=ut.length;P--;C[ut[P]]=w);return C},"o"),t=[1,2],s=[1,3],r=[1,4],n=[2,4],i=[1,9],a=[1,11],l=[1,12],E=[1,14],h=[1,15],c=[1,17],_=[1,18],u=[1,19],y=[1,25],T=[1,26],f=[1,27],g=[1,28],b=[1,29],R=[1,30],O=[1,31],A=[1,32],N=[1,33],S=[1,34],V=[1,35],v=[1,36],H=[1,37],U=[1,38],G=[1,39],J=[1,40],et=[1,42],z=[1,43],at=[1,44],rt=[1,45],nt=[1,46],Y=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Bt=[1,74],L=[1,80],D=[1,81],dt=[1,82],st=[1,83],W=[1,84],he=[1,85],pe=[1,86],Te=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],ge=[1,91],xe=[1,92],_e=[1,93],be=[1,94],me=[1,95],Ie=[1,96],ye=[1,97],Re=[1,98],Oe=[1,99],Le=[1,100],Ne=[1,101],Ae=[1,102],we=[1,103],Se=[1,104],ke=[1,105],Pe=[2,78],Nt=[4,5,17,51,53,54],Vt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],De=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Xt=[5,52],F=[70,71,72,73],ot=[1,151],Jt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement: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:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,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],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(w,C,P,m,q,o,At){var p=o.length-1;switch(q){case 3:return m.apply(o[p]),o[p];break;case 4:case 10:this.$=[];break;case 5:case 11:o[p-1].push(o[p]),this.$=o[p-1];break;case 6:case 7:case 12:case 13:this.$=o[p];break;case 8:case 9:case 14:this.$=[];break;case 16:o[p].type="createParticipant",this.$=o[p];break;case 17:o[p-1].unshift({type:"boxStart",boxData:m.parseBoxData(o[p-2])}),o[p-1].push({type:"boxEnd",boxText:o[p-2]}),this.$=o[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[p-2]),sequenceIndexStep:Number(o[p-1]),sequenceVisible:!0,signalType:m.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:m.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:m.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:m.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:m.LINETYPE.ACTIVE_START,actor:o[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:m.LINETYPE.ACTIVE_END,actor:o[p-1].actor};break;case 30:m.setDiagramTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 31:m.setDiagramTitle(o[p].substring(7)),this.$=o[p].substring(7);break;case 32:this.$=o[p].trim(),m.setAccTitle(this.$);break;case 33:case 34:this.$=o[p].trim(),m.setAccDescription(this.$);break;case 35:o[p-1].unshift({type:"loopStart",loopText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.LOOP_START}),o[p-1].push({type:"loopEnd",loopText:o[p-2],signalType:m.LINETYPE.LOOP_END}),this.$=o[p-1];break;case 36:o[p-1].unshift({type:"rectStart",color:m.parseMessage(o[p-2]),signalType:m.LINETYPE.RECT_START}),o[p-1].push({type:"rectEnd",color:m.parseMessage(o[p-2]),signalType:m.LINETYPE.RECT_END}),this.$=o[p-1];break;case 37:o[p-1].unshift({type:"optStart",optText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.OPT_START}),o[p-1].push({type:"optEnd",optText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.OPT_END}),this.$=o[p-1];break;case 38:o[p-1].unshift({type:"altStart",altText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.ALT_START}),o[p-1].push({type:"altEnd",signalType:m.LINETYPE.ALT_END}),this.$=o[p-1];break;case 39:o[p-1].unshift({type:"parStart",parText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.PAR_START}),o[p-1].push({type:"parEnd",signalType:m.LINETYPE.PAR_END}),this.$=o[p-1];break;case 40:o[p-1].unshift({type:"parStart",parText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.PAR_OVER_START}),o[p-1].push({type:"parEnd",signalType:m.LINETYPE.PAR_END}),this.$=o[p-1];break;case 41:o[p-1].unshift({type:"criticalStart",criticalText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.CRITICAL_START}),o[p-1].push({type:"criticalEnd",signalType:m.LINETYPE.CRITICAL_END}),this.$=o[p-1];break;case 42:o[p-1].unshift({type:"breakStart",breakText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.BREAK_START}),o[p-1].push({type:"breakEnd",optText:m.parseMessage(o[p-2]),signalType:m.LINETYPE.BREAK_END}),this.$=o[p-1];break;case 44:this.$=o[p-3].concat([{type:"option",optionText:m.parseMessage(o[p-1]),signalType:m.LINETYPE.CRITICAL_OPTION},o[p]]);break;case 46:this.$=o[p-3].concat([{type:"and",parText:m.parseMessage(o[p-1]),signalType:m.LINETYPE.PAR_AND},o[p]]);break;case 48:this.$=o[p-3].concat([{type:"else",altText:m.parseMessage(o[p-1]),signalType:m.LINETYPE.ALT_ELSE},o[p]]);break;case 49:o[p-3].draw="participant",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 50:o[p-1].draw="participant",o[p-1].type="addParticipant",this.$=o[p-1];break;case 51:o[p-3].draw="actor",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 52:case 57:o[p-1].draw="actor",o[p-1].type="addParticipant",this.$=o[p-1];break;case 53:o[p-1].type="destroyParticipant",this.$=o[p-1];break;case 54:o[p-3].draw="participant",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 55:o[p-1].draw="participant",o[p-1].type="addParticipant",this.$=o[p-1];break;case 56:o[p-3].draw="actor",o[p-3].type="addParticipant",o[p-3].description=m.parseMessage(o[p-1]),this.$=o[p-3];break;case 58:this.$=[o[p-1],{type:"addNote",placement:o[p-2],actor:o[p-1].actor,text:o[p]}];break;case 59:o[p-2]=[].concat(o[p-1],o[p-1]).slice(0,2),o[p-2][0]=o[p-2][0].actor,o[p-2][1]=o[p-2][1].actor,this.$=[o[p-1],{type:"addNote",placement:m.PLACEMENT.OVER,actor:o[p-2].slice(0,2),text:o[p]}];break;case 60:this.$=[o[p-1],{type:"addLinks",actor:o[p-1].actor,text:o[p]}];break;case 61:this.$=[o[p-1],{type:"addALink",actor:o[p-1].actor,text:o[p]}];break;case 62:this.$=[o[p-1],{type:"addProperties",actor:o[p-1].actor,text:o[p]}];break;case 63:this.$=[o[p-1],{type:"addDetails",actor:o[p-1].actor,text:o[p]}];break;case 66:this.$=[o[p-2],o[p]];break;case 67:this.$=o[p];break;case 68:this.$=m.PLACEMENT.LEFTOF;break;case 69:this.$=m.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p],activate:!0},{type:"activeStart",signalType:m.LINETYPE.ACTIVE_START,actor:o[p-1].actor}];break;case 71:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p]},{type:"activeEnd",signalType:m.LINETYPE.ACTIVE_END,actor:o[p-4].actor}];break;case 72:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p],activate:!0,centralConnection:m.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:m.LINETYPE.CENTRAL_CONNECTION,actor:o[p-1].actor}];break;case 73:this.$=[o[p-4],o[p-1],{type:"addMessage",from:o[p-4].actor,to:o[p-1].actor,signalType:o[p-2],msg:o[p],activate:!1,centralConnection:m.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:m.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[p-4].actor}];break;case 74:this.$=[o[p-5],o[p-1],{type:"addMessage",from:o[p-5].actor,to:o[p-1].actor,signalType:o[p-3],msg:o[p],activate:!0,centralConnection:m.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:m.LINETYPE.CENTRAL_CONNECTION,actor:o[p-1].actor},{type:"centralConnectionReverse",signalType:m.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[p-5].actor}];break;case 75:this.$=[o[p-3],o[p-1],{type:"addMessage",from:o[p-3].actor,to:o[p-1].actor,signalType:o[p-2],msg:o[p]}];break;case 76:this.$={type:"addParticipant",actor:o[p-1],config:o[p]};break;case 77:this.$=o[p-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[p]};break;case 79:this.$=m.LINETYPE.SOLID_OPEN;break;case 80:this.$=m.LINETYPE.DOTTED_OPEN;break;case 81:this.$=m.LINETYPE.SOLID;break;case 82:this.$=m.LINETYPE.SOLID_TOP;break;case 83:this.$=m.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=m.LINETYPE.STICK_TOP;break;case 85:this.$=m.LINETYPE.STICK_BOTTOM;break;case 86:this.$=m.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=m.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=m.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=m.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=m.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=m.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=m.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=m.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=m.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=m.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=m.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=m.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=m.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=m.LINETYPE.DOTTED;break;case 100:this.$=m.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=m.LINETYPE.SOLID_CROSS;break;case 102:this.$=m.LINETYPE.DOTTED_CROSS;break;case 103:this.$=m.LINETYPE.SOLID_POINT;break;case 104:this.$=m.LINETYPE.DOTTED_POINT;break;case 105:this.$=m.parseMessage(o[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:s,6:r},{1:[3]},{3:5,4:t,5:s,6:r},{3:6,4:t,5:s,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},e(M,[2,5]),{9:48,13:13,14:E,15:h,18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:U,53:G,54:J},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(M,[2,30]),e(M,[2,31]),{33:[1,62]},{35:[1,63]},e(M,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Bt},{23:75,55:76,73:Bt},{23:77,73:Y},{69:78,72:[1,79],78:L,79:D,80:dt,81:st,82:W,83:he,84:pe,85:Te,86:Ee,87:ue,88:fe,89:ge,90:xe,91:_e,92:be,93:me,94:Ie,95:ye,96:Re,97:Oe,98:Le,99:Ne,100:Ae,101:we,102:Se,103:ke},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Pe),e(M,[2,6]),e(M,[2,16]),e(Nt,[2,10],{11:114}),e(M,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(M,[2,22]),{5:[1,118]},{5:[1,119]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Vt,n,{7:120}),e(Vt,n,{7:121}),e(Vt,n,{7:122}),e(De,n,{41:123,7:124}),e(Gt,n,{43:125,7:126}),e(Gt,n,{7:126,43:127}),e(Ce,n,{46:128,7:129}),e(Vt,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Xt,Pe,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:L,79:D,80:dt,81:st,82:W,83:he,84:pe,85:Te,86:Ee,87:ue,88:fe,89:ge,90:xe,91:_e,92:be,93:me,94:Ie,95:ye,96:Re,97:Oe,98:Le,99:Ne,100:Ae,101:we,102:Se,103:ke},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:J},{5:[1,160]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,161],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,162],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,163],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{17:[1,164]},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[2,47],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,50:[1,165],51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{17:[1,166]},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[2,45],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,49:[1,167],51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{17:[1,168]},{17:[1,169]},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[2,43],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,48:[1,170],51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{4:i,5:a,8:8,9:10,10:l,13:13,14:E,15:h,17:[1,171],18:16,19:c,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:y,31:T,32:f,34:g,36:b,37:R,38:O,39:A,40:N,42:S,44:V,45:v,47:H,51:U,53:G,54:J,56:et,61:z,62:at,63:rt,64:nt,73:Y},{16:[1,172]},e(M,[2,50]),{16:[1,173]},e(M,[2,55]),e(Xt,[2,76]),{76:[1,174]},{16:[1,175]},e(M,[2,52]),{16:[1,176]},e(M,[2,57]),e(M,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Nt,[2,11]),{13:186,51:U,53:G,54:J},e(Nt,[2,13]),e(Nt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,187]},e(M,[2,39]),{16:[1,188]},e(M,[2,40]),e(M,[2,41]),{16:[1,189]},e(M,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(Nt,[2,12]),e(De,n,{7:124,41:201}),e(Gt,n,{7:126,43:202}),e(Ce,n,{7:129,46:203}),e(M,[2,49]),e(M,[2,54]),e(Xt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(w,C){if(C.recoverable)this.trace(w);else{var P=new Error(w);throw P.hash=C,P}},"parseError"),parse:x(function(w){var C=this,P=[0],m=[],q=[null],o=[],At=this.table,p="",vt=0,Me=0,Be=0,Tr=2,Ve=1,Er=o.slice.call(arguments,1),Z=Object.create(this.lexer),_t={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(_t.yy[Qt]=this.yy[Qt]);Z.setInput(w,_t.yy),_t.yy.lexer=Z,_t.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var $t=Z.yylloc;o.push($t);var ur=Z.options&&Z.options.ranges;typeof _t.yy.parseError=="function"?this.parseError=_t.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Es(it){P.length=P.length-2*it,q.length=q.length-it,o.length=o.length-it}x(Es,"popStack");function fr(){var it;return it=m.pop()||Z.lex()||Ve,typeof it!="number"&&(it instanceof Array&&(m=it,it=m.pop()),it=C.symbols_[it]||it),it}x(fr,"lex");for(var tt,jt,bt,ct,us,te,Ot={},Yt,pt,ve,Wt;;){if(bt=P[P.length-1],this.defaultActions[bt]?ct=this.defaultActions[bt]:((tt===null||typeof tt>"u")&&(tt=fr()),ct=At[bt]&&At[bt][tt]),typeof ct>"u"||!ct.length||!ct[0]){var ee="";Wt=[];for(Yt in At[bt])this.terminals_[Yt]&&Yt>Tr&&Wt.push("'"+this.terminals_[Yt]+"'");Z.showPosition?ee="Parse error on line "+(vt+1)+`: +`+Z.showPosition()+` +Expecting `+Wt.join(", ")+", got '"+(this.terminals_[tt]||tt)+"'":ee="Parse error on line "+(vt+1)+": Unexpected "+(tt==Ve?"end of input":"'"+(this.terminals_[tt]||tt)+"'"),this.parseError(ee,{text:Z.match,token:this.terminals_[tt]||tt,line:Z.yylineno,loc:$t,expected:Wt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+bt+", token: "+tt);switch(ct[0]){case 1:P.push(tt),q.push(Z.yytext),o.push(Z.yylloc),P.push(ct[1]),tt=null,jt?(tt=jt,jt=null):(Me=Z.yyleng,p=Z.yytext,vt=Z.yylineno,$t=Z.yylloc,Be>0&&Be--);break;case 2:if(pt=this.productions_[ct[1]][1],Ot.$=q[q.length-pt],Ot._$={first_line:o[o.length-(pt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(pt||1)].first_column,last_column:o[o.length-1].last_column},ur&&(Ot._$.range=[o[o.length-(pt||1)].range[0],o[o.length-1].range[1]]),te=this.performAction.apply(Ot,[p,Me,vt,_t.yy,ct[1],q,o].concat(Er)),typeof te<"u")return te;pt&&(P=P.slice(0,-1*pt*2),q=q.slice(0,-1*pt),o=o.slice(0,-1*pt)),P.push(this.productions_[ct[1]][0]),q.push(Ot.$),o.push(Ot._$),ve=At[P[P.length-2]][P[P.length-1]],P.push(ve);break;case 3:return!0}}return!0},"parse")},pr=(function(){var ut={EOF:1,parseError:x(function(C,P){if(this.yy.parser)this.yy.parser.parseError(C,P);else throw new Error(C)},"parseError"),setInput:x(function(w,C){return this.yy=C||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:x(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.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),w},"input"),unput:x(function(w){var C=w.length,P=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var m=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),P.length-1&&(this.yylineno-=P.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:P?(P.length===m.length?this.yylloc.first_column:0)+m[m.length-P.length].length-P[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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:x(function(w){this.unput(this.match.slice(w))},"less"),pastInput:x(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:x(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:x(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:x(function(w,C){var P,m,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))),m=w[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.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],P=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var o in q)this[o]=q[o];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,C,P,m;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),o=0;oC[0].length)){if(C=P,m=o,this.options.backtrack_lexer){if(w=this.test_match(P,q[o]),w!==!1)return w;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(w=this.test_match(C,q[m]),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:x(function(){var C=this.next();return C||this.lex()},"lex"),begin:x(function(C){this.conditionStack.push(C)},"begin"),popState:x(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(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:x(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:x(function(C){this.begin(C)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(C,P,m,q){var o=q;switch(m){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;break;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;break;case 10:return this.popState(),this.popState(),77;break;case 11:return P.yytext=P.yytext.trim(),73;break;case 12:return P.yytext=P.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return P.yytext=P.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return P.yytext=P.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 14;case 20:return this.begin("ID"),54;break;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 22:return this.popState(),this.popState(),5;break;case 23:return this.begin("LINE"),37;break;case 24:return this.begin("LINE"),38;break;case 25:return this.begin("LINE"),39;break;case 26:return this.begin("LINE"),40;break;case 27:return this.begin("LINE"),50;break;case 28:return this.begin("LINE"),42;break;case 29:return this.begin("LINE"),44;break;case 30:return this.begin("LINE"),49;break;case 31:return this.begin("LINE"),45;break;case 32:return this.begin("LINE"),48;break;case 33:return this.begin("LINE"),47;break;case 34:return this.popState(),16;break;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;break;case 45:return this.begin("ID"),24;break;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;break;case 49:return this.popState(),"acc_title_value";break;case 50:return this.begin("acc_descr"),34;break;case 51:return this.popState(),"acc_descr_value";break;case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return P.yytext=P.yytext.trim(),73;break;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/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,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,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],inclusive:!0}}};return ut})();Jt.lexer=pr;function Zt(){this.yy={}}return x(Zt,"Parser"),Zt.prototype=Jt,Jt.Parser=Zt,new Zt})();ne.parser=ne;var er=ne;var _r={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,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},br={FILLED:0,OPEN:1},mr={LEFTOF:0,RIGHTOF:1,OVER:2},Dt={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},qt=class{constructor(){this.state=new tr(()=>({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=se;this.setAccDescription=He;this.setDiagramTitle=Ue;this.getAccTitle=qe;this.getAccDescription=ze;this.getDiagramTitle=Ge;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap($().wrap),this.LINETYPE=_r,this.ARROWTYPE=br,this.PLACEMENT=mr}static{x(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,s,r,n,i){let a=this.state.records.currentBox,l;if(i!==void 0){let h;i.includes(` +`)?h=i+` +`:h=`{ +`+i+` +}`,l=je(h,{schema:$e})}n=l?.type??n,l?.alias&&(!r||r.text===s)&&(r={text:l.alias,wrap:r?.wrap,type:n});let E=this.state.records.actors.get(t);if(E){if(this.state.records.currentBox&&E.box&&this.state.records.currentBox!==E.box)throw new Error(`A same participant should only be defined in one Box: ${E.name} can't be in '${E.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=E.box?E.box:this.state.records.currentBox,E.box=a,E&&s===E.name&&r==null)return}if(r?.text==null&&(r={text:s,type:n}),(n==null||r.text==null)&&(r={text:s,type:n}),this.state.records.actors.set(t,{box:a,name:s,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor){let h=this.state.records.actors.get(this.state.records.prevActor);h&&(h.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let s,r=0;if(!t)return 0;for(s=0;s>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},E}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:s,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i,centralConnection:a??0}),!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 s=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(s===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:s}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:$().sequence?.wrap??!1}clear(){this.state.reset(),Fe()}parseMessage(t){let s=t.trim(),{wrap:r,cleanedText:n}=this.extractWrap(s),i={text:n,wrap:r};return j.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){let s=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=s?.[1]?s[1].trim():"transparent",n=s?.[2]?s[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let l=new Option().style;l.color=r,l.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(n);return{text:a?St(a,$()):void 0,color:r,wrap:i}}addNote(t,s,r){let n={actor:t,placement:s,message:r.text,wrap:r.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:s})}addLinks(t,s){let r=this.getActor(t);try{let n=St(s.text,$());n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let i=JSON.parse(n);this.insertLinks(r,i)}catch(n){j.error("error while parsing actor link text",n)}}addALink(t,s){let r=this.getActor(t);try{let n={},i=St(s.text,$()),a=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let l=i.slice(0,a-1).trim(),E=i.slice(a+1).trim();n[l]=E,this.insertLinks(r,n)}catch(n){j.error("error while parsing actor link text",n)}}insertLinks(t,s){if(t.links==null)t.links=s;else for(let r in s)t.links[r]=s[r]}addProperties(t,s){let r=this.getActor(t);try{let n=St(s.text,$()),i=JSON.parse(n);this.insertProperties(r,i)}catch(n){j.error("error while parsing actor properties text",n)}}insertProperties(t,s){if(t.properties==null)t.properties=s;else for(let r in s)t.properties[r]=s[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,s){let r=this.getActor(t),n=document.getElementById(s.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&this.insertProperties(r,a.properties),a.links&&this.insertLinks(r,a.links)}catch(i){j.error("error while parsing actor details text",i)}}getActorProperty(t,s){if(t?.properties!==void 0)return t.properties[s]}apply(t){if(Array.isArray(t))t.forEach(s=>{this.apply(s)});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,t.config);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,t.config),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"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":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,t.centralConnection);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":se(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 $().sequence}};var Ir=x(e=>{let t=e.dropShadow??"none",{look:s}=$();return`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: ${e.strokeWidth??1}; + } + + rect.actor.outer-path[data-look="neo"] { + filter: ${t}; + } + + rect.note[data-look="neo"] { + stroke:${e.noteBorderColor}; + fill:${e.noteBkgColor}; + filter: ${t}; + } + + text.actor > tspan { + fill: ${e.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${e.actorLineColor}; + } + + .innerArc { + stroke-width: 1.5; + stroke-dasharray: none; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${e.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${e.signalColor}; + } + + [id$="-arrowhead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + [id$="-sequencenumber"] { + fill: ${e.signalColor}; + } + + [id$="-crosshead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + filter: ${s==="neo"?t:"none"}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .sectionTitle, .sectionTitle > 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; + ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""} + } + + .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 circle, line { + fill: ${e.actorBkg}; + stroke-width: 2px; + } + + g rect.rect { + filter: ${t}; + stroke: ${e.nodeBorder}; + } +`},"getStyles"),rr=Ir;var ie=gr(xr(),1);var ft=36,gt="actor-top",xt="actor-bottom",Ht="actor-box",It="actor-man",Tt=new Set(["redux-color","redux-dark-color"]),Ct=x(function(e,t){let s=Je(e,t);return wt().look==="neo"&&s.attr("data-look","neo"),s},"drawRect"),Rr=x(function(e,t,s,r,n){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let i=t.links,a=t.actorCnt,l=t.rectData;var E="none";n&&(E="block !important");let h=e.append("g");h.attr("id","actor"+a+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",E);var c="";l.class!==void 0&&(c=" "+l.class);let _=l.width>s?l.width:s,u=h.append("rect");if(u.attr("class","actorPopupMenuPanel"+c),u.attr("x",l.x),u.attr("y",l.height),u.attr("fill",l.fill),u.attr("stroke",l.stroke),u.attr("width",_),u.attr("height",l.height),u.attr("rx",l.rx),u.attr("ry",l.ry),i!=null){var y=20;for(let g in i){var T=h.append("a"),f=(0,ie.sanitizeUrl)(i[g]);T.attr("xlink:href",f),T.attr("target","_blank"),Gr(r)(g,T,l.x+10,l.height+y,_,20,{class:"actor"},r),y+=30}}return u.attr("height",y),{height:l.height+y,width:_}},"drawPopup"),zt=x(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Mt=x(async function(e,t,s=null){let r=e.append("foreignObject"),n=await re(t.text,wt()),a=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(r.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",a.height+2*t.textMargin);let E=l.getBBox();r.attr("x",Math.round(E.x+E.width/2-a.width/2)).attr("y",Math.round(E.y+E.height/2-a.height/2))}else if(s){let{startx:l,stopx:E,starty:h}=s;if(l>E){let c=l;l=E,E=c}r.attr("x",Math.round(l+Math.abs(l-E)/2-a.width/2)),t.class==="loopText"?r.attr("y",Math.round(h)):r.attr("y",Math.round(h-a.height))}return[r]},"drawKatex"),yt=x(function(e,t){let s=0,r=0,n=t.text.split(k.lineBreakRegex),[i,a]=ae(t.fontSize),l=[],E=0,h=x(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=x(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=x(()=>Math.round(t.y+(s+r+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=x(()=>Math.round(t.y+(s+r+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[c,_]of n.entries()){t.textMargin!==void 0&&t.textMargin===0&&i!==void 0&&(E=c*i);let u=e.append("text");u.attr("x",t.x),u.attr("y",h()),t.anchor!==void 0&&u.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&u.style("font-family",t.fontFamily),a!==void 0&&u.style("font-size",a),t.fontWeight!==void 0&&u.style("font-weight",t.fontWeight),t.fill!==void 0&&u.attr("fill",t.fill),t.class!==void 0&&u.attr("class",t.class),t.dy!==void 0?u.attr("dy",t.dy):E!==0&&u.attr("dy",E);let y=_||Qe;if(t.tspan){let T=u.append("tspan");T.attr("x",t.x),t.fill!==void 0&&T.attr("fill",t.fill),T.text(y)}else u.text(y);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(u._groups||u)[0][0].getBBox().height,s=r),l.push(u)}return l},"drawText"),sr=x(function(e,t){function s(n,i,a,l,E){return n+","+i+" "+(n+a)+","+i+" "+(n+a)+","+(i+l-E)+" "+(n+a-E*1.2)+","+(i+l)+" "+n+","+(i+l)}x(s,"genPoints");let r=e.append("polygon");return r.attr("points",s(t.x,t.y,t.width,t.height,7)),r.attr("class","labelBox"),t.y=t.y+t.height/2,yt(e,t),r},"drawLabel"),B=-1,oe=x((e,t,s,r)=>{e.select&&s.forEach(n=>{let i=t.get(n),a=e.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr("y2",i.stopy+i.height/2):r.mirrorActors&&a.attr("y2",i.stopy)})},"fixLifeLineHeights"),Or=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+t.height,{look:E,theme:h,themeVariables:c}=s,{bkgColorArray:_,borderColorArray:u}=c,y=e.append("g").lower();var T=y;r||(B++,Object.keys(t.links||{}).length&&!s.forceMenus&&T.attr("onclick",zt(`actor${B}_popup`)).attr("cursor","pointer"),T.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),T=y.append("g"),t.actorCnt=B,t.links!=null&&T.attr("id","root-"+B),E==="neo"&&T.attr("data-look","neo"));let f=lt();var g="actor";t.properties?.class?g=t.properties.class:f.fill="#eaeaea",r?g+=` ${xt}`:g+=` ${gt}`,f.x=t.x,f.y=i,f.width=t.width,f.height=t.height,f.class=g,f.rx=3,f.ry=3,f.name=t.name,E==="neo"&&(f.rx=6,f.ry=6);let b=Ct(T,f),R=n.get(t.name)??0;if(Tt.has(h)&&(b.style("stroke",u[R%u.length]),b.style("fill",_[R%u.length])),E==="neo"&&b.attr("filter","url(#drop-shadow)"),t.rectData=f,t.properties?.icon){let A=t.properties.icon.trim();A.charAt(0)==="@"?Ft(T,f.x+f.width-20,f.y+10,A.substr(1)):Kt(T,f.x+f.width-20,f.y+10,A)}r||(T.attr("data-et","participant"),T.attr("data-type","participant"),T.attr("data-id",t.name)),Et(s,Q(t.description))(t.description,T,f.x,f.y,f.width,f.height,{class:`actor ${Ht}`},s);let O=t.height;if(b.node){let A=b.node().getBBox();t.height=A.height,O=A.height}return O},"drawActorTypeParticipant"),Lr=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+t.height,{look:E,theme:h,themeVariables:c}=s,{bkgColorArray:_,borderColorArray:u}=c,y=e.append("g").lower();var T=y;r||(B++,Object.keys(t.links||{}).length&&!s.forceMenus&&T.attr("onclick",zt(`actor${B}_popup`)).attr("cursor","pointer"),T.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),T=y.append("g"),t.actorCnt=B,t.links!=null&&T.attr("id","root-"+B),E==="neo"&&T.attr("data-look","neo"));let f=lt();var g="actor";t.properties?.class?g=t.properties.class:f.fill="#eaeaea",r?g+=` ${xt}`:g+=` ${gt}`,f.x=t.x,f.y=i,f.width=t.width,f.height=t.height,f.class=g,f.name=t.name;let b=6,R={...f,x:f.x+-b,y:f.y+ +b,class:"actor"},O=Ct(T,f),A=Ct(T,R);t.rectData=f,E==="neo"&&T.attr("filter","url(#drop-shadow)");let N=n.get(t.name)??0;if(Tt.has(h)&&(O.style("stroke",u[N%u.length]),O.style("fill",_[N%u.length]),A.style("stroke",u[N%u.length]),A.style("fill",_[N%u.length])),t.properties?.icon){let V=t.properties.icon.trim();V.charAt(0)==="@"?Ft(T,f.x+f.width-20,f.y+10,V.substr(1)):Kt(T,f.x+f.width-20,f.y+10,V)}Et(s,Q(t.description))(t.description,T,f.x-b,f.y+b,f.width,f.height,{class:`actor ${Ht}`},s);let S=t.height;if(O.node){let V=O.node().getBBox();t.height=V.height,S=V.height}return r||(T.attr("data-et","participant"),T.attr("data-type","collections"),T.attr("data-id",t.name)),S},"drawActorTypeCollections"),Nr=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+t.height,{look:E,theme:h,themeVariables:c}=s,{bkgColorArray:_,borderColorArray:u}=c,y=e.append("g").lower(),T=y;r||(B++,Object.keys(t.links||{}).length&&!s.forceMenus&&T.attr("onclick",zt(`actor${B}_popup`)).attr("cursor","pointer"),T.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),T=y.append("g"),t.actorCnt=B,t.links!=null&&T.attr("id","root-"+B),E==="neo"&&T.attr("data-look","neo"));let f=lt(),g="actor";t.properties?.class?g=t.properties.class:f.fill="#eaeaea",r?g+=` ${xt}`:g+=` ${gt}`,T.attr("class",g),f.x=t.x,f.y=i,f.width=t.width,f.height=t.height,f.name=t.name;let b=f.height/2,R=b/(2.5+f.height/50),O=T.append("g"),A=T.append("g"),N=`M ${f.x},${f.y+b} + a ${R},${b} 0 0 0 0,${f.height} + h ${f.width-2*R} + a ${R},${b} 0 0 0 0,-${f.height} + Z + `;O.append("path").attr("d",N),A.append("path").attr("d",`M ${f.x},${f.y+b} + a ${R},${b} 0 0 0 0,${f.height}`),O.attr("transform",`translate(${R}, ${-(f.height/2)})`),A.attr("transform",`translate(${f.width-R}, ${-f.height/2})`),t.rectData=f,E==="neo"&&O.attr("filter","url(#drop-shadow)");let S=n.get(t.name)??0;if(Tt.has(h)&&(O.style("stroke",u[S%u.length]),O.style("fill",_[S%u.length]),A.style("stroke",u[S%u.length]),A.style("fill",_[S%u.length])),t.properties?.icon){let H=t.properties.icon.trim(),U=f.x+f.width-20,G=f.y+10;H.charAt(0)==="@"?Ft(T,U,G,H.substr(1)):Kt(T,U,G,H)}Et(s,Q(t.description))(t.description,T,f.x,f.y,f.width,f.height,{class:`actor ${Ht}`},s);let V=t.height,v=O.select("path:last-child");if(v.node()){let H=v.node().getBBox();t.height=H.height,V=H.height}return r||(T.attr("data-et","participant"),T.attr("data-type","queue"),T.attr("data-id",t.name)),V},"drawActorTypeQueue"),Ar=x(function(e,t,s,r,n,i){let a=r?t.stopy:t.starty,l=t.x+t.width/2,E=a+75,{look:h,theme:c,themeVariables:_}=s,{bkgColorArray:u,borderColorArray:y,actorBorder:T,actorBkg:f}=_,g=e.append("g").lower();r||(B++,g.append("line").attr("id","actor"+B).attr("x1",l).attr("y1",E).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);let b=e.append("g"),R=It;r?R+=` ${xt}`:R+=` ${gt}`,b.attr("class",R),b.attr("name",t.name);let O=lt();O.x=t.x,O.y=a,O.fill="#eaeaea",O.width=t.width,O.height=t.height,O.class="actor";let A=t.x+t.width/2,N=a+32,S=22;b.append("defs").append("marker").attr("id",n+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),b.append("circle").attr("cx",A).attr("cy",N).attr("r",S).attr("filter",`${h==="neo"?"url(#drop-shadow)":""}`),b.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${A}, ${N-S})`);let V=i.get(t.name)??0;Tt.has(c)?(b.style("stroke",y[V%y.length]),b.style("fill",u[V%y.length])):(b.style("stroke",T),b.style("fill",f));let v=b.node().getBBox();return t.height=v.height+2*(s?.sequence?.labelBoxHeight??0),Et(s,Q(t.description))(t.description,b,O.x,O.y+S+(r?5:12),O.width,O.height,{class:`actor ${It}`},s),r||(b.attr("data-et","participant"),b.attr("data-type","control"),b.attr("data-id",t.name)),t.height},"drawActorTypeControl"),wr=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+75,{look:E,theme:h,themeVariables:c}=s,{bkgColorArray:_,borderColorArray:u}=c,y=e.append("g").lower(),T=e.append("g"),f="actor";r?f+=` ${xt}`:f+=` ${gt}`,T.attr("class",f),T.attr("name",t.name);let g=lt();g.x=t.x,g.y=i,g.fill="#eaeaea",g.width=t.width,g.height=t.height,g.class="actor";let b=t.x+t.width/2,R=i+(r?10:25),O=22;T.append("circle").attr("cx",b).attr("cy",R).attr("r",O).attr("width",t.width).attr("height",t.height),T.append("line").attr("x1",b-O).attr("x2",b+O).attr("y1",R+O).attr("y2",R+O).attr("stroke-width",2),E==="neo"&&T.attr("filter","url(#drop-shadow)");let A=n.get(t.name)??0;Tt.has(h)&&(T.style("stroke",u[A%u.length]),T.style("fill",_[A%u.length]));let N=T.node().getBBox();return t.height=N.height+(s?.sequence?.labelBoxHeight??0),r||(B++,y.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B),Et(s,Q(t.description))(t.description,T,g.x,g.y+(r?15:30),g.width,g.height,{class:`actor ${It}`},s),r?T.attr("transform",`translate(0, ${O})`):(T.attr("transform",`translate(0, ${O/2-5})`),T.attr("data-et","participant"),T.attr("data-type","entity"),T.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Sr=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+t.height+2*s.boxTextMargin,{theme:E,themeVariables:h,look:c}=s,{bkgColorArray:_,borderColorArray:u,actorBorder:y}=h,T=e.append("g").lower(),f=T;r||(B++,Object.keys(t.links||{}).length&&!s.forceMenus&&f.attr("onclick",zt(`actor${B}_popup`)).attr("cursor","pointer"),f.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),f=T.append("g"),t.actorCnt=B,t.links!=null&&f.attr("id","root-"+B),c==="neo"&&f.attr("data-look","neo"));let g=lt(),b="actor";t.properties?.class?b=t.properties.class:g.fill="#eaeaea",r?b+=` ${xt}`:b+=` ${gt}`,g.x=t.x,g.y=i,g.width=t.width,g.height=t.height,g.class=b,g.name=t.name,g.x=t.x,g.y=i;let R=g.width/3,O=g.width/3,A=R/2,N=A/(2.5+R/50),S=f.append("g");S.attr("class",b);let V=` + M ${g.x},${g.y+N} + a ${A},${N} 0 0 0 ${R},0 + a ${A},${N} 0 0 0 -${R},0 + l 0,${O-2*N} + a ${A},${N} 0 0 0 ${R},0 + l 0,-${O-2*N} +`;S.append("path").attr("d",V),c==="neo"&&S.attr("filter","url(#drop-shadow)");let v=n.get(t.name)??0;Tt.has(E)?(S.style("stroke",u[v%u.length]),S.style("fill",_[v%u.length])):S.style("stroke",y),S.attr("transform",`translate(${R}, ${N})`),t.rectData=g,Et(s,Q(t.description))(t.description,f,g.x,g.y+35,g.width,g.height,{class:`actor ${Ht}`},s);let H=S.select("path:last-child");if(H.node()){let U=H.node().getBBox();t.height=U.height+(s.sequence.labelBoxHeight??0)}return r||(f.attr("data-et","participant"),f.attr("data-type","database"),f.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),kr=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+80,E=22,h=e.append("g").lower(),{look:c,theme:_,themeVariables:u}=s,{bkgColorArray:y,borderColorArray:T,actorBorder:f}=u;r||(B++,h.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);let g=e.append("g"),b=It;r?b+=` ${xt}`:b+=` ${gt}`,g.attr("class",b),g.attr("name",t.name);let R=lt();R.x=t.x,R.y=i,R.fill="#eaeaea",R.width=t.width,R.height=t.height,R.class="actor",g.append("line").attr("id","actor-man-torso"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",i+12).attr("x2",t.x+t.width/2-15).attr("y2",i+12),g.append("line").attr("id","actor-man-arms"+B).attr("x1",t.x+t.width/2-E*2.5).attr("y1",i+2).attr("x2",t.x+t.width/2-E*2.5).attr("y2",i+22),g.append("circle").attr("cx",t.x+t.width/2).attr("cy",i+12).attr("r",E),c==="neo"&&g.attr("filter","url(#drop-shadow)");let O=n.get(t.name)??0;Tt.has(_)?(g.style("stroke",T[O%T.length]),g.style("fill",y[O%T.length])):g.style("stroke",f);let A=g.node().getBBox();return t.height=A.height+(s.sequence.labelBoxHeight??0),Et(s,Q(t.description))(t.description,g,R.x,R.y+15,R.width,R.height,{class:`actor ${It}`},s),g.attr("transform",`translate(0,${E/2+10})`),r||(g.attr("data-et","participant"),g.attr("data-type","boundary"),g.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),Pr=x(function(e,t,s,r,n){let i=r?t.stopy:t.starty,a=t.x+t.width/2,l=i+80,{look:E,theme:h,themeVariables:c}=s,{bkgColorArray:_,borderColorArray:u,actorBorder:y}=c,T=e.append("g").lower();r||(B++,T.append("line").attr("id","actor"+B).attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=B);let f=e.append("g"),g=It;r?g+=` ${xt}`:g+=` ${gt}`,f.attr("class",g),f.attr("name",t.name),r||f.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let b=E==="neo"?.5:1,R=E==="neo"?i+(1-b)*30:i;f.append("line").attr("id","actor-man-torso"+B).attr("x1",a).attr("y1",R+25*b).attr("x2",a).attr("y2",R+45*b),f.append("line").attr("id","actor-man-arms"+B).attr("x1",a-ft/2*b).attr("y1",R+33*b).attr("x2",a+ft/2*b).attr("y2",R+33*b),f.append("line").attr("x1",a-ft/2*b).attr("y1",R+60*b).attr("x2",a).attr("y2",R+45*b),f.append("line").attr("x1",a).attr("y1",R+45*b).attr("x2",a+(ft/2-2)*b).attr("y2",R+60*b);let O=f.append("circle");O.attr("cx",t.x+t.width/2),O.attr("cy",R+10*b),O.attr("r",15*b),O.attr("width",t.width*b),O.attr("height",t.height*b);let A=f.node().getBBox();t.height=A.height;let N=lt();N.x=t.x,N.y=R,N.fill="#eaeaea",N.width=t.width,N.height=t.height/b,N.class="actor",N.rx=3,N.ry=3;let S=n.get(t.name)??0;return Tt.has(h)?(f.style("stroke",u[S%u.length]),f.style("fill",_[S%u.length])):f.style("stroke",y),Et(s,Q(t.description))(t.description,f,N.x,R+35*b-(E==="neo"?10:0),N.width,N.height,{class:`actor ${It}`},s),t.height},"drawActorTypeActor"),Dr=x(async function(e,t,s,r,n,i,a){let l=a??new Map([...i.db.getActors().values()].map((E,h)=>[E.name,h]));switch(t.type){case"actor":return await Pr(e,t,s,r,l);case"participant":return await Or(e,t,s,r,l);case"boundary":return await kr(e,t,s,r,l);case"control":return await Ar(e,t,s,r,n,l);case"entity":return await wr(e,t,s,r,l);case"database":return await Sr(e,t,s,r,l);case"collections":return await Lr(e,t,s,r,l);case"queue":return await Nr(e,t,s,r,l)}},"drawActor"),Cr=x(function(e,t,s){let n=e.append("g");ar(n,t),t.name&&Et(s)(t.name,n,t.x,t.y+s.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},s),n.lower()},"drawBox"),Mr=x(function(e){return e.append("g")},"anchorElement"),Br=x(function(e,t,s,r,n,i,a){let{theme:l,themeVariables:E}=r,{bkgColorArray:h,borderColorArray:c,mainBkg:_}=E,u=lt(),y=t.anchored,T=t.actor;u.x=t.startx,u.y=t.starty,u.class="activation"+n%3,u.width=t.stopx-t.startx,u.height=s-t.starty;let f=Ct(y,u),b=(a??new Map([...i.db.getActors().values()].map((R,O)=>[R.name,O]))).get(T)??0;Tt.has(l)&&(f.style("stroke",c[b%c.length]),f.style("fill",h[b%c.length]??_))},"drawActivation"),Vr=x(async function(e,t,s,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:l,labelBoxWidth:E,messageFontFamily:h,messageFontSize:c,messageFontWeight:_}=r,u=e.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),y=x(function(g,b,R,O){return u.append("line").attr("x1",g).attr("y1",b).attr("x2",R).attr("y2",O).attr("class","loopLine")},"drawLoopLine");y(t.startx,t.starty,t.stopx,t.starty),y(t.stopx,t.starty,t.stopx,t.stopy),y(t.startx,t.stopy,t.stopx,t.stopy),y(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(g){y(t.startx,g.y,t.stopx,g.y).style("stroke-dasharray","3, 3")});let T=Pt();T.text=s,T.x=t.startx,T.y=t.starty,T.fontFamily=h,T.fontSize=c,T.fontWeight=_,T.anchor="middle",T.valign="middle",T.tspan=!1,T.width=Math.max(E??0,50),T.height=l+(r.look==="neo"?15:0)||20,T.textMargin=a,T.class="labelText",sr(u,T),T=nr(),T.text=t.title,T.x=t.startx+E/2+(t.stopx-t.startx)/2,T.y=t.starty+i+a,T.anchor="middle",T.valign="middle",T.textMargin=a,T.class="loopText",T.fontFamily=h,T.fontSize=c,T.fontWeight=_,T.wrap=!0;let f=Q(T.text)?await Mt(u,T,t):yt(u,T);if(t.sectionTitles!==void 0){for(let[g,b]of Object.entries(t.sectionTitles))if(b.message){T.text=b.message,T.x=t.startx+(t.stopx-t.startx)/2,T.y=t.sections[g].y+i+a,T.class="sectionTitle",T.anchor="middle",T.valign="middle",T.tspan=!1,T.fontFamily=h,T.fontSize=c,T.fontWeight=_,T.wrap=t.wrap,Q(T.text)?(t.starty=t.sections[g].y,await Mt(u,T,t)):yt(u,T);let R=Math.round(f.map(O=>(O._groups||O)[0][0].getBBox().height).reduce((O,A)=>O+A));t.sections[g].height+=R-(i+a)}}return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),ar=x(function(e,t){Ze(e,t)},"drawBackgroundRect"),vr=x(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Yr=x(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Wr=x(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Kr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Fr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),qr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Hr=x(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),zr=x(function(e,t){let{theme:s}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s==="redux"||s==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),nr=x(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"),Ur=x(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Et=(function(){function e(i,a,l,E,h,c,_){let u=a.append("text").attr("x",l+h/2).attr("y",E+c/2+5).style("text-anchor","middle").text(i);n(u,_)}x(e,"byText");function t(i,a,l,E,h,c,_,u){let{actorFontSize:y,actorFontFamily:T,actorFontWeight:f}=u,[g,b]=ae(y),R=i.split(k.lineBreakRegex);for(let O=0;Oe.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:x(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:x(function(e){this.boxes.push(e)},"addBox"),addActor:x(function(e){this.actors.push(e)},"addActor"),addLoop:x(function(e){this.loops.push(e)},"addLoop"),addMessage:x(function(e){this.messages.push(e)},"addMessage"),addNote:x(function(e){this.notes.push(e)},"addNote"),lastActor:x(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:x(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:x(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:x(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:x(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,lr($())},"init"),updateVal:x(function(e,t,s,r){e[t]===void 0?e[t]=s:e[t]=r(s,e[t])},"updateVal"),updateBounds:x(function(e,t,s,r){let n=this,i=0;function a(l){return x(function(h){i++;let c=n.sequenceItems.length-i+1;n.updateVal(h,"starty",t-c*d.boxMargin,Math.min),n.updateVal(h,"stopy",r+c*d.boxMargin,Math.max),n.updateVal(I.data,"startx",e-c*d.boxMargin,Math.min),n.updateVal(I.data,"stopx",s+c*d.boxMargin,Math.max),l!=="activation"&&(n.updateVal(h,"startx",e-c*d.boxMargin,Math.min),n.updateVal(h,"stopx",s+c*d.boxMargin,Math.max),n.updateVal(I.data,"starty",t-c*d.boxMargin,Math.min),n.updateVal(I.data,"stopy",r+c*d.boxMargin,Math.max))},"updateItemBounds")}x(a,"updateFn"),this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},"updateBounds"),insert:x(function(e,t,s,r){let n=k.getMin(e,s),i=k.getMax(e,s),a=k.getMin(t,r),l=k.getMax(t,r);this.updateVal(I.data,"startx",n,Math.min),this.updateVal(I.data,"starty",a,Math.min),this.updateVal(I.data,"stopx",i,Math.max),this.updateVal(I.data,"stopy",l,Math.max),this.updateBounds(n,a,i,l)},"insert"),newActivation:x(function(e,t,s){let r=s.get(e.from),n=Ut(e.from).length||0,i=r.x+r.width/2+(n-1)*d.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+d.activationWidth,stopy:void 0,actor:e.from,anchored:K.anchorElement(t)})},"newActivation"),endActivation:x(function(e){let t=this.activations.map(function(s){return s.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:x(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:x(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:x(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:x(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:x(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:I.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:x(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:x(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:x(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=k.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return{bounds:this.data,models:this.models}},"getBounds")},$r=x(async function(e,t,s){I.bumpVerticalPos(d.boxMargin),t.height=d.boxMargin,t.starty=I.getVerticalPos();let r=lt();r.x=t.startx,r.y=t.starty,r.width=t.width||d.width,r.class="note";let n=e.append("g");n.attr("data-et","note"),n.attr("data-id","i"+s);let i=K.drawRect(n,r),a=Pt();a.x=t.startx,a.y=t.starty,a.width=r.width,a.dy="1em",a.text=t.message,a.class="noteText",a.fontFamily=d.noteFontFamily,a.fontSize=d.noteFontSize,a.fontWeight=d.noteFontWeight,a.anchor=d.noteAlign,a.textMargin=d.noteMargin,a.valign="center";let l=Q(a.text)?await Mt(n,a):yt(n,a),E=Math.round(l.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,c)=>h+c));i.attr("height",E+2*d.noteMargin),t.height+=E+2*d.noteMargin,I.bumpVerticalPos(E+2*d.noteMargin),t.stopy=t.starty+E+2*d.noteMargin,t.stopx=t.startx+r.width,I.insert(t.startx,t.starty,t.stopx,t.stopy),I.models.addNote(t)},"drawNote"),ir=x(function(e,t,s,r,n,i,a){let l=r.db.getActors(),E=l.get(t.from),h=l.get(t.to),c=s.sequenceVisible,_=E.x+E.width/2,u=h.x+h.width/2,y=_<=u,T=dr(t,r),f=e.append("g"),g=16.5,b=x((S,V)=>{let v=S?g:-g;return V?-v:v},"getCircleOffset"),R=x(S=>{f.append("circle").attr("cx",S).attr("cy",a).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:O,CENTRAL_CONNECTION_REVERSE:A,CENTRAL_CONNECTION_DUAL:N}=r.db.LINETYPE;if(c)switch(t.centralConnection){case O:T&&(u+=b(y,!0));break;case A:T||(_+=b(y,!1));break;case N:T?u+=b(y,!0):_+=b(y,!1);break}switch(t.centralConnection){case O:R(u);break;case A:R(_);break;case N:R(_),R(u);break}},"drawCentralConnection"),Rt=x(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),Lt=x(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),le=x(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function jr(e,t){I.bumpVerticalPos(10);let{startx:s,stopx:r,message:n}=t,i=k.splitBreaks(n).length,a=Q(n),l=a?await mt(n,$()):X.calculateTextDimensions(n,Rt(d));if(!a){let _=l.height/i;t.height+=_,I.bumpVerticalPos(_)}let E,h=l.height-10,c=l.width;if(s===r){E=I.getVerticalPos()+h,d.rightAngles||(h+=d.boxMargin,E=I.getVerticalPos()+h),h+=30;let _=k.getMax(c/2,d.width/2);I.insert(s-_,I.getVerticalPos()-10+h,r+_,I.getVerticalPos()+30+h)}else h+=d.boxMargin,E=I.getVerticalPos()+h,I.insert(s,E-10,r,E);return I.bumpVerticalPos(h),t.height+=h,t.stopy=t.starty+t.height,I.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),E}x(jr,"boundMessage");var ts=x(async function(e,t,s,r,n,i){let{startx:a,stopx:l,starty:E,message:h,type:c,sequenceIndex:_,sequenceVisible:u}=t,y=X.calculateTextDimensions(h,Rt(d)),T=Pt();T.x=Math.min(a,l),T.y=E+10,T.width=Math.abs(l-a),T.class="messageText",T.dy="1em",T.text=h,T.fontFamily=d.messageFontFamily,T.fontSize=d.messageFontSize,T.fontWeight=d.messageFontWeight,T.anchor=d.messageAlign,T.valign="center",T.textMargin=d.wrapPadding,T.tspan=!1,Q(T.text)?await Mt(e,T,{startx:a,stopx:l,starty:s}):yt(e,T);let f=y.width,g;if(a===l){let R=u||d.showSequenceNumbers,O=dr(n,r),A=hs(n,r),N=a+(R&&(O||A)?10:0);d.rightAngles?g=e.append("path").attr("d",`M ${N},${s} H ${a+k.getMax(d.width/2,f/2)} V ${s+25} H ${a}`):g=e.append("path").attr("d","M "+N+","+s+" C "+(N+60)+","+(s-10)+" "+(a+60)+","+(s+30)+" "+a+","+(s+20)),ce(n,r)&&ir(e,n,t,r,a,l,s)}else g=e.append("line"),g.attr("x1",a),g.attr("y1",s),g.attr("x2",l),g.attr("y2",s),ce(n,r)&&ir(e,n,t,r,a,l,s);c===r.db.LINETYPE.DOTTED||c===r.db.LINETYPE.DOTTED_CROSS||c===r.db.LINETYPE.DOTTED_POINT||c===r.db.LINETYPE.DOTTED_OPEN||c===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||c===r.db.LINETYPE.SOLID_TOP_DOTTED||c===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||c===r.db.LINETYPE.STICK_TOP_DOTTED||c===r.db.LINETYPE.STICK_BOTTOM_DOTTED||c===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||c===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||c===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||c===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0"),g.attr("data-et","message"),g.attr("data-id","i"+t.id),g.attr("data-from",t.from),g.attr("data-to",t.to);let b="";if(d.arrowMarkerAbsolute&&(b=We(!0)),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(c===r.db.LINETYPE.SOLID_TOP||c===r.db.LINETYPE.SOLID_TOP_DOTTED)&&g.attr("marker-end","url("+b+"#"+i+"-solidTopArrowHead)"),(c===r.db.LINETYPE.SOLID_BOTTOM||c===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&g.attr("marker-end","url("+b+"#"+i+"-solidBottomArrowHead)"),(c===r.db.LINETYPE.STICK_TOP||c===r.db.LINETYPE.STICK_TOP_DOTTED)&&g.attr("marker-end","url("+b+"#"+i+"-stickTopArrowHead)"),(c===r.db.LINETYPE.STICK_BOTTOM||c===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&g.attr("marker-end","url("+b+"#"+i+"-stickBottomArrowHead)"),(c===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||c===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&g.attr("marker-start","url("+b+"#"+i+"-solidBottomArrowHead)"),(c===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||c===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&g.attr("marker-start","url("+b+"#"+i+"-solidTopArrowHead)"),(c===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||c===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&g.attr("marker-start","url("+b+"#"+i+"-stickBottomArrowHead)"),(c===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||c===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&g.attr("marker-start","url("+b+"#"+i+"-stickTopArrowHead)"),(c===r.db.LINETYPE.SOLID||c===r.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+b+"#"+i+"-arrowhead)"),(c===r.db.LINETYPE.BIDIRECTIONAL_SOLID||c===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+b+"#"+i+"-arrowhead)"),g.attr("marker-end","url("+b+"#"+i+"-arrowhead)")),(c===r.db.LINETYPE.SOLID_POINT||c===r.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+b+"#"+i+"-filled-head)"),(c===r.db.LINETYPE.SOLID_CROSS||c===r.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+b+"#"+i+"-crosshead)"),u||d.showSequenceNumbers){let R=c===r.db.LINETYPE.BIDIRECTIONAL_SOLID||c===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,O=c===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||c===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||c===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||c===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||c===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||c===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||c===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||c===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,A=6,N=ce(n,r),S=a,V=l;R?(aa?V=l-2*A:(V=l-A,S+=n?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),V+=N?15:0,g.attr("x2",V),g.attr("x1",S)):g.attr("x1",a+A);let v=0,H=a===l,U=a<=l;H?v=t.fromBounds+1:O?v=U?t.toBounds-1:t.fromBounds+1:v=U?t.fromBounds+1:t.toBounds-1;let G="12px",J=_.toString().length;J>5?G="7px":J>3&&(G="9px"),e.append("line").attr("x1",v).attr("y1",s).attr("x2",v).attr("y2",s).attr("stroke-width",0).attr("marker-start","url("+b+"#"+i+"-sequencenumber)"),e.append("text").attr("x",v).attr("y",s+4).attr("font-family","sans-serif").attr("font-size",G).attr("text-anchor","middle").attr("class","sequenceNumber").text(_)}},"drawMessage"),es=x(function(e,t,s,r,n,i,a){let l=0,E=0,h,c=0;for(let _ of r){let u=t.get(_),y=u.box;h&&h!=y&&(a||I.models.addBox(h),E+=d.boxMargin+h.margin),y&&y!=h&&(a||(y.x=l+E,y.y=n),E+=y.margin),u.width=k.getMax(u.width||d.width,d.width),u.height=k.getMax(u.height||d.height,d.height),u.margin=u.margin||d.actorMargin,c=k.getMax(c,u.height),s.get(u.name)&&(E+=u.width/2),u.x=l+E,u.starty=I.getVerticalPos(),I.insert(u.x,n,u.x+u.width,u.height),l+=u.width+E,u.box&&(u.box.width=l+y.margin-u.box.x),E=u.margin,h=u.box,I.models.addActor(u)}h&&!a&&I.models.addBox(h),I.bumpVerticalPos(c)},"addActorRenderingData"),de=x(async function(e,t,s,r,n,i,a){if(r){let l=0;I.bumpVerticalPos(d.boxMargin*2);for(let E of s){let h=t.get(E);h.stopy||(h.stopy=I.getVerticalPos());let c=await K.drawActor(e,h,d,!0,n,i,a);l=k.getMax(l,c)}I.bumpVerticalPos(l+d.boxMargin)}else for(let l of s){let E=t.get(l);await K.drawActor(e,E,d,!1,n,i,a)}},"drawActors"),cr=x(function(e,t,s,r){let n=0,i=0;for(let a of s){let l=t.get(a),E=ns(l),h=K.drawPopup(e,l,E,d,d.forceMenus,r);h.height>n&&(n=h.height),h.width+l.x>i&&(i=h.width+l.x)}return{maxHeight:n,maxWidth:i}},"drawActorsPopup"),lr=x(function(e){Ye(d,e),e.fontFamily&&(d.actorFontFamily=d.noteFontFamily=d.messageFontFamily=e.fontFamily),e.fontSize&&(d.actorFontSize=d.noteFontSize=d.messageFontSize=e.fontSize),e.fontWeight&&(d.actorFontWeight=d.noteFontWeight=d.messageFontWeight=e.fontWeight)},"setConf"),Ut=x(function(e){return I.activations.filter(function(t){return t.actor===e})},"actorActivations"),or=x(function(e,t){let s=t.get(e),r=Ut(e),n=r.reduce(function(a,l){return k.getMin(a,l.startx)},s.x+s.width/2-1),i=r.reduce(function(a,l){return k.getMax(a,l.stopx)},s.x+s.width/2+1);return[n,i]},"activationBounds");function ht(e,t,s,r,n){I.bumpVerticalPos(s);let i=r;if(t.id&&t.message&&e[t.id]){let a=e[t.id].width,l=Rt(d);t.message=X.wrapLabel(`[${t.message}]`,a-2*d.wrapPadding,l),t.width=a,t.wrap=!0;let E=X.calculateTextDimensions(t.message,l),h=k.getMax(E.height,d.labelBoxHeight);i=r+h,j.debug(`${h} - ${t.message}`)}n(t),I.bumpVerticalPos(i)}x(ht,"adjustLoopHeightForWrap");function rs(e,t,s,r,n,i,a){function l(c,_){c.x{L.add(D.from),L.add(D.to)}),f=f.filter(D=>L.has(D))}let N=new Map(f.map((L,D)=>[_.get(L)?.name??L,D]));es(c,_,u,f,0,g,!1);let S=await Ts(g,_,A,r);K.insertArrowHead(c,t),K.insertArrowCrossHead(c,t),K.insertArrowFilledHead(c,t),K.insertSequenceNumber(c,t),K.insertSolidTopArrowHead(c,t),K.insertSolidBottomArrowHead(c,t),K.insertStickTopArrowHead(c,t),K.insertStickBottomArrowHead(c,t),a==="neo"&&K.insertDropShadow(c,d);function V(L,D){let dt=I.endActivation(L);dt.starty+18>D&&(dt.starty=D-6,D+=12),K.drawActivation(c,dt,D,d,Ut(L.from).length,r,N),I.insert(dt.startx,D-10,dt.stopx,D)}x(V,"activeEnd");let v=1,H=1,U=[],G=[],J=0;for(let L of g){let D,dt,st;switch(L.type){case r.db.LINETYPE.NOTE:I.resetVerticalPos(),dt=L.noteModel,await $r(c,dt,L.id);break;case r.db.LINETYPE.ACTIVE_START:I.newActivation(L,c,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION:I.newActivation(L,c,_);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:I.newActivation(L,c,_);break;case r.db.LINETYPE.ACTIVE_END:V(L,I.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:ht(S,L,d.boxMargin,d.boxMargin+d.boxTextMargin,W=>I.newLoop(W));break;case r.db.LINETYPE.LOOP_END:D=I.endLoop(),await K.drawLoop(c,D,"loop",d,L),I.bumpVerticalPos(D.stopy-I.getVerticalPos()),I.models.addLoop(D);break;case r.db.LINETYPE.RECT_START:ht(S,L,d.boxMargin,d.boxMargin,W=>I.newLoop(void 0,W.message));break;case r.db.LINETYPE.RECT_END:D=I.endLoop(),G.push(D),I.models.addLoop(D),I.bumpVerticalPos(D.stopy-I.getVerticalPos());break;case r.db.LINETYPE.OPT_START:ht(S,L,d.boxMargin,d.boxMargin+d.boxTextMargin,W=>I.newLoop(W));break;case r.db.LINETYPE.OPT_END:D=I.endLoop(),await K.drawLoop(c,D,"opt",d,L),I.bumpVerticalPos(D.stopy-I.getVerticalPos()),I.models.addLoop(D);break;case r.db.LINETYPE.ALT_START:ht(S,L,d.boxMargin,d.boxMargin+d.boxTextMargin,W=>I.newLoop(W));break;case r.db.LINETYPE.ALT_ELSE:ht(S,L,d.boxMargin+d.boxTextMargin,d.boxMargin,W=>I.addSectionToLoop(W));break;case r.db.LINETYPE.ALT_END:D=I.endLoop(),await K.drawLoop(c,D,"alt",d,L),I.bumpVerticalPos(D.stopy-I.getVerticalPos()),I.models.addLoop(D);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:ht(S,L,d.boxMargin,d.boxMargin+d.boxTextMargin,W=>I.newLoop(W)),I.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:ht(S,L,d.boxMargin+d.boxTextMargin,d.boxMargin,W=>I.addSectionToLoop(W));break;case r.db.LINETYPE.PAR_END:D=I.endLoop(),await K.drawLoop(c,D,"par",d,L),I.bumpVerticalPos(D.stopy-I.getVerticalPos()),I.models.addLoop(D);break;case r.db.LINETYPE.AUTONUMBER:v=L.message.start||v,H=L.message.step||H,L.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:ht(S,L,d.boxMargin,d.boxMargin+d.boxTextMargin,W=>I.newLoop(W));break;case r.db.LINETYPE.CRITICAL_OPTION:ht(S,L,d.boxMargin+d.boxTextMargin,d.boxMargin,W=>I.addSectionToLoop(W));break;case r.db.LINETYPE.CRITICAL_END:D=I.endLoop(),await K.drawLoop(c,D,"critical",d,L),I.bumpVerticalPos(D.stopy-I.getVerticalPos()),I.models.addLoop(D);break;case r.db.LINETYPE.BREAK_START:ht(S,L,d.boxMargin,d.boxMargin+d.boxTextMargin,W=>I.newLoop(W));break;case r.db.LINETYPE.BREAK_END:D=I.endLoop(),await K.drawLoop(c,D,"break",d,L),I.bumpVerticalPos(D.stopy-I.getVerticalPos()),I.models.addLoop(D);break;default:try{st=L.msgModel,st.starty=I.getVerticalPos(),st.sequenceIndex=v,st.sequenceVisible=r.db.showSequenceNumbers(),st.id=L.id,st.from=L.from,st.to=L.to;let W=await jr(c,st);rs(L,st,W,J,_,u,y),U.push({messageModel:st,lineStartY:W,msg:L}),I.models.addMessage(st)}catch(W){j.error("error while drawing message",W)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(L.type)&&(v=Math.round((v+H)*100)/100),J++}j.debug("createdActors",u),j.debug("destroyedActors",y),await de(c,_,f,!1,t,r,N);for(let L of U)await ts(c,L.messageModel,L.lineStartY,r,L.msg,t);d.mirrorActors&&await de(c,_,f,!0,t,r,N),G.forEach(L=>K.drawBackgroundRect(c,L)),oe(c,_,f,d);for(let L of I.models.boxes){L.height=I.getVerticalPos()-L.y,I.insert(L.x,L.y,L.x+L.width,L.height);let D=d.boxMargin*2;L.startx=L.x-D,L.starty=L.y-D*.25,L.stopx=L.startx+L.width+2*D,L.stopy=L.starty+L.height+D*.75,L.stroke="rgb(0,0,0, 0.5)",K.drawBox(c,L,d)}R&&I.bumpVerticalPos(d.boxMargin);let et=cr(c,_,f,h),{bounds:z}=I.getBounds();z.startx===void 0&&(z.startx=0),z.starty===void 0&&(z.starty=0),z.stopx===void 0&&(z.stopx=0),z.stopy===void 0&&(z.stopy=0);let at=z.stopy-z.starty;at{let a=Rt(d),l=i.actorKeys.reduce((_,u)=>_+=e.get(u).width+(e.get(u).margin||0),0),E=d.boxMargin*8;l+=E,l-=2*d.boxTextMargin,i.wrap&&(i.name=X.wrapLabel(i.name,l-2*d.wrapPadding,a));let h=X.calculateTextDimensions(i.name,a);n=k.getMax(h.height,n);let c=k.getMax(l,h.width+2*d.wrapPadding);if(i.margin=d.boxTextMargin,li.textMaxHeight=n),k.getMax(r,d.height)}x(is,"calculateActorMargins");var os=x(async function(e,t,s){let r=t.get(e.from),n=t.get(e.to),i=r.x,a=n.x,l=e.wrap&&e.message,E=Q(e.message)?await mt(e.message,$()):X.calculateTextDimensions(l?X.wrapLabel(e.message,d.width,Lt(d)):e.message,Lt(d)),h={width:l?d.width:k.getMax(d.width,E.width+2*d.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===s.db.PLACEMENT.RIGHTOF?(h.width=l?k.getMax(d.width,E.width):k.getMax(r.width/2+n.width/2,E.width+2*d.noteMargin),h.startx=i+(r.width+d.actorMargin)/2):e.placement===s.db.PLACEMENT.LEFTOF?(h.width=l?k.getMax(d.width,E.width+2*d.noteMargin):k.getMax(r.width/2+n.width/2,E.width+2*d.noteMargin),h.startx=i-h.width+(r.width-d.actorMargin)/2):e.to===e.from?(E=X.calculateTextDimensions(l?X.wrapLabel(e.message,k.getMax(d.width,r.width),Lt(d)):e.message,Lt(d)),h.width=l?k.getMax(d.width,r.width):k.getMax(r.width,d.width,E.width+2*d.noteMargin),h.startx=i+(r.width-h.width)/2):(h.width=Math.abs(i+r.width/2-(a+n.width/2))+d.actorMargin,h.startx=i2,u=x(g=>E?-g:g,"adjustValue");e.from===e.to?c=h:(e.activate&&!_&&(c+=u(d.activationWidth/2-1)),[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.STICK_TOP,s.db.LINETYPE.STICK_BOTTOM,s.db.LINETYPE.STICK_TOP_DOTTED,s.db.LINETYPE.STICK_BOTTOM_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,s.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(c+=u(3)),[s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,s.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,s.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=u(3)));let y=[n,i,a,l],T=Math.abs(h-c);e.wrap&&e.message&&(e.message=X.wrapLabel(e.message,k.getMax(T+2*d.wrapPadding,d.width),Rt(d)));let f=X.calculateTextDimensions(e.message,Rt(d));return{width:k.getMax(e.wrap?0:f.width+2*d.wrapPadding,T+2*d.wrapPadding,d.width),height:0,startx:h,stopx:c,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,y),toBounds:Math.max.apply(null,y)}},"buildMessageModel");var Ts=x(async function(e,t,s,r){let n={},i=[],a,l,E;for(let h of e){switch(h.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:h.message&&(a=i.pop(),n[a.id]=a,n[h.id]=a,i.push(a));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:a=i.pop(),n[a.id]=a;break;case r.db.LINETYPE.ACTIVE_START:{let _=t.get(h.from?h.from:h.to.actor),u=Ut(h.from?h.from:h.to.actor).length,y=_.x+_.width/2+(u-1)*d.activationWidth/2,T={startx:y,stopx:y+d.activationWidth,actor:h.from,enabled:!0};I.activations.push(T)}break;case r.db.LINETYPE.ACTIVE_END:{let _=I.activations.map(u=>u.actor).lastIndexOf(h.from);I.activations.splice(_,1).splice(0,1)}break}h.placement!==void 0?(l=await os(h,t,r),h.noteModel=l,i.forEach(_=>{a=_,a.from=k.getMin(a.from,l.startx),a.to=k.getMax(a.to,l.startx+l.width),a.width=k.getMax(a.width,Math.abs(a.from-a.to))-d.labelBoxWidth})):(E=ps(h,t,r),h.msgModel=E,E.startx&&E.stopx&&i.length>0&&i.forEach(_=>{if(a=_,E.startx===E.stopx){let u=t.get(h.from),y=t.get(h.to);a.from=k.getMin(u.x-E.width/2,u.x-u.width/2,a.from),a.to=k.getMax(y.x+E.width/2,y.x+u.width/2,a.to),a.width=k.getMax(a.width,Math.abs(a.to-a.from))-d.labelBoxWidth}else a.from=k.getMin(E.startx,a.from),a.to=k.getMax(E.stopx,a.to),a.width=k.getMax(a.width,E.width)-d.labelBoxWidth}))}return I.activations=[],j.debug("Loop type widths:",n),n},"calculateLoopBounds"),hr={bounds:I,drawActors:de,drawActorsPopup:cr,setConf:lr,draw:ss};var Qs={parser:er,get db(){return new qt},renderer:hr,styles:rr,init:x(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Xe({sequence:{wrap:e.wrap}}))},"init")};export{Qs as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-7D4R322I.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-7D4R322I.mjs new file mode 100644 index 00000000000..14f764287f8 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-7D4R322I.mjs @@ -0,0 +1 @@ +import{a as X,c as N,d as J}from"./chunk-LCXTWHL2.mjs";import{a as O}from"./chunk-KRXBNO2N.mjs";import{D as F}from"./chunk-W44A43WB.mjs";import"./chunk-6764PJDD.mjs";import"./chunk-ZXARS5L4.mjs";import"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import{p as C}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{B as P,G as z,O as R,_ as t}from"./chunk-67TQ5CYL.mjs";import{H as W,L as U,b,h as L}from"./chunk-7W6UQGC5.mjs";import{a as f}from"./chunk-AQ6EADP3.mjs";var j=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=f((e,n)=>{let s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(n.id),c=s.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),s},"drawSimpleState"),K=f((e,n)=>{let s=f(function(d,w,y){let E=d.append("tspan").attr("x",2*t().state.padding).text(w);y||E.attr("dy",t().state.textHeight)},"addTspan"),r=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),g=r.height,h=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description"),i=!0,o=!0;n.descriptions.forEach(function(d){i||(s(h,d,o),o=!1),i=!1});let m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=h.node().getBBox(),p=Math.max(x.width,r.width);return m.attr("x2",p+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",p+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),v=f((e,n,s)=>{let c=t().state.padding,r=2*t().state.padding,g=e.node().getBBox(),h=g.width,i=g.x,o=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(n.id),x=o.node().getBBox().width+r,p=Math.max(x,h);p===h&&(p=p+r);let d,w=e.node().getBBox();n.doc,d=i-c,x>h&&(d=(h-p)/2+c),Math.abs(i-w.x)h&&(d=i-(x-h)/2);let y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",d).attr("y",y).attr("class",s?"alt-composit":"composit").attr("width",p).attr("height",w.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),o.attr("x",d+c),x<=h&&o.attr("x",i+(p-r)/2-x/2+c),e.insert("rect",":first-child").attr("x",d).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",d).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",p).attr("height",w.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),Q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),V=f((e,n)=>{let s=t().state.forkWidth,c=t().state.forkHeight;if(n.parentId){let r=s;s=c,c=r}return e.append("rect").style("stroke","black").style("fill","black").attr("width",s).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState");var D=f((e,n,s,c)=>{let r=0,g=c.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let h=e.replace(/\r\n/g,"
    ");h=h.replace(/\n/g,"
    ");let i=h.split(z.lineBreakRegex),o=1.25*t().state.noteMargin;for(let m of i){let x=m.trim();if(x.length>0){let p=g.append("tspan");if(p.text(x),o===0){let d=p.node().getBBox();o+=d.height}r+=o,p.attr("x",n+t().state.noteMargin),p.attr("y",s+r+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:r}},"_drawLongText"),tt=f((e,n)=>{n.attr("class","state-note");let s=n.append("rect").attr("x",0).attr("y",t().state.padding),c=n.append("g"),{textWidth:r,textHeight:g}=D(e,0,0,c);return s.attr("height",g+2*t().state.noteMargin),s.attr("width",r+t().state.noteMargin*2),s},"drawNote"),A=f(function(e,n){let s=n.id,c={id:s,label:n.id,width:0,height:0},r=e.append("g").attr("id",s).attr("class","stateGroup");n.type==="start"&&j(r),n.type==="end"&&Q(r),(n.type==="fork"||n.type==="join")&&V(r,n),n.type==="note"&&tt(n.note.text,r),n.type==="divider"&&q(r),n.type==="default"&&n.descriptions.length===0&&Z(r,n),n.type==="default"&&n.descriptions.length>0&&K(r,n);let g=r.node().getBBox();return c.width=g.width+2*t().state.padding,c.height=g.height+2*t().state.padding,c},"drawState"),Y=0,I=f(function(e,n,s){let c=f(function(o){switch(o){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");n.points=n.points.filter(o=>!Number.isNaN(o.y));let r=n.points,g=W().x(function(o){return o.x}).y(function(o){return o.y}).curve(U),h=e.append("path").attr("d",g(r)).attr("id","edge"+Y).attr("class","transition"),i="";if(t().state.arrowMarkerAbsolute&&(i=P(!0)),h.attr("marker-end","url("+i+"#"+c(N.relationType.DEPENDENCY)+"End)"),s.title!==void 0){let o=e.append("g").attr("class","stateLabel"),{x:m,y:x}=C.calcLabelPosition(n.points),p=z.getRows(s.title),d=0,w=[],y=0,E=0;for(let a=0;a<=p.length;a++){let u=o.append("text").attr("text-anchor","middle").text(p[a]).attr("x",m).attr("y",x+d),l=u.node().getBBox();y=Math.max(y,l.width),E=Math.min(E,l.x),b.info(l.x,m,x+d),d===0&&(d=u.node().getBBox().height,b.info("Title height",d,x)),w.push(u)}let M=d*p.length;if(p.length>1){let a=(p.length-1)*d*.5;w.forEach((u,l)=>u.attr("y",x+l*d-a)),M=d*p.length}let H=o.node().getBBox();o.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-M/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",M+t().state.padding),b.info(H)}Y++},"drawEdge");var S,G={},et=f(function(){},"setConf"),it=f(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"),nt=f(function(e,n,s,c){S=t().state;let r=t().securityLevel,g;r==="sandbox"&&(g=L("#i"+n));let h=r==="sandbox"?L(g.nodes()[0].contentDocument.body):L("body"),i=r==="sandbox"?g.nodes()[0].contentDocument:document;b.debug("Rendering diagram "+e);let o=h.select(`[id='${n}']`);it(o);let m=c.db.getRootDoc(),x=o.append("g").attr("id",n+"-root");$(m,x,void 0,!1,h,i,c);let p=S.padding,d=o.node().getBBox(),w=d.width+p*2,y=d.height+p*2,E=w*1.75;R(o,y,E,S.useMaxWidth),o.attr("viewBox",`${d.x-S.padding} ${d.y-S.padding} `+w+" "+y)},"draw"),at=f(e=>e?e.length*S.fontSizeFactor:1,"getLabelWidth"),$=f((e,n,s,c,r,g,h)=>{let i=new F({compound:!0,multigraph:!0}),o,m=!0;for(o=0;o{let B=l.parentElement,k=0,T=0;B&&(B.parentElement&&(k=B.parentElement.getBBox().width),T=parseInt(B.getAttribute("data-x-shift"),10),Number.isNaN(T)&&(T=0)),l.setAttribute("x1",0-T+8),l.setAttribute("x2",k-T-8)})):b.debug("No Node "+a+": "+JSON.stringify(i.node(a)))});let M=E.getBBox();i.edges().forEach(function(a){a!==void 0&&i.edge(a)!==void 0&&(b.debug("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(i.edge(a))),I(n,i.edge(a),i.edge(a).relation))}),M=E.getBBox();let H={id:s||"root",label:s||"root",width:0,height:0};return H.width=M.width+2*S.padding,H.height=M.height+2*S.padding,b.debug("Doc rendered",H,i),H},"renderDoc"),_={setConf:et,draw:nt};var Ht={parser:X,get db(){return new N(1)},renderer:_,styles:J,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Ht as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-v2-36443NZ5.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-v2-36443NZ5.mjs new file mode 100644 index 00000000000..5cc1152d04d --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/stateDiagram-v2-36443NZ5.mjs @@ -0,0 +1 @@ +import{a as e,b as i,c as a,d as o}from"./chunk-LCXTWHL2.mjs";import"./chunk-6764PJDD.mjs";import"./chunk-ZXARS5L4.mjs";import"./chunk-VU6ZFW4Y.mjs";import"./chunk-7J6CGLKN.mjs";import"./chunk-KGFNY3KK.mjs";import"./chunk-5IMINLNL.mjs";import"./chunk-T2UQINTJ.mjs";import"./chunk-5VCL7Z4A.mjs";import"./chunk-UY5QBCOK.mjs";import"./chunk-INKRHTLW.mjs";import"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import"./chunk-67TQ5CYL.mjs";import"./chunk-7W6UQGC5.mjs";import{a as t}from"./chunk-AQ6EADP3.mjs";var f={parser:e,get db(){return new a(2)},renderer:i,styles:o,init:t(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/timeline-definition-O6YCAMPW.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/timeline-definition-O6YCAMPW.mjs new file mode 100644 index 00000000000..d5459a7462b --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/timeline-definition-O6YCAMPW.mjs @@ -0,0 +1,120 @@ +import{a as kt}from"./chunk-LRIF4GLE.mjs";import{n as bt}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{P as J,S as yt,Z as xt,_ as Q,d as gt,e as ft,f as mt,t as it}from"./chunk-67TQ5CYL.mjs";import{F as st,b as w,h as j}from"./chunk-7W6UQGC5.mjs";import{a as s,c as Xt}from"./chunk-AQ6EADP3.mjs";var at=(function(){var e=s(function(b,i,d,l){for(d=d||{},l=b.length;l--;d[b[l]]=i);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],a=[1,13],r=[1,14],h=[1,15],c=[1,16],o=[1,19],f=[1,20],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:s(function(i,d,l,p,y,u,v){var k=u.length-1;switch(y){case 1:return u[k-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[k-1].push(u[k]),this.$=u[k-1];break;case 7:case 8:this.$=u[k];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[k].substr(6)),this.$=u[k].substr(6);break;case 12:this.$=u[k].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[k].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[k].substr(8)),this.$=u[k].substr(8);break;case 18:p.addTask(u[k],0,""),this.$=u[k];break;case 19:p.addEvent(u[k].substr(2)),this.$=u[k];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:a,17:r,19:h,20:c,21:17,22:18,23:o,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:a,17:r,19:h,20:c,21:17,22:18,23:o,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:s(function(i,d){if(d.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=d,l}},"parseError"),parse:s(function(i){var d=this,l=[0],p=[],y=[null],u=[],v=this.table,k="",H=0,V=0,R=0,O=2,L=1,C=u.slice.call(arguments,1),T=Object.create(this.lexer),B={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(B.yy[P]=this.yy[P]);T.setInput(i,B.yy),B.yy.lexer=T,B.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var D=T.yylloc;u.push(D);var $=T.options&&T.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _(W){l.length=l.length-2*W,y.length=y.length-W,u.length=u.length-W}s(_,"popStack");function E(){var W;return W=p.pop()||T.lex()||L,typeof W!="number"&&(W instanceof Array&&(p=W,W=p.pop()),W=d.symbols_[W]||W),W}s(E,"lex");for(var S,I,A,N,nt,X,z={},Z,F,pt,q;;){if(A=l[l.length-1],this.defaultActions[A]?N=this.defaultActions[A]:((S===null||typeof S>"u")&&(S=E()),N=v[A]&&v[A][S]),typeof N>"u"||!N.length||!N[0]){var rt="";q=[];for(Z in v[A])this.terminals_[Z]&&Z>O&&q.push("'"+this.terminals_[Z]+"'");T.showPosition?rt="Parse error on line "+(H+1)+`: +`+T.showPosition()+` +Expecting `+q.join(", ")+", got '"+(this.terminals_[S]||S)+"'":rt="Parse error on line "+(H+1)+": Unexpected "+(S==L?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(rt,{text:T.match,token:this.terminals_[S]||S,line:T.yylineno,loc:D,expected:q})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+S);switch(N[0]){case 1:l.push(S),y.push(T.yytext),u.push(T.yylloc),l.push(N[1]),S=null,I?(S=I,I=null):(V=T.yyleng,k=T.yytext,H=T.yylineno,D=T.yylloc,R>0&&R--);break;case 2:if(F=this.productions_[N[1]][1],z.$=y[y.length-F],z._$={first_line:u[u.length-(F||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(F||1)].first_column,last_column:u[u.length-1].last_column},$&&(z._$.range=[u[u.length-(F||1)].range[0],u[u.length-1].range[1]]),X=this.performAction.apply(z,[k,V,H,B.yy,N[1],y,u].concat(C)),typeof X<"u")return X;F&&(l=l.slice(0,-1*F*2),y=y.slice(0,-1*F),u=u.slice(0,-1*F)),l.push(this.productions_[N[1]][0]),y.push(z.$),u.push(z._$),pt=v[l[l.length-2]][l[l.length-1]],l.push(pt);break;case 3:return!0}}return!0},"parse")},x=(function(){var b={EOF:1,parseError:s(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:s(function(i,d){return this.yy=d||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var d=i.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var d=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),d=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:s(function(i,d){var l,p,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var u in y)this[u]=y[u];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,d,l,p;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),u=0;ud[0].length)){if(d=l,p=u,this.options.backtrack_lexer){if(i=this.test_match(l,y[u]),i!==!1)return i;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(i=this.test_match(d,y[p]),i!==!1?i:!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:s(function(){var d=this.next();return d||this.lex()},"lex"),begin:s(function(d){this.conditionStack.push(d)},"begin"),popState:s(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:s(function(d){this.begin(d)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(d,l,p,y){var u=y;switch(p){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/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]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return b})();g.lexer=x;function m(){this.yy={}}return s(m,"Parser"),m.prototype=g,g.Parser=m,new m})();at.parser=at;var _t=at;var lt={};Xt(lt,{addEvent:()=>Lt,addSection:()=>Nt,addTask:()=>Mt,addTaskOrg:()=>At,clear:()=>Tt,default:()=>Zt,getCommonDb:()=>St,getDirection:()=>$t,getSections:()=>Ht,getTasks:()=>It,setDirection:()=>Et});var K="",vt=0,ot="LR",ct=[],Y=[],U=[],St=s(()=>xt,"getCommonDb"),Tt=s(function(){ct.length=0,Y.length=0,K="",U.length=0,ot="LR",yt()},"clear"),Et=s(function(e){ot=e},"setDirection"),$t=s(function(){return ot},"getDirection"),Nt=s(function(e){K=e,ct.push(e)},"addSection"),Ht=s(function(){return ct},"getSections"),It=s(function(){let e=wt(),t=100,n=0;for(;!e&&nn.id===vt-1).events.push(e)},"addEvent"),At=s(function(e){let t={section:K,type:K,description:e,task:e,classes:[]};Y.push(t)},"addTaskOrg"),wt=s(function(){let e=s(function(n){return U[n].processed},"compileTask"),t=!0;for(let[n,a]of U.entries())e(n),t=t&&a.processed;return t},"compileTasks"),Zt={clear:Tt,getCommonDb:St,getDirection:$t,setDirection:Et,addSection:Nt,getSections:Ht,getTasks:It,addTask:Mt,addTaskOrg:At,addEvent:Lt};var Bt=0,tt=s(function(e,t){let n=e.append("rect");return n.attr("x",t.x),n.attr("y",t.y),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("width",t.width),n.attr("height",t.height),n.attr("rx",t.rx),n.attr("ry",t.ry),t.class!==void 0&&n.attr("class",t.class),n},"drawRect"),qt=s(function(e,t){let a=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");r.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"),r.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 h(f){let g=st().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(h,"smile");function c(f){let g=st().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(c,"sad");function o(f){f.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 s(o,"ambivalent"),t.score>3?h(r):t.score<3?c(r):o(r),a},"drawFace"),Jt=s(function(e,t){let n=e.append("circle");return n.attr("cx",t.cx),n.attr("cy",t.cy),n.attr("class","actor-"+t.pos),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("r",t.r),n.class!==void 0&&n.attr("class",n.class),t.title!==void 0&&n.append("title").text(t.title),n},"drawCircle"),Ct=s(function(e,t){let n=t.text.replace(//gi," "),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);let r=a.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(n),a},"drawText"),Qt=s(function(e,t){function n(r,h,c,o,f){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+o-f)+" "+(r+c-f*1.2)+","+(h+o)+" "+r+","+(h+o)}s(n,"genPoints");let a=e.append("polygon");a.attr("points",n(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,Ct(e,t)},"drawLabel"),Yt=s(function(e,t,n){let a=e.append("g"),r=dt();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,tt(a,r),Wt(n)(t.text,a,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},n,t.colour)},"drawSection"),ht=-1,te=s(function(e,t,n,a){let r=t.x+n.width/2,h=e.append("g");ht++,h.append("line").attr("id",a+"-task"+ht).attr("x1",r).attr("y1",t.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),qt(h,{cx:r,cy:300+(5-t.score)*30,score:t.score});let o=dt();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class="task task-type-"+t.num,o.rx=3,o.ry=3,tt(h,o),Wt(n)(t.task,h,o.x,o.y,o.width,o.height,{class:"task"},n,t.colour)},"drawTask"),ee=s(function(e,t){tt(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),ne=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),dt=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Wt=(function(){function e(r,h,c,o,f,g,x,m){let b=h.append("text").attr("x",c+f/2).attr("y",o+g/2+5).style("font-color",m).style("text-anchor","middle").text(r);a(b,x)}s(e,"byText");function t(r,h,c,o,f,g,x,m,b){let{taskFontSize:i,taskFontFamily:d}=m,l=r.split(//gi);for(let p=0;p)/).reverse(),r,h=[],c=1.1,o=n.attr("y"),f=parseFloat(n.attr("dy")),g=n.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",f+"em");for(let x=0;xt||r==="
    ")&&(h.pop(),g.text(h.join(" ").trim()),r==="
    "?h=[""]:h=[r],g=n.append("tspan").attr("x",0).attr("y",o).attr("dy",c+"em").text(r))})}s(Vt,"wrap");var ie=s(function(e,t,n,a,r,h=!1){let{theme:c,look:o}=a,f=c?.includes("redux"),g=a?.themeVariables?.THEME_COLOR_LIMIT??12,x=n%g-1,m=e.append("g");t.section=x,m.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+x));let b=m.append("g"),i=m.append("g"),l=i.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Vt,t.width).node().getBBox(),p=a.fontSize?.replace?a.fontSize.replace("px",""):a.fontSize;if(t.height=l.height+p*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,i.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),f&&i.attr("transform",`translate(${t.width/2}, ${h?t.padding/2+3:t.padding})`),ae(b,t,x,r,a),o==="neo"&&(m.attr("data-look","neo"),f)){let y=c.includes("dark"),u=e.node()?.ownerSVGElement??e.node(),v=j(u),k=v.attr("id")??"",H=k?`${k}-drop-shadow`:"drop-shadow";if(v.select(`#${H}`).empty()){let V=v.select("defs");(V.empty()?v.append("defs"):V).append("filter").attr("id",H).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",y?"0.2":"0.06").attr("flood-color",y?"#FFFFFF":"#000000")}}return t},"drawNode"),se=s(function(e,t,n){let a=e.append("g"),h=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Vt,t.width).node().getBBox(),c=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return a.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),ae=s(function(e,t,n,a,r){let{theme:h}=r,c=h?.includes("redux")?0:5,o=5,f=c>0?`M0 ${t.height-o} v${-t.height+2*o} q0,-${c},${c},-${c} h${t.width-2*o} q${c},0,${c},${c} v${t.height-o} H0 Z`:`M0 ${t.height-o} v${-(t.height-o)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",a+"-node-"+Bt++).attr("class","node-bkg node-"+t.type).attr("d",f),h?.includes("redux")||e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),M={drawRect:tt,drawCircle:Jt,drawSection:Yt,drawText:Ct,drawLabel:Qt,drawTask:te,drawBackgroundRect:ee,getTextObj:ne,getNoteRect:dt,initGraphics:re,drawNode:ie,getVirtualNodeHeight:se};var oe=s(function(e,t,n,a){let r=Q(),{look:h,theme:c,themeVariables:o}=r,{useGradient:f,gradientStart:g,gradientStop:x}=o,m=r.timeline?.leftMargin??50;w.debug("timeline",a.db);let b=r.securityLevel,i;b==="sandbox"&&(i=j("#i"+t));let l=(b==="sandbox"?j(i.nodes()[0].contentDocument.body):j("body")).select("#"+t);l.append("g");let p=a.db.getTasks(),y=a.db.getCommonDb().getDiagramTitle();w.debug("task",p),M.initGraphics(l,t);let u=a.db.getSections();w.debug("sections",u);let v=0,k=0,H=0,V=0,R=50+m,O=50;V=50;let L=0,C=!0;u.forEach(function($){let _={number:L,descr:$,section:L,width:150,padding:20,maxHeight:v},E=M.getVirtualNodeHeight(l,_,r);w.debug("sectionHeight before draw",E),v=Math.max(v,E+20)});let T=0,B=0;w.debug("tasks.length",p.length);for(let[$,_]of p.entries()){let E={number:$,descr:_,section:_.section,width:150,padding:20,maxHeight:k},S=M.getVirtualNodeHeight(l,E,r);w.debug("taskHeight before draw",S),k=Math.max(k,S+20),T=Math.max(T,_.events.length);let I=0;for(let A of _.events){let N={descr:A,section:_.section,number:_.section,width:150,padding:20,maxHeight:50};I+=M.getVirtualNodeHeight(l,N,r)}_.events.length>0&&(I+=(_.events.length-1)*10),B=Math.max(B,I)}w.debug("maxSectionHeight before draw",v),w.debug("maxTaskHeight before draw",k),u&&u.length>0?u.forEach($=>{let _=p.filter(A=>A.section===$),E={number:L,descr:$,section:L,width:200*Math.max(_.length,1)-50,padding:20,maxHeight:v};w.debug("sectionNode",E);let S=l.append("g"),I=M.drawNode(S,E,L,r,t);w.debug("sectionNode output",I),S.attr("transform",`translate(${R}, ${V})`),O+=v+50,_.length>0&&Rt(l,_,L,R,O,k,r,T,B,v,!1,t),R+=200*Math.max(_.length,1),O=V,L++}):(C=!1,Rt(l,p,L,R,O,k,r,T,B,v,!0,t));let P=l.node().getBBox();if(w.debug("bounds",P),y&&l.append("text").text(y).attr("x",h==="neo"?P.x*2+m:P.width/2-m).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),H=C?v+k+150:k+100,l.append("g").attr("class","lineWrapper").append("line").attr("x1",m).attr("y1",H).attr("x2",P.width+3*m).attr("y2",H).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),h==="neo"&&f&&c!=="neutral"){let $=l.select("defs"),E=($.empty()?l.append("defs"):$).append("linearGradient").attr("id",l.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");E.append("stop").attr("offset","0%").attr("stop-color",g).attr("stop-opacity",1),E.append("stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}J(void 0,l,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),Rt=s(function(e,t,n,a,r,h,c,o,f,g,x,m){for(let b of t){let i={descr:b.task,section:n,number:n,width:150,padding:20,maxHeight:h};w.debug("taskNode",i);let d=e.append("g").attr("class","taskWrapper"),p=M.drawNode(d,i,n,c,m).height;if(w.debug("taskHeight after draw",p),d.attr("transform",`translate(${a}, ${r})`),h=Math.max(h,p),b.events){let y=e.append("g").attr("class","lineWrapper"),u=h;r+=100,u=u+ce(e,b.events,n,a,r,c,m),r-=100,y.append("line").attr("x1",a+190/2).attr("y1",r+h).attr("x2",a+190/2).attr("y2",r+h+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${m}-arrowhead)`).attr("stroke-dasharray","5,5")}a=a+200,x&&!c.timeline?.disableMulticolor&&n++}r=r-10},"drawTasks"),ce=s(function(e,t,n,a,r,h,c){let o=0,f=r;r=r+100;for(let g of t){let x={descr:g,section:n,number:n,width:150,padding:20,maxHeight:50};w.debug("eventNode",x);let m=e.append("g").attr("class","eventWrapper"),i=M.drawNode(m,x,n,h,c,!0).height;o=o+i,m.attr("transform",`translate(${a}, ${r})`),r=r+10+i}return r=f,o},"drawEvents"),Pt={setConf:s(()=>{},"setConf"),draw:oe};var et=200,G=5,le=et+G*2,ut=et+100,he=ut+G*2,Ot=10,de=0,Ft=20,Dt=20,Gt=30,jt=50,ue=s(function(e,t,n,a){let r=Q(),h=r.timeline?.leftMargin??50;w.debug("timeline",a.db);let c=kt(t);c.append("g");let o=a.db.getTasks(),f=a.db.getCommonDb().getDiagramTitle();w.debug("task",o),M.initGraphics(c);let g=a.db.getSections();w.debug("sections",g);let x=0,m=0,b=50+h,i=50,d=i,l=b,p=le+Dt,y=he+jt,u=l+p,v=0,k=g&&g.length>0,H=k?u:b+p,V=Math.max(50,p+y-G*2);g.forEach(function($){let _={number:v,descr:$,section:v,width:V,padding:G,maxHeight:x},E=M.getVirtualNodeHeight(c,_,r);w.debug("sectionHeight before draw",E),x=Math.max(x,E)});let R=0;w.debug("tasks.length",o.length);for(let[$,_]of o.entries()){let E={number:$,descr:_,section:_.section,width:et,padding:G,maxHeight:m},S=M.getVirtualNodeHeight(c,E,r);w.debug("taskHeight before draw",S),m=Math.max(m,S);let I=0;for(let A of _.events){let N={descr:A,section:_.section,number:_.section,width:ut,padding:G,maxHeight:50};I+=M.getVirtualNodeHeight(c,N,r)}_.events.length>0&&(I+=(_.events.length-1)*Ot),R=Math.max(R,I)+de}w.debug("maxSectionHeight before draw",x),w.debug("maxTaskHeight before draw",m);let L=Math.max(m,R)+Gt;k?g.forEach($=>{let _=o.filter(z=>z.section===$),E={number:v,descr:$,section:v,width:V,padding:G,maxHeight:x};w.debug("sectionNode",E);let S=c.append("g"),I=M.drawNode(S,E,v,r);w.debug("sectionNode output",I);let A=H-p;S.attr("transform",`translate(${A}, ${i})`);let N=i+I.height+Ft;_.length>0&&zt(c,_,v,H,N,m,r,L,!1);let nt=_.length,X=I.height+Ft+L*Math.max(nt,1)-(nt>0?Gt*2:0);i+=X,v++}):zt(c,o,v,H,i,m,r,L,!0);let C=c.node()?.getBBox();if(!C)throw new Error("bbox not found");if(w.debug("bounds",C),f){if(c.append("text").text(f).attr("x",C.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),C=c.node()?.getBBox(),!C)throw new Error("bbox not found");w.debug("bounds after title",C)}let[T]=bt(r.fontSize),B=(T??16)*2,P=(T??16)*.5+20,D=c.append("g").attr("class","lineWrapper");D.append("line").attr("x1",H).attr("y1",d-B).attr("x2",H).attr("y2",C.y+C.height+P).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),D.lower(),J(void 0,c,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),zt=s(function(e,t,n,a,r,h,c,o,f){for(let g of t){let x={descr:g.task,section:n,number:n,width:et,padding:G,maxHeight:h};w.debug("taskNode",x);let m=e.append("g").attr("class","taskWrapper"),b=M.drawNode(m,x,n,c),i=b.height;w.debug("taskHeight after draw",i);let d=a-Dt-b.width;if(m.attr("transform",`translate(${d}, ${r})`),h=Math.max(h,i),g.events&&g.events.length>0){let l=r,p=a+jt;pe(e,g.events,n,a,p,l,c)}r=r+o,f&&!c.timeline?.disableMulticolor&&n++}},"drawTasks"),pe=s(function(e,t,n,a,r,h,c){let o=h;for(let f of t){let g={descr:f,section:n,number:n,width:ut,padding:G,maxHeight:0};w.debug("eventNode",g);let x=e.append("g").attr("class","eventWrapper"),b=M.drawNode(x,g,n,c).height;x.attr("transform",`translate(${r}, ${o})`);let i=e.append("g").attr("class","lineWrapper"),d=o+b/2;i.append("line").attr("x1",a).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+b+Ot}return o-h},"drawEvents"),Kt={setConf:s(()=>{},"setConf"),draw:ue};var ge=s(e=>{let{theme:t}=it(),n=t?.includes("dark"),a=t?.includes("color"),r=e.svgId?.replace(/^#/,"")??"",h=r?`url(#${r}-drop-shadow)`:e.dropShadow??"none",c="";for(let o=0;o{let t="";for(let n=0;n{let{theme:t}=it(),n=t?.includes("redux"),a=t==="neutral",r=e.svgId?.replace(/^#/,"")??"",h="";if(e.useGradient&&r&&e.THEME_COLOR_LIMIT&&!a)for(let c=0;c{},"setConf"),draw:s((e,t,n,a)=>(a?.db?.getDirection?.()??"LR")==="TD"?Kt.draw(e,t,n,a):Pt.draw(e,t,n,a),"draw")},Ue={db:lt,renderer:ye,parser:_t,styles:Ut};export{Ue as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/xychartDiagram-N2JHSOCM.mjs b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/xychartDiagram-N2JHSOCM.mjs new file mode 100644 index 00000000000..daff9615172 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/chunks/mermaid.esm.min/xychartDiagram-N2JHSOCM.mjs @@ -0,0 +1,7 @@ +import{a as $t}from"./chunk-LRIF4GLE.mjs";import{e as Ut}from"./chunk-INKRHTLW.mjs";import{o as wt}from"./chunk-QA3QBVWF.mjs";import"./chunk-KNLZD3CH.mjs";import{A as Wt,O as Ot,S as zt,T as Ft,U as Nt,V as jt,W as Gt,X as Ht,Y as Ct,h as It,j as Mt,t as rt}from"./chunk-67TQ5CYL.mjs";import{H as Tt,b as nt,n as At,o as Dt}from"./chunk-7W6UQGC5.mjs";import{a as s}from"./chunk-AQ6EADP3.mjs";var kt=(function(){var i=s(function(d,o,l,g){for(l=l||{},g=d.length;g--;l[d[g]]=o);return l},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],a=[1,3],n=[1,5],h=[1,6],p=[1,7],A=[1,5,10,12,14,16,18,19,21,23,34,35,36],D=[1,25],Y=[1,26],V=[1,28],_=[1,29],L=[1,30],I=[1,31],M=[1,32],R=[1,33],W=[1,34],O=[1,35],z=[1,36],m=[1,37],P=[1,43],c=[1,42],N=[1,47],B=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],j=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],k=[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],$=[1,64],T={trace:s(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:s(function(o,l,g,u,C,r,G){var x=r.length-1;switch(C){case 5:u.setOrientation(r[x]);break;case 9:u.setDiagramTitle(r[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},r[x]);break;case 13:u.setLineData(r[x-1],r[x]);break;case 14:u.setBarData({text:"",type:"text"},r[x]);break;case 15:u.setBarData(r[x-1],r[x]);break;case 16:this.$=r[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=r[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=r[x-1];break;case 20:this.$=[Number(r[x-2]),...r[x]];break;case 21:this.$=[Number(r[x])];break;case 22:u.setXAxisTitle(r[x]);break;case 23:u.setXAxisTitle(r[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(r[x]);break;case 26:u.setXAxisRangeData(Number(r[x-2]),Number(r[x]));break;case 27:this.$=r[x-1];break;case 28:this.$=[r[x-2],...r[x]];break;case 29:this.$=[r[x]];break;case 30:u.setYAxisTitle(r[x]);break;case 31:u.setYAxisTitle(r[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(r[x-2]),Number(r[x]));break;case 37:this.$={text:r[x],type:"text"};break;case 38:this.$={text:r[x],type:"text"};break;case 39:this.$={text:r[x],type:"markdown"};break;case 40:this.$=r[x];break;case 41:this.$=r[x-1]+""+r[x];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:a,34:n,35:h,36:p}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:a,34:n,35:h,36:p}),i(t,e,{4:2,7:4,6:9,3:10,5:a,8:[1,11],34:n,35:h,36:p}),{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]},i(A,[2,34]),i(A,[2,35]),i(A,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:a,34:n,35:h,36:p}),{1:[2,3]},i(A,[2,5]),i(t,[2,7],{4:22,34:n,35:h,36:p}),{11:23,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},{11:39,13:38,24:P,27:c,29:40,30:41,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},{11:45,15:44,27:N,33:46,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},{11:49,17:48,24:B,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},{11:52,17:51,24:B,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},{20:[1,53]},{22:[1,54]},i(b,[2,18]),{1:[2,2]},i(b,[2,8]),i(b,[2,9]),i(j,[2,37],{40:55,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m}),i(j,[2,38]),i(j,[2,39]),i(k,[2,40]),i(k,[2,42]),i(k,[2,43]),i(k,[2,44]),i(k,[2,45]),i(k,[2,46]),i(k,[2,47]),i(k,[2,48]),i(k,[2,49]),i(k,[2,50]),i(k,[2,51]),i(b,[2,10]),i(b,[2,22],{30:41,29:56,24:P,27:c}),i(b,[2,24]),i(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},i(b,[2,11]),i(b,[2,30],{33:60,27:N}),i(b,[2,32]),{31:[1,61]},i(b,[2,12]),{17:62,24:B},{25:63,27:$},i(b,[2,14]),{17:65,24:B},i(b,[2,16]),i(b,[2,17]),i(k,[2,41]),i(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(b,[2,31]),{27:[1,69]},i(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(b,[2,15]),i(b,[2,26]),i(b,[2,27]),{11:59,32:72,37:24,38:D,39:Y,40:27,41:V,42:_,43:L,44:I,45:M,46:R,47:W,48:O,49:z,50:m},i(b,[2,33]),i(b,[2,19]),{25:73,27:$},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:s(function(o,l){if(l.recoverable)this.trace(o);else{var g=new Error(o);throw g.hash=l,g}},"parseError"),parse:s(function(o){var l=this,g=[0],u=[],C=[null],r=[],G=this.table,x="",it=0,Xt=0,Yt=0,oe=2,Bt=1,he=r.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(H.yy[mt]=this.yy[mt]);w.setInput(o,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var ft=w.yylloc;r.push(ft);var le=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(E){g.length=g.length-2*E,C.length=C.length-E,r.length=r.length-E}s(Se,"popStack");function ce(){var E;return E=u.pop()||w.lex()||Bt,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=l.symbols_[E]||E),E}s(ce,"lex");for(var S,dt,U,X,_e,bt,q={},at,F,Vt,st;;){if(U=g[g.length-1],this.defaultActions[U]?X=this.defaultActions[U]:((S===null||typeof S>"u")&&(S=ce()),X=G[U]&&G[U][S]),typeof X>"u"||!X.length||!X[0]){var yt="";st=[];for(at in G[U])this.terminals_[at]&&at>oe&&st.push("'"+this.terminals_[at]+"'");w.showPosition?yt="Parse error on line "+(it+1)+`: +`+w.showPosition()+` +Expecting `+st.join(", ")+", got '"+(this.terminals_[S]||S)+"'":yt="Parse error on line "+(it+1)+": Unexpected "+(S==Bt?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(yt,{text:w.match,token:this.terminals_[S]||S,line:w.yylineno,loc:ft,expected:st})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+S);switch(X[0]){case 1:g.push(S),C.push(w.yytext),r.push(w.yylloc),g.push(X[1]),S=null,dt?(S=dt,dt=null):(Xt=w.yyleng,x=w.yytext,it=w.yylineno,ft=w.yylloc,Yt>0&&Yt--);break;case 2:if(F=this.productions_[X[1]][1],q.$=C[C.length-F],q._$={first_line:r[r.length-(F||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(F||1)].first_column,last_column:r[r.length-1].last_column},le&&(q._$.range=[r[r.length-(F||1)].range[0],r[r.length-1].range[1]]),bt=this.performAction.apply(q,[x,Xt,it,H.yy,X[1],C,r].concat(he)),typeof bt<"u")return bt;F&&(g=g.slice(0,-1*F*2),C=C.slice(0,-1*F),r=r.slice(0,-1*F)),g.push(this.productions_[X[1]][0]),C.push(q.$),r.push(q._$),Vt=G[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},y=(function(){var d={EOF:1,parseError:s(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:s(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:s(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:s(function(o){var l=o.length,g=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;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),g.length-1&&(this.yylineno-=g.length-1);var C=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===u.length?this.yylloc.first_column:0)+u[u.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(o){this.unput(this.match.slice(o))},"less"),pastInput:s(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:s(function(o,l){var g,u,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),u=o[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+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],g=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in C)this[r]=C[r];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,g,u;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),r=0;rl[0].length)){if(l=g,u=r,this.options.backtrack_lexer){if(o=this.test_match(g,C[r]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,C[u]),o!==!1?o:!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:s(function(){var l=this.next();return l||this.lex()},"lex"),begin:s(function(l){this.conditionStack.push(l)},"begin"),popState:s(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:s(function(l){this.begin(l)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(l,g,u,C){var r=C;switch(u){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 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 31;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 27;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46: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,/^(?:xychart\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,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],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:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return d})();T.lexer=y;function v(){this.yy={}}return s(v,"Parser"),v.prototype=T,T.Parser=v,new v})();kt.parser=kt;var qt=kt;function St(i){return i.type==="bar"}s(St,"isBarPlot");function ot(i){return i.type==="band"}s(ot,"isBandAxisData");function Q(i){return i.type==="linear"}s(Q,"isLinearAxisData");var K=class{constructor(t){this.parentGroup=t}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((h,p)=>Math.max(p.length,h),0)*e,height:e};let a={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(let h of t){let p=Ut(n,1,h),A=p?p.width:h.length*e,D=p?p.height:e;a.width=Math.max(a.width,A),a.height=Math.max(a.height,D)}return n.remove(),a}};var Z=class{constructor(t,e,a,n){this.axisConfig=t;this.title=e;this.textDimensionCalculator=a;this.axisThemeConfig=n;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{s(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 e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let a=this.getLabelDimension(),n=.2*t.width;this.outerPadding=Math.min(a.width/2,n);let h=a.height+this.axisConfig.labelPadding*2;this.labelTextHeight=a.height,h<=e&&(e-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=a.height+this.axisConfig.titlePadding*2;this.titleTextHeight=a.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let a=this.getLabelDimension(),n=.2*t.height;this.outerPadding=Math.min(a.height/2,n);let h=a.width+this.axisConfig.labelPadding*2;h<=e&&(e-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=a.height+this.axisConfig.titlePadding*2;this.titleTextHeight=a.height,n<=e&&(e-=n,this.showTitle=!0)}this.boundingRect.width=t.width-e,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 e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${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(e=>({text:e.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(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${e},${this.getScaleValue(a)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(a)}`,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 e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${e} L ${this.getScaleValue(a)},${e+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 e=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},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),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 e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${e+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 ht=class extends Z{static{s(this,"BandAxis")}constructor(t,e,a,n,h){super(t,n,h,e),this.categories=a,this.scale=At().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=At().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),nt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}};var lt=class extends Z{static{s(this,"LinearAxis")}constructor(t,e,a,n,h){super(t,n,h,e),this.domain=a,this.scale=Dt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Dt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function _t(i,t,e,a){let n=new K(a);return ot(i)?new ht(t,e,i.categories,i.title,n):new lt(t,e,[i.min,i.max],i.title,n)}s(_t,"getAxis");var Rt=class{constructor(t,e,a,n){this.textDimensionCalculator=t;this.chartConfig=e;this.chartData=a;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),a=Math.max(e.width,t.width),n=e.height+2*this.chartConfig.titlePadding;return e.width<=a&&e.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=a,this.boundingRect.height=n,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}};function Qt(i,t,e,a){let n=new K(a);return new Rt(n,i,t,e)}s(Qt,"getChartTitleComponent");var ct=class{constructor(t,e,a,n,h){this.plotData=t;this.xAxis=e;this.yAxis=a;this.orientation=n;this.plotIndex=h}static{s(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),e;return this.orientation==="horizontal"?e=Tt().y(a=>a[0]).x(a=>a[1])(t):e=Tt().x(a=>a[0]).y(a=>a[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}};var gt=class{constructor(t,e,a,n,h,p){this.barData=t;this.boundingRect=e;this.xAxis=a;this.yAxis=n;this.orientation=h;this.plotIndex=p}static{s(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(h=>[this.xAxis.getScaleValue(h[0]),this.yAxis.getScaleValue(h[1])]),a=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=a/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(h=>({x:this.boundingRect.x,y:h[0]-n,height:a,width:h[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(h=>({x:h[0]-n,y:h[1],width:a,height:this.boundingRect.y+this.boundingRect.height-h[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}};var Pt=class{constructor(t,e,a){this.chartConfig=t;this.chartData=e;this.chartThemeConfig=a;this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}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[e,a]of this.chartData.plots.entries())switch(a.type){case"line":{let n=new ct(a,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break;case"bar":{let n=new gt(a,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...n.getDrawableElement())}break}return t}};function Kt(i,t,e){return new Pt(i,t,e)}s(Kt,"getPlotComponent");var ut=class{constructor(t,e,a,n){this.chartConfig=t;this.chartData=e;this.componentStore={title:Qt(t,e,a,n),plot:Kt(t,e,a),xAxis:_t(e.xAxis,t.xAxis,{titleColor:a.xAxisTitleColor,labelColor:a.xAxisLabelColor,tickColor:a.xAxisTickColor,axisLineColor:a.xAxisLineColor},n),yAxis:_t(e.yAxis,t.yAxis,{titleColor:a.yAxisTitleColor,labelColor:a.yAxisLabelColor,tickColor:a.yAxisTickColor,axisLineColor:a.yAxisLineColor},n)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,a=0,n=0,h=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),A=this.componentStore.plot.calculateSpace({width:h,height:p});t-=A.width,e-=A.height,A=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),n=A.height,e-=A.height,this.componentStore.xAxis.setAxisPosition("bottom"),A=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=A.height,this.componentStore.yAxis.setAxisPosition("left"),A=this.componentStore.yAxis.calculateSpace({width:t,height:e}),a=A.width,t-=A.width,t>0&&(h+=t,t=0),e>0&&(p+=e,e=0),this.componentStore.plot.calculateSpace({width:h,height:p}),this.componentStore.plot.setBoundingBoxXY({x:a,y:n}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:a,y:n+p}),this.componentStore.yAxis.setRange([n,n+p]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(D=>St(D))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,a=0,n=0,h=0,p=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),A=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),D=this.componentStore.plot.calculateSpace({width:p,height:A});t-=D.width,e-=D.height,D=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),a=D.height,e-=D.height,this.componentStore.xAxis.setAxisPosition("left"),D=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=D.width,n=D.width,this.componentStore.yAxis.setAxisPosition("top"),D=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=D.height,h=a+D.height,t>0&&(p+=t,t=0),e>0&&(A+=e,e=0),this.componentStore.plot.calculateSpace({width:p,height:A}),this.componentStore.plot.setBoundingBoxXY({x:n,y:h}),this.componentStore.yAxis.setRange([n,n+p]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:a}),this.componentStore.xAxis.setRange([h,h+A]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:h}),this.chartData.plots.some(Y=>St(Y))&&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 e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}};var pt=class{static{s(this,"XYChartBuilder")}static build(t,e,a,n){return new ut(t,e,a,n).getDrawableElement()}};var J=0,Zt,tt=te(),et=Jt(),f=ee(),vt=et.plotColorPalette.split(",").map(i=>i.trim()),xt=!1,Et=!1;function Jt(){let i=It(),t=rt();return wt(i.xyChart,t.themeVariables.xyChart)}s(Jt,"getChartDefaultThemeConfig");function te(){let i=rt();return wt(Mt.xyChart,i.xyChart)}s(te,"getChartDefaultConfig");function ee(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}s(ee,"getChartDefaultData");function Lt(i){let t=rt();return Wt(i.trim(),t)}s(Lt,"textSanitizer");function ge(i){Zt=i}s(ge,"setTmpSVGG");function ue(i){i==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}s(ue,"setOrientation");function pe(i){f.xAxis.title=Lt(i.text)}s(pe,"setXAxisTitle");function ie(i,t){f.xAxis={type:"linear",title:f.xAxis.title,min:i,max:t},xt=!0}s(ie,"setXAxisRangeData");function xe(i){f.xAxis={type:"band",title:f.xAxis.title,categories:i.map(t=>Lt(t.text))},xt=!0}s(xe,"setXAxisBand");function me(i){f.yAxis.title=Lt(i.text)}s(me,"setYAxisTitle");function fe(i,t){f.yAxis={type:"linear",title:f.yAxis.title,min:i,max:t},Et=!0}s(fe,"setYAxisRangeData");function de(i){let t=Math.min(...i),e=Math.max(...i),a=Q(f.yAxis)?f.yAxis.min:1/0,n=Q(f.yAxis)?f.yAxis.max:-1/0;f.yAxis={type:"linear",title:f.yAxis.title,min:Math.min(a,t),max:Math.max(n,e)}}s(de,"setYAxisRangeFromPlotData");function ae(i){let t=[];if(i.length===0)return t;if(!xt){let e=Q(f.xAxis)?f.xAxis.min:1/0,a=Q(f.xAxis)?f.xAxis.max:-1/0;ie(Math.min(e,1),Math.max(a,i.length))}if(Et||de(i),ot(f.xAxis)&&(t=f.xAxis.categories.map((e,a)=>[e,i[a]])),Q(f.xAxis)){let e=f.xAxis.min,a=f.xAxis.max,n=(a-e)/(i.length-1),h=[];for(let p=e;p<=a;p+=n)h.push(`${p}`);t=h.map((p,A)=>[p,i[A]])}return t}s(ae,"transformDataWithoutCategory");function se(i){return vt[i===0?0:i%vt.length]}s(se,"getPlotColorFromPalette");function be(i,t){let e=ae(t);f.plots.push({type:"line",strokeFill:se(J),strokeWidth:2,data:e}),J++}s(be,"setLineData");function ye(i,t){let e=ae(t);f.plots.push({type:"bar",fill:se(J),data:e}),J++}s(ye,"setBarData");function Ce(){if(f.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return f.title=Ct(),pt.build(tt,f,et,Zt)}s(Ce,"getDrawableElem");function Ae(){return et}s(Ae,"getChartThemeConfig");function De(){return tt}s(De,"getChartConfig");function Te(){return f}s(Te,"getXYChartData");var we=s(function(){zt(),J=0,tt=te(),f=ee(),et=Jt(),vt=et.plotColorPalette.split(",").map(i=>i.trim()),xt=!1,Et=!1},"clear"),ne={getDrawableElem:Ce,clear:we,setAccTitle:Ft,getAccTitle:Nt,setDiagramTitle:Ht,getDiagramTitle:Ct,getAccDescription:Gt,setAccDescription:jt,setOrientation:ue,setXAxisTitle:pe,setXAxisRangeData:ie,setXAxisBand:xe,setYAxisTitle:me,setYAxisRangeData:fe,setLineData:be,setBarData:ye,setTmpSVGG:ge,getChartThemeConfig:Ae,getChartConfig:De,getXYChartData:Te};var ke=s((i,t,e,a)=>{let n=a.db,h=n.getChartThemeConfig(),p=n.getChartConfig(),A=n.getXYChartData().plots[0].data.map(m=>m[1]);function D(m){return m==="top"?"text-before-edge":"middle"}s(D,"getDominantBaseLine");function Y(m){return m==="left"?"start":m==="right"?"end":"middle"}s(Y,"getTextAnchor");function V(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}s(V,"getTextTransformation"),nt.debug(`Rendering xychart chart +`+i);let _=$t(t),L=_.append("g").attr("class","main"),I=L.append("rect").attr("width",p.width).attr("height",p.height).attr("class","background");Ot(_,p.height,p.width,!0),_.attr("viewBox",`0 0 ${p.width} ${p.height}`),I.attr("fill",h.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let M=n.getDrawableElem(),R={};function W(m){let P=L,c="";for(let[N]of m.entries()){let B=L;N>0&&R[c]&&(B=R[c]),c+=m[N],P=R[c],P||(P=R[c]=B.append("g").attr("class",m[N]))}return P}s(W,"getGroup");for(let m of M){if(m.data.length===0)continue;let P=W(m.groupTexts);switch(m.type){case"rect":if(P.selectAll("rect").data(m.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),p.showDataLabel){let c=p.showDataLabelOutsideBar;if(p.chartOrientation==="horizontal"){let j=function(y,v){let{data:d,label:o}=y;return v*o.length*.7<=d.width-10};var O=j;s(j,"fitsHorizontally");let N=.7,B=10,b=m.data.map((y,v)=>({data:y,label:A[v].toString()})).filter(y=>y.data.width>0&&y.data.height>0),k=b.map(y=>{let{data:v}=y,d=v.height*.7;for(;!j(y,d)&&d>0;)d-=1;return d}),$=Math.floor(Math.min(...k)),T=s(y=>c?y.data.x+y.data.width+10:y.data.x+y.data.width-10,"determineLabelXPosition");P.selectAll("text").data(b).enter().append("text").attr("x",T).attr("y",y=>y.data.y+y.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${$}px`).text(y=>y.label)}else{let b=function(T,y,v){let{data:d,label:o}=T,g=y*o.length*.7,u=d.x+d.width/2,C=u-g/2,r=u+g/2,G=C>=d.x&&r<=d.x+d.width,x=d.y+v+y<=d.y+d.height;return G&&x};var z=b;s(b,"fitsInBar");let N=10,B=m.data.map((T,y)=>({data:T,label:A[y].toString()})).filter(T=>T.data.width>0&&T.data.height>0),j=B.map(T=>{let{data:y,label:v}=T,d=y.width/(v.length*.7);for(;!b(T,d,10)&&d>0;)d-=1;return d}),k=Math.floor(Math.min(...j)),$=s(T=>c?T.data.y-10:T.data.y+10,"determineLabelYPosition");P.selectAll("text").data(B).enter().append("text").attr("x",T=>T.data.x+T.data.width/2).attr("y",$).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${k}px`).text(T=>T.label)}}break;case"text":P.selectAll("text").data(m.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=>D(c.verticalPos)).attr("text-anchor",c=>Y(c.horizontalPos)).attr("transform",c=>V(c)).text(c=>c.text);break;case"path":P.selectAll("path").data(m.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"),re={draw:ke};var Ii={parser:qt,db:ne,renderer:re};export{Ii as diagram}; diff --git a/TMessagesProj/src/main/assets/mermaid/manifest.json b/TMessagesProj/src/main/assets/mermaid/manifest.json new file mode 100644 index 00000000000..ebdebfef489 --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/manifest.json @@ -0,0 +1,24 @@ +{ + "mermaidVersion": "11.15.0", + "root": "mermaid.esm.min.mjs", + "selected": [ + "chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs", + "chunks/mermaid.esm.min/sequenceDiagram-VS2MUI6T.mjs", + "chunks/mermaid.esm.min/classDiagram-KGZ6W3CR.mjs", + "chunks/mermaid.esm.min/classDiagram-v2-72OJOZXJ.mjs", + "chunks/mermaid.esm.min/stateDiagram-7D4R322I.mjs", + "chunks/mermaid.esm.min/stateDiagram-v2-36443NZ5.mjs", + "chunks/mermaid.esm.min/erDiagram-L5TCEMPS.mjs", + "chunks/mermaid.esm.min/gitGraphDiagram-S2ZK5IYY.mjs", + "chunks/mermaid.esm.min/journeyDiagram-M6C3CM3L.mjs", + "chunks/mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs", + "chunks/mermaid.esm.min/pieDiagram-CU6KROY3.mjs", + "chunks/mermaid.esm.min/quadrantDiagram-VICAPDV7.mjs", + "chunks/mermaid.esm.min/requirementDiagram-JXO7QTGE.mjs", + "chunks/mermaid.esm.min/mindmap-definition-2TDM6QVE.mjs", + "chunks/mermaid.esm.min/timeline-definition-O6YCAMPW.mjs", + "chunks/mermaid.esm.min/xychartDiagram-N2JHSOCM.mjs" + ], + "fileCount": 57, + "totalBytes": 2327638 +} diff --git a/TMessagesProj/src/main/assets/mermaid/mermaid.esm.min.mjs b/TMessagesProj/src/main/assets/mermaid/mermaid.esm.min.mjs new file mode 100644 index 00000000000..f3cb54322bb --- /dev/null +++ b/TMessagesProj/src/main/assets/mermaid/mermaid.esm.min.mjs @@ -0,0 +1,12 @@ +import{a as Zt}from"./chunks/mermaid.esm.min/chunk-LRIF4GLE.mjs";import{a as Wt,b as Kt}from"./chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs";import{a as Qt}from"./chunks/mermaid.esm.min/chunk-VU6ZFW4Y.mjs";import"./chunks/mermaid.esm.min/chunk-7J6CGLKN.mjs";import"./chunks/mermaid.esm.min/chunk-KGFNY3KK.mjs";import"./chunks/mermaid.esm.min/chunk-5IMINLNL.mjs";import"./chunks/mermaid.esm.min/chunk-T2UQINTJ.mjs";import"./chunks/mermaid.esm.min/chunk-5VCL7Z4A.mjs";import"./chunks/mermaid.esm.min/chunk-UY5QBCOK.mjs";import{b as _t,d as Gt}from"./chunks/mermaid.esm.min/chunk-INKRHTLW.mjs";import{b as wt,d as Bt,m as Lt,o as Yt,p as $,q as qt,r as Xt}from"./chunks/mermaid.esm.min/chunk-QA3QBVWF.mjs";import"./chunks/mermaid.esm.min/chunk-KNLZD3CH.mjs";import{H as $t,J as Ht,K,L as at,M as Q,N as zt,O as Nt,Q as Et,R as Ut,a as Rt,da as G,ea as Z,i as et,l as Tt,m as xt,n as Ct,o as kt,p as jt,q as Ot,r as ht,s as It,t as _,u as Pt,v as W,x as Ft,y as Vt}from"./chunks/mermaid.esm.min/chunk-67TQ5CYL.mjs";import{b as f,c as yt,h as k}from"./chunks/mermaid.esm.min/chunk-7W6UQGC5.mjs";import{a as r}from"./chunks/mermaid.esm.min/chunk-AQ6EADP3.mjs";var Ke=r(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Qe=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/c4Diagram-Y2BXMSZH.mjs");return{id:"c4",diagram:t}},"loader"),Ze={id:"c4",detector:Ke,loader:Qe},Jt=Ze;var tr="flowchart",Je=r((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),ta=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs");return{id:tr,diagram:t}},"loader"),ra={id:tr,detector:Je,loader:ta},rr=ra;var er="flowchart-v2",ea=r((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),aa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs");return{id:er,diagram:t}},"loader"),ia={id:er,detector:ea,loader:aa},ar=ia;var oa=r(t=>/^\s*erDiagram/.test(t),"detector"),na=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/erDiagram-L5TCEMPS.mjs");return{id:"er",diagram:t}},"loader"),sa={id:"er",detector:oa,loader:na},ir=sa;var or="gitGraph",ca=r(t=>/^\s*gitGraph/.test(t),"detector"),ma=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/gitGraphDiagram-S2ZK5IYY.mjs");return{id:or,diagram:t}},"loader"),pa={id:or,detector:ca,loader:ma},nr=pa;var sr="gantt",da=r(t=>/^\s*gantt/.test(t),"detector"),fa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ganttDiagram-JCBTUEKG.mjs");return{id:sr,diagram:t}},"loader"),ga={id:sr,detector:da,loader:fa},cr=ga;var mr="info",la=r(t=>/^\s*info/.test(t),"detector"),ua=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/infoDiagram-3YFTVSEB.mjs");return{id:mr,diagram:t}},"loader"),pr={id:mr,detector:la,loader:ua};var Da=r(t=>/^\s*pie/.test(t),"detector"),ya=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/pieDiagram-CU6KROY3.mjs");return{id:"pie",diagram:t}},"loader"),dr={id:"pie",detector:Da,loader:ya};var fr="quadrantChart",xa=r(t=>/^\s*quadrantChart/.test(t),"detector"),ha=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/quadrantDiagram-VICAPDV7.mjs");return{id:fr,diagram:t}},"loader"),Ea={id:fr,detector:xa,loader:ha},gr=Ea;var lr="xychart",wa=r(t=>/^\s*xychart(-beta)?/.test(t),"detector"),La=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/xychartDiagram-N2JHSOCM.mjs");return{id:lr,diagram:t}},"loader"),Sa={id:lr,detector:wa,loader:La},ur=Sa;var Dr="requirement",ba=r(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),Ma=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/requirementDiagram-JXO7QTGE.mjs");return{id:Dr,diagram:t}},"loader"),va={id:Dr,detector:ba,loader:Ma},yr=va;var xr="sequence",Aa=r(t=>/^\s*sequenceDiagram/.test(t),"detector"),Ra=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sequenceDiagram-VS2MUI6T.mjs");return{id:xr,diagram:t}},"loader"),Ta={id:xr,detector:Aa,loader:Ra},hr=Ta;var Er="class",Ca=r((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),ka=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-KGZ6W3CR.mjs");return{id:Er,diagram:t}},"loader"),ja={id:Er,detector:Ca,loader:ka},wr=ja;var Lr="classDiagram",Oa=r((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),Ia=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/classDiagram-v2-72OJOZXJ.mjs");return{id:Lr,diagram:t}},"loader"),Pa={id:Lr,detector:Oa,loader:Ia},Sr=Pa;var br="state",Fa=r((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),Va=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/stateDiagram-7D4R322I.mjs");return{id:br,diagram:t}},"loader"),_a={id:br,detector:Fa,loader:Va},Mr=_a;var vr="stateDiagram",Ga=r((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),$a=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/stateDiagram-v2-36443NZ5.mjs");return{id:vr,diagram:t}},"loader"),Ha={id:vr,detector:Ga,loader:$a},Ar=Ha;var Rr="journey",za=r(t=>/^\s*journey/.test(t),"detector"),Na=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/journeyDiagram-M6C3CM3L.mjs");return{id:Rr,diagram:t}},"loader"),Ua={id:Rr,detector:za,loader:Na},Tr=Ua;var Ba=r((t,e,a)=>{f.debug(`rendering svg for syntax error +`);let i=Zt(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Nt(i,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${a}`)},"draw"),St={draw:Ba},Cr=St;var Ya={db:{},renderer:St,parser:{parse:r(()=>{},"parse")}},kr=Ya;var jr="flowchart-elk",qa=r((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),Xa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/flowDiagram-H6V6AXG4.mjs");return{id:jr,diagram:t}},"loader"),Wa={id:jr,detector:qa,loader:Xa},Or=Wa;var Ir="timeline",Ka=r(t=>/^\s*timeline/.test(t),"detector"),Qa=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/timeline-definition-O6YCAMPW.mjs");return{id:Ir,diagram:t}},"loader"),Za={id:Ir,detector:Ka,loader:Qa},Pr=Za;var Fr="mindmap",Ja=r(t=>/^\s*mindmap/.test(t),"detector"),ti=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/mindmap-definition-2TDM6QVE.mjs");return{id:Fr,diagram:t}},"loader"),ri={id:Fr,detector:Ja,loader:ti},Vr=ri;var _r="kanban",ei=r(t=>/^\s*kanban/.test(t),"detector"),ai=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/kanban-definition-75IXJCU3.mjs");return{id:_r,diagram:t}},"loader"),ii={id:_r,detector:ei,loader:ai},Gr=ii;var $r="sankey",oi=r(t=>/^\s*sankey(-beta)?/.test(t),"detector"),ni=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/sankeyDiagram-URQDO5SZ.mjs");return{id:$r,diagram:t}},"loader"),si={id:$r,detector:oi,loader:ni},Hr=si;var zr="packet",ci=r(t=>/^\s*packet(-beta)?/.test(t),"detector"),mi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-QXG6HAR7.mjs");return{id:zr,diagram:t}},"loader"),Nr={id:zr,detector:ci,loader:mi};var Ur="radar",pi=r(t=>/^\s*radar-beta/.test(t),"detector"),di=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-3NCE3AQN.mjs");return{id:Ur,diagram:t}},"loader"),Br={id:Ur,detector:pi,loader:di};var Yr="block",fi=r(t=>/^\s*block(-beta)?/.test(t),"detector"),gi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/blockDiagram-7IZFK4PR.mjs");return{id:Yr,diagram:t}},"loader"),li={id:Yr,detector:fi,loader:gi},qr=li;var Xr="treeView",ui=r(t=>/^\s*treeView-beta/.test(t),"detector"),Di=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-WEQXMOUZ.mjs");return{id:Xr,diagram:t}},"loader"),yi={id:Xr,detector:ui,loader:Di},Wr=yi;var Kr="architecture",xi=r(t=>/^\s*architecture/.test(t),"detector"),hi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/architectureDiagram-UL44E2DR.mjs");return{id:Kr,diagram:t}},"loader"),Ei={id:Kr,detector:xi,loader:hi},Qr=Ei;var Zr="eventmodeling",wi=r(t=>/^\s*eventmodeling/.test(t),"detector"),Li=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-HNR7UZ2L.mjs");return{id:Zr,diagram:t}},"loader"),Si={id:Zr,detector:wi,loader:Li},Jr=Si;var te="ishikawa",bi=r(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),Mi=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/ishikawaDiagram-BNXS4ZKH.mjs");return{id:te,diagram:t}},"loader"),re={id:te,detector:bi,loader:Mi};var ee="venn",vi=r(t=>/^\s*venn-beta/.test(t),"detector"),Ai=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/vennDiagram-MWXL3ELB.mjs");return{id:ee,diagram:t}},"loader"),Ri={id:ee,detector:vi,loader:Ai},ae=Ri;var ie="treemap",Ti=r(t=>/^\s*treemap/.test(t),"detector"),Ci=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/diagram-GF46GFSD.mjs");return{id:ie,diagram:t}},"loader"),oe={id:ie,detector:Ti,loader:Ci};var ne="wardley-beta",ki=r(t=>/^\s*wardley-beta/i.test(t),"detector"),ji=r(async()=>{let{diagram:t}=await import("./chunks/mermaid.esm.min/wardleyDiagram-CUQ6CDDI.mjs");return{id:ne,diagram:t}},"loader"),Oi={id:ne,detector:ki,loader:ji},se=Oi;var ce=!1,H=r(()=>{ce||(ce=!0,G("error",kr,t=>t.toLowerCase().trim()==="error"),G("---",{db:{clear:r(()=>{},"clear")},styles:{},renderer:{draw:r(()=>{},"draw")},parser:{parse:r(()=>{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:r(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Q(Or,Vr,Qr),Q(Jt,Gr,Sr,wr,ir,cr,pr,dr,yr,hr,ar,rr,Pr,nr,Ar,Mr,Tr,gr,Hr,Nr,ur,qr,Jr,Wr,Br,re,oe,ae,se))},"addDiagrams");var me=r(async()=>{f.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(K).map(async([a,{detector:i,loader:o}])=>{if(o)try{Z(a)}catch{try{let{diagram:n,id:m}=await o();G(m,n,i)}catch(n){throw f.error(`Failed to load external diagram with key ${a}. Removing from detectors.`),delete K[a],n}}}))).filter(a=>a.status==="rejected");if(e.length>0){f.error(`Failed to load ${e.length} external diagrams`);for(let a of e)f.error(a);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");var z="comm",it="rule",ot="decl";var pe="@media",de="@import";var fe="@supports";var ge="@namespace",J="@keyframes";var nt="@layer",le="@scope";var bt=Math.abs,tt=String.fromCharCode;function st(t){return t.trim()}r(st,"trim");function N(t,e,a){return t.replace(e,a)}r(N,"replace");function ue(t,e,a){return t.indexOf(e,a)}r(ue,"indexof");function j(t,e){return t.charCodeAt(e)|0}r(j,"charat");function O(t,e,a){return t.slice(e,a)}r(O,"substr");function h(t){return t.length}r(h,"strlen");function ct(t){return t.length}r(ct,"sizeof");function U(t,e){return e.push(t),t}r(U,"append");var mt=1,B=1,De=0,w=0,D=0,q="";function pt(t,e,a,i,o,n,m,s){return{value:t,root:e,parent:a,type:i,props:o,children:n,line:mt,column:B,length:m,return:"",siblings:s}}r(pt,"node");function ye(){return D}r(ye,"char");function xe(){return D=w>0?j(q,--w):0,B--,D===10&&(B=1,mt--),D}r(xe,"prev");function L(){return D=w2||Y(D)>3?"":" "}r(we,"whitespace");function Le(t,e){for(;--e&&L()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return dt(t,rt()+(e<6&&I()==32&&L()==32))}r(Le,"escaping");function Mt(t){for(;L();)switch(D){case t:return w;case 34:case 39:t!==34&&t!==39&&Mt(D);break;case 40:t===41&&Mt(t);break;case 92:L();break}return w}r(Mt,"delimiter");function Se(t,e){for(;L()&&t+D!==57;)if(t+D===84&&I()===47)break;return"/*"+dt(e,w-1)+"*"+tt(t===47?t:L())}r(Se,"commenter");function be(t){for(;!Y(I());)L();return dt(t,w)}r(be,"identifier");function Ae(t){return Ee(gt("",null,null,null,[""],t=he(t),0,[0],t))}r(Ae,"compile");function gt(t,e,a,i,o,n,m,s,c){for(var g=0,y=0,p=m,x=0,A=0,S=0,l=1,T=1,b=1,u=0,M="",C=o,R=n,E=i,d=M;T;)switch(S=u,u=L()){case 40:if(S!=108&&j(d,p-1)==58){ue(d+=N(ft(u),"&","&\f"),"&\f",bt(g?s[g-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:d+=ft(u);break;case 9:case 10:case 13:case 32:d+=we(S);break;case 92:d+=Le(rt()-1,7);continue;case 47:switch(I()){case 42:case 47:U(Pi(Se(L(),rt()),e,a,c),c),(Y(S||1)==5||Y(I()||1)==5)&&h(d)&&O(d,-1,void 0)!==" "&&(d+=" ");break;default:d+="/"}break;case 123*l:s[g++]=h(d)*b;case 125*l:case 59:case 0:switch(u){case 0:case 125:T=0;case 59+y:b==-1&&(d=N(d,/\f/g,"")),A>0&&(h(d)-p||l===0&&S===47)&&U(A>32?ve(d+";",i,a,p-1,c):ve(N(d," ","")+";",i,a,p-2,c),c);break;case 59:d+=";";default:if(U(E=Me(d,e,a,g,y,o,s,M,C=[],R=[],p,n),n),u===123)if(y===0)gt(d,e,E,E,C,n,p,s,R);else{switch(x){case 99:if(j(d,3)===110)break;case 108:if(j(d,2)===97)break;default:y=0;case 100:case 109:case 115:}y?gt(t,E,E,i&&U(Me(t,E,E,0,0,o,s,M,o,C=[],p,R),R),o,R,p,s,i?C:R):gt(d,E,E,E,[""],R,0,s,R)}}g=y=A=0,l=b=1,M=d="",p=m;break;case 58:p=1+h(d),A=S;default:if(l<1){if(u==123)--l;else if(u==125&&l++==0&&xe()==125)continue}switch(d+=tt(u),u*l){case 38:b=y>0?1:(d+="\f",-1);break;case 44:s[g++]=(h(d)-1)*b,b=1;break;case 64:I()===45&&(d+=ft(L())),x=I(),y=p=h(M=d+=be(rt())),u++;break;case 45:S===45&&h(d)==2&&(l=0)}}return n}r(gt,"parse");function Me(t,e,a,i,o,n,m,s,c,g,y,p){for(var x=o-1,A=o===0?n:[""],S=ct(A),l=0,T=0,b=0;l0?A[u]+" "+M:N(M,/&\f/g,A[u])))&&(c[b++]=C);return pt(t,e,a,o===0?it:s,c,g,y,p)}r(Me,"ruleset");function Pi(t,e,a,i){return pt(t,e,a,z,tt(ye()),O(t,2,-2),0,i)}r(Pi,"comment");function ve(t,e,a,i,o){return pt(t,e,a,ot,O(t,0,i),O(t,i+1,-1),i,o)}r(ve,"declaration");function lt(t,e){for(var a="",i=0;i{je.forEach(t=>{t()}),je=[]},"attachFunctions");var Ie=r(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Pe(t){let e=t.match($t);if(!e)return{text:t,metadata:{}};let a=Kt(e[1],{schema:Wt})??{};a=typeof a=="object"&&!Array.isArray(a)?a:{};let i={};return a.displayMode&&(i.displayMode=a.displayMode.toString()),a.title&&(i.title=a.title.toString()),a.config&&(i.config=a.config),{text:t.slice(e[0].length),metadata:i}}r(Pe,"extractFrontMatter");var _i=r(t=>t.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,a,i)=>"<"+a+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Gi=r(t=>{let{text:e,metadata:a}=Pe(t),{displayMode:i,title:o,config:n={}}=a;return i&&(n.gantt||(n.gantt={}),n.gantt.displayMode=i),{title:o,config:n,text:e}},"processFrontmatter"),$i=r(t=>{let e=$.detectInit(t)??{},a=$.detectDirective(t,"wrap");return Array.isArray(a)?e.wrap=a.some(({type:i})=>i==="wrap"):a?.type==="wrap"&&(e.wrap=!0),{text:Bt(t),directive:e}},"processDirectives");function vt(t){let e=_i(t),a=Gi(e),i=$i(a.text),o=Yt(a.config,i.directive);return t=Ie(i.text),{code:t,title:a.title,config:o}}r(vt,"preprocessDiagram");function Fe(t){let e=new TextEncoder().encode(t),a=Array.from(e,i=>String.fromCodePoint(i)).join("");return btoa(a)}r(Fe,"toBase64");var Hi=5e4,zi="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Ni="sandbox",Ui="loose",Bi="http://www.w3.org/2000/svg",Yi="http://www.w3.org/1999/xlink",qi="http://www.w3.org/1999/xhtml",Xi="100%",Wi="100%",Ki="border:0;margin:0;",Qi="margin:0",Zi="allow-top-navigation-by-user-activation allow-popups",Ji='The "iframe" tag is not supported by your browser.',to=["foreignobject"],ro=["dominant-baseline"];function $e(t){let e=vt(t);return W(),Pt(e.config??{}),e}r($e,"processAndSetConfigs");async function eo(t,e){H();try{let{code:a,config:i}=$e(t);return{diagramType:(await He(a)).type,config:i}}catch(a){if(e?.suppressErrors)return!1;throw a}}r(eo,"parse");var Ve=r((t,e,a=[])=>{let i=Tt(`{ ${a.join(" !important; ")} !important; }`);return`.${t} ${e} ${i}`},"cssImportantStyles"),ao=r((t,e=new Map)=>{let a=new CSSStyleSheet;if(t.fontFamily!==void 0&&a.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,a.cssRules.length),t.altFontFamily!==void 0&&a.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,a.cssRules.length),e instanceof Map){let s=Ft(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(c=>{wt(c.styles)||s.forEach(g=>{a.insertRule(Ve(c.id,g,c.styles),a.cssRules.length)}),wt(c.textStyles)||a.insertRule(Ve(c.id,"tspan",(c?.textStyles||[]).map(g=>g.replace("color","fill"))),a.cssRules.length)})}let i="";if(t.themeCSS!==void 0)if(typeof a.replaceSync=="function"){let o=new CSSStyleSheet;o.replaceSync(t.themeCSS),i=Et(o)+` +`}else i+=`${t.themeCSS} +`;return i+Et(a)},"createCssStyles"),io=r((t,e)=>lt(Ae(`${t}{${e}}`),Te([r(function(i,o,n,m){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===J)return;i.props=i.props.map(s=>s.startsWith(t)?s:`${t} ${s}`)}else i.type.startsWith("@")&&([...[pe,fe,nt,le,"@container","@starting-style"],J].includes(i.type)||(f.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=z))},"addNamespace"),Re])),"compileCSS"),oo=r((t,e,a,i)=>{let o=ao(t,a),n=Ut(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return io(i,n)},"createUserStyles"),no=r((t="",e,a)=>{let i=t;return!a&&!e&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Xt(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),so=r((t="",e)=>{let a=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":Wi,i=Fe(`${t}`);return``},"putIntoIFrame"),_e=r((t,e,a,i,o)=>{let n=t.append("div");n.attr("id",a),i&&n.attr("style",i);let m=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Bi);return o&&m.attr("xmlns:xlink",o),m.append("g"),t},"appendDivSvgG");function Ge(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}r(Ge,"sandboxedIframe");var co=r((t,e,a,i)=>{t.getElementById(e)?.remove(),t.getElementById(a)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),mo=r(async function(t,e,a){H();let i=$e(e);e=i.code;let o=_();f.debug(o),e.length>(o?.maxTextSize??Hi)&&(e=zi);let n=`#${t}`,m="i"+t,s="#"+m,c="d"+t,g="#"+c,y=r(()=>{let Dt=k(x?s:g).node();Dt&&"remove"in Dt&&Dt.remove()},"removeTempElements"),p=k(document.body),x=o.securityLevel===Ni,A=o.securityLevel===Ui,S=o.fontFamily;if(a!==void 0){if(a&&(a.innerHTML=""),x){let v=Ge(k(a),m);p=k(v.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=k(a);_e(p,t,c,`font-family: ${S}`,Yi)}else{if(co(document,t,c,m),x){let v=Ge(k(document.body),m);p=k(v.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=k("body");_e(p,t,c)}let l,T;try{l=await X.fromText(e,{title:i.title})}catch(v){if(o.suppressErrorRendering)throw y(),v;l=await X.fromText("error"),T=v}let b=p.select(g).node(),u=l.type,M=b.firstChild,C=M.firstChild,R=l.renderer.getClasses?.(e,l),E=oo(o,u,R,n),d=document.createElement("style");d.innerHTML=E,M.insertBefore(d,C);try{await l.renderer.draw(e,t,"11.15.0",l)}catch(v){throw o.suppressErrorRendering?y():Cr.draw(e,t,"11.15.0"),v}let qe=p.select(`${g} svg`),Xe=l.db.getAccTitle?.(),We=l.db.getAccDescription?.();fo(u,qe,Xe,We),p.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",qi);let V=p.select(g).node().innerHTML;if(f.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),V=no(V,x,Ct(o.arrowMarkerAbsolute)),x){let v=p.select(g+" svg").node();V=so(V,v)}else A||(V=Vt.sanitize(V,{ADD_TAGS:to,ADD_ATTR:ro,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Oe(),T)throw T;return y(),{diagramType:u,svg:V,bindFunctions:l.db.bindFunctions}},"render");function po(t={}){let e=Rt({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),jt(e),e?.theme&&e.theme in et?e.themeVariables=et[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=et.default.getThemeVariables(e.themeVariables));let a=typeof e=="object"?kt(e):ht();yt(a.logLevel),H()}r(po,"initialize");var He=r((t,e={})=>{let{code:a}=vt(t);return X.fromText(a,e)},"getDiagramFromText");function fo(t,e,a,i){Ce(e,t),ke(e,a,i,e.attr("id"))}r(fo,"addA11yInfo");var F=Object.freeze({render:mo,parse:eo,getDiagramFromText:He,initialize:po,getConfig:_,setConfig:It,getSiteConfig:ht,updateSiteConfig:Ot,reset:r(()=>{W()},"reset"),globalReset:r(()=>{W(xt)},"globalReset"),defaultConfig:xt});yt(_().logLevel);W(_());var go=r((t,e,a)=>{f.warn(t),Lt(t)?(a&&a(t.str,t.hash),e.push({...t,message:t.str,error:t})):(a&&a(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),ze=r(async function(t={querySelector:".mermaid"}){try{await lo(t)}catch(e){if(Lt(e)&&f.error(e.str),P.parseError&&P.parseError(e),!t.suppressErrors)throw f.error("Use the suppressErrors option to suppress these errors"),e}},"run"),lo=r(async function({postRenderCallback:t,querySelector:e,nodes:a}={querySelector:".mermaid"}){let i=F.getConfig();f.debug(`${t?"":"No "}Callback function found`);let o;if(a)o=a;else if(e)o=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");f.debug(`Found ${o.length} diagrams`),i?.startOnLoad!==void 0&&(f.debug("Start On Load: "+i?.startOnLoad),F.updateSiteConfig({startOnLoad:i?.startOnLoad}));let n=new $.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),m,s=[];for(let c of Array.from(o)){f.info("Rendering diagram: "+c.id);if(c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");let g=`mermaid-${n.next()}`;m=c.innerHTML,m=Gt($.entityDecode(m)).trim().replace(//gi,"
    ");let y=$.detectInit(m);y&&f.debug("Detected early reinit: ",y);try{let{svg:p,bindFunctions:x}=await Ye(g,m,c);c.innerHTML=p,t&&await t(g),x&&x(c)}catch(p){go(p,s,P.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Ne=r(function(t){F.initialize(t)},"initialize"),uo=r(async function(t,e,a){f.warn("mermaid.init is deprecated. Please use run instead."),t&&Ne(t);let i={postRenderCallback:a,querySelector:".mermaid"};typeof e=="string"?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await ze(i)},"init"),Do=r(async(t,{lazyLoad:e=!0}={})=>{H(),Q(...t),e===!1&&await me()},"registerExternalDiagrams"),Ue=r(function(){if(P.startOnLoad){let{startOnLoad:t}=F.getConfig();t&&P.run().catch(e=>f.error("Mermaid failed to initialize",e))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",Ue,!1)}var yo=r(function(t){P.parseError=t},"setParseErrorHandler"),ut=[],At=!1,Be=r(async()=>{if(!At){for(At=!0;ut.length>0;){let t=ut.shift();if(t)try{await t()}catch(e){f.error("Error executing queue",e)}}At=!1}},"executeQueue"),xo=r(async(t,e)=>new Promise((a,i)=>{let o=r(()=>new Promise((n,m)=>{F.parse(t,e).then(s=>{n(s),a(s)},s=>{f.error("Error parsing",s),P.parseError?.(s),m(s),i(s)})}),"performCall");ut.push(o),Be().catch(i)}),"parse"),Ye=r((t,e,a)=>new Promise((i,o)=>{let n=r(()=>new Promise((m,s)=>{F.render(t,e,a).then(c=>{m(c),i(c)},c=>{f.error("Error parsing",c),P.parseError?.(c),s(c),o(c)})}),"performCall");ut.push(n),Be().catch(o)}),"render"),ho=r(()=>Object.keys(K).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),P={startOnLoad:!0,mermaidAPI:F,parse:xo,render:Ye,init:uo,run:ze,registerExternalDiagrams:Do,registerLayoutLoaders:Qt,initialize:Ne,parseError:void 0,contentLoaded:Ue,setParseErrorHandler:yo,detectType:at,registerIconPacks:_t,getRegisteredDiagramsMetadata:ho},qc=P;export{qc as default}; +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java b/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java index 124cd87f4cc..3bdd500954c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ArticleViewer.java @@ -90,6 +90,8 @@ import android.webkit.WebBackForwardList; import android.webkit.WebChromeClient; import android.webkit.WebHistoryItem; +import android.webkit.WebResourceRequest; +import android.webkit.WebResourceResponse; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; @@ -221,6 +223,7 @@ import org.telegram.ui.web.WebBrowserSettings; import org.telegram.ui.web.WebInstantView; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.net.URLDecoder; @@ -8462,6 +8465,9 @@ public void postEvent(final String eventName, final String eventData) { private WebpageAdapter parentAdapter; + private static final String MERMAID_ASSET_URL_PREFIX = "https://telegram.org/embed/mermaid/"; + private static final String MERMAID_ASSET_PATH_PREFIX = "mermaid/"; + public class TouchyWebView extends WebView { public TouchyWebView(Context context) { @@ -8635,6 +8641,25 @@ public void onHideCustomView() { }); webView.setWebViewClient(new WebViewClient() { + @Nullable + @Override + public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { + if (request != null && request.getUrl() != null && request.getUrl().toString().startsWith(MERMAID_ASSET_URL_PREFIX)) { + final String assetName = request.getUrl().toString().substring(MERMAID_ASSET_URL_PREFIX.length()); + final String assetPath = MERMAID_ASSET_PATH_PREFIX + assetName; + try { + if (assetName.contains("..") || assetName.startsWith("/")) { + throw new IllegalArgumentException("Invalid Mermaid asset path"); + } + return new WebResourceResponse("application/javascript", "UTF-8", ApplicationLoader.applicationContext.getAssets().open(assetPath)); + } catch (Exception e) { + FileLog.e(e); + return new WebResourceResponse("application/javascript", "UTF-8", new ByteArrayInputStream("export default {};".getBytes(StandardCharsets.UTF_8))); + } + } + return super.shouldInterceptRequest(view, request); + } + @Override public boolean onRenderProcessGone(WebView view, RenderProcessGoneDetail detail) { try { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java index 4ee56651b38..b326bb5b2ec 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/MarkdownParser.java @@ -75,6 +75,7 @@ public class MarkdownParser { private static final int MAX_FILE_SIZE = 64 * 1024; private static final int MERMAID_EMBED_WIDTH = 720; private static final int MERMAID_EMBED_HEIGHT = 240; + private static final String MERMAID_ASSET_ENTRY = "https://telegram.org/embed/mermaid/mermaid.esm.min.mjs"; public static boolean isMarkdown(MessageObject msg) { if (msg == null) return false; @@ -1094,26 +1095,71 @@ private static String buildMermaidHtml(String source) { final StringBuilder html = new StringBuilder(source.length() + 2048); html.append(""); html.append(""); + html.append(""); html.append(""); html.append("
    "); html.append("
    ");
             appendEscapedHtml(html, source);
             html.append("
    "); - html.append(""); - html.append(""); return html.toString();