diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eccbd6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Retain the exact pinned upstream bundle, including whitespace in template literals. +ios/SourceBraid/Resources/Mermaid/mermaid.tiny.js -whitespace linguist-vendored diff --git a/README.de.md b/README.de.md index 882bc89..780bb3f 100644 --- a/README.de.md +++ b/README.de.md @@ -438,7 +438,7 @@ werden getrennt verfolgt; die Freigabe belegt keinen erfolgreichen Cloud-Build oder Store-Release. Siehe [Release-Hinweise 1.1.0](docs/IOS_RELEASE_1.1.0.de.md), [Umsetzungs- und Testprotokoll](docs/IOS_IMPLEMENTATION_TESTING.de.md) und [verbleibende Geräteprüfungen](docs/IOS_DEVICE_ACCEPTANCE.de.md). Native -Navigation für Neueste/Suche/Chat und begrenzte Hintergrundaktualisierung stehen +Navigation für Zuletzt/Suche/Chat und begrenzte Hintergrundaktualisierung stehen im [UI- und Refresh-Konzept](docs/IOS_READER_REFRESH_UX.de.md). ## Android-Roadmap diff --git a/README.md b/README.md index 3f801dd..7769246 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ separately; approval does not establish a successful cloud build or store releas See the [1.1.0 release notes](docs/IOS_RELEASE_1.1.0.md), [implementation and test record](docs/IOS_IMPLEMENTATION_TESTING.md), and [remaining device checks](docs/IOS_DEVICE_ACCEPTANCE.md). Native -Latest/Search/Chat navigation and bounded background refresh are described in +Recent/Search/Chat navigation and bounded background refresh are described in the [UI and refresh concept](docs/IOS_READER_REFRESH_UX.md). ## Android roadmap diff --git a/docs/IOS_APP_STORE_METADATA.de.md b/docs/IOS_APP_STORE_METADATA.de.md new file mode 100644 index 0000000..2507074 --- /dev/null +++ b/docs/IOS_APP_STORE_METADATA.de.md @@ -0,0 +1,252 @@ +# iOS-App-Store-Texte und Screenshots + +Vorbereitet am 17. Oktober 2026 · [English](IOS_APP_STORE_METADATA.md) + +Bearbeitungsziel ist der **Entwurf 1.1.1** in App Store Connect. Deutsche und +englische Werbetexte, Beschreibungen, Schlüsselwörter, Untertitel und erste +Diagnose-Neuerungen wurden gespeichert. **22 neue native Screenshots** sind +bestätigt hinterlegt: je Sprache vier für iPhone, drei für iPad und vier für +iPhone Duo. Der bisherige iPad-Screenshot wurde aus der Auswahl dieses Entwurfs +entfernt und bleibt in der Asset-Bibliothek. Es ist kein Build ausgewählt; der +Entwurf wurde weder eingereicht noch veröffentlicht. + +Die überarbeiteten Beschreibungen und die Neuerungen für 1.1.1 unten +berücksichtigen zusätzlich die spätere Korrektur des Archivladens und lokale +Mermaid-Diagramme. Diese neuesten Texte sind in beiden Sprachen gespeichert und +wurden nach vollständigem Neuladen und Sprachwechsel mit den exportierten +Textdateien abgeglichen. Alle sechs Screenshot-Bereiche behielten die erwarteten +Dateinamen und Anzahlen; beide Untertitel wurden unter App-Informationen +gespeichert. Implementierungstests und Geräteprüfung laufen noch; die Texte +bestätigen keine Veröffentlichung dieser Änderungen. + +Die [deutsche App-Store-Seite](https://apps.apple.com/de/app/sourcebraid/id6798551232) +ist weiterhin als **1.1.0** öffentlich verfügbar, bestätigt am 17. Oktober 2026 +mit dem Veröffentlichungszeitpunkt **07:14:07 UTC**. Deren veröffentlichte +Screenshots und Release bleiben durch die Vorbereitung von 1.1.1 unverändert. + +## Direkt übernehmbare deutsche Felder + +### App-Name + +```text +SourceBraid +``` + +### Untertitel — höchstens 30 Zeichen + +```text +Quellen sammeln, lesen, finden +``` + +### Werbetext — höchstens 170 Zeichen + +```text +Teile Webseiten als Markdown in dein GitHub-Archiv. Lies geladene Beiträge, durchsuche ihren Text und stelle Fragen mit optionaler Apple Intelligence auf dem Gerät. +``` + +### Beschreibung — höchstens 4.000 Zeichen + +```text +SourceBraid — Weave the web into Markdown. + +Sammle nützliche Quellen, finde sie wieder und behalte die Dateien in einem GitHub-Repository unter deiner Kontrolle. SourceBraid verbindet Erfassung, Markdown-Reader, lokale Suche und optionalen Chat auf deinem iPhone und iPad. + +AUS DEM TEILEN-MENÜ SPEICHERN +Teile eine Webseite, ausgewählten Text, eine PDF oder eine andere Datei mit SourceBraid. Passe den Titel an, ergänze Tags oder eine Notiz und speichere alles im eingerichteten Repository. Lesbare öffentliche Seiten werden zu Markdown mit Quellenmetadaten und relevanten Bildern. Nicht auslesbare Seiten werden klar als Links gespeichert. Geteilte PDFs lassen sich durch den optionalen Docling-Workflow in GitHub Actions umwandeln. + +DIE NEUESTEN QUELLEN GRIFFBEREIT +Unter Zuletzt findest du sieben aktuelle Beiträge. Öffne direkt einen Beitrag, aktualisiere dein Archiv oder wechsle zu Suche und Chat. Breite Ansichten zeigen Liste und Reader nebeneinander. + +MARKDOWN ANGENEHM LESEN +Lies Überschriften, Listen, Aufgaben, Tabellen, Zitate, Code und lokale Bilder. Öffne PDF-Anhänge in der nativen Vorschau, sieh dir rohes Markdown an, teile einen Beitrag oder öffne seine Originalquelle. Externe Bilder werden erst geladen, wenn du es für das jeweilige Dokument auswählst. Gängige Mermaid-Fluss-, Sequenz-, Zustands-, Klassen-, ER- und Gantt-Diagramme werden lokal dargestellt; bei nicht unterstützten oder fehlerhaften Diagrammen bleibt der ursprüngliche Quelltext erhalten. + +GELADENE TEXTE WIEDERFINDEN +Die Volltextsuche läuft auf deinem Gerät und zeigt den indizierten Anteil des Archivs. Geladene Beiträge lassen sich offline lesen und durchsuchen, solange dein Repository eingerichtet bleibt. Die Suche umfasst lokal gespeicherten, indizierten Text; bei großen Archiven kann der Bestand zunächst unvollständig sein. Aktualisieren schließt Lücken. iOS kann Cache-Dateien entfernen, um Speicher freizugeben, und bestimmt die Ausführung von Hintergrundaktualisierungen. + +DEINE QUELLEN AUF DEM GERÄT BEFRAGEN +Stelle auf kompatiblen Geräten Fragen zu einem ausgewählten Beitrag oder passenden Auszügen aus dem indizierten Archiv. Antworten erscheinen schrittweise und enthalten Links zu den Quellenauszügen, die dem Modell vorlagen. Du kannst eine Antwort jederzeit stoppen. + +Chat benötigt iOS oder iPadOS ab 26, ein geeignetes Gerät, aktivierte Apple Intelligence, ein bereites heruntergeladenes Systemmodell und eine unterstützte Sprache. Er arbeitet mit begrenzten Auszügen statt mit jedem Wort jedes Dokuments. KI-Antworten können falsch sein; Quellenlinks helfen bei der Prüfung. Reader und Suche bleiben bei nicht verfügbarem Chat nutzbar. SourceBraid sendet Chat-Fragen an keinen Cloud-KI-Dienst und verwendet keinen Cloud-Ersatz. + +DEIN ARCHIV, DEINE DATEIEN +Markdown-Dateien und Git-Verlauf bleiben im gewählten GitHub-Repository. Der GitHub-Token liegt im Schlüsselbund; Reader und Suche verwenden einen ersetzbaren lokalen Cache. Lesen, Suche, Chat und lesende App-Kurzbefehle verändern dein Archiv nicht. Die Teilen-Erweiterung speichert nur die von dir gewählten Inhalte. + +SourceBraid enthält keine Werbung, kein Tracking und keine Analysefunktionen. Erfassung und Archivaktualisierung kontaktieren GitHub und die beteiligten Quellwebseiten; deren eigene Datenschutzregeln gelten. Für lokalen Chat brauchst du kein zusätzliches KI-Konto. + +ERSTE SCHRITTE +Du benötigst ein GitHub-Konto und richtest ein Repository mit einem fein abgestuften Zugriffstoken ein. Zum Lesen genügen Leserechte; zum Speichern benötigt die App zusätzlich Schreibrechte für Repository-Inhalte. Reader und Suche unterstützen iOS und iPadOS ab 17. +``` + +### Schlüsselwörter — höchstens 100 Bytes + +```text +markdown,webclipper,lesen,notizen,recherche,archiv,pdf,offline,suche,lesezeichen +``` + +### Neuerungen — Fakten zu iOS 1.1.0, höchstens 4.000 Zeichen + +Nur für die Funktionsbeschreibung von 1.1.0 oder historische Release-Texte. +Für ein späteres Fehlerkorrektur-Update dessen tatsächliche Änderungen nennen. + +```text +SourceBraid hilft dir jetzt auch, deine gespeicherten Quellen zu nutzen: + +• Neueste zeigt sieben aktuelle Beiträge mit direktem Zugang zum Reader. +• Lies Markdown mit Tabellen, Aufgaben, Code, lokalen Bildern und Archivlinks. Sieh PDF-Anhänge an und teile Beiträge. +• Durchsuche geladene Texte auf deinem Gerät mit sichtbarer Indexabdeckung. Lies und durchsuche lokal gespeicherte Beiträge offline. +• Stelle Fragen zu einem Beitrag oder indizierten Archivauszügen: optional mit Apple Intelligence, schrittweisen Antworten, Abbrechen und Quellenlinks. +• Finde Quellen, liste aktuelle Beiträge auf und öffne geladene Beiträge über lesende App-Kurzbefehle. +• Nutze angepasste Ansichten für iPhone und iPad, neue Farben und begrenzte Hintergrundaktualisierungen. + +Lokaler Chat benötigt iOS oder iPadOS ab 26, ein geeignetes Gerät, aktivierte Apple Intelligence, ein bereites Systemmodell und eine unterstützte Sprache. Suche und Chat umfassen geladene, indizierte Inhalte; Quellenlinks garantieren keine sachlich richtige KI-Antwort. +``` + +### Neuerungen — Entwurf 1.1.1, noch nicht veröffentlicht + +Diesen Entwurf erst mit einem 1.1.1-Build verwenden, der die Änderungen enthält, +nachdem Tests und Geräteprüfung bestanden sind. Der historische Text zu 1.1.0 +oben bleibt unverändert. + +```text +Dieses Update verbessert Archivladen, Lesen und lokalen Chat: + +• Behebt einen Reader, der nach der Rückkehr zur Liste und dem Öffnen eines anderen Beitrags beim Laden hängen bleiben konnte. +• Unterbrochene erste Archiv-Downloads werden beim Zurückkehren fortgesetzt. Eine Anzeige geladener Beiträge und eine Aktion zum Laden der übrigen Beiträge machen den lokalen Archivstand deutlicher. +• Gängige Mermaid-Fluss-, Sequenz-, Zustands-, Klassen-, ER- und Gantt-Diagramme werden auf deinem Gerät dargestellt. Bei nicht unterstützten oder fehlerhaften Diagrammen bleibt der ursprüngliche Quelltext erhalten. +• Der lokale Chat erklärt die Verfügbarkeit von Apple Intelligence genauer, zeigt passende Hilfeschritte und lässt dich nach Änderungen in den Systemeinstellungen erneut prüfen. Lesen und Suche bleiben verfügbar. +• Der Startbereich heißt jetzt Zuletzt. Die Einstellungen enthalten keine zusätzliche Liste kürzlich gespeicherter Beiträge mehr. + +Apple Intelligence benötigt weiterhin ein kompatibles Gerät, eine unterstützte Sprache, aktivierte Einstellungen und ein bereites Systemmodell. SourceBraid kann dessen Download nicht erzwingen. +``` + +Keinen Download-Fortschrittsbalken, erzwungenen Modelldownload oder eine Änderung +der Systemeinstellungen versprechen, solange die veröffentlichte App das nicht +tatsächlich leisten kann. + +## Im Entwurf 1.1.1 gespeicherter nativer Screenshot-Satz + +Das gemeinsame Upload-ZIP enthält **22 native Bilder** auf Deutsch und Englisch: +je Sprache vier für **iPhone 17 Pro** mit **1206 × 2622**, drei für **iPad Pro +13 Zoll (M5)** mit **2064 × 2752** und vier für **iPhone Duo** mit **1398 × 2034**. +Diese Anzahlen wurden in App Store Connect bestätigt. Upload und Speichern +bedeuten weder eine Freigabe durch Apple noch eine öffentliche Veröffentlichung. + +Die beiden iPad-Aufnahmen von Zuletzt bleiben optionale Kandidaten außerhalb +des ZIPs, weil der anfängliche Detailbereich viel leere Fläche zeigt. Die +laufende App zeigt selbst verfasste fiktive Archivinhalte. Pixelmaße, Aufnahme +und Sichtprüfung stehen in `CAPTURE_README.md`, `IPHONE_DUO_README.md` und im +gemeinsamen Manifest. Siehe auch das +[Implementierungs-Testprotokoll](IOS_IMPLEMENTATION_TESTING.de.md). + +Die empfohlenen Bilder erklären hilfreiche Funktionen ohne verfügbares KI-Modell. +Den warmen SourceBraid-Hintergrund, dunklen Text und Petrol-Akzent beibehalten. +Die Bildtexte unten sind begleitende Textvorschläge; sie behaupten nicht, dass +die nativen Bilder bereits beschriftet wurden. Die App muss auch als Miniatur +lesbar bleiben. + +| Reihenfolge | Bildtext | Empfohlene Geräte | Native Ansicht und Nachweis | +| --- | --- | --- | --- | +| 1 | Lies, was du gespeichert hast | iPhone, iPhone Duo und iPad | Markdown-Reader mit „Lesen, verstehen, behalten“, seiner fiktiven Autorenkennzeichnung, Überschriften und gut lesbarem Beitrag. Der iPad-Satz zeigt dabei auch die native breite Ansicht. | +| 2 | Deine neuesten Quellen griffbereit | iPhone und iPhone Duo | Zuletzt mit sieben abwechslungsreichen, selbst verfassten Beispielbeiträgen. Die aufgenommene iPad-Variante bleibt optional und ist nicht im empfohlenen ZIP enthalten. | +| 3 | Finde es im geladenen Text | iPhone, iPhone Duo und iPad | Offline-Suche mit sinnvoller Anfrage und der tatsächlichen Indexanzeige der App. Dies zeigt die Suche im Cache, keine vollständige Archivsynchronisation. | +| 4 | Deine Dateien bleiben Markdown | iPhone, iPhone Duo und iPad | Rohes Markdown aus dem Reader mit portablem Quelltext und klar fiktiven Metadaten. | + +### Spätere optionale Aufnahmen — außerhalb des empfohlenen Upload-Satzes + +- **Aus dem Teilen-Menü speichern:** Teilen-Erweiterung mit Titel, Tags und + Notiz vor dem Speichern mit synthetischer Eingabe und Test-Repository + aufnehmen. +- **Frage deine Quellen auf dem Gerät:** Echte Antwort mit Quellenbuttons auf + einem Gerät mit bereitem Modell aufnehmen. Hinweis „Benötigt kompatible + Apple Intelligence“ ergänzen. Der empfohlene Upload-Satz enthält keine + KI-Antwort. Eine Demo-Antwort muss sichtbar „Beispielantwort mit Testdaten“ + bleiben und ist kein Nachweis einer Modellantwort. +- **Sieh, wann lokale KI bereit ist:** Neue Diagnoseansicht erst aufnehmen, + wenn sie in der eingereichten Version enthalten ist. Hilfreiche Schritte + zeigen, ohne Download-Fortschritt zu erfinden oder ungeprüfte Bedingungen + als bestanden auszugeben. + +Einen nicht verfügbaren Modellstatus niemals durch eine erfundene erfolgreiche +Antwort ersetzen. Das angehängte Nutzerfoto ist kein geeigneter +Werbe-Screenshot. Diagnosebilder gehören zum nächsten Update und dürfen nicht +nachträglich als Funktion von 1.1.0 dargestellt werden. + +### Sichere Screenshot-Inhalte + +Die vorbereiteten Aufnahmen verwenden das selbst verfasste fiktive Markdown +in `ArchiveDemoReader.storeDocuments()` mit den ausdrücklichen Debug-Opt-ins +`SOURCEBRAID_DEMO=1` und `SOURCEBRAID_STORE_DEMO=1`. Dieser Adapter verwendet +weder Netzwerk noch Zugangsdaten, private Archivinhalte oder Modellausgaben. +Die Beispiel-URLs liegen auf `example.invalid`; die Autorenkennzeichnung +lautet „SourceBraid-Beispielarchiv“. Die sieben tatsächlichen Titel sind: + +- Ein Garten auf dem Balkon +- Ein Notizbuch fürs Wochenende +- Oberflächen mit Freiraum +- Mehr als ein Lesezeichen +- Kleine Werkzeuge, großer Wert +- Die eigene Wissensbibliothek +- Lesen, verstehen, behalten + +Dies sind erfundene Beispiele, keine erfassten Veröffentlichungen. Keine echten +Autoren, Veröffentlichungsdaten oder Quelldomains hinzufügen. Keine Inhalte +aus `web-clips/`, Tokens, Kontokennungen, Review-Zugangsdaten oder privaten +Repository-Namen zeigen. Eine ruhige Statusleiste mit 09:41 ist geeignet; +den Funktionszustand der App nicht für unbelegte Aussagen verändern. + +### Export und Prüfung + +Die vorbereiteten nativen PNG- oder JPEG-Aufnahmen mit den in App Store Connect +angezeigten Gerätegrößen nach [Apples aktuellen Screenshot-Vorgaben](https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications/) +abgleichen. Keine Aufnahme eines anderen Geräts hochskalieren und als native +Aufnahme ausgeben. Je Gerätesatz und Sprache 1–10 Bilder hinterlegen und +Reihenfolge, Ausschnitte, Lesbarkeit und übersetzte Bildtexte im Media Manager +prüfen. Für dieselbe Oberfläche auf kleineren Geräten kann Apples unterstützte +Skalierung verwendet werden. Die 22 Bilder wurden im Entwurf 1.1.1 hochgeladen +und gespeichert; ein passender Build und die Prüfung stehen noch aus. Dieses +Dokument bestätigt keine öffentliche Verfügbarkeit der neuen Bilder. + +## Änderbarkeit in App Store Connect + +Am 17. Oktober 2026 anhand von Apples Dokumentation geprüft: + +- Die [Dokumentation zu Versionslokalisierungen](https://developer.apple.com/documentation/appstoreconnectapi/app-store-version-localizations) + erlaubt Änderungen am Werbetext jederzeit; andere versionsbezogene + Textfelder benötigen einen bearbeitbaren App-Status. +- Die [aktuelle Anleitung zur Asset Library](https://developer.apple.com/help/app-store-connect/manage-app-information/manage-your-app-store-assets) + erlaubt den Screenshot-/Vorschau-Upload in den Zuständen Prepare for + Submission, Invalid Binary, Rejected, Metadata Rejected und Developer + Rejected. Die Ausnahme für veröffentlichte Versionen betrifft freigegebene + Creative Assets für Produktseitenkopf und Suchergebnisse; diese sind von + Screenshots und Vorschauen getrennt. +- Die [App- und Einreichungsstatus](https://developer.apple.com/help/app-store-connect/reference/app-information/app-and-submission-statuses) + schließen Screenshot-Uploads und -Änderungen während Warten auf Prüfung + ausdrücklich aus. In Prüfung und Ready for Distribution gehören ebenfalls + nicht zu den genannten Upload-Zuständen. Keine bestehende Einreichung allein + für Marketing-Änderungen zurückziehen. + +Da 1.1.0 öffentlich verfügbar ist, werden die neuen normalen Screenshots, +Beschreibung, Untertitel und Schlüsselwörter im **Entwurf 1.1.1** desselben +App-Eintrags bearbeitet. Die 22 Bilder und die neueste Textfassung oben sind +gespeichert und wurden nach vollständigem Neuladen und Sprachwechsel geprüft. Eine [neue Version](https://developer.apple.com/help/app-store-connect/update-your-app/create-a-new-version) +übernimmt zunächst die aktuellen Metadaten. Es ist kein Build ausgewählt, und +es wurde keine Einreichung oder Veröffentlichung ausgelöst. Ein neuer passender +Build und abgeschlossene Prüfungen stehen noch aus. Verträge, +Veröffentlichungseinstellungen und Zugriffsrechte wurden nicht geändert. + +## Prüfung der Aussagen + +Die Texte für 1.1.1 setzen den Abschluss und die Prüfung der zugehörigen +Änderungen für Archivladen, lokale Mermaid-Darstellung und Intelligence-Diagnose +voraus. Sie beschreiben nur gängige Mermaid-Typen; bei nicht unterstützter Syntax +oder Darstellungsfehlern bleibt der Quelltext erhalten. Sie versprechen weder +Download-Fortschrittsbalken noch erzwungenen Modelldownload. + +Die Texte folgen der Implementierung in `ios/SourceBraid/Archive/`, +`ios/SourceBraidShare/`, der [iOS-README](../ios/README.md), +dem [Release-Protokoll für 1.1.0](IOS_RELEASE_1.1.0.de.md) und +dem [Datenschutzhinweis](../PRIVACY.md). Sie versprechen weder vollständige +Archivsynchronisation noch garantierte Offline-Aufbewahrung, uneingeschränkte +lokale KI, sachlich richtige generierte Antworten oder einen Cloud-KI-Ersatz. +Die separate Chrome-Erweiterung, das Codex-Plugin und der ChatGPT-Dienst sind +keine in der iOS-App enthaltenen Dienste und werden nicht als solche beworben. diff --git a/docs/IOS_APP_STORE_METADATA.md b/docs/IOS_APP_STORE_METADATA.md new file mode 100644 index 0000000..fa5281e --- /dev/null +++ b/docs/IOS_APP_STORE_METADATA.md @@ -0,0 +1,241 @@ +# iOS App Store metadata and screenshots + +Prepared October 17, 2026 · [Deutsch](IOS_APP_STORE_METADATA.de.md) + +The editing target is the **1.1.1 draft** in App Store Connect. Its English and +German promotional text, description, keywords, subtitles and initial diagnostic +update notes have been saved. **22 new native screenshots** are confirmed saved: +four iPhone, three iPad and four iPhone Duo images per localization. The previous +iPad screenshot was removed from this draft's selection and remains in the asset +library. No build is selected; the draft has not been submitted or released. + +The revised descriptions and 1.1.1 update notes below also cover the subsequent +archive-loading fix and local Mermaid rendering. These latest text revisions +are saved in both localizations and were verified after a full page reload and +locale switch against the exported text files. All six screenshot wells retained +the expected filenames and counts; both localized subtitles were saved in App +Information. Implementation tests and physical-device acceptance remain in +progress; the copy does not establish that these changes have shipped. + +The [German App Store listing](https://apps.apple.com/de/app/sourcebraid/id6798551232) +remains publicly available as **1.1.0**, verified on October 17, 2026, with a +release timestamp of **07:14:07 UTC**. Its live screenshots and release are +unchanged by preparation of the 1.1.1 draft. + +## Copy-ready English (U.S.) fields + +### App name + +```text +SourceBraid +``` + +### Subtitle — maximum 30 characters + +```text +Save, read and search sources +``` + +### Promotional text — maximum 170 characters + +```text +Turn shared pages into Markdown in your GitHub archive. Read downloaded clips, search their text, and ask questions with optional on-device Apple Intelligence. +``` + +### Description — maximum 4,000 characters + +```text +SourceBraid — Weave the web into Markdown. + +Save useful sources, find them again, and keep the files in a GitHub repository you control. SourceBraid brings capture, a Markdown reader, local search, and optional on-device chat to your iPhone and iPad. + +SAVE FROM THE SHARE MENU +Share a web page, selected text, a PDF, or another file to SourceBraid. Adjust the title, add tags or a note, and save it to your configured repository. Readable public pages become Markdown with source metadata and relevant images. Pages that cannot be extracted are clearly saved as links. Shared PDFs can be converted by the optional Docling GitHub Actions workflow in your repository. + +RETURN TO YOUR LATEST SOURCES +The Recent view puts seven recent clips within reach. Open a source directly, refresh your archive, or switch to Search and Chat. Wider layouts place your list and reader side by side. + +READ MARKDOWN COMFORTABLY +Read headings, lists, tasks, tables, quotes, code, and local images. Open PDF attachments in the native preview, inspect the raw Markdown, share a clip, or follow its original source. External images load only when you choose to load them for that document. Common Mermaid flowcharts and sequence, state, class, ER, and Gantt diagrams render locally; unsupported or invalid diagrams retain their original source text. + +FIND TEXT YOU HAVE DOWNLOADED +Full-text search runs on your device and shows how much of your archive is indexed. Downloaded clips can be read and searched offline while your repository remains configured. Search covers cached, indexed text; it may not yet include every file in a large archive. Refresh fills gaps, and iOS may remove cached files to reclaim storage. Background updates run when iOS allows them. + +ASK YOUR SOURCES ON DEVICE +On compatible devices, ask about a selected clip or relevant excerpts from the indexed archive. Answers stream into the conversation and include links to the source excerpts supplied to the model. You can stop an answer at any time. + +Chat requires iOS or iPadOS 26 or later, an eligible device, enabled Apple Intelligence, a ready downloaded system model, and a supported language. It works with limited excerpts rather than every word of every document. AI answers can be wrong; source links help you check them. Reader and search remain available when chat is unavailable. SourceBraid does not send chat questions to a cloud AI service or use a cloud fallback. + +YOUR ARCHIVE, YOUR FILES +Markdown files and Git history stay in the GitHub repository you choose. The app stores the GitHub token in Keychain and maintains a disposable local reading and search cache. Reading, searching, chat, and read-only App Shortcuts do not change your archive. Saving through the Share Extension writes the captures you choose. + +SourceBraid includes no ads, tracking, or analytics. Capture and archive refresh contact GitHub and the source websites involved; those services have their own privacy policies. No separate AI account is required for on-device chat. + +GET STARTED +Use a GitHub account and configure a repository with a fine-grained access token. Read access is sufficient for the reader; saving captures also needs repository contents write access. Reader and search support iOS and iPadOS 17 or later. +``` + +### Keywords — maximum 100 bytes + +```text +markdown,webclipper,reader,notes,research,archive,pdf,offline,search,bookmarks +``` + +### What's New — iOS 1.1.0 facts, maximum 4,000 characters + +Use this only for the 1.1.0 feature description or historical release copy. +For a later bug-fix update, describe the changes in that update instead. + +```text +SourceBraid now helps you use the sources you save: + +• Latest opens with seven recent clips and direct access to the reader. +• Read Markdown with tables, tasks, code, local images, and archive links. Preview PDF attachments and share clips. +• Search downloaded text on your device, with visible index coverage. Read and search cached clips offline. +• Ask questions about a selected clip or indexed archive excerpts with optional Apple Intelligence chat, streaming answers, cancellation, and source links. +• Use read-only App Shortcuts to find sources, list recent clips, and open a loaded clip. +• Enjoy adaptive phone and iPad layouts, refreshed colors, and bounded background archive refresh. + +Local chat requires iOS or iPadOS 26 or later, an eligible device, enabled Apple Intelligence, a ready system model, and a supported language. Search and chat cover downloaded, indexed material; source links do not guarantee an AI answer is correct. +``` + +### What's New — 1.1.1 draft, not yet released + +Use this draft only with a 1.1.1 build containing these changes, after its tests +and device checks pass. The 1.1.0 historical copy above remains unchanged. + +```text +This update improves archive loading, reading, and local chat: + +• Fixes a reader that could stay loading after you returned to the list and opened another clip. +• Interrupted initial archive downloads resume when you return. A loaded-clip count and an action to load remaining clips make the local archive state clearer. +• Common Mermaid flowcharts and sequence, state, class, ER, and Gantt diagrams render on your device. Unsupported or invalid diagrams keep their original source text. +• Local chat explains Apple Intelligence availability more clearly, offers relevant recovery steps, and lets you check again after changing system settings. Reading and search remain available. +• The home tab is now called Recent. Settings no longer repeats a list of recently saved items. + +Apple Intelligence still requires a compatible device, supported language, enabled settings, and a ready system model. SourceBraid cannot force its download. +``` + +Do not promise a download progress bar, a forced model download, or a system +setting change unless the released implementation can actually provide it. + +## Native screenshot set saved in the 1.1.1 draft + +The combined upload ZIP contains **22 native images** in English and German: +four per **iPhone 17 Pro** localization at **1206 × 2622**, three per **iPad Pro +13-inch (M5)** localization at **2064 × 2752**, and four per **iPhone Duo** +localization at **1398 × 2034**. These exact counts have been confirmed in +App Store Connect. Upload and save do not mean Apple approval or public release. + +The two iPad Recent captures remain optional candidates outside the ZIP because +their initial detail pane leaves a large empty area. Each image shows the +running app with original fictional archive content. Pixel dimensions, capture +and visual checks are recorded in the delivered `CAPTURE_README.md`, +`IPHONE_DUO_README.md` and combined manifest. See also the +[implementation test record](IOS_IMPLEMENTATION_TESTING.md). + +The recommended images explain useful functionality without requiring an available +AI model. Keep the warm SourceBraid background, dark text, and teal accent. +The captions below are accompanying copy suggestions, not claims that text +has been added to the native images. Leave the app readable at thumbnail size. + +| Order | Caption | Recommended devices | Native screen and evidence | +| --- | --- | --- | --- | +| 1 | Read what you saved | iPhone, iPhone Duo and iPad | Markdown reader showing “Reading notes that last”, its fictional author label, headings, and a readable article. The iPad set also demonstrates the native wider layout. | +| 2 | Your latest sources, within reach | iPhone and iPhone Duo | Recent with seven varied original example articles. The captured iPad variant is optional and excluded from the recommended ZIP. | +| 3 | Find it in downloaded text | iPhone, iPhone Duo and iPad | Offline Search with a meaningful query and the app's actual coverage display. This depicts cached search, not complete archive synchronization. | +| 4 | Your files stay Markdown | iPhone, iPhone Duo and iPad | The reader's raw Markdown view, preserving the portable source text and clearly fictional metadata. | + +### Later optional captures — outside the recommended upload set + +- **Save from the Share menu:** capture the Share Extension with title, tags, + and a note before saving, using synthetic input and a test repository. +- **Ask your sources, on device:** use a real answer with source buttons on a + device with an available model. Add the qualifier “Requires compatible Apple + Intelligence.” The recommended upload set contains no AI-answer screenshot. + A demo answer must remain visibly labeled “Example answer with test data” + and is not evidence of model output. +- **Know when local AI is ready:** capture the new diagnostic UI only after + it exists in the version being submitted. Show useful recovery steps without + inventing download progress or marking unchecked conditions as passed. + +Never replace an unavailable-model screen with a fabricated successful answer. +Do not use the user's attached photo as a promotional screenshot. Diagnostic +screens belong to the next update, not a retrospective claim about 1.1.0. + +### Safe screenshot data + +The prepared captures use the original fictional Markdown in +`ArchiveDemoReader.storeDocuments()` with the explicit Debug opt-ins +`SOURCEBRAID_DEMO=1` and `SOURCEBRAID_STORE_DEMO=1`. This adapter uses no +network, credentials, private archive content, or model output. Its fixture +URLs use `example.invalid`, and its author label says “SourceBraid example +archive”. The seven actual fixture titles are: + +- A balcony garden +- A notebook for the weekend +- Interfaces with room to breathe +- Beyond the bookmark +- Small tools, lasting value +- A personal reference library +- Reading notes that last + +These are invented examples, not captured publications. Do not attach real +authors, publication dates, or source domains to them. No `web-clips/` data, +tokens, account identifiers, review credentials, or private repository names +may appear. A clean 09:41 status bar is appropriate; do not alter the app's +feature state to create unsupported claims. + +### Export and review + +Check the prepared native PNG or JPEG files against the device wells shown by App Store +Connect, using [Apple's current screenshot specifications](https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications/). +Do not upscale an unrelated device image into an asserted native device +capture. Upload 1–10 screenshots per supported device set and localization; +check order, crops, legibility, and localized captions in Media Manager. The +same UI on smaller devices can use Apple's supported scaling. The 22-image +set has been uploaded and saved in draft 1.1.1; it still requires a matching +build and review. This document does not assert that the new images are live. + +## App Store Connect editability + +Checked against Apple's documentation on October 17, 2026: + +- [Version-localization documentation](https://developer.apple.com/documentation/appstoreconnectapi/app-store-version-localizations) + says promotional text can be updated at any time; other version-localization + attributes require an editable app state. +- [The current Asset Library guide](https://developer.apple.com/help/app-store-connect/manage-app-information/manage-your-app-store-assets) + lists screenshot/previews upload states: Prepare for Submission, Invalid + Binary, Rejected, Metadata Rejected, and Developer Rejected. Its live-version + exception concerns approved Header/Search Results creative assets, which are + separate from screenshots and previews. +- [App and submission statuses](https://developer.apple.com/help/app-store-connect/reference/app-information/app-and-submission-statuses) + explicitly says that Waiting for Review does not allow uploading or editing + screenshots/previews. In Review and Ready for Distribution are not among + the screenshot-upload states above. Do not withdraw an existing submission + simply to change marketing. + +Since 1.1.0 is publicly available, the new default screenshots, description, +subtitle and keywords are being edited in draft **1.1.1** on the same app record. +The 22 screenshots and latest patch copy above are saved and were verified after +a full page reload and locale switch. [Creating a new version](https://developer.apple.com/help/app-store-connect/update-your-app/create-a-new-version) +copies the current metadata into the new version. No build is selected and no +submission or release has been triggered. A new matching build and completed +checks are still required. Agreements, release settings and access rights have +not been changed. + +## Claim checks + +The 1.1.1 copy is conditional on completion and validation of the corresponding +archive-loading, local Mermaid and Intelligence diagnostic changes. It claims +common Mermaid types only; unsupported syntax and render errors retain source +text. It promises neither a model download progress bar nor a forced download. + +The copy follows the implementation in `ios/SourceBraid/Archive/`, +`ios/SourceBraidShare/`, [the iOS README](../ios/README.md), +[the 1.1.0 release record](IOS_RELEASE_1.1.0.md), and +[the privacy notice](../PRIVACY.md). It intentionally does not claim complete +archive synchronization, guaranteed offline retention, unconditional local AI +availability, factual accuracy of generated answers, or a hosted AI fallback. +The separate Chrome extension, Codex plugin, and ChatGPT service are not iOS +in-app features and are not presented as included services here. diff --git a/docs/IOS_BRAND_APPEARANCE.de.md b/docs/IOS_BRAND_APPEARANCE.de.md index b396556..642c2f8 100644 --- a/docs/IOS_BRAND_APPEARANCE.de.md +++ b/docs/IOS_BRAND_APPEARANCE.de.md @@ -5,7 +5,7 @@ Diese lokale Anpassung gibt der iOS-/iPadOS-App eine zurückhaltende Identität, inspiriert von [sourcebraid.com](https://sourcebraid.com/). Warme Papierflächen, dunkelgrüne Schrift und ein einzelner Petrol-Akzent übertragen den Charakter -der Webseite auf native Apple-Steuerelemente. **Neueste** mit sieben Einträgen, +der Webseite auf native Apple-Steuerelemente. **Zuletzt** mit sieben Einträgen, Navigation, Reader und Hintergrundaktualisierung folgen weiterhin dem [Reader-Konzept](IOS_READER_REFRESH_UX.de.md). @@ -66,7 +66,7 @@ Sichtprüfung; die Palettenberechnung prüft nicht jede zusammengesetzte Ansicht ## Prüfgrenze -Neueste, Suche, Chat, Einstellungen und gerendertes Markdown im hellen/dunklen +Zuletzt, Suche, Chat, Einstellungen und gerendertes Markdown im hellen/dunklen Modus, mit erhöhtem Kontrast und vergrößerter Schrift prüfen. Dabei Datum und Platzhalter, gewählte Tabs, Links, Eingabe-/Sendesteuerung, Quellen, Codeblöcke und Tabellen auf Lesbarkeit prüfen. Den Eingaberahmen mit und ohne Fokus, diff --git a/docs/IOS_BRAND_APPEARANCE.md b/docs/IOS_BRAND_APPEARANCE.md index 5fafd4a..e3657a2 100644 --- a/docs/IOS_BRAND_APPEARANCE.md +++ b/docs/IOS_BRAND_APPEARANCE.md @@ -5,7 +5,7 @@ October 12, 2026 · [Deutsch](IOS_BRAND_APPEARANCE.de.md) This local appearance update gives the iOS/iPadOS app a restrained identity inspired by [sourcebraid.com](https://sourcebraid.com/). Warm paper, deep green text and a single teal accent carry the website's visual character into native -Apple controls. The seven-entry **Latest** destination, navigation, reader and +Apple controls. The seven-entry **Recent** destination, navigation, reader and background-refresh behavior remain as described in the [reader concept](IOS_READER_REFRESH_UX.md). @@ -63,7 +63,7 @@ does not verify every composited screen. ## Verification boundary -Inspect Latest, Search, Chat, Settings and rendered Markdown in light/dark mode, +Inspect Recent, Search, Chat, Settings and rendered Markdown in light/dark mode, increased contrast and enlarged text. Check legible dates and placeholder text, selected tabs, links, composer/send controls, sources, code blocks and tables. Check the input border with and without focus, reserved text/action space, diff --git a/docs/IOS_DEVICE_ACCEPTANCE.de.md b/docs/IOS_DEVICE_ACCEPTANCE.de.md index 4edad6a..e862f5b 100644 --- a/docs/IOS_DEVICE_ACCEPTANCE.de.md +++ b/docs/IOS_DEVICE_ACCEPTANCE.de.md @@ -59,8 +59,12 @@ historische Läufe mit Runtime 27.0 bleiben Nachweise ohne Duo-Abdeckung. - [ ] Neueste sieben mit dem vollständigen GitHub-Bestand vergleichen: UTC- Aufnahmezeit, Tages-Fallback, gleiche Datumswerte und undatierte Dateien. Ein unvollständiger Erstabruf darf keinen vollständigen Bestand behaupten. -- [ ] Start mit **Neueste** und sieben Beiträgen; Suche/Chat nutzen native Navigation. +- [ ] Start mit **Zuletzt** und sieben Beiträgen; Suche/Chat nutzen native Navigation. Antippen öffnet den Beitrag. Zurücknavigation, Auswahlmarkierung und interner Link funktionieren. +- [ ] Verschiedene Beiträge nacheinander öffnen, etwa 5 → Zurück → 6 → Zurück + → 7 → Zurück → 5. Jede Auswahl muss fertig laden und ihren eigenen Inhalt, + Originalquelle und Markdown-Quelltext zeigen. Auch aus Suche und nach der + Rückkehr vom Chat prüfen. - [ ] Auf breitem iPad erscheinen Auswahl/Chat links und Reader rechts; Hoch-/Querformat, schmale Fenster, Split View und zweite App-Szene prüfen. - [ ] Überschriften, Fett/Kursiv, verschachtelte Listen, Aufgaben, Zitate, @@ -114,7 +118,10 @@ Gerät Apple Intelligence aktivieren und den Modelldownload abschließen. | Fall | Erwartung / zu protokollierender Nachweis | | --- | --- | -| KI deaktiviert / Modell lädt / unzulässige Sprache | Verständlicher Status, kein aktives Chat-Eingabefeld; Reader/Suche nutzbar. | +| Gerät nicht berechtigt / iOS zu alt | Der gemeldete Grund ist von einem noch nicht bereiten Modell unterschieden; Reader/Suche bleiben nutzbar. | +| Apple Intelligence deaktiviert | Aktivieren in den Einstellungen wird empfohlen; kein angeblich laufender Modelldownload. | +| Modell nicht bereit | Der Status benennt die unbekannten Download-/Einrichtungsdetails ehrlich; Schritte zu aktivierter Intelligence, gleicher Geräte-/Siri-Sprache, WLAN, Strom und freiem Speicher. | +| Nicht unterstützte Sprache | Geprüfte Sprache und Sprachhinweise sichtbar; keine Anfrage erreicht das Modell. | | Demo-Beitrag 5: „Welcher Wert steht in der Swift-Zeile?“ | `SourceBraid` aus dem Code; Quellenknopf öffnet den richtigen Auszug. | | Gleicher Fall auf Englisch | „What is the value in the Swift code?“; passende Sprache, gleicher Beleg. | | „Fasse diesen Beitrag zusammen.“ | Nur gelieferte Auszüge; keine Aussage, die eine vollständige Langdokument-Analyse behauptet. | @@ -126,6 +133,30 @@ Gerät Apple Intelligence aktivieren und den Modelldownload abschließen. | Während Antwort stoppen / abmelden / Archiv wechseln | Keine nachträglich als geprüft dargestellte alte Antwort; Chat beim Archivwechsel geleert. | | Lange Quellen, Deutsch und weitere unterstützte Sprachen | Begrenzte Auszüge oder verständlicher Kontextfehler; kein stilles „vollständig gelesen“. | +Die erweiterte Diagnose ist **für das nächste Update vorbereitet und nicht Teil +der veröffentlichten 1.1.0**. Ihre Abnahme auf einem echten iPhone steht aus: + +- [ ] Auf einem iPhone 17 Pro die Debug-Verfügbarkeitsvorgaben entfernen und + tatsächliche App-/Build- und iOS-Version, Geräte- und Siri-Sprache, + Intelligence-Einstellung und gemeldeten Zustand protokollieren. Ein geeignetes + Gerät darf nicht automatisch als bereites Modell dargestellt werden. +- [ ] Falls iOS ein noch nicht bereites Modell meldet, die Schritte mit + [Apples Hilfe](https://support.apple.com/de-de/121115) vergleichen. Einstellungen, + gleiche unterstützte Sprachen, WLAN, Strom und freien Speicher prüfen. + SourceBraid darf keinen Downloadprozentsatz, Downloadstart oder festen + Fertigstellungstermin behaupten. Den echten Zustand nach abgeschlossener + iOS-Vorbereitung protokollieren. +- [ ] Chat öffnen, aus Einstellungen/Hintergrund zurückkehren und manuell + erneut prüfen: Jeweils den aktuellen Grund anzeigen. Bei fehlender + Verfügbarkeit bleibt Senden gesperrt; Lesen/Suche funktionieren weiter. +- [ ] Nach einem echten Verfügbarkeitswechsel vorhandenen Verlauf und einen + ungesendeten mehrzeiligen Entwurf über erneute Prüfung und Wiederherstellung + behalten. Sobald das Modell bereit ist, die erhaltene Frage zu einem Beitrag + mit passenden Belegen senden; keine doppelte Anfrage oder automatische + Übermittlung. Zum Test geänderte Einstellungen danach wiederherstellen. +- [ ] Vollständige Diagnose, erneute Prüfung und Apple-Hilfelink auf Deutsch + und Englisch mit großer Schrift und VoiceOver prüfen; per Scrollen erreichbar. + Pro Fall Sprache, Geräte-/OS-Version, grobe Dauer, Ergebnis und Pass/Fail festhalten. Quellen-IDs sind strukturell prüfbar; ob ein Text die Antwort wirklich stützt, muss in dieser Abnahme inhaltlich kontrolliert werden. @@ -245,6 +276,29 @@ Release-Stufe diese Funktionen einschließt. Fehlende Nachweise als **offen** führen, nicht als bestanden. Keine privaten Dokumente oder Tokens in Screenshots, Testreports oder öffentlichen Issues. +## Mermaid-Reader-Abnahme für das nächste Update + +Diese lokalen Änderungen sind nicht in der veröffentlichten 1.1.0 enthalten. +Ein synthetisches Dokument mit Flussdiagramm, Sequenzdiagramm, einem ungültigen +und anschließend gültigen Diagramm sowie einem zu großen Diagramm prüfen. +Unterstützte Vorschauen müssen offline ohne CDN oder Diagrammdienst sichtbar +bleiben. Fehlerhafte, nicht unterstützte und zu große Eingaben müssen ihren +lesbaren Originalquelltext und einen klaren Hinweis behalten. Erfolgreiche +Vorschauen bieten weiterhin einen aufklappbaren Quelltext. + +Mermaid Tiny 12.2.0 enthält keine Mindmaps, Architekturdiagramme oder KaTeX. +Angeforderte ELK-Layouts verwenden Dagre. Zwei verschiedene Dokumente +nacheinander öffnen, zum ersten zurückkehren, dunkle Darstellung und Drehung +prüfen sowie eine Quellenzeile unterhalb eines Diagramms anspringen. Relative +Links und Bilder müssen zum aktuellen Dokument gehören; die Leseposition muss +nach Abschluss der Darstellung wiederhergestellt werden. Archivskripte, +anklickbare Diagrammlinks und externe Diagrammmedien bleiben deaktiviert; +externe Reader-Bilder benötigen weiterhin eine bewusste Auswahl. + +Ergebnisse auf echten Geräten, einschließlich des gemeldeten iPhone 17 Pro, +sind weiterhin **offen**. Simulator-WebKit-Nachweise stehen getrennt im +Implementierungsprotokoll und belegen kein Verhalten auf realer Hardware. + ## Abnahmeprotokoll | Gerät / OS / Sprache | Fall | Ergebnis / Fehler | Nachweis | Freigabe | diff --git a/docs/IOS_DEVICE_ACCEPTANCE.md b/docs/IOS_DEVICE_ACCEPTANCE.md index 722c444..2a21f43 100644 --- a/docs/IOS_DEVICE_ACCEPTANCE.md +++ b/docs/IOS_DEVICE_ACCEPTANCE.md @@ -53,8 +53,11 @@ historical runs on runtime 27.0 remain non-Duo evidence. - [ ] Compare latest-seven ordering against the complete inventory: UTC capture timestamps, day/filename fallback, ties and undated files. Partial sync is labeled. -- [ ] Start at **Latest** with seven clips; Search/Chat use native navigation. +- [ ] Start at **Recent** with seven clips; Search/Chat use native navigation. Tap a row to open the document. Back, selection indication and relative links work. +- [ ] Open different clips in succession, for example 5 → Back → 6 → Back → 7 + → Back → 5. Each selection must finish loading and show its own body, original + source and raw Markdown. Repeat from Search and after returning from Chat. - [ ] Wide iPad has selection/chat left and reader right. Test rotation, narrow windows, Split View, and a second app scene. - [ ] Verify headings, emphasis, nested lists, tasks, quotes, code, wide tables, @@ -105,7 +108,10 @@ the model download. | Case | Expected evidence | | --- | --- | -| Disabled / model loading / unsupported language | Reason shown, no active chat input, reader/search usable. | +| Device not eligible / iOS too old | The reported reason is distinguished from a model that is not ready; reader/search remain usable. | +| Apple Intelligence disabled | Enabling it in Settings is suggested; the app does not claim a model download is running. | +| Model not ready | The status remains honest about unknown download/setup progress; steps cover enabling Intelligence, matching device/Siri languages, Wi-Fi, power and free storage. | +| Unsupported language | The checked language and language guidance are shown; no request reaches the model. | | Demo clip 5: “What is the value in the Swift code?” | `SourceBraid`, with a source button opening its supporting excerpt. | | German equivalent | “Welcher Wert steht in der Swift-Zeile?”; same evidence, suitable language. | | Summarize selected clip | Only supplied excerpts; no claim of complete long-document analysis. | @@ -117,6 +123,27 @@ the model download. | Stop/sign out/change archive while streaming | No late verified old answer; archive changes clear chat. | | Long sources and multiple supported languages | Bounded excerpts or understandable context failure, without a silent completeness claim. | +The expanded diagnostics are **prepared for the next update, not part of the +published 1.1.0**. Their physical iPhone acceptance remains pending: + +- [ ] On an iPhone 17 Pro, remove Debug availability overrides and record the + actual app/build, iOS version, device and Siri languages, Intelligence setting + and reported state. Device eligibility alone must not be presented as readiness. +- [ ] If iOS reports that the model is not ready, compare the displayed steps + with [Apple's guide](https://support.apple.com/en-us/121115). Check Settings, + matching supported languages, Wi-Fi, power and available storage. SourceBraid + must not display a download percentage, claim to start a download or promise + a completion time. Record the real state after iOS finishes preparation. +- [ ] Enter Chat, return from Settings/background and use the manual recheck; + each should show the current reason. Check that sending remains blocked when + unavailable and that reading/search still work. +- [ ] After a real availability change, keep an existing conversation and an + unsent multiline draft through refresh and recovery. Once ready, send the + preserved question against a clip with matching evidence; no duplicate request + or automatic submission should occur. Restore any settings changed for testing. +- [ ] Check the full diagnosis, recheck action and Apple help link in German + and English with large text and VoiceOver; scrolling must keep them reachable. + Record device/OS/language, rough duration, result and pass/fail. Verify the answer against the actual excerpt; structural citation checks do not establish semantic correctness. Repeat positive and negative quality cases at least @@ -227,6 +254,27 @@ archive measurements remain release gates for stages that include them. Missing evidence is **pending**, never passed. Keep private documents and tokens out of screenshots, reports and public issues. +## Mermaid reader acceptance for the next update + +These local changes are not included in the published 1.1.0. In a synthetic +document, verify a flowchart, a sequence diagram, an invalid diagram followed +by a valid one, and an oversized diagram. Supported diagrams must remain +visible offline without contacting a CDN or diagram service. Invalid, +unsupported and oversized input must leave readable original source and a clear +message; successful previews retain an expandable source section. + +Mermaid Tiny 12.2.0 omits mindmaps, architecture diagrams and KaTeX. Requested +ELK layouts fall back to Dagre. Test two different documents in succession, +reopen the first, switch to dark appearance, rotate, and navigate to a source +line below a diagram. Check source links/images resolve against the current +document, and that reading position is restored after rendering completes. +Archived scripts, clickable diagram links and external diagram media must +remain disabled; reader images still need explicit permission. + +Real-device results, including the reported iPhone 17 Pro, remain **pending**. +Simulator WebKit test evidence is recorded separately in the implementation +test report; it does not establish physical-device behavior. + ## Acceptance record | Device / OS / language | Case | Result / issue | Evidence | Approval | diff --git a/docs/IOS_IMPLEMENTATION_TESTING.de.md b/docs/IOS_IMPLEMENTATION_TESTING.de.md index 73eb659..f424fcd 100644 --- a/docs/IOS_IMPLEMENTATION_TESTING.de.md +++ b/docs/IOS_IMPLEMENTATION_TESTING.de.md @@ -450,6 +450,153 @@ iOS-Release. Xcode Cloud 27.1 RC wurde geprüft; nächste Cloud-Buildnummer ist Diese lokalen Ergebnisse behaupten weder erfolgreichen Cloud-Upload noch eine App-Store-Veröffentlichung. +### Lokale KI-Diagnose und Store-Dateien: 17. Oktober + +Diese Arbeitskopie bereitet ein späteres Update vor; die veröffentlichte +1.1.0/Build 11 enthält die neue Diagnoseansicht noch nicht. Die Prüfung nutzt +Apples öffentlichen `SystemLanguageModel`-Status und die Sprachunterstützung. +Die Hilfe unterscheidet ausgeschaltete Intelligence, ein nicht bereites Modell, +ungeeignete Hardware und eine nicht unterstützte Sprache, ohne angeblichen +Downloadfortschritt anzuzeigen. Entwurf, Verlauf und Fragebereich bleiben bei +erneuter Prüfung erhalten; vor der Generierung wird auch nach dem Abruf der +Quellenauszüge nochmals geprüft. + +Der vorgeschriebene unsignierte generische iOS-Simulator-Build sowie Quell- und +Bundle-Releaseprüfung bestanden. Im eigens angelegten iPhone-17-Pro-Simulator +(iOS 27.1) bestanden alle **51 Unit-/Integrations- und 12 UI-Tests**. Dazu +gehören sieben bestehende Regressionstests, eine zweisprachige Prüfung von +Diagnose/erneuter Prüfung/Reader und vier ausdrücklich aktivierte Bildfälle. +Auf iPad Pro 13 Zoll (M5) bestanden ebenfalls die fünf Bild-/Diagnose-UI-Fälle. +Nach der Sichtprüfung wurden Prüfbutton und Apple-Hilfelink über die langen +Hinweise verschoben. Die drei betroffenen Diagnose-UI-Fälle bestanden danach +erneut auf beiden Geräten. Beide Aktionen müssen in beiden Sprachen ohne +Scrollen erreichbar sein. + +Der Store-Ablauf benötigt in einem Debug-Build sowohl `SOURCEBRAID_DEMO=1` als +auch `SOURCEBRAID_STORE_DEMO=1`. Sieben selbst verfasste fiktive Artikel nutzen +`example.invalid` und eine ausdrückliche Beispielarchiv-Autorenkennzeichnung; +private Archive, Zugangsdaten und generierte Modellantworten fehlen. Pro Sprache +und Gerät sind vier native Produktansichten vorbereitet: Reader, Neueste, +Offline-Suche und Markdown-Quelltext. Diagnosevorschauen gehören nicht zum +Produkt-Uploadsatz. Die erweiterten Store-Felder auf +[Deutsch](IOS_APP_STORE_METADATA.de.md) / [Englisch](IOS_APP_STORE_METADATA.md) +halten Apples Längenlimits ein. +Alle 16 nativen Produktaufnahmen wurden gesichtet: iPhone **1206 × 2622** und +iPad **2064 × 2752**, RGB-PNG ohne Alphakanal. Das empfohlene Upload-ZIP enthält +**14 Bilder**; die zwei iPad-Neueste-Aufnahmen bleiben wegen des anfangs leeren +Detailbereichs optional außerhalb davon. PNG-Hashes und ZIP-Integrität sind +geprüft. + +Nachweise außerhalb von Git: +`/private/tmp/sourcebraid-store-diagnostics-build.log`, +`/private/tmp/sourcebraid-store-diagnostics-phone-verified.xcresult`, +`/private/tmp/sourcebraid-store-diagnostics-ipad.xcresult` mit zugehörigen Logs. +Die endgültige Diagnoseanordnung ist in +`/private/tmp/sourcebraid-diagnostics-{phone,ipad}-actions.xcresult` mit +zugehörigen Logs und getrennt ausgelieferten Vorschauen belegt. +Für CLI-Aufnahmen wird die Runner-Umgebungsvariable +`TEST_RUNNER_SOURCEBRAID_APP_STORE_CAPTURE=1` gesetzt. Normale Testläufe +überspringen diese Bildfälle ohne ausdrückliche Aktivierung. + +Die Simulator-Injektion prüft Darstellung und Schutz vor Modellaufrufen, nicht +die echte Modellvorbereitung, Einstellungen, Siri-Sprache oder Antwortqualität +auf dem iPhone. Physische iPhone-17-Pro-Wiederherstellung und Accessibility +bleiben in der Gerätecheckliste offen. Version/Build unverändert; keine +Signierung, Store-Uploads, neuen Einreichungen oder Git-Pushes ausgeführt. +Neue Standard-Screenshots und Beschreibung benötigen die nächste bearbeitbare +Store-Version, weil 1.1.0 bereits öffentlich verfügbar ist. + +### Store-Entwurf 1.1.1 und Reader-Korrekturen: 17. Oktober + +Nach Wiederherstellung der angemeldeten Chrome-Verbindung bestätigte App Store +Connect 1.1.0/Build 11 als bereit für den Vertrieb. Ein eigener **Entwurf 1.1.1** +enthält jetzt die erweiterten deutschen/englischen Beschreibungen, Werbetexte, +Schlüsselwörter, Neuerungen und Untertitel. Alle **22 nativen Produktbilder** +sind gespeichert und nach erneutem Laden geprüft: je Sprache vier für iPhone +17 Pro, vier für iPhone Duo und drei für iPad. Die Duo-Aufnahmen sind +**1398 × 2034** große RGB-PNGs ohne Alpha; beide Produktaufnahme-Tests bestanden. +Das Gesamtpaket bewahrt die unveränderten Bilddateien und ersetzt die oben +dokumentierte erste Vorbereitung mit 14 Bildern. Für 1.1.1 wurde kein Build +ausgewählt, eingereicht oder veröffentlicht; öffentlich bleibt 1.1.0 bestehen. +Nach der Umbenennung in Recent/Zuletzt wurden alle 22 ausgewählten Bilder neu +aufgenommen, als unveränderte native PNGs geprüft und in allen sechs +Sprach-/Gerätegruppen ersetzt. Erneutes Laden bestätigte neue Asset-IDs und +Bildzahlen. Gespeicherte Beschreibungen und 1.1.1-Neuerungen auf Deutsch und +Englisch stimmen exakt mit den lokalen Textdateien überein. + +Die Ladekorrektur reproduziert einen ersten Abruf, der nach einem gespeicherten +Beitrag unterbrochen wird. Ein späterer Start ergänzt jetzt nur die fehlenden +Plätze bis sieben; ausdrückliches Aktualisieren lädt den übrigen Bestand. +Zuletzt zeigt geladenen/Gesamtbestand und **Übrige Beiträge laden**. Die +Wiederherstellung nach Abbruch bleibt im überwachten Aktualisierungsjob, damit +sie keinen Cache nach dessen Entfernung durch ein anderes Fenster erneut +öffnet. Ein deterministischer Test hält die Abbruchbereinigung an und prüft, +dass die Entfernung wartet und kein Cache-Verzeichnis wieder entsteht. + +Ein eigener Regressionstest reproduziert den präzisierten Gerätebericht in +der markierten Version 1.1.0: Beitrag 5 öffnet sich, nach Zurück bleibt Beitrag +6 am nativen Ladekreisel hängen. Synthetische Ablaufmarkierungen zeigen, dass +die erzwungene äußere Reader-Identität den neuen Detail-Ladevorgang während der +kompakten Navigation abbricht. Allein das Entfernen dieses `.id(...)` aus dem +veröffentlichten Code lässt die vollständige Folge 5 → 6 → 7 → 5 bestehen, +einschließlich eigener Inhalte und Quell-URLs im Markdown-Quelltext. Der neue +Stand behält den Reader bei, ordnet Ladeaufgaben Pfad/SHA und Generation zu, +setzt beitragsbezogene Ansichtsoptionen zurück, verhindert veraltete Ergebnisse +und bietet nach einem Ladeabbruch einen erneuten Versuch an. Ungültiges UTF-8 +meldet jetzt einen Dateifehler statt eines still verschluckten Abbruchs. + +Der Startbereich heißt jetzt **Recent** / **Zuletzt**. Die zusätzliche Liste +kürzlich gespeicherter Beiträge entfällt aus den Einstellungen, ebenso deren +ungenutzter Ansichtsstatus und Aktualisierungsaufruf. Die gemeinsame +Capture-Speicherung der Share Extension bleibt unverändert. + +Mermaid-Codeblöcke verwenden jetzt die fest gebündelte **Mermaid Tiny 12.2.0** +in einer isolierten WebKit-Skriptumgebung. Seitenskripte bleiben deaktiviert, +Diagramme benötigen keinen externen Dienst und externe Artikelbilder weiterhin +die Freigabe pro Dokument. Gängige Fluss-, Sequenz-, Zustands-, Klassen-, ER- +und Gantt-Diagramme werden unterstützt. Ungültige, nicht unterstützte oder zu +große Eingaben behalten ihren Originalquelltext. Nach zehn Sekunden oder einem +WebKit-Prozessabbruch bleibt eine Quelltextansicht erhalten. Die eingebettete +WebView wird Beitragspfad, SHA und Bestands-Commit zugeordnet. Lizenzhinweise der +Abhängigkeiten bleiben in der App enthalten. + +Abschließende Prüfung: + +- Der generische unsignierte iOS-Simulator-Build bestand. +- Alle **58 Unit-/Integrationstests bestanden**, einschließlich unterbrochenem + Startabruf, ausdrücklichem vollständigem Abruf, ungültigem UTF-8, echten + Abbrüchen und Abbruch-/Löschfällen über mehrere Fenster. +- Der echte WebKit-UI-Test bestand auf **iPhone 17 Pro und iPad Pro 13 Zoll**: + drei sichtbare gefüllte SVGs, gültige Darstellung nach einem Syntaxfehler, + Quelltext bei Übergröße, keine aktiven/Medien-/Link-Elemente und isolierte + JavaScript-Variablen. +- Alle **sechs gezielten Reader-/Navigationsfälle bestanden** mit dem finalen + Stand: aufeinanderfolgende Auswahl aus Zuletzt und Suche, Chatentwurf und + Tab-Wechsel, PDF/interne Links, Mermaid/Sicherheit und Rotation. Weitere + **acht UI-Fälle** bestanden für deutsche/englische Reader-, Einstellungs- und + Suchansichten auf dem iPhone sowie native Produktaufnahmen auf iPhone 17 Pro, + iPad Pro 13 Zoll und iPhone Duo. Die Darstellung wird in einer synthetischen + Debug-App geprüft, da das Unit-Testziel keinen UIApplication-Host besitzt. +- Quell-/Bundle-Prüfung, Integrität der gebündelten Ressourcen und + `git diff --check` bestanden. Keine echten Archive, Zugangsdaten oder + generierten Antworten wurden verwendet. + +Nachweise außerhalb von Git: `/private/tmp/sourcebraid-recent-reader-final-build.log`, +`/private/tmp/sourcebraid-recent-store-phone-v2.xcresult`, +`/private/tmp/sourcebraid-reader-navigation-fixed.xcresult`, +`/private/tmp/sourcebraid-recent-store-ipad.xcresult`, +`/private/tmp/sourcebraid-recent-store-duo.xcresult` mit zugehörigen Logs. +Der frühere `/private/tmp/sourcebraid-1-1-1-mermaid-ipad.xcresult` enthält den +WebKit-Test auf dem iPad. Der Vergleich mit dem veröffentlichten Code liegt in +`/private/tmp/sourcebraid-reader-release-repro.xcresult` und +`/private/tmp/sourcebraid-reader-release-without-outer-id.xcresult`. +Dies sind lokale Änderungen, kein auf dem physischen iPhone installiertes +Update. Version/Build, Signierung und Git-Verlauf bleiben unverändert. Der +Reader-Wechselfehler wurde unabhängig vom unterbrochenen Startabruf nachgestellt +und durch den beschriebenen Vergleich mit dem veröffentlichten Code eingegrenzt. +Das korrigierte Verhalten auf dem physischen iPhone des Nutzers bleibt Teil der +Geräteabnahme. + ## Nächster Abnahmeschritt [Gerätecheckliste](IOS_DEVICE_ACCEPTANCE.de.md) lokal in Xcode und auf dem diff --git a/docs/IOS_IMPLEMENTATION_TESTING.md b/docs/IOS_IMPLEMENTATION_TESTING.md index 7abeea6..1f3bf72 100644 --- a/docs/IOS_IMPLEMENTATION_TESTING.md +++ b/docs/IOS_IMPLEMENTATION_TESTING.md @@ -425,6 +425,139 @@ core/MCP logs. The planned iOS-only tag is `ios-v1.1.0`; Chrome/plugin/MCP stay Xcode Cloud 27.1 RC was verified; next Cloud build number is 11. These local results do not assert a successful Cloud archive/upload or App Store release. +### Local Intelligence diagnostics and Store assets: October 17 + +This working-tree update prepares a later release; the published 1.1.0/build 11 +does not contain the new diagnostic UI. Availability uses Apple's public +`SystemLanguageModel` status and locale support. Guidance distinguishes +disabled Intelligence, an unready model, ineligible hardware and an unsupported +language without claiming to know download progress. Checks preserve the draft, +conversation and scope, and run again after retrieval before generation. + +The generic unsigned iOS Simulator build passed, as did source and built-bundle +release validation. On the dedicated iPhone 17 Pro simulator (iOS 27.1), all +**51 unit/integration tests and 12 UI tests passed**. The latter include the +seven existing regression cases, a bilingual diagnostic/recheck/reader case, +and four explicitly opted-in screenshot cases. On iPad Pro 13-inch (M5), the +five screenshot/diagnostic UI cases also passed. +After visual review moved the recheck button and Apple help link above the +long guidance, the three affected diagnostic UI cases passed again on each +device. Both actions are asserted reachable without scrolling in both languages. + +The Store workflow requires both `SOURCEBRAID_DEMO=1` and +`SOURCEBRAID_STORE_DEMO=1` in a Debug build. Seven original fictional articles +use `example.invalid` and an explicit example-archive author; no private archive, +credentials or generated model answer appears. Four native product views per +locale/device are prepared: reader, Latest, offline search and raw Markdown. +Diagnostic previews are excluded from the product upload set. Expanded +[English](IOS_APP_STORE_METADATA.md) / [German](IOS_APP_STORE_METADATA.de.md) +Store fields stay within Apple's length limits. +All 16 original product captures were inspected: iPhone **1206 × 2622** and +iPad **2064 × 2752**, RGB PNG without alpha. The recommended upload ZIP contains +**14 images**; the two iPad Latest pictures remain optional outside it because +their initial detail pane is empty. PNG hashes and ZIP integrity were verified. + +Evidence outside Git: +`/private/tmp/sourcebraid-store-diagnostics-build.log`, +`/private/tmp/sourcebraid-store-diagnostics-phone-verified.xcresult`, +`/private/tmp/sourcebraid-store-diagnostics-ipad.xcresult` and matching logs. +The final diagnostic layout evidence is in +`/private/tmp/sourcebraid-diagnostics-{phone,ipad}-actions.xcresult` with matching +logs and separately delivered previews. +The screenshot capture tests are gated by the runner environment variable +`TEST_RUNNER_SOURCEBRAID_APP_STORE_CAPTURE=1` for CLI runs. Routine tests skip +them unless explicitly requested. + +Simulator injection verifies presentation and request gating, not the real +iPhone's model preparation, Settings, Siri language or answer quality. Physical +iPhone 17 Pro recovery and accessibility checks remain in the device checklist. +No build/version bump, signing, App Store upload, new submission or Git push +occurred. The new default screenshots and description need the next editable +Store version because 1.1.0 is already public. + +### Store draft 1.1.1 and reader fixes: October 17 + +After the signed-in Chrome connection became available, App Store Connect +confirmed 1.1.0/build 11 as Ready for Distribution. A separate **1.1.1 draft** +now contains the expanded English/German description, promotional text, +keywords, update notes and subtitles. All **22 native product screenshots** +were saved and verified after reloading: per language, four iPhone 17 Pro, +four iPhone Duo and three iPad pictures. The Duo images are **1398 × 2034** +RGB PNGs without alpha; its two product capture tests passed. The combined +package retains the original screenshot bytes. This supersedes the earlier +14-image preparation set above. No build was selected, submitted or released +for 1.1.1; the public 1.1.0 listing remains unchanged. +After the Recent/Zuletzt naming change, all 22 selected images were captured +again, checked as original native PNGs and replaced in all six locale/device +wells. A full reload confirmed their new asset IDs and counts. The saved +English/German descriptions and 1.1.1 notes exactly match the local text files. + +The archive fix reproduces an initial refresh interrupted after one committed +article. A later launch now fills only the missing slots up to seven; an +explicit refresh downloads the remaining inventory. Recent shows loaded/total +coverage and a **Load remaining clips** action. Cancellation recovery remains +inside the coordinator's tracked job so it cannot reopen a cache after another +scene has removed local data. A deterministic test holds cancellation cleanup +and verifies that removal waits and leaves no recreated cache directory. + +A separate regression reproduces the user's clarified report in the tagged +1.1.0 app: article 5 opens, but after Back, article 6 remains on the native +spinner. Synthetic lifecycle tracing shows that the forced outer reader +identity cancels the new detail task during compact navigation. Removing only +that `.id(...)` from the released code makes the full 5 → 6 → 7 → 5 sequence +pass, including distinct rendered bodies and raw source URLs. The working +implementation keeps the reader stable, keys its loading task by path/SHA and +generation, resets document-specific UI state, guards stale completions and +offers Retry after an interrupted load. Invalid UTF-8 now reports a file error +instead of being silently treated as cancellation. + +The home destination is now **Recent** / **Zuletzt**. Settings no longer shows +the separate recently saved list; its unused settings-only state and refresh +hook were removed. Capture storage used by the Share Extension is unchanged. + +Mermaid fences now use the pinned, bundled **Mermaid Tiny 12.2.0** engine in +an isolated WebKit content world. Page scripts remain disabled, diagram +rendering uses no remote service, and external article images retain their +per-document opt-in. Common flowchart, sequence, state, class, ER and Gantt +syntax is supported; invalid/unsupported/oversized input keeps its original +source. A ten-second watchdog and WebKit termination recovery preserve the +source-only fallback. The embedded WebView is keyed by clip path, SHA and +inventory commit. Dependency notices are retained in the app. + +Final verification: + +- Generic unsigned iOS Simulator build passed. +- All **58 unit/integration tests passed**, including interrupted bootstrap, + explicit full refresh, invalid UTF-8, genuine cancellation and cross-window + deletion/cancellation regressions. +- The real WebKit UI probe passed on **iPhone 17 Pro and iPad Pro 13-inch**: + three visible nonempty SVGs, recovery from an invalid diagram, oversized + source fallback, no active/media/link elements and isolated JavaScript globals. +- All **six targeted reader/navigation UI cases passed** with the final code: + successive selections from Recent and Search, Chat draft/tab preservation, + PDF/internal links, Mermaid/security and rotation. Another **eight UI cases** + passed for English/German phone reader/settings/search and native product + captures on iPhone 17 Pro, iPad Pro 13-inch and iPhone Duo. Rendering uses a + Debug-only synthetic app probe because the unit-test target has no + UIApplication host. +- Source/bundle validation, pinned resource integrity and `git diff --check` + passed. No production archive, credentials or generated answer was used. + +Evidence outside Git: `/private/tmp/sourcebraid-recent-reader-final-build.log`, +`/private/tmp/sourcebraid-recent-store-phone-v2.xcresult`, +`/private/tmp/sourcebraid-reader-navigation-fixed.xcresult`, +`/private/tmp/sourcebraid-recent-store-ipad.xcresult`, +`/private/tmp/sourcebraid-recent-store-duo.xcresult` and matching logs. +The earlier `/private/tmp/sourcebraid-1-1-1-mermaid-ipad.xcresult` records the +iPad WebKit probe. Controlled release evidence is retained in +`/private/tmp/sourcebraid-reader-release-repro.xcresult` and +`/private/tmp/sourcebraid-reader-release-without-outer-id.xcresult`. +These are local changes, not an installed physical-device update. Version/build, +signing and Git history remain unchanged. The reader transition failure is +reproduced separately from interrupted bootstrap and isolated by the controlled +release experiment above. The corrected behavior on the user's physical iPhone +still requires device acceptance. + ## Next acceptance step Follow the [device checklist](IOS_DEVICE_ACCEPTANCE.md) in Xcode and on iPhone, diff --git a/docs/IOS_READER_REFRESH_UX.de.md b/docs/IOS_READER_REFRESH_UX.de.md index e53924f..81d9cfe 100644 --- a/docs/IOS_READER_REFRESH_UX.de.md +++ b/docs/IOS_READER_REFRESH_UX.de.md @@ -13,14 +13,14 @@ freigegeben. Das [Konzept für die Markenfarben der App](IOS_BRAND_APPEARANCE.de.md) beschreibt die zurückhaltende Papier-/Grün-Palette nach dem Vorbild der SourceBraid-Webseite. -Die App startet mit **Neueste** und zeigt die neuesten sieben Beiträge. +Die App startet mit **Zuletzt** und zeigt die neuesten sieben Beiträge. Die native gruppierte Liste nutzt den verfügbaren Inhaltsbereich. Antippen öffnet den Beitrag direkt; die systemeigene Zurücknavigation führt zur Liste. Datumswerte erscheinen entsprechend der aktuellen Sprache statt als ISO-Zeitstempel. Reine Tagesdaten behalten ihren UTC-Kalendertag. -Ab OS 18 trennt die systemeigene Tab-Leiste **Neueste**, **Suche** und **Chat**. +Ab OS 18 trennt die systemeigene Tab-Leiste **Zuletzt**, **Suche** und **Chat**. OS 17 verwendet entsprechende Aktionen in der unteren Toolbar. Oben stehen Aktualisieren/Stopp und ein Mehr-Menü für Einstellungen, lokale Datenlöschung und Abmelden. Reader-Aktionen bleiben in dessen Toolbar; dort kann man auch zum @@ -56,8 +56,9 @@ Skills bleiben außerhalb des Repositorys. | Auslöser | Arbeit | | --- | --- | -| Start mit Cache / Vordergrund | Geschützten lokalen Metadatenkatalog und Suchabdeckung wiederherstellen. Keine automatische GitHub-Bestands- oder Artikelanfrage. | +| Start mit Cache / Vordergrund nach abgeschlossenem Startpaket | Geschützten lokalen Metadatenkatalog und Suchabdeckung wiederherstellen. Keine automatische GitHub-Bestands- oder Artikelanfrage. | | Leerer lokaler Cache | Gepinnten Bestand mit Anfragebudget lesen und höchstens sieben Markdown-Dateien versuchen. Unvollständige Abdeckung anzeigen. | +| Unterbrochenes Startpaket | Gespeicherte Beiträge wiederherstellen, den begrenzten Bestand erneut prüfen und nur die fehlenden Plätze bis zu sieben geladenen/indexierten Beiträgen ergänzen. | | Geplanter Hintergrundabruf | Neuesten Commit prüfen, Bestandsänderungen abgleichen und ein begrenztes Paket fehlender/geänderter Dateien oder Suchzeilen verarbeiten. | | Pull to refresh / Toolbar-Aktualisierung | Ausdrücklichen inkrementellen Abgleich starten; ausstehende Artikel innerhalb vorhandener Datei-/Cache-Grenzen vervollständigen. Stopp bleibt verfügbar. | | Nicht geladenen Beitrag öffnen | Diesen Beitrag gezielt laden und Metadaten/Suchzeile seiner aktuellen Version ergänzen. | @@ -69,6 +70,20 @@ Teilbestand. Weitere Pakete ermitteln die tatsächliche Aufnahmezeit-Reihenfolge ohne die erforderlichen Metadaten kann die App keine endgültigen neuesten sieben garantieren. Bereits vollständig gespeicherte Metadaten liefern diese sofort. +Das nächste Update setzt auch ein teilweise gespeichertes Startpaket fort. +Bisher konnte ein bereits gespeicherter Bestand nach einem Startabbruch alle +weiteren Startdownloads unterdrücken, selbst wenn erst ein Beitrag fertig war. +Die Fortsetzungsprüfung zählt jetzt geladene/indexierte Beiträge zusätzlich zum +Bestand; fertige Beiträge werden wiederverwendet. Stopp oder Abbruch einer +Aktualisierung übernimmt deren bereits atomar gespeicherten Fortschritt in die +sichtbare Bibliothek. Der Start bleibt auf insgesamt sieben Beiträge begrenzt; +ausdrückliches Aktualisieren vervollständigt den Rest eines großen Archivs. +Archivformat, Berechtigungen und Cache-Budgets bleiben unverändert. +Solange der Bestand unvollständig ist, zeigt die Fußzeile unter **Zuletzt** die +Zahl geladener Beiträge gegenüber dem vollständigen Bestand. **Übrige Beiträge +laden** startet dort direkt die ausdrückliche inkrementelle Aktualisierung mit +vorhandener Fortschrittsanzeige und Stopp-Aktion. + Der Katalog speichert den gepinnten Commit und jede Datei-SHA. Bei vollständigem, unverändertem Bestand/Index genügt während einer Aktualisierung die Commit-Anfrage. Unveränderte Dateien und passende Suchzeilen werden wiederverwendet. diff --git a/docs/IOS_READER_REFRESH_UX.md b/docs/IOS_READER_REFRESH_UX.md index 5e5814f..ea0d018 100644 --- a/docs/IOS_READER_REFRESH_UX.md +++ b/docs/IOS_READER_REFRESH_UX.md @@ -12,13 +12,13 @@ approval remain pending; no commit, push or upload is authorized. The [app brand-color concept](IOS_BRAND_APPEARANCE.md) defines the restrained paper/green palette inspired by the SourceBraid website. -The initial destination is **Latest** and shows the latest seven clips. Its +The initial destination is **Recent** and shows the latest seven clips. Its native grouped list fills the available content area. A row opens its document directly; the system Back control returns to the list. Dates use the current locale rather than raw ISO timestamps; day-only capture dates retain their UTC calendar day. -On OS 18 and later, a system tab bar separates **Latest**, **Search**, and +On OS 18 and later, a system tab bar separates **Recent**, **Search**, and **Chat**. OS 17 uses the corresponding bottom toolbar actions. The upper toolbar contains Refresh/Stop and a More menu for Settings, local-data removal, and sign-out. Reader actions remain in the reader toolbar, including an action @@ -54,8 +54,9 @@ outside this repository. | Trigger | Work | | --- | --- | -| Warm launch / foreground | Restore the protected local metadata catalog and index coverage. No automatic GitHub inventory or article request. | +| Warm launch / foreground after a completed initial seed | Restore the protected local metadata catalog and index coverage. No automatic GitHub inventory or article request. | | Empty local cache | Read a pinned, request-bounded inventory and attempt at most seven Markdown bodies. Show partial coverage. | +| Interrupted initial seed | Restore committed clips, recheck the bounded inventory and resume only the missing slots up to seven loaded/indexed clips. | | Scheduled background refresh | Check the latest commit, reconcile inventory changes and process a bounded batch of missing/changed bodies or index rows. | | Pull to refresh / toolbar Refresh | Run an explicit incremental refresh; finish pending articles within existing per-file/cache limits. Stop remains available. | | Open a missing document | Download that document on demand and add its current-version metadata/search row. | @@ -67,6 +68,18 @@ capture-time ordering; the app cannot claim the definitive newest seven before reading the necessary metadata. Previously cached full metadata can show the correct newest seven immediately. +The next update also recovers a partially saved initial seed. Previously, a +snapshot saved before a launch interruption could suppress all later startup +downloads even if only one clip had finished. The resume check now counts +loaded/indexed clips as well as the inventory; completed clips are reused. +Stopping or cancelling a refresh restores its atomically committed progress in +the visible library. The startup still stops at seven total clips, and explicit +Refresh remains the way to complete the rest of a large archive. These fixes do +not change the archive format, permissions or cache budgets. +The Recent footer shows the loaded count against the full inventory while +coverage is partial. **Load remaining clips** starts the explicit incremental +refresh directly from that footer, with the existing progress and Stop action. + The catalog records the pinned commit and each file's SHA. A complete, unchanged inventory/index requires only the commit request during a refresh. Unchanged bodies and existing matching search rows are reused. New/changed diff --git a/docs/IOS_RELEASE_1.1.1.de.md b/docs/IOS_RELEASE_1.1.1.de.md new file mode 100644 index 0000000..1aafd50 --- /dev/null +++ b/docs/IOS_RELEASE_1.1.1.de.md @@ -0,0 +1,104 @@ +# SourceBraid für iOS 1.1.1 + +17. Oktober 2026 · [English](IOS_RELEASE_1.1.1.md) + +## Release-Status + +Der Maintainer hat das Pushen der aktuellen Änderungen, die Veröffentlichung +des iOS-spezifischen GitHub-Releases **`ios-v1.1.1`**, die Begleitung seines +Xcode-Cloud-Builds und die Einreichung der passenden App-Version zur +Apple-Prüfung freigegeben. Dieses Protokoll beschreibt den geprüften +Kandidaten. Die Freigabe allein belegt weder erfolgreiche Cloud-Archivierung +und Upload noch Prüfeinreichung oder App-Store-Veröffentlichung. + +Der Kandidat für App und Share Extension ist **1.1.1/Build 12**. Build 12 wurde +nach Prüfung der Xcode-Cloud-Historie gewählt; der neueste vorhandene Build +war 11. Ein erfolgreicher Cloud-Durchlauf für Build 12 bleibt zu bestätigen. +**1.1.0/Build 11** ist die +vorherige, bereits veröffentlichte App-Store-Version. Ihr erfolgreicher +Cloud-Build belegt diesen Kandidaten nicht. Chrome-Erweiterung, Codex-Plugin +und gehosteter ChatGPT-MCP behalten ihre unabhängigen Release-Versionen. + +## Änderungen + +- Mehrere Beiträge lassen sich auf dem kompakten iPhone-Layout nacheinander + öffnen. In 1.1.0 konnte der erste gewählte Beitrag erscheinen, während die + nächste Auswahl nach Zurück dauerhaft lud. Der Reader behält jetzt seine + Navigationsidentität, startet anhand von Dateipfad/-version, setzt + beitragsspezifische Zustände zurück und verwirft veraltete Ergebnisse. + Unterbrochene Abrufe bieten erneutes Versuchen; ungültiges UTF-8 zeigt einen + Dateifehler mit GitHub-Fallback. +- Ein unterbrochener erster Archivabruf wird fortgesetzt, statt nur seinen + ersten fertigen Beitrag anzuzeigen. Der Start ergänzt fehlende Plätze bis + insgesamt sieben geladene/indexierte Beiträge. Die Abdeckung zeigt + geladenen und vollständigen Bestand; **Übrige Beiträge laden** startet die + ausdrückliche inkrementelle Aktualisierung. Fertiger Fortschritt bleibt + nach Stopp sichtbar. Die Wiederherstellung kann keinen Cache erneut öffnen, + der in einem anderen Fenster gerade entfernt wird. +- Die Apple-Intelligence-Diagnose unterscheidet ausgeschaltete Intelligence, + ein noch nicht bereites Systemmodell, nicht unterstützte Sprache und + ungeeignete Hardware mit konkreten Hilfeschritten. Geprüft wird beim Öffnen + von Chat, bei der Rückkehr in den Vordergrund, vor der Generierung und auf + Wunsch. Entwurf und Verlauf bleiben erhalten. Apples Einrichtungshilfe + beschreibt die nächsten Schritte; SourceBraid kann weder den Systemmodell- + Download erzwingen noch dessen Fortschritt anzeigen. +- Mermaid-Diagramme werden mit gebündeltem, fest versioniertem **Mermaid Tiny + 12.2.0** vollständig auf dem Gerät dargestellt. Gängige Fluss-, Sequenz-, + Zustands-, Klassen-, ER- und Gantt-Syntax wird unterstützt. Fehlerhafte, + nicht unterstützte oder zu große Diagramme behalten ihren Originalquelltext, + ebenso Zeitüberschreitungen und die WebKit-Wiederherstellung. Auch nach + erfolgreicher Vorschau bleibt der Quelltext erreichbar. Tiny enthält keine + Mindmaps, Architekturdiagramme oder KaTeX; ELK-Layouts verwenden Dagre. +- Der Hauptbereich heißt jetzt **Recent** / **Zuletzt**. Die überholte Liste + **Zuletzt gespeichert** entfällt aus den Einstellungen. Der Capture-Speicher + der Share Extension bleibt unverändert. +- Erweiterte englische/deutsche App-Store-Texte und **22 native Produktbilder**: + pro Sprache vier iPhone-, vier iPhone-Duo- und drei iPad-Bilder. Die neuen + Bilder und Texte sind im Store-Entwurf 1.1.1 gespeichert und nach erneutem + Laden geprüft. Alle Beispielbeiträge sind fiktiv; weder private Archive noch + erzeugte KI-Antworten erscheinen darin. + +## Kompatibilität und Datenschutz + +Reader und Suche unterstützen weiterhin iOS/iPadOS ab 17. Chat benötigt +zusätzlich iOS/iPadOS ab 26, geeignete Hardware, aktivierte Apple Intelligence +und ein bereites Systemmodell in einer unterstützten Sprache. Die +Duo-Faltanpassung benötigt iOS 27.1. Reader und Suche bleiben ohne lokale KI +verfügbar. + +Es gibt keine neuen GitHub-Berechtigungen, Zugangsdaten-Speicher, +Archivformatänderungen oder externen Diagrammdienste. Mermaid führt nur das +gebündelte Programm der App in einer isolierten WebKit-Umgebung aus. +Archivskripte, Diagrammlinks und eingebettete/externe Diagrammmedien bleiben +deaktiviert. Externe Artikelbilder benötigen weiterhin eine bewusste Freigabe +für den jeweiligen Beitrag. Tokens bleiben im Schlüsselbund; Reader und Suche +verwenden den vorhandenen geschützten, verwerfbaren Cache. Die Share Extension +behält ihre bisherigen Capture-Schreibzugriffe. Siehe [Datenschutz](../PRIVACY.md). + +## Prüfung und Distributionsprotokoll + +Der funktionale Kandidat besteht **58 Unit-/Integrationstests und 14 UI-Fälle** +auf Simulatoren mit iOS 27.1. Vorgeschriebener unsignierter iOS-Simulator-Build, +Quell-/Bundle-Validierung, Integritätsprüfung der gebündelten Ressourcen und +`git diff --check` bestehen. Die UI-Nachweise umfassen aufeinanderfolgende +Beitragsauswahl, unterschiedliche gerenderte/rohe Inhalte, Navigation über +Zuletzt/Suche, Erhalt des Chatentwurfs, Reader-Links/PDFs, englische/deutsche +Einstellungen und Store-Aufnahmen. Die echte WebKit-Mermaid-Prüfung besteht +auf iPhone 17 Pro und iPad Pro 13 Zoll; Produktaufnahmen auch im nativen +iPhone-Duo-Simulator. Der kontrollierte 1.1.0-Vergleich reproduziert den +Fehler nach dem ersten Öffnen und grenzt die äußere Reader-Identität als +Ursache ein. Umfang und lokale Nachweispfade stehen im +[Testprotokoll](IOS_IMPLEMENTATION_TESTING.de.md). + +Diese Prüfungen belegen die funktionale Änderung vor der Distribution. +Das genaue versionierte Release-Bundle, Signierung, neue Xcode-Cloud- +Archivierung, Upload, App-Store-Verarbeitung und Prüfeinreichung werden jeweils +an ihren tatsächlichen Ergebnissen geprüft. Bei Vorbereitung dieses Protokolls +wird kein erfolgreicher neuer Cloud-Build oder eine Apple-Freigabe behauptet. +Der erfolgreiche historische **Build 11** bleibt getrennt. + +Die Abnahme der korrigierten Navigation auf dem physischen iPhone, tatsächliche +Apple-Intelligence-Vorbereitung/Antwortqualität, Mindest-OS-Starts, physische +Duo-Faltwechsel und die übrige Accessibility-Matrix bleiben in der +[Gerätecheckliste](IOS_DEVICE_ACCEPTANCE.de.md) dokumentiert. Simulatoren und +Veröffentlichungsfreigabe ersetzen diese offenen Prüfungen nicht. diff --git a/docs/IOS_RELEASE_1.1.1.md b/docs/IOS_RELEASE_1.1.1.md new file mode 100644 index 0000000..292c893 --- /dev/null +++ b/docs/IOS_RELEASE_1.1.1.md @@ -0,0 +1,94 @@ +# SourceBraid for iOS 1.1.1 + +October 17, 2026 · [Deutsch](IOS_RELEASE_1.1.1.de.md) + +## Release status + +The maintainer has authorized pushing the current changes, publishing the +iOS-specific GitHub release **`ios-v1.1.1`**, following its Xcode Cloud build, +and submitting the matching app version for Apple's review. This record +describes the validated candidate; authorization alone does not establish a +successful cloud archive, upload, review submission or App Store publication. + +The candidate is **1.1.1/build 12** for both the app and Share Extension. +Build 12 was selected after checking the Xcode Cloud history, whose latest +existing build was 11. A successful cloud result for build 12 remains to be +verified. **1.1.0/build 11** is the +previous, already published App Store version. Its successful cloud build +does not validate this candidate. The Chrome extension, Codex plugin and hosted +ChatGPT MCP retain their independent release versions. + +## Changes + +- Fix repeated article opening on a compact iPhone layout. In 1.1.0, the first + chosen article could open, while the next selection after Back stayed on a + spinner. The reader now keeps a stable navigation identity, starts loading + by file path/version, resets document-specific state and rejects stale + completions. Interrupted loads offer Retry; invalid UTF-8 produces a visible + file error with GitHub fallback. +- Resume an interrupted initial archive download instead of leaving only its + first completed article visible. Startup fills the missing slots up to seven + loaded/indexed clips. Coverage shows loaded/total counts and **Load remaining + clips** starts an explicit incremental refresh. Committed progress survives + Stop, and recovery cannot reopen a cache being removed by another scene. +- Show practical Apple Intelligence diagnostics for disabled Intelligence, + an unready system model, unsupported language and ineligible hardware. + Availability is checked when entering Chat, returning to the foreground, + before generation and on request. The draft and conversation are retained. + Apple's setup guide explains the next steps; SourceBraid cannot force a + system-model download or report its progress. +- Render Mermaid diagrams entirely on the device using pinned, bundled + **Mermaid Tiny 12.2.0**. Common flowchart, sequence, state, class, ER and Gantt + syntax is supported. Invalid, unsupported or oversized diagrams retain + their original source, as do rendering timeouts and WebKit recovery. + Source remains available even after a successful preview. Tiny omits + mindmaps, architecture diagrams and KaTeX; ELK layouts use Dagre. +- Rename the main destination to **Recent** / **Zuletzt** and remove the + obsolete **Recently saved** list from Settings. Share Extension capture + storage remains unchanged. +- Expand the English/German App Store description and prepare **22 native + product screenshots**: four iPhone, four iPhone Duo and three iPad pictures + per language. These updated images and text are saved in the 1.1.1 Store + draft and were verified after reload. All example articles are fictional; + no private archive or generated model answer appears. + +## Compatibility and privacy + +Reader and search retain iOS/iPadOS 17 support. Chat additionally requires +iOS/iPadOS 26 or later, eligible hardware, enabled Apple Intelligence and a +ready system model in a supported language. The Duo hinge adapter requires +iOS 27.1. Reader and search remain available without local AI. + +There are no new GitHub scopes, credential stores, archive-format changes or +remote diagram services. Mermaid executes only the app-owned offline bundle +in an isolated WebKit content world. Archived page scripts, diagram links and +embedded/external diagram media remain disabled. External article images +retain their per-document opt-in. Tokens stay in Keychain, and reader/search +use the existing protected disposable cache. The Share Extension retains its +existing capture writes. See [Privacy](../PRIVACY.md). + +## Validation and distribution record + +The functional candidate passed **58 unit/integration tests and 14 UI cases** +on iOS 27.1 simulators. The generic unsigned iOS Simulator build passed, as did +source/bundle validation, pinned resource integrity and `git diff --check`. +The UI evidence includes successive article selections, distinct rendered/raw +bodies, Recent/Search navigation, Chat draft preservation, reader links/PDFs, +English/German settings and Store captures. The real WebKit Mermaid probe +passed on iPhone 17 Pro and iPad Pro 13-inch; product capture also passed on +the native iPhone Duo simulator. The controlled 1.1.0 experiment reproduces +the first-open-only failure and isolates the outer reader identity as its +cause. The [test record](IOS_IMPLEMENTATION_TESTING.md) contains exact scope +and local evidence paths. + +These checks validate the functional patch before distribution. The exact +versioned release bundle, signing, new Xcode Cloud archive, upload, App Store +processing and review submission must each be verified from their own results. +At preparation of this record, no new cloud-build success or review acceptance +is asserted. The successful historical build **11** remains separate. + +Physical iPhone acceptance of the corrected navigation, actual Apple +Intelligence preparation/answer quality, minimum-OS launches, physical Duo +fold transitions and the remaining accessibility matrix are still documented +in the [device checklist](IOS_DEVICE_ACCEPTANCE.md). Simulator and release +authorization do not mark those checks as passed. diff --git a/ios/README.md b/ios/README.md index 2383a22..2e3921c 100644 --- a/ios/README.md +++ b/ios/README.md @@ -1,10 +1,11 @@ # SourceBraid for iOS The iOS project contains a SwiftUI archive reader, configuration screens, and a -native Share Extension. The maintainer approved the **1.1.0** release candidate -for publication on October 15, 2026 after a hands-on functional check. Xcode -Cloud distribution and App Store availability are tracked separately in the -[release notes](../docs/IOS_RELEASE_1.1.0.md). The Share +native Share Extension. The next iOS release candidate is **1.1.1/build 12**; its +[release record](../docs/IOS_RELEASE_1.1.1.md) separates validated local changes +from the new cloud build and Apple review. **1.1.0/build 11** remains the +published App Store version; its [earlier release notes](../docs/IOS_RELEASE_1.1.0.md) +preserve the preflight and publication record. The Share Extension saves shared URLs, readable Safari content and its relevant image assets, selected text, PDFs, and other files into the same GitHub repository and URL-hash-sharded `web-clips/index/*.jsonl` format as the Chrome extension. @@ -32,13 +33,17 @@ Reader-only use needs `Contents: Read` for the selected GitHub repository. The S ## TestFlight The project uses automatic distribution signing for Apple Developer team -`H76K2HQUFB`. The approved release candidate is version `1.1.0` (build `11`) for -both the app and Share Extension. Its planned iOS-only GitHub tag is -`ios-v1.1.0`; Chrome, the Codex plugin, and hosted MCP remain at `1.0.1`. +`H76K2HQUFB`. The iOS release candidate is `1.1.1/build 12` for both the app and +Share Extension, with the iOS-only tag `ios-v1.1.1`. Build 12 was selected after +checking the existing Xcode Cloud history; its new cloud result is tracked in the +[release record](../docs/IOS_RELEASE_1.1.1.md). The already published +`1.1.0/build 11` belongs to the previous release. Chrome, the local Codex plugin, +and hosted MCP remain at `1.0.1` in this iOS release and use independent +submission-bundle releases. Before every later upload, increment `CURRENT_PROJECT_VERSION` for both targets. The maintainer reports that the Xcode Cloud workflow uses Xcode 27.1 RC. -Cloud archive, distribution, and App Store processing must each be verified -from their actual results; none is implied by local validation. +For the new upload, cloud archive, distribution, and App Store processing must +each be verified from their actual results; none is implied by local validation. Run the release preflight from the repository root before archiving: @@ -82,10 +87,12 @@ python3 ../scripts/validate_ios_release.py \ ## Use -The app starts at **Latest** with the latest seven clips, ordered by recorded +The next update starts at **Recent** (called **Latest** in published 1.1.0) +with the latest seven clips, ordered by recorded capture time and documented day/filename fallbacks. Tap a row to open it. Native **Search** and **Chat** destinations keep the initial list spacious; Refresh and More live in the toolbar. Wider layouts show the chosen destination alongside the reader. +The separate recently saved list has been removed from Settings. Search covers downloaded text and displays index coverage. Warm starts restore the local catalog without downloading articles again. An empty cache seeds at most seven bodies; the initial filename-based candidates remain explicitly @@ -111,6 +118,19 @@ are required. Unsupported devices retain reader/search and show the reason chat is unavailable. App Shortcuts provide read-only search, recent clips, and opening a loaded clip; broader Siri conversation support is not promised. +**Prepared for the next update; not included in the published 1.1.0:** Chat +diagnostics distinguish device eligibility, disabled Apple Intelligence, a model +that is not ready, and an unsupported language. They show the language being +checked and practical steps in Settings, with [Apple's setup and availability +guide](https://support.apple.com/en-us/121115). For a model that is not ready, +check that Apple Intelligence is enabled, that the device and Siri use the same +supported language, and that Wi-Fi, power and free storage are available. +SourceBraid cannot determine download progress or force a system-model download. +Availability is checked when entering Chat, returning to the foreground, before +generation and using **Check availability again**. A status change preserves the +chat history and draft; sending stays disabled until the model is ready. Reading +and search remain available. Real-device acceptance is still required. + In Safari, Files, or another app: 1. Tap **Share**. @@ -119,6 +139,20 @@ In Safari, Files, or another app: Apps such as Chrome generally share only a URL. SourceBraid loads public web URLs in an isolated web view and converts the readable page content to Markdown before saving, recording the same extraction methods as the browser extension (including specialized DeepMind captures). Safari can additionally supply its already visible page text and relevant article images through the extension's preprocessing script. Images are copied into the clip's asset folder and linked relatively in Markdown. Shared PDFs are queued as `pdf-docling-pending`; the PDF is pushed last so the existing GitHub Actions workflow can safely convert it after its Markdown and index metadata exist. Pages that require an authenticated browser session or block the isolated request are saved as clearly labeled link-only clips. +## Mermaid previews prepared for the next update + +Fenced `mermaid` blocks render on device with bundled Mermaid Tiny 12.2.0; +no CDN, diagram service or runtime download is used. Common flowcharts, +sequence/state/class/ER diagrams and Gantt charts are supported. Upstream's tiny +build omits mindmaps, architecture diagrams and KaTeX; ELK layouts fall back to +Dagre. Unsupported, invalid or oversized diagrams show an explanation and their +original source. The source is also available below successful previews. +Archive scripts, diagram links and external diagram media remain disabled; +ordinary external reader images still require the user's explicit selection. +Details and license notices are in [the bundled renderer notes](SourceBraid/Resources/Mermaid/README.md). +These changes are local preparation for the next update, not part of the +published 1.1.0. Real-device diagram acceptance remains pending. + ## Build without signing ```bash @@ -145,20 +179,28 @@ model-quality checks remain documented in the acceptance checklist; this approval does not mark the full device matrix as passed. Historical test entries retain the version and build that were actually tested. -## Deutsch: Release-Kandidat 1.1.0 - -Der Maintainer hat Version **1.1.0/Build 11** am 15. Oktober 2026 nach eigenem -Funktionstest zur Veröffentlichung freigegeben. Der geplante iOS-GitHub-Tag -lautet `ios-v1.1.0`; Chrome, Codex-Plugin und gehosteter MCP bleiben auf `1.0.1`. -Der Xcode-Cloud-Workflow verwendet laut Maintainer Xcode 27.1 RC. Cloud-Build, -Distribution und App-Store-Verfügbarkeit werden anhand ihrer tatsächlichen -Ergebnisse getrennt geprüft. [Release-Hinweise](../docs/IOS_RELEASE_1.1.0.de.md). - -Die App startet mit **Neueste** und den neuesten sieben Beiträgen; Antippen +## Deutsch: Veröffentlichung 1.1.1 + +Der nächste iOS-Kandidat ist **1.1.1/Build 12** für App und Share Extension mit +dem iOS-spezifischen Tag `ios-v1.1.1`. Build 12 wurde nach Prüfung der +Xcode-Cloud-Historie gewählt; der neue Cloud-Durchlauf wird im +[Release-Protokoll](../docs/IOS_RELEASE_1.1.1.de.md) dokumentiert. Die bereits +veröffentlichte **1.1.0/Build 11** gehört zum vorherigen Release. Chrome, +lokales Codex-Plugin und gehosteter MCP bleiben in diesem iOS-Release auf +`1.0.1` und verwenden unabhängige Submission-Bundle-Releases. Deren öffentliche +Freigabe folgt unabhängig. +Der Xcode-Cloud-Workflow verwendet laut Maintainer Xcode 27.1 RC. Für spätere +Uploads werden Cloud-Build, Distribution und App-Store-Verarbeitung anhand +ihrer tatsächlichen Ergebnisse geprüft. Die früheren Testnachweise bleiben +in den [Release-Hinweisen](../docs/IOS_RELEASE_1.1.0.de.md) erhalten. + +Im nächsten Update startet die App mit **Zuletzt** (in der veröffentlichten +1.1.0 **Neueste**) und den neuesten sieben Beiträgen; Antippen öffnet den Beitrag direkt. Native Bereiche für **Suche** und **Chat** halten die Startliste frei. Aktualisieren und weitere Aktionen liegen in der Toolbar. Breite Oberflächen zeigen den gewählten -Bereich neben dem Reader. Cache-Starts laden keine Artikel erneut. Bei leerem +Bereich neben dem Reader. Die zusätzliche Liste kürzlich gespeicherter Beiträge +entfällt aus den Einstellungen. Cache-Starts laden keine Artikel erneut. Bei leerem Cache werden höchstens sieben Dateien versucht; die Dateinamens-Kandidaten bleiben bis zum weiteren Metadatenabruf als Teilbestand markiert. Begrenzte Hintergrundpakete und manuelles Aktualisieren lesen neue/geänderte Dateien. @@ -173,6 +215,20 @@ bereites Modell in einer unterstützten Sprache. Nicht verfügbare KI wird verständlich angezeigt. Quellenlinks verweisen auf gelieferte Auszüge einer festen Dateiversion; sachliche Antwortqualität wird separat getestet. +**Für das nächste Update vorbereitet; nicht in der veröffentlichten 1.1.0:** +Die Chat-Diagnose unterscheidet Geräteberechtigung, ausgeschaltete Apple +Intelligence, ein noch nicht bereites Modell und eine nicht unterstützte Sprache. +Sie zeigt die geprüfte Sprache und konkrete Schritte in den Einstellungen mit +[Apples Hilfe zu Einrichtung und Verfügbarkeit](https://support.apple.com/de-de/121115). +Bei einem noch nicht bereiten Modell Apple Intelligence, dieselbe unterstützte +Geräte- und Siri-Sprache sowie WLAN, Strom und freien Speicher prüfen. +SourceBraid kann weder den Downloadfortschritt erkennen noch einen Download des +Systemmodells erzwingen. Geprüft wird beim Öffnen von Chat, bei der Rückkehr in +den Vordergrund, vor der Generierung und über **Verfügbarkeit erneut prüfen**. +Ein Statuswechsel erhält Chatverlauf und Entwurf; Senden bleibt bis zur +Bereitschaft gesperrt. Lesen und Suche bleiben verfügbar. Die Abnahme auf echten +Geräten steht weiterhin aus. + Markdown wird lokal mit `swift-markdown` dargestellt, PDF-Anhänge über Quick Look. Externe Bilder werden nur nach bewusster Auswahl geladen. Der Reader verändert keine GitHub-Dateien. Für reines Lesen genügen Contents-Leserechte; @@ -182,3 +238,14 @@ im [Testprotokoll](../docs/IOS_IMPLEMENTATION_TESTING.de.md) und in der [Gerätecheckliste](../docs/IOS_DEVICE_ACCEPTANCE.de.md). Die Release-Freigabe ersetzt keine offenen Mindest-OS-, Dunkelmodus-, Accessibility- oder echten KI-Qualitätsnachweise. + +**Mermaid-Vorschauen für das nächste Update:** `mermaid`-Codeblöcke werden mit +gebündeltem Mermaid Tiny 12.2.0 vollständig auf dem Gerät dargestellt. Gängige +Fluss-, Sequenz-, Zustands-, Klassen-, ER- und Gantt-Diagramme werden unterstützt. +Mindmaps, Architekturdiagramme und KaTeX fehlen in der Tiny-Distribution; +ELK-Layouts verwenden Dagre. Fehlerhafte, nicht unterstützte oder zu große +Diagramme zeigen einen Hinweis und ihren originalen Quelltext. Auch bei +erfolgreicher Darstellung bleibt der Quelltext aufklappbar. Archivskripte, +Diagrammlinks und externe Diagrammmedien bleiben deaktiviert. Es gibt keinen +CDN-Aufruf und keinen Diagrammdienst. Die Geräteabnahme ist weiterhin offen; +die veröffentlichte 1.1.0 enthält diese Änderung noch nicht. diff --git a/ios/SourceBraid.xcodeproj/project.pbxproj b/ios/SourceBraid.xcodeproj/project.pbxproj index 7be5dcc..300582a 100644 --- a/ios/SourceBraid.xcodeproj/project.pbxproj +++ b/ios/SourceBraid.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 41B68DF557BA4ECA86DAFC01 /* Mermaid in Resources */ = {isa = PBXBuildFile; fileRef = 41B68DF557BA4ECA86DAFC00; }; + 41B68DF557BA4ECA86DAFC02 /* Mermaid in Resources */ = {isa = PBXBuildFile; fileRef = 41B68DF557BA4ECA86DAFC00; }; 6D92AC9703BA4356B0E87DA9 /* SourceBraidTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C8E20934E3047468D63A6CD /* SourceBraidTheme.swift */; }; B00000000000000000000001 /* SourceBraidApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F00000000000000000000001 /* SourceBraidApp.swift */; }; B00000000000000000000002 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F00000000000000000000002 /* ContentView.swift */; }; @@ -101,6 +103,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 41B68DF557BA4ECA86DAFC00 /* Mermaid */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Mermaid; sourceTree = ""; }; 5C8E20934E3047468D63A6CD /* SourceBraidTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceBraidTheme.swift; sourceTree = ""; }; F00000000000000000000001 /* SourceBraidApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SourceBraidApp.swift; sourceTree = ""; }; F00000000000000000000002 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; @@ -272,6 +275,7 @@ A00000000000000000000013 /* Resources */ = { isa = PBXGroup; children = ( + 41B68DF557BA4ECA86DAFC00 /* Mermaid */, FFF7E51EC70CFB7966EF03F8, FE7B92C17012BBBE45D84C8C, 3735DECBB708A2101B4D05B1, @@ -417,6 +421,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 41B68DF557BA4ECA86DAFC01 /* Mermaid in Resources */, E386330F97E0A9F1FA343421, 6C84BB344B4E1367C68CBB1E, 1C51DD952698BC1420F7DDAB, @@ -439,6 +444,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 41B68DF557BA4ECA86DAFC02 /* Mermaid in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -583,7 +589,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = SourceBraid/Resources/SourceBraid.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = H76K2HQUFB; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = NO; @@ -593,7 +599,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.1; PRODUCT_BUNDLE_IDENTIFIER = de.patrickschiller.sourcebraid; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -612,7 +618,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = SourceBraid/Resources/SourceBraid.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = H76K2HQUFB; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = SourceBraid/Resources/Info.plist; @@ -621,7 +627,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.1; PRODUCT_BUNDLE_IDENTIFIER = de.patrickschiller.sourcebraid; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -639,7 +645,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CODE_SIGN_ENTITLEMENTS = SourceBraidShare/SourceBraidShare.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = H76K2HQUFB; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = SourceBraidShare/Info.plist; @@ -647,7 +653,7 @@ "$(inherited)", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.1; PRODUCT_BUNDLE_IDENTIFIER = de.patrickschiller.sourcebraid.share; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -666,7 +672,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CODE_SIGN_ENTITLEMENTS = SourceBraidShare/SourceBraidShare.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = H76K2HQUFB; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = SourceBraidShare/Info.plist; @@ -674,7 +680,7 @@ "$(inherited)", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.1; PRODUCT_BUNDLE_IDENTIFIER = de.patrickschiller.sourcebraid.share; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/ios/SourceBraid/App/ContentView.swift b/ios/SourceBraid/App/ContentView.swift index d2cefa6..b8ac627 100644 --- a/ios/SourceBraid/App/ContentView.swift +++ b/ios/SourceBraid/App/ContentView.swift @@ -4,7 +4,7 @@ enum ArchiveSection: Hashable { case recent, search, chat var title: LocalizedStringResource { switch self { - case .recent: "Latest" + case .recent: "Recent" case .search: "Search" case .chat: "Chat" } @@ -32,6 +32,8 @@ struct ContentView: View { _chat = StateObject(wrappedValue: ArchiveChat(service: ArchiveDemoAnswering(), availability: { .ready })) } else if ProcessInfo.processInfo.environment["SOURCEBRAID_CHAT_LAYOUT"] == "1" { _chat = StateObject(wrappedValue: ArchiveChat(availability: { .ready })) + } else if ProcessInfo.processInfo.environment["SOURCEBRAID_INTELLIGENCE_STATE"] == "modelNotReady" { + _chat = StateObject(wrappedValue: ArchiveChat(availability: { .modelNotReady })) } } #endif @@ -40,7 +42,9 @@ struct ContentView: View { var body: some View { Group { #if DEBUG - if ProcessInfo.processInfo.environment["SOURCEBRAID_NATIVE_PREVIEW"] == "1" { ArchiveNativeProbe() } + if ProcessInfo.processInfo.environment["SOURCEBRAID_DEMO"] == "1", + ProcessInfo.processInfo.environment["SOURCEBRAID_MERMAID_PROBE"] == "1" { ArchiveMermaidProbe() } + else if ProcessInfo.processInfo.environment["SOURCEBRAID_NATIVE_PREVIEW"] == "1" { ArchiveNativeProbe() } else { ArchiveWorkspace(library: library, chat: chat, section: $section, preferredColumn: $preferredColumn, searchQuery: $searchQuery, searchResults: $searchResults, searchError: $searchError, @@ -242,7 +246,10 @@ private struct ArchiveRecentList: View { } } footer: { ArchiveSyncFooter(isSyncing: library.isSyncing, progress: library.progress, status: library.status, - metadataComplete: library.metadataComplete, checkedAt: library.snapshot?.checkedAt) + metadataComplete: library.metadataComplete, checkedAt: library.snapshot?.checkedAt, + loadedCount: library.clips.count, inventoryCount: library.inventoryClipCount) { + library.synchronize() + } } } .listStyle(.insetGrouped) @@ -300,11 +307,19 @@ private struct ArchiveSyncFooter: View { let status: String let metadataComplete: Bool let checkedAt: Date? + let loadedCount: Int + let inventoryCount: Int + let loadRemaining: () -> Void var body: some View { VStack(alignment: .leading, spacing: 6) { if isSyncing { Label(progress, systemImage: "arrow.triangle.2.circlepath") } - if !metadataComplete && checkedAt != nil { - Text(archiveText("Showing loaded clips. More update in the background.", "Geladene Beiträge. Weitere werden im Hintergrund aktualisiert.")) + if !metadataComplete && checkedAt != nil && inventoryCount > loadedCount { + Text(archiveText("\(loadedCount) of \(inventoryCount) clips loaded.", + "\(loadedCount) von \(inventoryCount) Beiträgen geladen.")) + if !isSyncing { + Button(archiveText("Load remaining clips", "Übrige Beiträge laden"), action: loadRemaining) + .accessibilityIdentifier("archive.loadRemaining") + } } if !status.isEmpty { Text(status) } } @@ -376,7 +391,6 @@ private struct ArchiveDetail: View { var body: some View { if let clip = library.selected { ArchiveReaderView(library: library, clip: clip, askAboutClip: ask) - .id(clip.path + clip.sha + library.generation.uuidString) } else { ContentUnavailableView(archiveText("Select a clip", "Beitrag auswählen"), systemImage: "doc.richtext", description: Text(archiveText("Your Markdown archive, with its original sources.", "Dein Markdown-Archiv mit seinen Originalquellen."))) diff --git a/ios/SourceBraid/App/SettingsView.swift b/ios/SourceBraid/App/SettingsView.swift index 5efcd7b..7488b7f 100644 --- a/ios/SourceBraid/App/SettingsView.swift +++ b/ios/SourceBraid/App/SettingsView.swift @@ -4,7 +4,6 @@ struct SettingsView: View { @StateObject private var model = SettingsViewModel() @State private var notices = false @Environment(\.dismiss) private var dismiss - @Environment(\.scenePhase) private var scenePhase var body: some View { NavigationStack { @@ -77,22 +76,6 @@ struct SettingsView: View { } .listRowBackground(SourceBraidTheme.surface) - if !model.recentCaptures.isEmpty { - Section(archiveText("Recently saved", "Zuletzt gespeichert")) { - ForEach(model.recentCaptures) { capture in - VStack(alignment: .leading, spacing: 4) { - Text(capture.title) - .lineLimit(2) - Text(capture.path) - .font(.caption2.monospaced()) - .foregroundStyle(SourceBraidTheme.secondaryInk) - .lineLimit(1) - } - } - } - .listRowBackground(SourceBraidTheme.surface) - } - Section { Button(archiveText("Third-party licenses", "Lizenzen von Drittanbietern")) { notices = true } } @@ -118,11 +101,6 @@ struct SettingsView: View { } } .toolbar { ToolbarItem(placement: .confirmationAction) { Button(archiveText("Done", "Fertig")) { dismiss() } } } - .onChange(of: scenePhase) { _, phase in - if phase == .active { - model.refreshRecentCaptures() - } - } } } private var licenseText: String { diff --git a/ios/SourceBraid/App/SettingsViewModel.swift b/ios/SourceBraid/App/SettingsViewModel.swift index 6ca3500..4e0cbf1 100644 --- a/ios/SourceBraid/App/SettingsViewModel.swift +++ b/ios/SourceBraid/App/SettingsViewModel.swift @@ -10,7 +10,6 @@ final class SettingsViewModel: ObservableObject { @Published var statusMessage = "" @Published var statusIsError = false @Published var isWorking = false - @Published var recentCaptures: [RecentCapture] = [] init() { let configuration = SourceBraidSettings.load() @@ -25,7 +24,6 @@ final class SettingsViewModel: ObservableObject { statusMessage = error.localizedDescription statusIsError = true } - refreshRecentCaptures() } var isConfigured: Bool { @@ -53,10 +51,6 @@ final class SettingsViewModel: ObservableObject { } } - func refreshRecentCaptures() { - recentCaptures = RecentCaptureStore.load() - } - private var configuration: SourceBraidConfiguration { SourceBraidConfiguration(owner: owner, repository: repository, branch: branch, rootFolder: rootFolder) } @@ -72,7 +66,6 @@ final class SettingsViewModel: ObservableObject { _ = try ArchiveIdentity(configuration: configuration) try KeychainStore().setToken(token) try SourceBraidSettings.save(normalized) - refreshRecentCaptures() owner = normalized.owner repository = normalized.repository branch = normalized.branch diff --git a/ios/SourceBraid/Archive/ArchiveBackgroundRefresh.swift b/ios/SourceBraid/Archive/ArchiveBackgroundRefresh.swift index 51b0c8e..8c11a81 100644 --- a/ios/SourceBraid/Archive/ArchiveBackgroundRefresh.swift +++ b/ios/SourceBraid/Archive/ArchiveBackgroundRefresh.swift @@ -21,6 +21,16 @@ private enum ArchiveRefreshError: LocalizedError { var errorDescription: String? { archiveText("An archive refresh is already running.", "Das Archiv wird bereits aktualisiert.") } } +struct ArchiveRefreshRecovery: Sendable { + let manifest: ArchiveCache.Manifest + let indexedCount: Int +} + +struct ArchiveRefreshFailure: Error { + let cause: any Error + let recovery: ArchiveRefreshRecovery? +} + /// One writer per archive across windows and scheduled refreshes. Data removal blocks /// new writers, cancels the existing writer, and waits before deleting the cache. @MainActor @@ -40,12 +50,26 @@ enum ArchiveRefreshCoordinator { guard !pauses.values.contains(where: { $0 == nil || $0 == identity }) else { throw CancellationError() } guard jobs[identity] == nil else { throw ArchiveRefreshError.busy } let id = UUID() - let task = Task { try await ArchiveRefreshEngine.run(client: client, cache: cache, index: index, scope: scope, progress: progress) } + let task = Task { + do { return try await ArchiveRefreshEngine.run(client: client, cache: cache, index: index, scope: scope, progress: progress) } + catch { + // Recovery may open the disposable search database. Keep that I/O + // inside the tracked job, so data removal waits for it as well as + // the engine. A paused archive must never be reopened by recovery. + var recovery: ArchiveRefreshRecovery? + if !isPaused(identity), let manifest = try? await cache.load(), + !isPaused(identity), manifest.snapshot?.identity == identity { + let count = (try? await index?.count()) ?? 0 + if !isPaused(identity) { recovery = .init(manifest: manifest, indexedCount: count) } + } + throw ArchiveRefreshFailure(cause: error, recovery: recovery) + } + } jobs[identity] = Job(id: id, cancel: { task.cancel() }, finished: Task { _ = try? await task.value }) defer { if jobs[identity]?.id == id { jobs.removeValue(forKey: identity) } } return try await withTaskCancellationHandler { let result = try await task.value - try Task.checkCancellation() + if Task.isCancelled { throw ArchiveRefreshFailure(cause: CancellationError(), recovery: .init(manifest: result.manifest, indexedCount: result.indexedCount)) } return result } onCancel: { task.cancel() } } @@ -90,6 +114,10 @@ enum ArchiveRefreshCoordinator { } static func resume(_ token: UUID) { pauses.removeValue(forKey: token) } + + private static func isPaused(_ identity: ArchiveIdentity) -> Bool { + pauses.values.contains { $0 == nil || $0 == identity } + } } struct ArchiveRefreshResult: Sendable { @@ -132,14 +160,19 @@ private enum ArchiveRefreshEngine { let rhs = metadata[$1.path]?.sha == $1.sha ? metadata[$1.path]! : ClipMetadataReader.read("", file: $1) return ArchiveClip.newestFirst(lhs, rhs) } + // A previous launch may have committed only part of its initial seed. + // Resume up to seven total loaded clips, rather than fetching seven more + // every time an interrupted launch returns to the foreground. + let loadedCount = markdown.filter { metadata[$0.path]?.sha == $0.sha && indexed[$0.path] == $0.sha }.count + let fileLimit = scope == .bootstrap ? max(0, scope.fileLimit - loadedCount) : scope.fileLimit var attempted = 0, processed = 0, failed = 0, consumedBytes = 0 for file in pending { try Task.checkCancellation() - guard attempted < scope.fileLimit, consumedBytes < scope.byteLimit else { break } + guard attempted < fileLimit, consumedBytes < scope.byteLimit else { break } // Declared sizes bound a scheduled batch before any body request is made. if file.size > scope.byteLimit - consumedBytes { continue } attempted += 1 - progress("\(attempted) / \(min(pending.count, scope.fileLimit))") + progress("\(attempted) / \(min(pending.count, fileLimit))") do { guard file.size >= 0, file.size <= ArchiveReadClient.markdownLimit else { throw ArchiveError.tooLarge } let available = scope.byteLimit - consumedBytes diff --git a/ios/SourceBraid/Archive/ArchiveChatView.swift b/ios/SourceBraid/Archive/ArchiveChatView.swift index 1aafbe9..4b17b23 100644 --- a/ios/SourceBraid/Archive/ArchiveChatView.swift +++ b/ios/SourceBraid/Archive/ArchiveChatView.swift @@ -6,7 +6,7 @@ struct ArchiveChatView: View { let openSource: (SourceExcerpt, ArchiveSnapshot) -> Void var body: some View { Group { - if chat.state.canGenerate { + if chat.state.canGenerate || !chat.messages.isEmpty { ArchiveChatHistory(chat: chat, selectedTitle: library.selected?.title, indexedCount: library.indexedCount, clipCount: library.inventoryClipCount, hasSelection: library.selected != nil, summarize: { chat.wholeArchive = false @@ -15,11 +15,9 @@ struct ArchiveChatView: View { }, openSource: openSource) .safeAreaInset(edge: .bottom) { ArchiveChatComposer(chat: chat, send: { chat.send(library: library) }) } } else { - VStack { - ContentUnavailableView(archiveText("Apple Intelligence", "Apple Intelligence"), systemImage: "sparkles", description: Text(chat.state.message)) - Button(archiveText("Check availability again", "Verfügbarkeit erneut prüfen")) { chat.checkAvailability() } - .buttonStyle(.bordered) - }.padding() + ScrollView { + ArchiveIntelligenceDiagnostics(chat: chat).padding().padding(.bottom, 80) + } } } .frame(maxWidth: .infinity, maxHeight: .infinity) @@ -29,7 +27,55 @@ struct ArchiveChatView: View { Button { chat.reset() } label: { Label(archiveText("Clear chat", "Chat leeren"), systemImage: "trash") } } } - .onAppear { if library.selected == nil && chat.messages.isEmpty { chat.wholeArchive = true } } + .onAppear { + chat.checkAvailability() + if library.selected == nil && chat.messages.isEmpty { chat.wholeArchive = true } + } + } +} + +private struct ArchiveIntelligenceDiagnostics: View { + @ObservedObject var chat: ArchiveChat + private var checkedLanguage: String { + Locale.current.localizedString(forIdentifier: Locale.current.identifier) ?? Locale.current.identifier + } + var body: some View { + VStack(alignment: .leading, spacing: 20) { + Label("Apple Intelligence", systemImage: "sparkles") + .font(.subheadline.weight(.semibold)).foregroundStyle(.tint) + .accessibilityIdentifier("archive.chat.diagnostics") + VStack(alignment: .leading, spacing: 8) { + Text(chat.state.title).font(.title2.bold()).foregroundStyle(SourceBraidTheme.ink) + Text(chat.state.message).foregroundStyle(SourceBraidTheme.secondaryInk) + } + Button(archiveText("Check availability again", "Verfügbarkeit erneut prüfen")) { chat.checkAvailability() } + .buttonStyle(.borderedProminent) + .accessibilityIdentifier("archive.chat.checkAvailability") + Link(archiveText("Apple's setup and availability guide", "Apples Hilfe zu Einrichtung und Verfügbarkeit"), destination: IntelligenceState.supportURL) + .accessibilityIdentifier("archive.chat.appleHelp") + VStack(alignment: .leading, spacing: 16) { + ForEach(Array(chat.state.recoverySteps.enumerated()), id: \.element.id) { index, step in + HStack(alignment: .top, spacing: 12) { + Text("\(index + 1). ").fontWeight(.semibold).foregroundStyle(.tint) + Text(step.message).foregroundStyle(SourceBraidTheme.ink) + } + } + } + VStack(alignment: .leading, spacing: 8) { + Text(archiveText("Language checked: \(checkedLanguage)", "Geprüfte Sprache: \(checkedLanguage)")) + if chat.state == .modelNotReady { + Text(archiveText("SourceBraid cannot read download progress or start the system model download.", + "SourceBraid kann den Downloadfortschritt nicht auslesen oder den Download des Systemmodells starten.")) + } + Text(archiveText("Reading and search remain available. Your chat and draft are kept.", + "Lesen und Suche bleiben verfügbar. Dein Chat und Entwurf bleiben erhalten.")) + Text(archiveText("Checked at ", "Geprüft um ") + chat.availabilityCheckedAt.formatted(date: .omitted, time: .shortened)) + } + .font(.footnote).foregroundStyle(SourceBraidTheme.secondaryInk) + } + .frame(maxWidth: 620, alignment: .leading) + .frame(maxWidth: .infinity, alignment: .center) + .padding(.vertical, 12) } } @@ -45,7 +91,7 @@ private struct ArchiveChatScope: View { Text(archiveText("Archive", "Archiv")).tag(true) }.pickerStyle(.segmented) if !chat.wholeArchive { - Text(selectedTitle ?? archiveText("Select a clip in Latest first.", "Wähle zuerst einen Beitrag unter Neueste.")) + Text(selectedTitle ?? archiveText("Select a clip in Recent first.", "Wähle zuerst einen Beitrag unter Zuletzt.")) .font(.subheadline).foregroundStyle(SourceBraidTheme.ink).lineLimit(2) } Text(archiveText("Apple Intelligence · on device · \(indexedCount)/\(clipCount) clips indexed", @@ -68,6 +114,7 @@ private struct ArchiveChatHistory: View { ScrollViewReader { proxy in ScrollView { LazyVStack(alignment: .leading, spacing: 20) { + if !chat.state.canGenerate { ArchiveIntelligenceDiagnostics(chat: chat) } ArchiveChatScope(chat: chat, selectedTitle: selectedTitle, indexedCount: indexedCount, clipCount: clipCount) if chat.messages.isEmpty { VStack(alignment: .leading, spacing: 16) { @@ -146,7 +193,7 @@ private struct ArchiveChatComposer: View { } .buttonStyle(.borderedProminent).buttonBorderShape(.circle) .foregroundStyle(SourceBraidTheme.onAccent) - .disabled(!chat.isWorking && chat.draft.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) + .disabled(!chat.isWorking && (!chat.state.canGenerate || chat.draft.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)) .accessibilityLabel(chat.isWorking ? archiveText("Stop answer", "Antwort stoppen") : archiveText("Send question", "Frage senden")) } .padding(6) diff --git a/ios/SourceBraid/Archive/ArchiveDemo.swift b/ios/SourceBraid/Archive/ArchiveDemo.swift index f636644..442ca61 100644 --- a/ios/SourceBraid/Archive/ArchiveDemo.swift +++ b/ios/SourceBraid/Archive/ArchiveDemo.swift @@ -10,8 +10,14 @@ struct ArchiveDemoReader: ArchiveReading { let documents: [String: Data] let inventory: ArchiveSnapshot init() throws { - identity = try ArchiveIdentity(configuration: .init(owner: "synthetic", repository: "fixture", branch: archiveText("main-seven", "main-seven-de"), rootFolder: "clips")) + let storeDemo = ProcessInfo.processInfo.environment["SOURCEBRAID_DEMO"] == "1" + && ProcessInfo.processInfo.environment["SOURCEBRAID_STORE_DEMO"] == "1" + identity = try ArchiveIdentity(configuration: .init(owner: "synthetic", repository: "fixture", + branch: storeDemo ? archiveText("store-examples-en", "store-examples-de") : archiveText("main-seven-reader-v2", "main-seven-reader-v2-de"), rootFolder: "clips")) var documents: [String: Data] = [:], files: [ArchiveFile] = [] + if storeDemo { + documents = Self.storeDocuments() + } else { for number in 1...7 { let path = "clips/2026/10/2026-10-12-demo-\(number).md" let markdown = """ @@ -26,6 +32,8 @@ struct ArchiveDemoReader: ArchiveReading { \(archiveText("This synthetic document checks the local reader. It contains no private content.", "Dieses synthetische Dokument prüft den lokalen Reader. Es enthält keine privaten Inhalte.")) + \(archiveText("Synthetic document body", "Synthetischer Beitragsinhalt")) \(number). + \(number == 7 ? archiveText("This clip demonstrates offline search in a Markdown archive.", "Dieser Beitrag zeigt die Offline-Suche in einem Markdown-Archiv.") : "") **Bold**, *emphasis*, and `inline code`. @@ -58,6 +66,7 @@ struct ArchiveDemoReader: ArchiveReading { """ documents[path] = Data(markdown.utf8) } + } documents["clips/2026/10/assets/pixel.png"] = Data(base64Encoded: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+jB7kAAAAASUVORK5CYII=")! documents["clips/2026/10/assets/synthetic.pdf"] = Self.syntheticPDF() for (path, bytes) in documents { @@ -67,6 +76,99 @@ struct ArchiveDemoReader: ArchiveReading { self.documents = documents inventory = ArchiveSnapshot(identity: identity, commit: String(repeating: "0", count: 40), files: files.sorted { $0.path < $1.path }, checkedAt: Date()) } + + /// Original fictional articles used only by the explicitly opted-in store + /// capture workflow. No network, credentials, user archive, or model output. + private static func storeDocuments() -> [String: Data] { + let titles = archiveText( + "A balcony garden|A notebook for the weekend|Interfaces with room to breathe|Beyond the bookmark|Small tools, lasting value|A personal reference library|Reading notes that last", + "Ein Garten auf dem Balkon|Ein Notizbuch fürs Wochenende|Oberflächen mit Freiraum|Mehr als ein Lesezeichen|Kleine Werkzeuge, großer Wert|Die eigene Wissensbibliothek|Lesen, verstehen, behalten" + ).split(separator: "|").map(String.init) + let summaries = [ + archiveText("A few herbs, good soil, and a little patience make a small balcony feel like a garden.", "Ein paar Kräuter, gute Erde und etwas Geduld machen aus einem kleinen Balkon einen Garten."), + archiveText("Leave space for a sketch, a useful question, and something you want to remember.", "Platz für eine Skizze, eine gute Frage und etwas, das in Erinnerung bleiben soll."), + archiveText("Clear hierarchy and comfortable spacing help a page stay readable.", "Klare Hierarchien und angenehme Abstände machen eine Seite gut lesbar."), + archiveText("Save the useful passage, keep the source, and find it again offline.", "Die wichtige Passage speichern, die Quelle behalten und offline wiederfinden."), + archiveText("Portable files are a good foundation for a collection that grows with you.", "Portable Dateien sind eine gute Grundlage für eine Sammlung, die mitwächst."), + archiveText("An offline library connects your reading, project notes, and useful references.", "Eine Offline-Bibliothek verbindet Lesestoff, Projektnotizen und hilfreiche Quellen."), + archiveText("Good notes make an interesting article useful long after you close the page.", "Gute Notizen machen einen interessanten Artikel auch später noch nützlich.") + ] + var result: [String: Data] = [:] + for number in 1...7 { + let title = titles[number - 1] + let body: String + if number == 7 { + body = archiveText(""" + # Keep the idea. Keep the source. + + A useful reading note connects **an idea**, its context, and a place to return to. + + ## A small reading ritual + + - Capture the passage worth keeping. + - Add a few words in your own voice. + - Revisit the original when you need context. + + > The best note is the one you can find again. + + ## Ready when you are + + Downloaded Markdown stays readable offline. A simple text search brings the right passage back into view. + + | Keep | Why it helps | + | --- | --- | + | Original link | Return to the context | + | Markdown text | Read with your own tools | + | Your notes | Connect ideas over time | + + [A personal reference library](2026-10-17-demo-6.md) + """, """ + # Die Idee bleibt. Die Quelle auch. + + Eine gute Lesenotiz verbindet **eine Idee**, ihren Zusammenhang und einen Ort zum Wiederfinden. + + ## Ein kleines Leseritual + + - Die wichtige Passage festhalten. + - Ein paar eigene Gedanken ergänzen. + - Bei Bedarf zur Originalquelle zurückkehren. + + > Die beste Notiz ist die, die du wiederfindest. + + ## Bereit, wenn du es bist + + Geladenes Markdown bleibt offline lesbar. Eine einfache Textsuche bringt die passende Passage zurück. + + | Behalten | Der Nutzen | + | --- | --- | + | Original-Link | Den Kontext wiederfinden | + | Markdown-Text | Mit eigenen Werkzeugen lesen | + | Eigene Notizen | Ideen miteinander verbinden | + + [Die eigene Wissensbibliothek](2026-10-17-demo-6.md) + """) + } else { + body = "# \(title)\n\n\(summaries[number - 1])\n\n" + archiveText( + "## A little room for ideas\n\nCollect what matters, keep the original context, and make space for your next thought.\n\n- Start with one useful detail.\n- Keep the source beside your notes.\n- Return when the idea becomes relevant.\n", + "## Raum für neue Gedanken\n\nSammle, was wichtig ist, bewahre den ursprünglichen Zusammenhang und halte Platz für den nächsten Gedanken frei.\n\n- Mit einem nützlichen Detail beginnen.\n- Die Quelle neben den Notizen behalten.\n- Zurückkehren, wenn die Idee wieder relevant wird.\n") + } + let markdown = """ + --- + title: "\(title)" + author: "\(archiveText("SourceBraid example archive", "SourceBraid-Beispielarchiv"))" + captured_at: "2026-10-17T1\(number):00:00Z" + url: "https://example.invalid/sourcebraid/\(number)" + capture_method: "\(archiveText("Original fictional sample", "Eigener fiktiver Beispieltext"))" + tags: ["example", "markdown"] + --- + \(body) + + *\(archiveText("Original fictional sample content. No private archive data.", "Eigener fiktiver Beispieltext. Keine privaten Archivdaten."))* + """ + result["clips/2026/10/2026-10-17-demo-\(number).md"] = Data(markdown.utf8) + } + return result + } func snapshot() async throws -> ArchiveSnapshot { inventory } func read(_ file: ArchiveFile, limit: Int) async throws -> Data { guard let bytes = documents[file.path], bytes.count <= limit else { throw ArchiveError.tooLarge } diff --git a/ios/SourceBraid/Archive/ArchiveIntelligence.swift b/ios/SourceBraid/Archive/ArchiveIntelligence.swift index 2f4cf9b..80b8bf9 100644 --- a/ios/SourceBraid/Archive/ArchiveIntelligence.swift +++ b/ios/SourceBraid/Archive/ArchiveIntelligence.swift @@ -7,17 +7,45 @@ import FoundationModels enum IntelligenceState: CaseIterable, Equatable { case ready, unsupportedOS, deviceNotEligible, disabled, modelNotReady, unsupportedLanguage, unknown var canGenerate: Bool { self == .ready } + var title: String { + switch self { + case .ready: return archiveText("Local chat is ready", "Lokaler Chat ist bereit") + case .unsupportedOS: return archiveText("iOS update required", "iOS-Update erforderlich") + case .deviceNotEligible: return archiveText("Local model unavailable on this device", "Lokales Modell auf diesem Gerät nicht verfügbar") + case .disabled: return archiveText("Apple Intelligence is turned off", "Apple Intelligence ist ausgeschaltet") + case .modelNotReady: return archiveText("Local model is not ready", "Lokales Modell ist nicht bereit") + case .unsupportedLanguage: return archiveText("Language is not supported", "Sprache wird nicht unterstützt") + case .unknown: return archiveText("Local chat is unavailable", "Lokaler Chat ist nicht verfügbar") + } + } var message: String { switch self { case .ready: return archiveText("Apple Intelligence · on device", "Apple Intelligence · auf dem Gerät") case .unsupportedOS: return archiveText("Chat requires iOS 26 or later. Reading and search are available.", "Chat benötigt iOS 26 oder neuer. Lesen und Suche sind verfügbar.") - case .deviceNotEligible: return archiveText("This device does not support the local model.", "Dieses Gerät unterstützt das lokale Modell nicht.") - case .disabled: return archiveText("Enable Apple Intelligence in system Settings to use chat.", "Für den Chat Apple Intelligence in den Systemeinstellungen aktivieren.") - case .modelNotReady: return archiveText("The local model is not ready yet. Try again after its download.", "Das lokale Modell ist noch nicht bereit. Nach dem Download erneut versuchen.") - case .unsupportedLanguage: return archiveText("The current language is not supported by the local model.", "Die aktuelle Sprache wird vom lokalen Modell nicht unterstützt.") - case .unknown: return archiveText("The local model is currently unavailable.", "Das lokale Modell ist derzeit nicht verfügbar.") + case .deviceNotEligible: return archiveText("iOS reports that this device is not eligible for the on-device language model.", "iOS meldet, dass dieses Gerät nicht für das lokale Sprachmodell berechtigt ist.") + case .disabled: return archiveText("iOS reports that Apple Intelligence is not enabled.", "iOS meldet, dass Apple Intelligence nicht aktiviert ist.") + case .modelNotReady: return archiveText("iOS reports that the on-device language model is not ready. A download or setup may still be pending.", "iOS meldet, dass das lokale Sprachmodell nicht bereit ist. Ein Download oder die Einrichtung kann noch ausstehen.") + case .unsupportedLanguage: return archiveText("The local model is available, but does not support the language currently checked by SourceBraid.", "Das lokale Modell ist verfügbar, unterstützt aber die von SourceBraid aktuell geprüfte Sprache nicht.") + case .unknown: return archiveText("iOS returned an availability status that SourceBraid cannot identify. Check again after returning from Settings.", "iOS hat einen Verfügbarkeitsstatus gemeldet, den SourceBraid nicht zuordnen kann. Nach der Rückkehr aus den Einstellungen erneut prüfen.") } } + + var recoverySteps: [IntelligenceRecoveryStep] { + switch self { + case .ready: return [] + case .unsupportedOS: return [.updateOS] + case .deviceNotEligible: return [.checkRequirements] + case .disabled: return [.checkAppleIntelligence, .matchLanguages] + case .modelNotReady: return [.checkAppleIntelligence, .matchLanguages, .prepareModel] + case .unsupportedLanguage: return [.matchLanguages] + case .unknown: return [.checkAppleIntelligence, .updateOS] + } + } + + static var supportURL: URL { + URL(string: archiveText("https://support.apple.com/en-us/121115", "https://support.apple.com/de-de/121115"))! + } + static func current() -> Self { #if canImport(FoundationModels) if #available(iOS 26, *) { @@ -39,6 +67,30 @@ enum IntelligenceState: CaseIterable, Equatable { } } +enum IntelligenceRecoveryStep: String, Identifiable { + case checkAppleIntelligence, matchLanguages, prepareModel, checkRequirements, updateOS + var id: Self { self } + var message: String { + switch self { + case .checkAppleIntelligence: + return archiveText("Open Settings → Apple Intelligence & Siri and check that Apple Intelligence is enabled.", + "Öffne Einstellungen → Apple Intelligence & Siri und prüfe, ob Apple Intelligence aktiviert ist.") + case .matchLanguages: + return archiveText("Check the device and Siri languages in Settings. Both must use the same supported language. Wait for any language download to finish.", + "Prüfe in den Einstellungen die Geräte- und Siri-Sprache. Beide müssen auf dieselbe unterstützte Sprache eingestellt sein. Warte gegebenenfalls den Sprachdownload ab.") + case .prepareModel: + return archiveText("Connect the device to Wi-Fi and power, make sure it has free storage, and allow time for iOS to prepare the model. Then return here and check again.", + "Verbinde das Gerät mit WLAN und Strom, sorge für freien Speicher und gib iOS Zeit, das Modell vorzubereiten. Kehre danach zurück und prüfe erneut.") + case .checkRequirements: + return archiveText("Check Apple's supported devices, languages and regions. Hardware support alone does not guarantee model availability.", + "Prüfe bei Apple die unterstützten Geräte, Sprachen und Regionen. Geeignete Hardware allein garantiert keine Modellverfügbarkeit.") + case .updateOS: + return archiveText("Check Settings → General → Software Update for a compatible iOS update.", + "Prüfe unter Einstellungen → Allgemein → Softwareupdate, ob ein passendes iOS-Update verfügbar ist.") + } + } +} + struct ArchiveChatMessage: Identifiable { let id = UUID() let isUser: Bool @@ -65,7 +117,8 @@ struct LocalArchiveAnswering: ArchiveAnswering { @MainActor final class ArchiveChat: ObservableObject { - @Published var state: IntelligenceState + @Published private(set) var state: IntelligenceState + @Published private(set) var availabilityCheckedAt = Date() @Published var draft = "" @Published var wholeArchive = false @Published private(set) var messages: [ArchiveChatMessage] = [] @@ -80,7 +133,10 @@ final class ArchiveChat: ObservableObject { self.service = service; self.availability = availability; state = availability() } - func checkAvailability() { state = availability() } + func checkAvailability() { + state = availability() + availabilityCheckedAt = Date() + } func reset() { task?.cancel(); epoch = UUID(); isWorking = false; messages = []; draft = ""; error = "" checkAvailability() @@ -126,6 +182,9 @@ final class ArchiveChat: ObservableObject { guard !sources.isEmpty else { throw ArchiveError.noEvidence } try Task.checkCancellation() guard library.generation == libraryEpoch else { throw CancellationError() } + // Retrieval can take time. Never start generation using a stale readiness check. + checkAvailability() + guard state.canGenerate else { throw ArchiveError.unavailable } let result = try await service.answer(question: question, history: history, sources: sources, recent: recent) { text in guard requestEpoch == self.epoch, library.generation == libraryEpoch, let index = self.messages.firstIndex(where: { $0.id == answerID }) else { return } diff --git a/ios/SourceBraid/Archive/ArchiveLibrary.swift b/ios/SourceBraid/Archive/ArchiveLibrary.swift index e272073..5ca7bac 100644 --- a/ios/SourceBraid/Archive/ArchiveLibrary.swift +++ b/ios/SourceBraid/Archive/ArchiveLibrary.swift @@ -41,6 +41,15 @@ final class ArchiveLibrary: ObservableObject { var recent: [ArchiveClip] { Array(clips.prefix(7)) } var isConfigured: Bool { identity != nil && client != nil } + private var needsBootstrap: Bool { + guard snapshot != nil else { return true } + // A persisted inventory does not imply the initial bodies finished. A + // launch interrupted after one body must resume instead of staying at one + // visible clip until iOS happens to grant background execution. + let seedCount = min(ArchiveRefreshScope.bootstrap.fileLimit, inventoryClipCount) + return min(clips.count, indexedCount) < seedCount + } + func configure(bootstrapIfEmpty: Bool = true) async { guard !isConfiguring else { return } isConfiguring = true @@ -48,7 +57,7 @@ final class ArchiveLibrary: ObservableObject { do { if injectedReader { try await restoreCachedMetadata() - if bootstrapIfEmpty, snapshot == nil { synchronize(scope: .bootstrap) } + if bootstrapIfEmpty, needsBootstrap { synchronize(scope: .bootstrap) } return } #if DEBUG @@ -57,7 +66,7 @@ final class ArchiveLibrary: ObservableObject { identity = reader.identity; client = reader; cache = ArchiveServices.cache(for: reader.identity) if let cache { searchIndex = ArchiveSearchIndex(directory: cache.directory) } try await restoreCachedMetadata() - if bootstrapIfEmpty, snapshot == nil { synchronize(scope: .bootstrap) } + if bootstrapIfEmpty, needsBootstrap { synchronize(scope: .bootstrap) } return } #endif @@ -84,9 +93,9 @@ final class ArchiveLibrary: ObservableObject { guard !token.isEmpty else { throw ArchiveError.missingCredentials } client = ArchiveReadClient(identity: next, token: token) try await restoreCachedMetadata() - // Warm launch and foreground only restore metadata. The first launch seeds - // at most seven bodies; scheduled/manual refresh fills the remaining gaps. - if bootstrapIfEmpty, snapshot == nil { synchronize(scope: .bootstrap) } + // A finished seed restores without network work. An interrupted seed + // resumes only its missing slots; scheduled/manual refresh fills the rest. + if bootstrapIfEmpty, needsBootstrap { synchronize(scope: .bootstrap) } } catch { let previousTask = syncTask previousTask?.cancel(); generation = UUID() @@ -144,9 +153,28 @@ final class ArchiveLibrary: ObservableObject { status = result.status; lastRefreshReport = result.report if let selectedPath, !clips.contains(where: { $0.path == selectedPath }) { self.selectedPath = nil } return result.report + } catch let failure as ArchiveRefreshFailure { + let cancelled = failure.cause is CancellationError + let report = ArchiveRefreshReport(state: cancelled ? .cancelled : .failed, processed: 0, remaining: 0) + guard generation == epoch else { return report } + // Recovery was captured before the coordinator released its job. + // Applying these values performs no filesystem work that could race + // another scene's removal of local data. + if let recovery = failure.recovery, recovery.manifest.snapshot?.identity == identity { + snapshot = recovery.manifest.snapshot; clips = recovery.manifest.clips + metadataComplete = recovery.manifest.metadataComplete; indexedCount = recovery.indexedCount + } + lastRefreshReport = report + status = cancelled + ? archiveText("Refresh stopped. Downloaded clips are available.", "Aktualisierung gestoppt. Geladene Beiträge sind verfügbar.") + : failure.cause.localizedDescription + (snapshot == nil ? "" : " · " + archiveText("Showing offline copy", "Lokaler Stand wird angezeigt")) + return report } catch is CancellationError { let report = ArchiveRefreshReport(state: .cancelled, processed: 0, remaining: 0) - if generation == epoch { lastRefreshReport = report } + if generation == epoch { + lastRefreshReport = report + status = archiveText("Refresh stopped. Downloaded clips are available.", "Aktualisierung gestoppt. Geladene Beiträge sind verfügbar.") + } return report } catch { let report = ArchiveRefreshReport(state: .failed, processed: 0, remaining: 0) @@ -182,7 +210,9 @@ final class ArchiveLibrary: ObservableObject { guard epoch == generation else { throw CancellationError() } } guard bytes.count <= ArchiveReadClient.markdownLimit else { throw ArchiveError.tooLarge } - guard epoch == generation, let raw = String(data: bytes, encoding: .utf8) else { throw CancellationError() } + try Task.checkCancellation() + guard epoch == generation else { throw CancellationError() } + guard let raw = String(data: bytes, encoding: .utf8) else { throw ArchiveError.invalidEncoding } let parsed = ClipMetadataReader.read(raw, file: file) // Opening a previously uncached current article expands metadata/search coverage. // An old pinned citation must never replace metadata from the current inventory. @@ -232,7 +262,9 @@ final class ArchiveLibrary: ObservableObject { if let identity { _ = try await ArchiveRefreshCoordinator.store(identity: identity, cache: cache, index: nil, bytes: bytes, file: file) } } guard bytes.count <= ArchiveReadClient.markdownLimit else { throw ArchiveError.tooLarge } - guard epoch == generation, let raw = String(data: bytes, encoding: .utf8) else { throw CancellationError() } + try Task.checkCancellation() + guard epoch == generation else { throw CancellationError() } + guard let raw = String(data: bytes, encoding: .utf8) else { throw ArchiveError.invalidEncoding } pinnedClip = ClipMetadataReader.read(raw, file: file); pinnedSnapshot = inventory selectedPath = source.path; sourceFragment = "source-L\(source.line)" } diff --git a/ios/SourceBraid/Archive/ArchiveModels.swift b/ios/SourceBraid/Archive/ArchiveModels.swift index 68fb011..fbe3d86 100644 --- a/ios/SourceBraid/Archive/ArchiveModels.swift +++ b/ios/SourceBraid/Archive/ArchiveModels.swift @@ -192,12 +192,13 @@ enum ClipMetadataReader { } enum ArchiveError: LocalizedError, Equatable { - case invalidPath, invalidResponse, tooLarge, incompleteTree, missingCredentials, noEvidence, unavailable, rateLimited, previewUnavailable + case invalidPath, invalidResponse, invalidEncoding, tooLarge, incompleteTree, missingCredentials, noEvidence, unavailable, rateLimited, previewUnavailable case http(Int) var errorDescription: String? { switch self { case .invalidPath: return archiveText("Invalid archive path or link.", "Ungültiger Archivpfad oder Link.") case .invalidResponse: return archiveText("Invalid GitHub response.", "Ungültige GitHub-Antwort.") + case .invalidEncoding: return archiveText("This Markdown file is not valid UTF-8. Open it on GitHub or save it as UTF-8.", "Diese Markdown-Datei ist kein gültiges UTF-8. Auf GitHub öffnen oder als UTF-8 speichern.") case .tooLarge: return archiveText("The local file or context limit was reached. Try a smaller file or question.", "Das lokale Datei- oder Kontextlimit wurde erreicht. Kleinere Datei oder Frage versuchen.") case .incompleteTree: return archiveText("Archive inventory is incomplete.", "Archivbestand ist unvollständig.") case .missingCredentials: return archiveText("Configure GitHub in Settings first.", "Zuerst GitHub in den Einstellungen konfigurieren.") diff --git a/ios/SourceBraid/Archive/ArchiveReaderView.swift b/ios/SourceBraid/Archive/ArchiveReaderView.swift index b359c4d..93c91b2 100644 --- a/ios/SourceBraid/Archive/ArchiveReaderView.swift +++ b/ios/SourceBraid/Archive/ArchiveReaderView.swift @@ -15,6 +15,8 @@ struct ArchiveReaderView: View { @State private var confirmImages = false @State private var attachment: ArchiveAttachment? @State private var retry = 0 + @State private var loadRequest = UUID() + private var loadedMatchesClip: Bool { loaded?.path == clip.path && loaded?.sha == clip.sha } var body: some View { VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 5) { @@ -29,13 +31,16 @@ struct ArchiveReaderView: View { if let value = clip.sourceURL, let url = ArchivePath.externalURL(value) { Link(archiveText("Original source", "Originalquelle"), destination: url).font(.caption) } }.padding().background(SourceBraidTheme.surface) Divider() - if let loaded, let inventory = library.readerSnapshot(for: clip) { + if let loaded, loadedMatchesClip, + let inventory = library.readerSnapshot(for: clip) { if rawView { ScrollView { Text(raw).font(.system(.body, design: .monospaced)).foregroundStyle(SourceBraidTheme.ink).textSelection(.enabled).frame(maxWidth: .infinity, alignment: .leading).padding() }.background(SourceBraidTheme.surface).accessibilityIdentifier("archive.reader.raw") } else { ArchiveWebView(html: MarkdownRenderer.document(loaded, root: inventory.identity.root, allowRemoteImages: remoteImages), library: library, inventory: inventory, clip: clip, fragment: library.sourceFragment, + allowRemoteImages: remoteImages, openAttachment: { attachment = ArchiveAttachment(path: $0, snapshot: inventory) }) + .id(clip.path + clip.sha + inventory.commit) } } else if !error.isEmpty { VStack { @@ -43,7 +48,9 @@ struct ArchiveReaderView: View { Button(archiveText("Retry", "Erneut versuchen")) { retry += 1 } if let url = library.readerSnapshot(for: clip)?.githubURL(for: clip.path) { Link(archiveText("Open on GitHub", "Auf GitHub öffnen"), destination: url) } }.padding(.bottom) - } else { ProgressView().frame(maxWidth: .infinity, maxHeight: .infinity) } + } else { ProgressView().frame(maxWidth: .infinity, maxHeight: .infinity) + .accessibilityIdentifier("archive.reader.loading") + .accessibilityLabel(archiveText("Loading clip", "Beitrag wird geladen")) } } .background(SourceBraidTheme.surface) .navigationTitle(archiveText("Reader", "Reader")) @@ -56,7 +63,7 @@ struct ArchiveReaderView: View { } Menu { Toggle(archiveText("Raw Markdown", "Markdown-Quelltext"), isOn: $rawView) - if !raw.isEmpty { ShareLink(item: raw) { Label(archiveText("Share Markdown", "Markdown teilen"), systemImage: "square.and.arrow.up") } } + if loadedMatchesClip && !raw.isEmpty { ShareLink(item: raw) { Label(archiveText("Share Markdown", "Markdown teilen"), systemImage: "square.and.arrow.up") } } if let url = library.readerSnapshot(for: clip)?.githubURL(for: clip.path) { Link(archiveText("Open on GitHub", "Auf GitHub öffnen"), destination: url) } Button(archiveText("Load external images…", "Externe Bilder laden …")) { confirmImages = true } } label: { Label(archiveText("Reader options", "Reader-Optionen"), systemImage: "ellipsis") } @@ -65,13 +72,26 @@ struct ArchiveReaderView: View { Button(archiveText("Load images", "Bilder laden")) { remoteImages = true } } .sheet(item: $attachment) { ArchiveAttachmentView(library: library, attachment: $0) } - .task(id: clip.sha + library.generation.uuidString + String(retry)) { + .task(id: clip.path + clip.sha + library.generation.uuidString + String(retry)) { + guard library.selected?.path == clip.path, library.selected?.sha == clip.sha else { return } + let request = UUID(), epoch = library.generation + loadRequest = request loaded = nil; raw = ""; error = ""; remoteImages = false + rawView = false; confirmImages = false; attachment = nil do { let value = try await library.document(clip) try Task.checkCancellation() + guard loadRequest == request, library.generation == epoch else { return } loaded = value.0; raw = value.1 - } catch is CancellationError { } catch { self.error = error.localizedDescription } + } catch { + // A previous selection must never replace the new document's + // state, even when URLSession reports cancellation as URLError. + guard loadRequest == request, library.generation == epoch, + library.selected?.path == clip.path, library.selected?.sha == clip.sha else { return } + if Task.isCancelled || error is CancellationError || (error as? URLError)?.code == .cancelled { + self.error = archiveText("Loading was interrupted. Please try again.", "Das Laden wurde unterbrochen. Bitte versuche es erneut.") + } else { self.error = error.localizedDescription } + } } } } @@ -82,6 +102,7 @@ private struct ArchiveWebView: UIViewRepresentable { let inventory: ArchiveSnapshot let clip: ArchiveClip let fragment: String? + let allowRemoteImages: Bool let openAttachment: (String) -> Void func makeCoordinator() -> Coordinator { Coordinator(library: library, inventory: inventory, clip: clip, openAttachment: openAttachment) } func makeUIView(context: Context) -> WKWebView { @@ -99,7 +120,12 @@ private struct ArchiveWebView: UIViewRepresentable { } func updateUIView(_ view: WKWebView, context: Context) { let coordinator = context.coordinator + coordinator.allowRemoteImages = allowRemoteImages if coordinator.html != html || coordinator.fragment != fragment { + coordinator.renderTask?.cancel() + coordinator.renderWatchdog?.cancel() + coordinator.skipMermaid = false + coordinator.navigationGeneration = UUID() coordinator.html = html; coordinator.fragment = fragment coordinator.restore = library.readingPositions[clip.sha] ?? 0 // The base has no network origin. Even malicious HTML cannot inherit GitHub credentials. @@ -107,8 +133,13 @@ private struct ArchiveWebView: UIViewRepresentable { } } static func dismantleUIView(_ view: WKWebView, coordinator: Coordinator) { + coordinator.renderTask?.cancel() + coordinator.renderWatchdog?.cancel() coordinator.tasks.values.forEach { $0.cancel() }; coordinator.tasks.removeAll() view.stopLoading(); view.navigationDelegate = nil; view.scrollView.delegate = nil + // Discard a pending JavaScript promise as well as network/scheme work; + // Task cancellation alone cannot interrupt WebKit's async JavaScript. + view.loadHTMLString("", baseURL: nil) } @MainActor final class Coordinator: NSObject, WKNavigationDelegate, WKURLSchemeHandler, UIScrollViewDelegate { @@ -117,6 +148,11 @@ private struct ArchiveWebView: UIViewRepresentable { let openAttachment: (String) -> Void var html = "", fragment: String?, restore: Double = 0 var tasks: [ObjectIdentifier: Task] = [:] + var renderTask: Task? + var renderWatchdog: Task? + var skipMermaid = false + var navigationGeneration = UUID() + var allowRemoteImages = false init(library: ArchiveLibrary, inventory: ArchiveSnapshot, clip: ArchiveClip, openAttachment: @escaping (String) -> Void) { self.library = library; self.inventory = inventory; self.clip = clip; self.openAttachment = openAttachment } @@ -129,7 +165,8 @@ private struct ArchiveWebView: UIViewRepresentable { let bytes: Data let mime: String? if url.host == "remote" { - guard let value = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems?.first(where: { $0.name == "url" })?.value, + guard allowRemoteImages, + let value = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems?.first(where: { $0.name == "url" })?.value, let remote = ArchivePath.externalURL(value) else { throw ArchiveError.invalidPath } let result = try await ArchiveExternalImageLoader.read(remote) bytes = result.0; mime = result.1 @@ -172,6 +209,35 @@ private struct ArchiveWebView: UIViewRepresentable { } else { decisionHandler(.cancel) } } func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + let generation = navigationGeneration + renderTask?.cancel() + renderTask = Task { [weak self, weak webView] in + guard let self, let webView else { return } + if html.contains("data-mermaid") && !skipMermaid { + renderWatchdog?.cancel() + renderWatchdog = Task { [weak self, weak webView] in + do { try await Task.sleep(for: .seconds(10)) } catch { return } + guard let self, let webView, !Task.isCancelled, + navigationGeneration == generation else { return } + // A stalled JavaScript promise must not leave the reader + // waiting indefinitely. Loading a fresh document also + // discards that execution world; source stays readable. + skipMermaid = true + renderTask?.cancel() + navigationGeneration = UUID() + webView.loadHTMLString(html, baseURL: URL(string: "sourcebraid-document://local/")) + } + // Rendering only reads escaped diagram text from the DOM; no + // archived content is concatenated into executable JavaScript. + try? await MermaidRenderer.render(in: webView) + guard navigationGeneration == generation else { return } + renderWatchdog?.cancel() + } + guard !Task.isCancelled, navigationGeneration == generation else { return } + restorePosition(in: webView) + } + } + private func restorePosition(in webView: WKWebView) { if let fragment, let data = try? JSONEncoder().encode(fragment), let literal = String(data: data, encoding: .utf8) { // Trusted app-owned DOM navigation; document scripts remain disabled. webView.evaluateJavaScript("document.getElementById(\(literal))?.scrollIntoView()", completionHandler: nil) @@ -180,6 +246,14 @@ private struct ArchiveWebView: UIViewRepresentable { let maximum = max(0, webView.scrollView.contentSize.height - webView.scrollView.bounds.height) webView.scrollView.setContentOffset(CGPoint(x: 0, y: min(maximum, CGFloat(restore))), animated: false) } + func webViewWebContentProcessDidTerminate(_ webView: WKWebView) { + renderTask?.cancel() + renderWatchdog?.cancel() + // Avoid repeatedly restarting a diagram that terminated WebKit. + skipMermaid = true + navigationGeneration = UUID() + webView.loadHTMLString(html, baseURL: URL(string: "sourcebraid-document://local/")) + } func scrollViewDidScroll(_ scrollView: UIScrollView) { library.readingPositions[clip.sha] = Double(scrollView.contentOffset.y) } @@ -249,3 +323,121 @@ private struct NativeArchivePreview: UIViewControllerRepresentable { func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> any QLPreviewItem { url as NSURL } } } + +#if DEBUG +// Real WebKit integration checks need a UIApplication host. The logic-test +// target intentionally has none, so UI tests open this entirely synthetic view. +// It cannot be reached in a release build or without the explicit demo flag. +struct ArchiveMermaidProbe: View { + @State private var status = "Preparing offline Mermaid checks" + var body: some View { + VStack(spacing: 8) { + Text(status).font(.caption).accessibilityIdentifier("archive.mermaid.probe.result") + ArchiveMermaidProbeWebView { status = $0 } + .frame(maxWidth: .infinity, maxHeight: .infinity) + }.padding(.top).frame(maxWidth: .infinity, maxHeight: .infinity) + } +} + +private struct ArchiveMermaidProbeWebView: UIViewRepresentable { + let report: (String) -> Void + func makeCoordinator() -> Coordinator { Coordinator(report: report) } + func makeUIView(context: Context) -> WKWebView { + let config = WKWebViewConfiguration() + config.websiteDataStore = .nonPersistent() + config.defaultWebpagePreferences.allowsContentJavaScript = false + let web = WKWebView(frame: .zero, configuration: config) + web.accessibilityIdentifier = "archive.mermaid.probe.web" + web.navigationDelegate = context.coordinator + let body = """ + # Synthetic Mermaid checks + + ```mermaid + flowchart LR + A[Capture] --> B[Read] + ``` + + ```mermaid + sequenceDiagram + Alice->>Bob: Synthetic message + ``` + + ```mermaid + this is deliberately invalid + ``` + + ```mermaid + flowchart TD + C[After invalid diagram] --> D[Still renders] + ``` + + + + ```mermaid + %%{init: {'securityLevel': 'loose', 'htmlLabels': true}}%% + flowchart LR + A[\"\"] --> B[Safe] + click B \"https://example.invalid/navigation\" + ``` + + ```mermaid + \(String(repeating: "%% synthetic comment\n", count: 301)) + flowchart TD + A --> B + ``` + """ + let clip = ClipMetadataReader.read(body, file: .init(path: "clips/mermaid-probe.md", sha: String(repeating: "a", count: 40), size: body.utf8.count)) + context.coordinator.html = MarkdownRenderer.document(clip, root: "clips") + return web + } + func updateUIView(_ web: WKWebView, context: Context) { + guard !context.coordinator.started else { return } + context.coordinator.started = true + web.loadHTMLString(context.coordinator.html, baseURL: URL(string: "sourcebraid-document://local/")) + } + static func dismantleUIView(_ web: WKWebView, coordinator: Coordinator) { + coordinator.task?.cancel(); web.stopLoading(); web.navigationDelegate = nil + } + @MainActor final class Coordinator: NSObject, WKNavigationDelegate { + let report: (String) -> Void + var task: Task? + var html = "" + var started = false + init(report: @escaping (String) -> Void) { self.report = report } + func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { + decisionHandler(navigationAction.request.url?.scheme == "sourcebraid-document" || navigationAction.request.url?.absoluteString == "about:blank" ? .allow : .cancel) + } + func webView(_ web: WKWebView, didFinish navigation: WKNavigation!) { + report("Synthetic WebKit document loaded") + task = Task { [weak self, weak web] in + guard let self, let web else { return } + do { + try await MermaidRenderer.render(in: web, progress: report) + let check = try await web.callAsyncJavaScript(""" + const figures = [...document.querySelectorAll('[data-mermaid]')]; + const good = [0, 1, 3].filter(index => { + const figure = figures[index]; + const svg = figure?.querySelector('.mermaid-preview svg'); + return figure?.dataset.mermaidRendered === 'true' && svg?.getBoundingClientRect().width > 0 && + !figure.querySelector('details').open && svg.textContent.trim().length > 0; + }).length; + const failed = figures[2]?.dataset.mermaidRendered === 'false' && figures[2]?.querySelector('details').open; + const limited = figures[5]?.dataset.mermaidRendered === 'false' && figures[5]?.querySelector('details').open; + const unsafe = document.querySelectorAll('.mermaid-preview script, .mermaid-preview img, .mermaid-preview image, .mermaid-preview foreignObject, .mermaid-preview a').length; + return `good=${good};failed=${failed};limited=${limited};unsafe=${unsafe};count=${figures.length}`; + """, arguments: [:], in: nil, contentWorld: MermaidRenderer.contentWorld) as? String ?? "Missing checks" + let page = try await web.evaluateJavaScript("`pageScript=${globalThis.archiveScriptRan === true};isolated=${typeof mermaid === 'undefined'}`") as? String ?? "Missing isolation check" + try Task.checkCancellation() + report(check + ";" + page) + } catch { if !Task.isCancelled { report("Mermaid probe failed: " + error.localizedDescription) } } + } + } + func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) { + report("Mermaid probe failed: navigation " + error.localizedDescription) + } + func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) { + report("Mermaid probe failed: provisional navigation " + error.localizedDescription) + } + } +} +#endif diff --git a/ios/SourceBraid/Archive/MarkdownRenderer.swift b/ios/SourceBraid/Archive/MarkdownRenderer.swift index 15ca0ba..6a1ef83 100644 --- a/ios/SourceBraid/Archive/MarkdownRenderer.swift +++ b/ios/SourceBraid/Archive/MarkdownRenderer.swift @@ -1,5 +1,6 @@ import Foundation import Markdown +import WebKit enum MarkdownRenderer { static func escape(_ text: String) -> String { @@ -29,6 +30,10 @@ enum MarkdownRenderer { hr{border:0;border-top:1px solid var(--separator)}::selection{background:var(--muted-surface);color:var(--ink)}input{accent-color:var(--accent)} li>p:first-of-type{display:inline}li>input{margin-inline-end:.4em} img{max-width:100%;height:auto}.image-placeholder{display:block;padding:8px;background:var(--muted-surface);color:var(--secondary);border:1px dashed var(--separator)} + .mermaid-diagram{margin:1em 0;border:1px solid var(--separator);border-radius:8px;padding:12px;overflow:hidden} + .mermaid-preview{overflow:auto;max-height:75vh}.mermaid-preview svg{display:block;max-width:100%;height:auto;margin:auto} + .mermaid-status,.mermaid-diagram summary{font-size:.85em;color:var(--secondary)}.mermaid-diagram details{margin-top:8px} + .mermaid-diagram pre{margin-bottom:0}.mermaid-preview[hidden]{display:none}
\(content)
""" } @@ -49,7 +54,23 @@ enum MarkdownRenderer { func render(_ node: any Markup) -> String { if let text = node as? Markdown.Text { return escape(text.string) } if let code = node as? InlineCode { return "\(escape(code.code))" } - if let code = node as? CodeBlock { return "\(escape(code.code))" } + if let code = node as? CodeBlock { + // The info string is data, never an HTML attribute or executable script. + let language = code.language?.split(whereSeparator: { $0.isWhitespace }).first?.lowercased() + if language == "mermaid" { + let label = archiveText("Mermaid diagram", "Mermaid-Diagramm") + let status = archiveText("Diagram preview unavailable. The original Mermaid source is shown below.", "Diagrammvorschau nicht verfügbar. Der originale Mermaid-Quelltext steht unten.") + let source = archiveText("Mermaid source", "Mermaid-Quelltext") + return """ + + +

\(escape(status))

+
\(escape(source))
\(escape(code.code))
+ + """ + } + return "\(escape(code.code))" + } if let html = node as? HTMLBlock { return "
\(escape(html.rawHTML))
" } if let html = node as? InlineHTML { return escape(html.rawHTML) } if node is LineBreak { return "
" } @@ -122,3 +143,26 @@ enum MarkdownRenderer { } } } + +// Only this app-owned, offline bundle executes, in a separate JavaScript world. +// The Markdown document keeps allowsContentJavaScript=false and script-src 'none'. +enum MermaidRenderer { + static let contentWorld = WKContentWorld.world(name: "SourceBraid.Mermaid") + + @MainActor static func render(in webView: WKWebView, bundle: Bundle = .main, + progress: ((String) -> Void)? = nil) async throws { + try Task.checkCancellation() + guard let engine = bundle.url(forResource: "mermaid.tiny", withExtension: "js", subdirectory: "Mermaid"), + let adapter = bundle.url(forResource: "sourcebraid-mermaid", withExtension: "js", subdirectory: "Mermaid") else { + // HTML already contains the accessible, original-source fallback. + return + } + progress?("Loading bundled Mermaid engine") + let script = try String(contentsOf: engine, encoding: .utf8) + "\n" + String(contentsOf: adapter, encoding: .utf8) + _ = try await webView.evaluateJavaScript(script + "\nvoid 0;", in: nil, contentWorld: contentWorld) + try Task.checkCancellation() + progress?("Rendering synthetic Mermaid diagrams") + _ = try await webView.callAsyncJavaScript("return await globalThis.SourceBraidMermaid.renderAll();", arguments: [:], in: nil, contentWorld: contentWorld) + progress?("Mermaid render completed") + } +} diff --git a/ios/SourceBraid/Resources/Localizable.xcstrings b/ios/SourceBraid/Resources/Localizable.xcstrings index ff053a6..b61c1ab 100644 --- a/ios/SourceBraid/Resources/Localizable.xcstrings +++ b/ios/SourceBraid/Resources/Localizable.xcstrings @@ -167,20 +167,20 @@ } } }, - "Latest": { + "Recent": { "extractionState": "manual", "comment": "Primary archive destination in the system tab bar.", "localizations": { "en": { "stringUnit": { "state": "translated", - "value": "Latest" + "value": "Recent" } }, "de": { "stringUnit": { "state": "translated", - "value": "Neueste" + "value": "Zuletzt" } } } diff --git a/ios/SourceBraid/Resources/Mermaid/LICENSE-mermaid.txt b/ios/SourceBraid/Resources/Mermaid/LICENSE-mermaid.txt new file mode 100644 index 0000000..2e5daeb --- /dev/null +++ b/ios/SourceBraid/Resources/Mermaid/LICENSE-mermaid.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 - 2022 Knut Sveidqvist + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/ios/SourceBraid/Resources/Mermaid/README.md b/ios/SourceBraid/Resources/Mermaid/README.md new file mode 100644 index 0000000..a1d14cf --- /dev/null +++ b/ios/SourceBraid/Resources/Mermaid/README.md @@ -0,0 +1,35 @@ +# Offline Mermaid / Mermaid offline + +`mermaid.tiny.js` is the unmodified official `@mermaid-js/tiny` **12.2.0** +distribution from . +The exact tarball integrity and bundle SHA-256 are recorded in +`vendor-manifest.json`; verify both when replacing the bundle. Its upstream +source is . +`LICENSE-mermaid.txt` and `ThirdPartyNotices.txt` retain the applicable notices. +No npm install, download, CDN, diagram service or network connection is needed +at runtime. The app and test targets both copy this folder as a resource. + +The app-owned `sourcebraid-mermaid.js` reads escaped fenced-block text and +renders in an isolated `WKContentWorld`. Archived scripts stay disabled; +the document retains `script-src 'none'`, `connect-src 'none'` and no network +origin. Strict Mermaid security, SVG sanitization and a native remote-image +permission check prevent diagrams from enabling scripts, links or media. + +The tiny distribution supports common flowcharts, sequence/state/class/ER +diagrams and Gantt charts. ELK layouts fall back to Dagre. Mindmaps, +architecture diagrams and KaTeX are omitted by upstream; unsupported or +invalid input stays visible as original Mermaid source, with a clear message. +The adapter limits previews to 12 diagrams, 20,000 characters/300 lines per +diagram, 100,000 total characters and 200 flowchart edges. These limits affect +previews only, never archive content or its raw Markdown. + +Die Datei stammt unverändert aus der oben genannten offiziellen Distribution. +Diagramme werden vollständig auf dem Gerät dargestellt. Das Archiv bleibt +unverändert; der originale Quelltext ist immer aufklappbar. Fehlerhafte, +nicht unterstützte oder zu große Diagramme zeigen einen Hinweis und ihren +Quelltext. ELK, Mindmaps, Architekturdiagramme und KaTeX sind nicht enthalten; +ELK-Layouts verwenden Dagre. Externe Dienste, aktive Archivskripte und +zusätzliche Berechtigungen werden nicht benötigt. + +Upstream usage and supported tiny-build limitations: + diff --git a/ios/SourceBraid/Resources/Mermaid/ThirdPartyNotices.txt b/ios/SourceBraid/Resources/Mermaid/ThirdPartyNotices.txt new file mode 100644 index 0000000..7355ac2 --- /dev/null +++ b/ios/SourceBraid/Resources/Mermaid/ThirdPartyNotices.txt @@ -0,0 +1,3447 @@ +SourceBraid offline Mermaid renderer — third-party notices + +Mermaid Tiny 12.2.0 +https://github.com/mermaid-js/mermaid + +The MIT License (MIT) + +Copyright (c) 2014 - 2022 Knut Sveidqvist + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +The official tiny distribution excludes ELK, Cytoscape mindmaps, architecture, +and KaTeX. Additional permissive runtime dependency notices are retained below. +DOMPurify is used under its Apache-2.0 licensing option. These notices do not +relicense SourceBraid or the captured user content. + +------------------------------------------------------------------------------- +@antfu/install-pkg 2.1.0 + +LICENSE +MIT License + +Copyright (c) 2021 Anthony Fu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +@braintree/sanitize-url 7.1.2 + +LICENSE +MIT License + +Copyright (c) 2017 Braintree + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +@chevrotain/cst-dts-gen 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/gast 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/regexp-to-ast 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/types 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/utils 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@iconify/types 2.0.0 + +license.txt +MIT License + +Copyright (c) 2021 - 2022 Vjacheslav Trushkin / Iconify OÜ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------- +@iconify/utils 3.1.7 + +license.txt +MIT License + +Copyright (c) 2021-PRESENT Vjacheslav Trushkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------- +@mermaid-js/parser 2.0.1 + +LICENSE +The MIT License (MIT) + +Copyright (c) 2023 Yokozuna59 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +@upsetjs/venn.js 2.0.0 + +LICENSE +MIT License + +Copyright (c) 2013 Ben Frederickson +Copyright (c) 2021 Samuel Gratzl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +chevrotain 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +d3 7.9.0 + +LICENSE +Copyright 2010-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-array 3.2.4 + +LICENSE +Copyright 2010-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-axis 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-brush 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-chord 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-color 3.1.0 + +LICENSE +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-contour 4.0.2 + +LICENSE +Copyright 2012-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-delaunay 6.0.4 + +LICENSE +Copyright 2018-2021 Observable, Inc. +Copyright 2021 Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-dispatch 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-drag 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-dsv 3.0.1 + +LICENSE +Copyright 2013-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-ease 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock +Copyright 2001 Robert Penner +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- +d3-fetch 3.0.1 + +LICENSE +Copyright 2016-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-force 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-format 3.1.2 + +LICENSE +Copyright 2010-2026 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-geo 3.1.1 + +LICENSE +Copyright 2010-2024 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +This license applies to GeographicLib, versions 1.12 and later. + +Copyright 2008-2012 Charles Karney + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +d3-hierarchy 3.1.2 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-interpolate 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-path 3.1.0 + +LICENSE +Copyright 2015-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-polygon 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-quadtree 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-random 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-sankey 0.12.3 + +LICENSE +Copyright 2015, Mike Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- +d3-scale 4.0.2 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-scale-chromatic 3.1.0 + +LICENSE +Copyright 2010-2024 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +Apache-Style Software License for ColorBrewer software and ColorBrewer Color Schemes + +Copyright 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State University + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + + +------------------------------------------------------------------------------- +d3-selection 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-shape 3.2.0 + +LICENSE +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-time 3.1.0 + +LICENSE +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-time-format 4.1.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-timer 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-transition 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-zoom 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +dagre-d3-es 7.0.14 + +LICENSE.md +Original dagre-d3 copyright: Copyright (c) 2013 Chris Pettitt +Original dagre copyright: Copyright (c) 2012-2014 Chris Pettitt +Original graphlib copyright: Copyright (c) 2012-2014 Chris Pettitt + +Copyright (c) 2022-2024 Thibaut Lassalle, David Newell, Alois Klink, Sidharth Vinod and dagre-es contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +------------------------------------------------------------------------------- +dayjs 1.11.23 + +LICENSE +MIT License + +Copyright (c) 2018-present, iamkun + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +delaunator 5.1.0 + +LICENSE +ISC License + +Copyright (c) 2026, Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +dompurify 3.4.17 + +LICENSE + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +LICENSE-MPL +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + + +------------------------------------------------------------------------------- +es-toolkit 1.52.0 + +LICENSE +MIT License + +Copyright (c) 2024 Viva Republica, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +NOTICE +es-toolkit + +Parts of the test suite and compatibility layer in es-toolkit/compat are +derived from Lodash (https://github.com/lodash/lodash). + +Lodash copyright notice and MIT permission notice: + +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +hachure-fill 0.5.2 + +LICENSE +MIT License + +Copyright (c) 2023 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +iconv-lite 0.6.3 + +LICENSE +Copyright (c) 2011 Alexander Shtuchkin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +------------------------------------------------------------------------------- +import-meta-resolve 4.2.0 + +license +(The MIT License) + +Copyright (c) Titus Wormer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +This is a derivative work based on: +. +Which is licensed: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +------------------------------------------------------------------------------- +internmap 2.0.3 + +LICENSE +Copyright 2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +khroma 2.1.0 + +license +The MIT License (MIT) + +Copyright (c) 2019-present Fabio Spampinato, Andrew Maney + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +lodash-es 4.18.1 + +LICENSE +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +------------------------------------------------------------------------------- +marked 16.4.2 + +LICENSE.md +# License information + +## Contribution License Agreement + +If you contribute code to this project, you are implicitly allowing your code +to be distributed under the MIT license. You are also implicitly verifying that +all code is your original work. `` + +## Marked + +Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/) +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## Markdown + +Copyright © 2004, John Gruber +http://daringfireball.net/ +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. + + +------------------------------------------------------------------------------- +package-manager-detector 1.9.0 + +LICENSE +MIT License + +Copyright (c) 2020-PRESENT Anthony Fu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +path-data-parser 0.1.0 + +LICENSE +MIT License + +Copyright (c) 2020 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +points-on-curve 0.2.0 + +LICENSE +MIT License + +Copyright (c) 2020 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +points-on-path 0.2.1 + +LICENSE +MIT License + +Copyright (c) 2020 Preet + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +robust-predicates 3.0.3 + +LICENSE +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + + +------------------------------------------------------------------------------- +roughjs 4.6.6 + +LICENSE +MIT License + +Copyright (c) 2019 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +rw 1.3.3 + +LICENSE +Copyright (c) 2014-2016, Michael Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- +safer-buffer 2.1.2 + +LICENSE +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +stylis 4.4.0 + +LICENSE +MIT License + +Copyright (c) 2016-present Sultan Tarimo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +tinyexec 1.3.1 + +LICENSE +MIT License + +Copyright (c) 2024 Tinylibs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +ts-dedent 2.3.0 + +LICENSE +MIT License + +Copyright (c) 2018 Tamino Martinius + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +uuid 14.0.3 + +LICENSE.md +The MIT License (MIT) + +Copyright (c) 2010-2020 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ios/SourceBraid/Resources/Mermaid/mermaid.tiny.js b/ios/SourceBraid/Resources/Mermaid/mermaid.tiny.js new file mode 100644 index 0000000..de62f21 --- /dev/null +++ b/ios/SourceBraid/Resources/Mermaid/mermaid.tiny.js @@ -0,0 +1,3580 @@ +"use strict";var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var DLe=Object.create;var d1=Object.defineProperty;var NLe=Object.getOwnPropertyDescriptor;var MLe=Object.getOwnPropertyNames;var OLe=Object.getPrototypeOf,PLe=Object.prototype.hasOwnProperty;var a=(e,t)=>d1(e,"name",{value:t,configurable:!0});var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var dd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ir=(e,t)=>{for(var r in t)d1(e,r,{get:t[r],enumerable:!0})},sV=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of MLe(t))!PLe.call(e,i)&&i!==r&&d1(e,i,{get:()=>t[i],enumerable:!(n=NLe(t,i))||n.enumerable});return e};var Io=(e,t,r)=>(r=e!=null?DLe(OLe(e)):{},sV(t||!e||!e.__esModule?d1(r,"default",{value:e,enumerable:!0}):r,e)),BLe=e=>sV(d1({},"__esModule",{value:!0}),e);var $Le,Fp,YR,aV,gC=w(()=>{"use strict";$Le=Object.freeze({left:0,top:0,width:16,height:16}),Fp=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),YR=Object.freeze({...$Le,...Fp}),aV=Object.freeze({...YR,body:"",hidden:!1})});var FLe,oV,lV=w(()=>{"use strict";gC();FLe=Object.freeze({width:null,height:null}),oV=Object.freeze({...FLe,...Fp})});var KR,yC,cV=w(()=>{"use strict";KR=a((e,t,r,n="")=>{let i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return t&&!yC(h)?null:h}let s=i[0],o=s.split("-");if(o.length>1){let l={provider:n,prefix:o.shift(),name:o.join("-")};return t&&!yC(l)?null:l}if(r&&n===""){let l={provider:n,prefix:"",name:s};return t&&!yC(l,r)?null:l}return null},"stringToIcon"),yC=a((e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,"validateIconName")});function uV(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}var hV=w(()=>{"use strict";a(uV,"mergeIconTransformations")});function XR(e,t){let r=uV(e,t);for(let n in aV)n in Fp?n in e&&!(n in r)&&(r[n]=Fp[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}var dV=w(()=>{"use strict";gC();hV();a(XR,"mergeIconData")});function fV(e,t){let r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function s(o){if(r[o])return i[o]=[];if(!(o in i)){i[o]=null;let l=n[o]&&n[o].parent,u=l&&s(l);u&&(i[o]=[l].concat(u))}return i[o]}return a(s,"resolve"),(t||Object.keys(r).concat(Object.keys(n))).forEach(s),i}var pV=w(()=>{"use strict";a(fV,"getIconsTree")});function mV(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),s={};function o(l){s=XR(n[l]||i[l],s)}return a(o,"parse"),o(t),r.forEach(o),XR(e,s)}function QR(e,t){if(e.icons[t])return mV(e,t,[]);let r=fV(e,[t])[t];return r?mV(e,t,r):null}var gV=w(()=>{"use strict";dV();pV();a(mV,"internalGetIconData");a(QR,"getIconData")});function ZR(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;let n=e.split(GLe);if(n===null||!n.length)return e;let i=[],s=n.shift(),o=VLe.test(s);for(;;){if(o){let l=parseFloat(s);isNaN(l)?i.push(s):i.push(Math.ceil(l*t*r)/r)}else i.push(s);if(s=n.shift(),s===void 0)return i.join("");o=!o}}var GLe,VLe,yV=w(()=>{"use strict";GLe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,VLe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;a(ZR,"calculateSize")});function zLe(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;n>=0;){let i=e.indexOf(">",n),s=e.indexOf("",s);if(o===-1)break;r+=e.slice(i+1,s).trim(),e=e.slice(0,n).trim()+e.slice(o+1)}return{defs:r,content:e}}function ULe(e,t){return e?""+e+""+t:t}function xV(e,t,r){let n=zLe(e);return ULe(n.defs,t+n.content+r)}var bV=w(()=>{"use strict";a(zLe,"splitSVGDefs");a(ULe,"mergeDefsAndContent");a(xV,"wrapSVGContent")});function JR(e,t){let r={...YR,...e},n={...oV,...t},i={left:r.left,top:r.top,width:r.width,height:r.height},s=r.body;[r,n].forEach(y=>{let x=[],b=y.hFlip,T=y.vFlip,C=y.rotate;b?T?C+=2:(x.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),x.push("scale(-1 1)"),i.top=i.left=0):T&&(x.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),x.push("scale(1 -1)"),i.top=i.left=0);let v;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:v=i.height/2+i.top,x.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:x.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:v=i.width/2+i.left,x.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}C%2===1&&(i.left!==i.top&&(v=i.left,i.left=i.top,i.top=v),i.width!==i.height&&(v=i.width,i.width=i.height,i.height=v)),x.length&&(s=xV(s,'',""))});let o=n.width,l=n.height,u=i.width,h=i.height,d,f;o===null?(f=l===null?"1em":l==="auto"?h:l,d=ZR(f,u/h)):(d=o==="auto"?u:o,f=l===null?ZR(d,h/u):l==="auto"?h:l);let p={},m=a((y,x)=>{WLe(x)||(p[y]=x.toString())},"setAttr");m("width",d),m("height",f);let g=[i.left,i.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:s}}var WLe,TV=w(()=>{"use strict";gC();lV();yV();bV();WLe=a(e=>e==="unset"||e==="undefined"||e==="none","isUnsetKeyword");a(JR,"iconToSVG")});function eL(e,t=qLe){let r=[],n;for(;n=jLe.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{let o=typeof t=="function"?t(s):t+(HLe++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}var jLe,qLe,HLe,CV=w(()=>{"use strict";jLe=/\sid="(\S+)"/g,qLe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),HLe=0;a(eL,"replaceIDs")});function tL(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in t)r+=" "+n+'="'+t[n]+'"';return'"+e+""}var kV=w(()=>{"use strict";a(tL,"iconToHTML")});var SV=w(()=>{"use strict";cV();gV();TV();CV();kV()});var rL,Pn,Gp=w(()=>{"use strict";rL=a((e,t,{depth:r=2}={})=>{let n={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(i=>rL(e,i,n)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(i=>{e.includes(i)||e.push(i)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){let i=e;Object.entries(t).forEach(([s,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),i[s]===void 0&&(i[s]=Array.isArray(o)?[]:{}),typeof i[s]=="object"&&(i[s]=rL(i[s],o,{depth:r-1}))}else typeof i[s]!="object"&&(Object.hasOwn(e,s)?i[s]=o:Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Pn=rL});var xC=dd((nL,iL)=>{"use strict";(function(e,t){typeof nL=="object"&&typeof iL<"u"?iL.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(nL,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",s="minute",o="hour",l="day",u="week",h="month",d="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(G){var I=["th","st","nd","rd"],F=G%100;return"["+G+(I[(F-20)%10]||I[F]||I[0])+"]"},"ordinal")},b=a(function(G,I,F){var N=String(G);return!N||N.length>=I?G:""+Array(I+1-N.length).join(F)+G},"m"),T={s:b,z:a(function(G){var I=-G.utcOffset(),F=Math.abs(I),N=Math.floor(F/60),D=F%60;return(I<=0?"+":"-")+b(N,2,"0")+":"+b(D,2,"0")},"z"),m:a(function G(I,F){if(I.date()1)return G(R[0])}else{var P=I.name;v[P]=I,D=P}return!N&&D&&(C=D),D||!N&&C},"t"),A=a(function(G,I){if(S(G))return G.clone();var F=typeof I=="object"?I:{};return F.date=G,F.args=arguments,new $(F)},"O"),B=T;B.l=_,B.i=S,B.w=function(G,I){return A(G,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var $=(function(){function G(F){this.$L=_(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[E]=!0}a(G,"M");var I=G.prototype;return I.parse=function(F){this.$d=(function(N){var D=N.date,M=N.utc;if(D===null)return new Date(NaN);if(B.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var R=D.match(g);if(R){var P=R[2]-1||0,V=(R[7]||"0").substring(0,3);return M?new Date(Date.UTC(R[1],P,R[3]||1,R[4]||0,R[5]||0,R[6]||0,V)):new Date(R[1],P,R[3]||1,R[4]||0,R[5]||0,R[6]||0,V)}}return new Date(D)})(F),this.init()},I.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},I.$utils=function(){return B},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(F,N){var D=A(F);return this.startOf(N)<=D&&D<=this.endOf(N)},I.isAfter=function(F,N){return A(F){"use strict";EV=Io(xC(),1),bc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:a((...e)=>{},"trace"),debug:a((...e)=>{},"debug"),info:a((...e)=>{},"info"),warn:a((...e)=>{},"warn"),error:a((...e)=>{},"error"),fatal:a((...e)=>{},"fatal")},f1=a(function(e="fatal"){let t=bc.fatal;typeof e=="string"?e.toLowerCase()in bc&&(t=bc[e]):typeof e=="number"&&(t=e),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},t<=bc.fatal&&(H.fatal=console.error?console.error.bind(console,to("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",to("FATAL"))),t<=bc.error&&(H.error=console.error?console.error.bind(console,to("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",to("ERROR"))),t<=bc.warn&&(H.warn=console.warn?console.warn.bind(console,to("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",to("WARN"))),t<=bc.info&&(H.info=console.info?console.info.bind(console,to("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",to("INFO"))),t<=bc.debug&&(H.debug=console.debug?console.debug.bind(console,to("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",to("DEBUG"))),t<=bc.trace&&(H.trace=console.debug?console.debug.bind(console,to("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",to("TRACE")))},"setLogLevel"),to=a(e=>`%c${(0,EV.default)().format("ss.SSS")} : ${e} : `,"format")});var bC,vV,wV=w(()=>{"use strict";bC={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:a(e=>e>=255?255:e<0?0:e,"r"),g:a(e=>e>=255?255:e<0?0:e,"g"),b:a(e=>e>=255?255:e<0?0:e,"b"),h:a(e=>e%360,"h"),s:a(e=>e>=100?100:e<0?0:e,"s"),l:a(e=>e>=100?100:e<0?0:e,"l"),a:a(e=>e>=1?1:e<0?0:e,"a")},toLinear:a(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:a((e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:a(({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let i=r<.5?r*(1+t):r+t-r*t,s=2*r-i;switch(n){case"r":return bC.hue2rgb(s,i,e+.3333333333333333)*255;case"g":return bC.hue2rgb(s,i,e)*255;case"b":return bC.hue2rgb(s,i,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:a(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;let i=Math.max(e,t,r),s=Math.min(e,t,r),o=(i+s)/2;if(n==="l")return o*100;if(i===s)return 0;let l=i-s,u=o>.5?l/(2-i-s):l/(i+s);if(n==="s")return u*100;switch(i){case e:return((t-r)/l+(t{"use strict";YLe={clamp:a((e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:a(e=>Math.round(e*1e10)/1e10,"round")},_V=YLe});var KLe,RV,LV=w(()=>{"use strict";KLe={dec2hex:a(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},RV=KLe});var XLe,sr,gl=w(()=>{"use strict";wV();AV();LV();XLe={channel:vV,lang:_V,unit:RV},sr=XLe});var Tc,$i,p1=w(()=>{"use strict";gl();Tc={};for(let e=0;e<=255;e++)Tc[e]=sr.unit.dec2hex(e);$i={ALL:0,RGB:1,HSL:2}});var sL,IV,DV=w(()=>{"use strict";p1();sL=class{static{a(this,"Type")}constructor(){this.type=$i.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=$i.ALL}is(t){return this.type===t}},IV=sL});var aL,NV,MV=w(()=>{"use strict";gl();DV();p1();aL=class{static{a(this,"Channels")}constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new IV}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=$i.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=sr.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=sr.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=sr.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=sr.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=sr.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=sr.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is($i.HSL)&&r!==void 0?r:(this._ensureHSL(),sr.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is($i.HSL)&&r!==void 0?r:(this._ensureHSL(),sr.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is($i.HSL)&&r!==void 0?r:(this._ensureHSL(),sr.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is($i.RGB)&&r!==void 0?r:(this._ensureRGB(),sr.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is($i.RGB)&&r!==void 0?r:(this._ensureRGB(),sr.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is($i.RGB)&&r!==void 0?r:(this._ensureRGB(),sr.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set($i.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set($i.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set($i.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set($i.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set($i.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set($i.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},NV=aL});var QLe,Au,m1=w(()=>{"use strict";MV();QLe=new NV({r:0,g:0,b:0,a:0},"transparent"),Au=QLe});var OV,fd,oL=w(()=>{"use strict";m1();p1();OV={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:a(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(OV.re);if(!t)return;let r=t[1],n=parseInt(r,16),i=r.length,s=i%4===0,o=i>4,l=o?1:17,u=o?8:4,h=s?0:-1,d=o?255:15;return Au.set({r:(n>>u*(h+3)&d)*l,g:(n>>u*(h+2)&d)*l,b:(n>>u*(h+1)&d)*l,a:s?(n&d)*l/255:1},e)},"parse"),stringify:a(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`#${Tc[Math.round(t)]}${Tc[Math.round(r)]}${Tc[Math.round(n)]}${Tc[Math.round(i*255)]}`:`#${Tc[Math.round(t)]}${Tc[Math.round(r)]}${Tc[Math.round(n)]}`},"stringify")},fd=OV});var TC,g1,PV=w(()=>{"use strict";gl();m1();TC={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:a(e=>{let t=e.match(TC.hueRe);if(t){let[,r,n]=t;switch(n){case"grad":return sr.channel.clamp.h(parseFloat(r)*.9);case"rad":return sr.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return sr.channel.clamp.h(parseFloat(r)*360)}}return sr.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:a(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(TC.re);if(!r)return;let[,n,i,s,o,l]=r;return Au.set({h:TC._hue2deg(n),s:sr.channel.clamp.s(parseFloat(i)),l:sr.channel.clamp.l(parseFloat(s)),a:o?sr.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},"parse"),stringify:a(e=>{let{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${sr.lang.round(t)}, ${sr.lang.round(r)}%, ${sr.lang.round(n)}%, ${i})`:`hsl(${sr.lang.round(t)}, ${sr.lang.round(r)}%, ${sr.lang.round(n)}%)`},"stringify")},g1=TC});var CC,lL,BV=w(()=>{"use strict";oL();CC={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:a(e=>{e=e.toLowerCase();let t=CC.colors[e];if(t)return fd.parse(t)},"parse"),stringify:a(e=>{let t=fd.stringify(e);for(let r in CC.colors)if(CC.colors[r]===t)return r},"stringify")},lL=CC});var $V,y1,FV=w(()=>{"use strict";gl();m1();$V={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:a(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match($V.re);if(!r)return;let[,n,i,s,o,l,u,h,d]=r;return Au.set({r:sr.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:sr.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:sr.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?sr.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},e)},"parse"),stringify:a(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${sr.lang.round(t)}, ${sr.lang.round(r)}, ${sr.lang.round(n)}, ${sr.lang.round(i)})`:`rgb(${sr.lang.round(t)}, ${sr.lang.round(r)}, ${sr.lang.round(n)})`},"stringify")},y1=$V});var ZLe,Fi,Cc=w(()=>{"use strict";oL();PV();BV();FV();p1();ZLe={format:{keyword:lL,hex:fd,rgb:y1,rgba:y1,hsl:g1,hsla:g1},parse:a(e=>{if(typeof e!="string")return e;let t=fd.parse(e)||y1.parse(e)||g1.parse(e)||lL.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:a(e=>!e.changed&&e.color?e.color:e.type.is($i.HSL)||e.data.r===void 0?g1.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?y1.stringify(e):fd.stringify(e),"stringify")},Fi=ZLe});var JLe,kC,cL=w(()=>{"use strict";gl();Cc();JLe=a((e,t)=>{let r=Fi.parse(e);for(let n in t)r[n]=sr.channel.clamp[n](t[n]);return Fi.stringify(r)},"change"),kC=JLe});var e3e,Qn,uL=w(()=>{"use strict";gl();m1();Cc();cL();e3e=a((e,t,r=0,n=1)=>{if(typeof e!="number")return kC(e,{a:t});let i=Au.set({r:sr.channel.clamp.r(e),g:sr.channel.clamp.g(t),b:sr.channel.clamp.b(r),a:sr.channel.clamp.a(n)});return Fi.stringify(i)},"rgba"),Qn=e3e});var t3e,kc,GV=w(()=>{"use strict";gl();Cc();t3e=a((e,t)=>sr.lang.round(Fi.parse(e)[t]),"channel"),kc=t3e});var r3e,VV,zV=w(()=>{"use strict";gl();Cc();r3e=a(e=>{let{r:t,g:r,b:n}=Fi.parse(e),i=.2126*sr.channel.toLinear(t)+.7152*sr.channel.toLinear(r)+.0722*sr.channel.toLinear(n);return sr.lang.round(i)},"luminance"),VV=r3e});var n3e,UV,WV=w(()=>{"use strict";zV();n3e=a(e=>VV(e)>=.5,"isLight"),UV=n3e});var i3e,tn,jV=w(()=>{"use strict";WV();i3e=a(e=>!UV(e),"isDark"),tn=i3e});var s3e,Vp,SC=w(()=>{"use strict";gl();Cc();s3e=a((e,t,r)=>{let n=Fi.parse(e),i=n[t],s=sr.channel.clamp[t](i+r);return i!==s&&(n[t]=s),Fi.stringify(n)},"adjustChannel"),Vp=s3e});var a3e,Ue,qV=w(()=>{"use strict";SC();a3e=a((e,t)=>Vp(e,"l",t),"lighten"),Ue=a3e});var o3e,je,HV=w(()=>{"use strict";SC();o3e=a((e,t)=>Vp(e,"l",-t),"darken"),je=o3e});var l3e,EC,YV=w(()=>{"use strict";SC();l3e=a((e,t)=>Vp(e,"a",-t),"transparentize"),EC=l3e});var c3e,oe,KV=w(()=>{"use strict";Cc();cL();c3e=a((e,t)=>{let r=Fi.parse(e),n={};for(let i in t)t[i]&&(n[i]=r[i]+t[i]);return kC(e,n)},"adjust"),oe=c3e});var u3e,XV,QV=w(()=>{"use strict";Cc();uL();u3e=a((e,t,r=50)=>{let{r:n,g:i,b:s,a:o}=Fi.parse(e),{r:l,g:u,b:h,a:d}=Fi.parse(t),f=r/100,p=f*2-1,m=o-d,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,x=1-y,b=n*y+l*x,T=i*y+u*x,C=s*y+h*x,v=o*f+d*(1-f);return Qn(b,T,C,v)},"mix"),XV=u3e});var h3e,Pe,ZV=w(()=>{"use strict";Cc();QV();h3e=a((e,t=100)=>{let r=Fi.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,XV(r,e,t)},"invert"),Pe=h3e});var JV=w(()=>{"use strict";uL();GV();jV();qV();HV();YV();KV();ZV()});var Ai=w(()=>{"use strict";JV()});var Ri,Li,Do=w(()=>{"use strict";Ri="#ffffff",Li="#f2f2f2"});var tr,ez,si,ro=w(()=>{"use strict";Ai();tr=a((e,t)=>t?oe(e,{s:-40,l:10}):oe(e,{s:-40,l:-10}),"mkBorder"),ez=a(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),si=a((e,t)=>ez(e)&&ez(t)?{...e,...t}:t,"applyOverride")});var hL,tz,rz=w(()=>{"use strict";Ai();Do();ro();hL=class{static{a(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||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(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?je(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(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||je(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||je(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Ue(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Ue(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||oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||oe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||oe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},tz=a(e=>{let t=new hL;return t.calculate(e),t},"getThemeVariables")});var dL,nz,iz=w(()=>{"use strict";Ai();ro();dL=class{static{a(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ue(this.primaryColor,16),this.tertiaryColor=oe(this.primaryColor,{h:-160}),this.primaryBorderColor=Pe(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.tertiaryColor),this.lineColor=Pe(this.background),this.textColor=Pe(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ue(Pe("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Qn(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=je("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=je(this.sectionBkgColor,10),this.taskBorderColor=Qn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Qn(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||Ue(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||je(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=Ue(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=Ue(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Ue(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=Pe(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=oe(this.primaryColor,{h:64}),this.fillType3=oe(this.secondaryColor,{h:64}),this.fillType4=oe(this.primaryColor,{h:-64}),this.fillType5=oe(this.secondaryColor,{h:-64}),this.fillType6=oe(this.primaryColor,{h:128}),this.fillType7=oe(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||oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||oe(this.primaryColor,{h:330});for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},nz=a(e=>{let t=new dL;return t.calculate(e),t},"getThemeVariables")});var fL,Zi,yl=w(()=>{"use strict";Ai();ro();Do();fL=class{static{a(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=oe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=oe(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.tertiaryColor),this.lineColor=Pe(this.background),this.textColor=Pe(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=tr(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=Qn(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||oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||oe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||je(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||je(this.tertiaryColor,40);for(let t=0;t{this[n]==="calculated"&&(this[n]=void 0)}),typeof t!="object"){this.updateColors();return}let r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},Zi=a(e=>{let t=new fL;return t.calculate(e),t},"getThemeVariables")});var pL,sz,az=w(()=>{"use strict";Ai();Do();ro();pL=class{static{a(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Ue("#cde498",10),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.primaryColor),this.lineColor=Pe(this.background),this.textColor=Pe(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=je(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||oe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||je(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||je(this.tertiaryColor,40);for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},sz=a(e=>{let t=new pL;return t.calculate(e),t},"getThemeVariables")});var mL,oz,lz=w(()=>{"use strict";Ai();ro();Do();mL=class{static{a(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Ue(this.contrast,55),this.background="#ffffff",this.tertiaryColor=oe(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.tertiaryColor),this.lineColor=Pe(this.background),this.textColor=Pe(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||Ue(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=Ue(this.contrast,55),this.border2=this.contrast,this.actorBorder=Ue(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},oz=a(e=>{let t=new mL;return t.calculate(e),t},"getThemeVariables")});var gL,cz,uz=w(()=>{"use strict";Ai();ro();Do();gL=class{static{a(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=tr(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||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(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?je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||(tn(this.background)?Ue(this.background,4):je(this.background,4));let t="#ECECFE",r="#E9E9F1",n=oe(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||oe(t,{h:30}),this.cScale4=this.cScale4||oe(t,{h:60}),this.cScale5=this.cScale5||oe(t,{h:90}),this.cScale6=this.cScale6||oe(t,{h:120}),this.cScale7=this.cScale7||oe(t,{h:150}),this.cScale8=this.cScale8||oe(t,{h:210,l:150}),this.cScale9=this.cScale9||oe(t,{h:270}),this.cScale10=this.cScale10||oe(t,{h:300}),this.cScale11=this.cScale11||oe(t,{h:330}),this.darkMode)for(let s=0;s{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},cz=a(e=>{let t=new gL;return t.calculate(e),t},"getThemeVariables")});var yL,hz,dz=w(()=>{"use strict";Ai();ro();Do();yL=class{static{a(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ue(this.primaryColor,16),this.tertiaryColor=oe(this.primaryColor,{h:-160}),this.primaryBorderColor=Pe(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ue(Pe("#323D47"),10),this.border1="#ccc",this.border2=Qn(255,255,255,.25),this.arrowheadColor=Pe(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||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Ue(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||oe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||oe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},hz=a(e=>{let t=new yL;return t.calculate(e),t},"getThemeVariables")});var xL,fz,pz=w(()=>{"use strict";Ai();ro();Do();xL=class{static{a(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=tr("#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||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(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?je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||(tn(this.background)?Ue(this.background,4):je(this.background,4));let t="#ECECFE",r="#E9E9F1",n=oe(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(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 s=0;s{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},fz=a(e=>{let t=new xL;return t.calculate(e),t},"getThemeVariables")});var bL,mz,gz=w(()=>{"use strict";Ai();ro();Do();bL=class{static{a(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ue(this.primaryColor,16),this.tertiaryColor=oe(this.primaryColor,{h:-160}),this.primaryBorderColor=Pe(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ue(Pe("#323D47"),10),this.border1="#ccc",this.border2=Qn(255,255,255,.25),this.arrowheadColor=Pe(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||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Ue(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||oe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||oe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},mz=a(e=>{let t=new bL;return t.calculate(e),t},"getThemeVariables")});var TL,yz,xz=w(()=>{"use strict";Ai();ro();Do();TL=class{static{a(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=tr("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(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?je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||(tn(this.background)?Ue(this.background,4):je(this.background,4));let t="#ECECFE",r="#E9E9F1",n=oe(t,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let s=0;s{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},yz=a(e=>{let t=new TL;return t.calculate(e),t},"getThemeVariables")});var CL,bz,Tz=w(()=>{"use strict";Ai();ro();Do();CL=class{static{a(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Ue(this.primaryColor,16),this.tertiaryColor=oe(this.primaryColor,{h:-160}),this.primaryBorderColor=Pe(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Pe(this.primaryColor),this.secondaryTextColor=Pe(this.secondaryColor),this.tertiaryTextColor=Pe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Ue(Pe("#323D47"),10),this.border1="#ccc",this.border2=Qn(255,255,255,.25),this.arrowheadColor=Pe(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Pe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Pe(this.tertiaryColor),this.lineColor=this.lineColor||Pe(this.background),this.arrowheadColor=this.arrowheadColor||Pe(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Ue(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?je(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||je(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Pe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Ue(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let n=0;n{this["fillType"+i]=this["fillType"+i]||n});for(let n=0;n{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=si(this[n],t[n])})}},bz=a(e=>{let t=new CL;return t.calculate(e),t},"getThemeVariables")});var no,wC=w(()=>{"use strict";rz();iz();yl();az();lz();uz();dz();pz();gz();xz();Tz();no={base:{getThemeVariables:tz},dark:{getThemeVariables:nz},default:{getThemeVariables:Zi},forest:{getThemeVariables:sz},neutral:{getThemeVariables:oz},neo:{getThemeVariables:cz},"neo-dark":{getThemeVariables:hz},redux:{getThemeVariables:fz},"redux-dark":{getThemeVariables:mz},"redux-color":{getThemeVariables:yz},"redux-dark-color":{getThemeVariables:bz}}});var ai,Cz=w(()=>{"use strict";ai={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,colorBy:"branch",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,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}});var kz,Sz,Ez,dr,Gi=w(()=>{"use strict";wC();Cz();kz={...ai,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:no.default.getThemeVariables(),sequence:{...ai.sequence,messageFont:a(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:a(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:a(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:ai.class?.theme,look:ai.class?.look,layout:ai.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...ai.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ai.c4,useWidth:void 0,personFont:a(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ai.flowchart,inheritDir:!1},external_personFont:a(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:a(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:a(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:a(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:a(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:a(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:a(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:a(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:a(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:a(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:a(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:a(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:a(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:a(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:a(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:a(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:a(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:a(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:a(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:a(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:a(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ai.pie,useWidth:984},xyChart:{...ai.xyChart,useWidth:void 0},requirement:{...ai.requirement,useWidth:void 0},packet:{...ai.packet},eventmodeling:{...ai.eventmodeling},treeView:{...ai.treeView,useWidth:void 0},radar:{...ai.radar},usecase:{...ai.usecase},railroad:{...ai.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...ai.ishikawa},sankey:{...ai.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:{...ai.venn},cynefin:{...ai.cynefin}},Sz=a((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...Sz(e[n],"")]:[...r,t+n],[]),"keyify"),Ez=new Set(Sz(kz,"")),dr=kz});var d3e,vz,wz=w(()=>{"use strict";d3e={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},vz=a(e=>d3e[e]??e,"getDiagramConfigKey")});var f3e,p3e,zp,kL,_C=w(()=>{"use strict";Gi();bt();f3e={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},p3e=a((e,t)=>{for(let r of Object.keys(e)){let n=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof n!="string"||!t.test(n))&&(H.debug("sanitize deleting dictionary entry:",r,n),delete e[r])}},"sanitizeDictionaryConfig"),zp=a(e=>{if(H.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>zp(t));return}for(let t of Object.keys(e)){if(H.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ez.has(t)||e[t]==null){H.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){let n=f3e[t];n?p3e(e[t],n):(H.debug("sanitizing object",t),zp(e[t]));continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)t.includes(n)&&(H.debug("sanitizing css option",t),e[t]=kL(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}H.debug("After sanitization",e)}},"sanitizeDirective"),kL=a(e=>{let t=0,r=0;for(let n of e){if(t{"use strict";Gp();bt();wC();Gi();wz();_C();xl=Object.freeze(dr),m3e=["theme","look","layout"],g3e=new Set(["classic","handDrawn","neo"]),y3e=a((e,t)=>e==="theme"?t==="null"||Object.hasOwn(no,t):e!=="look"||g3e.has(t),"isUsableAppearance"),x3e=a((e,t,r)=>e?[e[t]?.[r],e[r]].find(i=>i!==void 0&&y3e(r,i)):void 0,"readAppearance"),Ji=a(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Fs=Pn({},xl),AC={},Ru=[],x1=Pn({},xl),b3e=a((e,t)=>{if(!b1)return;let r=[t,...[...Ru].reverse(),AC,xl],n=e[b1];for(let i of m3e)for(let s of r){let o=x3e(s,b1,i);if(o!==void 0){e[i]=o,n?.[i]!==void 0&&(n[i]=o);break}}},"resolveAppearance"),Up=a((e,t)=>{let r=Pn({},e),n={};for(let s of t)Iz(s),n=Pn(n,s);if(r=Pn(r,n),b3e(r,n),(!!n.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(no,r.theme)){let s=Pn({},Az),o=Pn(s.themeVariables||{},n.themeVariables);r.themeVariables=no[r.theme].getThemeVariables(o)}return x1=r,C3e(x1),x1},"updateCurrentConfig"),RC=a(e=>{b1=e===void 0?void 0:vz(e),Up(Fs,Ru)},"setDiagramConfigScope"),SL=a(e=>(Fs=Pn({},xl),Fs=Pn(Fs,e),AC=Pn({},e),e.theme&&Object.hasOwn(no,e.theme)&&(Fs.themeVariables=no[e.theme].getThemeVariables(e.themeVariables)),Up(Fs,Ru),Fs),"setSiteConfig"),Rz=a(e=>{Az=Pn({},e)},"saveConfigFromInitialize"),Lz=a(e=>(Fs=Pn(Fs,e),AC=Pn(AC,e),Up(Fs,Ru),Fs),"updateSiteConfig"),EL=a(()=>Pn({},Fs),"getSiteConfig"),LC=a(e=>(Up(x1,[e]),Ct()),"setConfig"),Ct=a(()=>Pn({},x1),"getConfig"),Iz=a(e=>{e&&(["secure",...Fs.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(H.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Iz(e[t])}))},"sanitize"),Dz=a(e=>{zp(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ru.push(e),Up(Fs,Ru)},"addDirective"),T1=a((e=Fs)=>{Ru=[],b1=void 0,Up(e,Ru)},"reset"),T3e={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."},_z={},Nz=a(e=>{_z[e]||(H.warn(T3e[e]),_z[e]=!0)},"issueWarning"),C3e=a(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Nz("LAZY_LOAD_DEPRECATED")},"checkConfig"),vn=a(e=>(e.flowchart?.htmlLabels!=null&&Nz("FLOWCHART_HTML_LABELS_DEPRECATED"),Ji(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function Mz(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:S1;if(Oz&&Oz(e,null),!Iu(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let s=r(i);s!==i&&(_3e(t)||(t[n]=s),i=s)}e[i]=!0}return e}function P3e(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:Z3e(),t=a(Et=>Qz(Et),"DOMPurify");if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==Oa.document||!e.Element)return t.isSupported=!1,t;let r=e.document,n=r,i=n.currentScript;e.DocumentFragment;let s=e.HTMLTemplateElement,o=e.Node,l=e.Element,u=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let d=e.DOMParser,f=e.trustedTypes,p=l.prototype,m=Tl(p,"cloneNode"),g=Tl(p,"remove"),y=Tl(p,"nextSibling"),x=Tl(p,"childNodes"),b=Tl(p,"parentNode"),T=Tl(p,"shadowRoot"),C=Tl(p,"attributes"),v=o&&o.prototype?Tl(o.prototype,"nodeType"):null,E=o&&o.prototype?Tl(o.prototype,"nodeName"):null;if(typeof s=="function"){let Et=r.createElement("template");Et.content&&Et.content.ownerDocument&&(r=Et.content.ownerDocument)}let S,_="",A,B=!1,$=0,O=a(function(){if($>0)throw pd('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},"_assertNotInTrustedTypesPolicy"),G=a(function(be){O(),$++;try{return S.createHTML(be)}finally{$--}},"_createTrustedHTML"),I=a(function(be){O(),$++;try{return S.createScriptURL(be)}finally{$--}},"_createTrustedScriptURL"),F=a(function(){return B||(A=J3e(f,i),B=!0),A},"_getDefaultTrustedTypesPolicy"),N=r,D=N.implementation,M=N.createNodeIterator,R=N.createDocumentFragment,P=N.getElementsByTagName,V=n.importNode,U=Yz();t.isSupported=typeof Kz=="function"&&typeof b=="function"&&D&&D.createHTMLDocument!==void 0;let z=V3e,j=z3e,K=U3e,Z=W3e,ce=j3e,te=q3e,me=H3e,he=K3e,we=jz,ye=null,ke=Xr({},[...Vz,...wL,..._L,...AL,...zz]),Fe=null,Ge=Xr({},[...Uz,...RL,...Wz,...IC]),Me=Object.seal(qp(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}})),at=null,ht=null,ge=Object.seal(qp(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),De=!0,Le=!0,Ie=!1,Q=!0,ne=!1,re=!0,se=!1,fe=!1,J=null,L=null,W=!1,ae=!1,X=!1,xe=!1,ee=!0,Y=!1,q="user-content-",ve=!0,Se=!1,Ae={},Ee=null,Qe=Xr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),qe=null,lt=Xr({},["audio","video","img","source","image","track"]),Ve=null,Ye=Xr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Oe="http://www.w3.org/2000/svg",Vt="http://www.w3.org/1999/xhtml",Ce=Vt,Ut=!1,Re=null,vt=Xr({},[Je,Oe,Vt],vL),Zt=ms(["mi","mo","mn","ms","mtext"]),_t=Xr({},Zt),qt=ms(["annotation-xml"]),At=Xr({},qt),zt=Xr({},["title","style","font","a","script"]),ot=null,Rt=["application/xhtml+xml","text/html"],Ar="text/html",ie=null,xt=null,kt=r.createElement("form"),de=a(function(be){return be instanceof RegExp||be instanceof Function},"isRegexOrFunction"),Ne=a(function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(xt&&xt===be)return;(!be||typeof be!="object")&&(be={}),be=Gs(be),ot=Rt.indexOf(be.PARSER_MEDIA_TYPE)===-1?Ar:be.PARSER_MEDIA_TYPE,ie=ot==="application/xhtml+xml"?vL:S1,ye=Lu(be,"ALLOWED_TAGS",ke,{transform:ie}),Fe=Lu(be,"ALLOWED_ATTR",Ge,{transform:ie}),Re=Lu(be,"ALLOWED_NAMESPACES",vt,{transform:vL}),Ve=Lu(be,"ADD_URI_SAFE_ATTR",Ye,{transform:ie,base:Ye}),qe=Lu(be,"ADD_DATA_URI_TAGS",lt,{transform:ie,base:lt}),Ee=Lu(be,"FORBID_CONTENTS",Qe,{transform:ie}),at=Lu(be,"FORBID_TAGS",Gs({}),{transform:ie}),ht=Lu(be,"FORBID_ATTR",Gs({}),{transform:ie}),Ae=ts(be,"USE_PROFILES")?be.USE_PROFILES&&typeof be.USE_PROFILES=="object"?Gs(be.USE_PROFILES):be.USE_PROFILES:!1,De=be.ALLOW_ARIA_ATTR!==!1,Le=be.ALLOW_DATA_ATTR!==!1,Ie=be.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=be.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=be.SAFE_FOR_TEMPLATES||!1,re=be.SAFE_FOR_XML!==!1,se=be.WHOLE_DOCUMENT||!1,ae=be.RETURN_DOM||!1,X=be.RETURN_DOM_FRAGMENT||!1,xe=be.RETURN_TRUSTED_TYPE||!1,W=be.FORCE_BODY||!1,ee=be.SANITIZE_DOM!==!1,Y=be.SANITIZE_NAMED_PROPS||!1,ve=be.KEEP_CONTENT!==!1,Se=be.IN_PLACE||!1,we=$3e(be.ALLOWED_URI_REGEXP)?be.ALLOWED_URI_REGEXP:jz,Ce=typeof be.NAMESPACE=="string"?be.NAMESPACE:Vt,_t=ts(be,"MATHML_TEXT_INTEGRATION_POINTS")&&be.MATHML_TEXT_INTEGRATION_POINTS&&typeof be.MATHML_TEXT_INTEGRATION_POINTS=="object"?Gs(be.MATHML_TEXT_INTEGRATION_POINTS):Xr({},Zt),At=ts(be,"HTML_INTEGRATION_POINTS")&&be.HTML_INTEGRATION_POINTS&&typeof be.HTML_INTEGRATION_POINTS=="object"?Gs(be.HTML_INTEGRATION_POINTS):Xr({},qt);let Ke=ts(be,"CUSTOM_ELEMENT_HANDLING")&&be.CUSTOM_ELEMENT_HANDLING&&typeof be.CUSTOM_ELEMENT_HANDLING=="object"?Gs(be.CUSTOM_ELEMENT_HANDLING):qp(null);if(Me=qp(null),ts(Ke,"tagNameCheck")&&de(Ke.tagNameCheck)&&(Me.tagNameCheck=Ke.tagNameCheck),ts(Ke,"attributeNameCheck")&&de(Ke.attributeNameCheck)&&(Me.attributeNameCheck=Ke.attributeNameCheck),ts(Ke,"allowCustomizedBuiltInElements")&&typeof Ke.allowCustomizedBuiltInElements=="boolean"&&(Me.allowCustomizedBuiltInElements=Ke.allowCustomizedBuiltInElements),gs(Me),ne&&(Le=!1),X&&(ae=!0),Ae&&(ye=Xr({},zz),Fe=qp(null),Ae.html===!0&&(Xr(ye,Vz),Xr(Fe,Uz)),Ae.svg===!0&&(Xr(ye,wL),Xr(Fe,RL),Xr(Fe,IC)),Ae.svgFilters===!0&&(Xr(ye,_L),Xr(Fe,RL),Xr(Fe,IC)),Ae.mathMl===!0&&(Xr(ye,AL),Xr(Fe,Wz),Xr(Fe,IC))),ge.tagCheck=null,ge.attributeCheck=null,ts(be,"ADD_TAGS")&&(typeof be.ADD_TAGS=="function"?ge.tagCheck=be.ADD_TAGS:Iu(be.ADD_TAGS)&&(ye===ke&&(ye=Gs(ye)),Xr(ye,be.ADD_TAGS,ie))),ts(be,"ADD_ATTR")&&(typeof be.ADD_ATTR=="function"?ge.attributeCheck=be.ADD_ATTR:Iu(be.ADD_ATTR)&&(Fe===Ge&&(Fe=Gs(Fe)),Xr(Fe,be.ADD_ATTR,ie))),ts(be,"ADD_URI_SAFE_ATTR")&&Iu(be.ADD_URI_SAFE_ATTR)&&Xr(Ve,be.ADD_URI_SAFE_ATTR,ie),ts(be,"FORBID_CONTENTS")&&Iu(be.FORBID_CONTENTS)&&(Ee===Qe&&(Ee=Gs(Ee)),Xr(Ee,be.FORBID_CONTENTS,ie)),ts(be,"ADD_FORBID_CONTENTS")&&Iu(be.ADD_FORBID_CONTENTS)&&(Ee===Qe&&(Ee=Gs(Ee)),Xr(Ee,be.ADD_FORBID_CONTENTS,ie)),ve&&(ye["#text"]=!0),se&&Xr(ye,["html","head","body"]),ye.table&&(Xr(ye,["tbody"]),delete at.tbody),be.TRUSTED_TYPES_POLICY){if(typeof be.TRUSTED_TYPES_POLICY.createHTML!="function")throw pd('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof be.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pd('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let pt=S;S=be.TRUSTED_TYPES_POLICY;try{_=G("")}catch(Wt){throw S=pt,Wt}}else be.TRUSTED_TYPES_POLICY===null?(S=void 0,_=""):(S===void 0&&(S=F()),S&&typeof _=="string"&&(_=G("")));ms&&ms(be),xt=be},"_parseConfig"),nt=Xr({},[...wL,..._L,...F3e]),ft=Xr({},[...AL,...G3e]),dt=a(function(be,Ke,pt){return Ke.namespaceURI===Vt?be==="svg":Ke.namespaceURI===Je?be==="svg"&&(pt==="annotation-xml"||_t[pt]):!!nt[be]},"_checkSvgNamespace"),cr=a(function(be,Ke,pt){return Ke.namespaceURI===Vt?be==="math":Ke.namespaceURI===Oe?be==="math"&&At[pt]:!!ft[be]},"_checkMathMlNamespace"),$e=a(function(be,Ke,pt){return Ke.namespaceURI===Oe&&!At[pt]||Ke.namespaceURI===Je&&!_t[pt]?!1:!ft[be]&&(zt[be]||!nt[be])},"_checkHtmlNamespace"),it=a(function(be){let Ke=b(be);(!Ke||!Ke.tagName)&&(Ke={namespaceURI:Ce,tagName:"template"});let pt=S1(be.tagName),Wt=S1(Ke.tagName);return Re[be.namespaceURI]?be.namespaceURI===Oe?dt(pt,Ke,Wt):be.namespaceURI===Je?cr(pt,Ke,Wt):be.namespaceURI===Vt?$e(pt,Ke,Wt):!!(ot==="application/xhtml+xml"&&Re[be.namespaceURI]):!1},"_checkValidNamespace"),mt=a(function(be){jp(t.removed,{element:be});try{b(be).removeChild(be)}catch{if(g(be),!b(be))throw pd("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},"_forceRemove"),wt=a(function(be){mr(be);let Ke=x(be);if(Ke){let Wt=[];Wp(Ke,Bt=>{jp(Wt,Bt)}),Wp(Wt,Bt=>{try{g(Bt)}catch{}})}let pt=C(be);if(pt)for(let Wt=pt.length-1;Wt>=0;--Wt){let Bt=pt[Wt],Ht=Bt&&Bt.name;if(typeof Ht=="string")try{be.removeAttribute(Ht)}catch{}}},"_neutralizeRoot"),Dt=a(function(be,Ke){try{jp(t.removed,{attribute:Ke.getAttributeNode(be),from:Ke})}catch{jp(t.removed,{attribute:null,from:Ke})}if(Ke.removeAttribute(be),be==="is")if(ae||X)try{mt(Ke)}catch{}else try{Ke.setAttribute(be,"")}catch{}},"_removeAttribute"),Jt=a(function(be){let Ke=C(be);if(Ke)for(let pt=Ke.length-1;pt>=0;--pt){let Wt=Ke[pt],Bt=Wt&&Wt.name;if(!(typeof Bt!="string"||Fe[ie(Bt)]))try{be.removeAttribute(Bt)}catch{}}},"_stripDisallowedAttributes"),mr=a(function(be){let Ke=[be];for(;Ke.length>0;){let pt=Ke.pop();(v?v(pt):pt.nodeType)===Oa.element&&Jt(pt);let Bt=x(pt);if(Bt)for(let Ht=Bt.length-1;Ht>=0;--Ht)Ke.push(Bt[Ht])}},"_neutralizeSubtree"),ar=a(function(be){if(!re)return;let Ke=[be];for(;Ke.length>0;){let pt=Ke.pop(),Wt=v?v(pt):pt.nodeType;if(Wt===Oa.processingInstruction||Wt===Oa.comment&&es(Hz,pt.data)){try{g(pt)}catch{}continue}if(Wt===Oa.element){let Ht=pt,En=ie(E?E(pt):pt.nodeName);try{Ht.hasAttribute&&Ht.hasAttribute("patchsrc")&&Ht.removeAttribute("patchsrc"),Ht.hasAttribute&&Ht.hasAttribute("for")&&En!=="label"&&En!=="output"&&Ht.removeAttribute("for")}catch{}}let Bt=x(pt);if(Bt)for(let Ht=Bt.length-1;Ht>=0;--Ht)Ke.push(Bt[Ht])}},"_neutralizePatchLinkage"),Yt=a(function(be){let Ke=null,pt=null;if(W)be=""+be;else{let Ht=Bz(be,/^[\r\n\t ]+/);pt=Ht&&Ht[0]}ot==="application/xhtml+xml"&&Ce===Vt&&(be=''+be+"");let Wt=S?G(be):be;if(Ce===Vt)try{Ke=new d().parseFromString(Wt,ot)}catch{}if(!Ke||!Ke.documentElement){Ke=D.createDocument(Ce,"template",null);try{Ke.documentElement.innerHTML=Ut?_:Wt}catch{}}let Bt=Ke.body||Ke.documentElement;return be&&pt&&Bt.insertBefore(r.createTextNode(pt),Bt.childNodes[0]||null),Ce===Vt?P.call(Ke,se?"html":"body")[0]:se?Ke.documentElement:Bt},"_initDocument"),St=a(function(be){return M.call(be.ownerDocument||be,be,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Lt=a(function(be){return be=C1(be,z," "),be=C1(be,j," "),be=C1(be,K," "),be},"_stripTemplateExpressions"),Pt=a(function(be){var Ke;be.normalize();let pt=M.call(be.ownerDocument||be,be,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),Wt=pt.nextNode();for(;Wt;)Wt.data=Lt(Wt.data),Wt=pt.nextNode();let Bt=(Ke=be.querySelectorAll)===null||Ke===void 0?void 0:Ke.call(be,"template");Bt&&Wp(Bt,Ht=>{Kt(Ht.content)&&Pt(Ht.content)})},"_scrubTemplateExpressions"),yt=a(function(be){let Ke=E?E(be):null;return typeof Ke!="string"||ie(Ke)!=="form"?!1:typeof be.nodeName!="string"||typeof be.textContent!="string"||typeof be.removeChild!="function"||be.attributes!==C(be)||typeof be.removeAttribute!="function"||typeof be.setAttribute!="function"||typeof be.namespaceURI!="string"||typeof be.insertBefore!="function"||typeof be.hasChildNodes!="function"||be.nodeType!==v(be)||be.childNodes!==x(be)},"_isClobbered"),Kt=a(function(be){if(!v||typeof be!="object"||be===null)return!1;try{return v(be)===Oa.documentFragment}catch{return!1}},"_isDocumentFragment"),pe=a(function(be){if(!v||typeof be!="object"||be===null)return!1;try{return typeof v(be)=="number"}catch{return!1}},"_isNode");function Wr(Et,be,Ke){Et.length!==0&&Wp(Et,pt=>{pt.call(t,be,Ke,xt)})}a(Wr,"_executeHooks");let Te=a(function(be,Ke){return!!(re&&be.hasChildNodes()&&!pe(be.firstElementChild)&&es(qz,be.textContent)&&es(qz,be.innerHTML)||re&&be.namespaceURI===Vt&&Ke==="style"&&pe(be.firstElementChild)||be.nodeType===Oa.processingInstruction||re&&be.nodeType===Oa.comment&&es(Hz,be.data))},"_isUnsafeNode"),nr=a(function(be,Ke){if(!at[Ke]&&ze(Ke)&&(Me.tagNameCheck instanceof RegExp&&es(Me.tagNameCheck,Ke)||Me.tagNameCheck instanceof Function&&Me.tagNameCheck(Ke)))return!1;if(ve&&!Ee[Ke]){let pt=b(be),Wt=x(be);if(Wt&&pt){let Bt=Wt.length;for(let Ht=Bt-1;Ht>=0;--Ht){let En=Se?Wt[Ht]:m(Wt[Ht],!0);pt.insertBefore(En,y(be))}}}return mt(be),!0},"_sanitizeDisallowedNode"),Mt=a(function(be,Ke){if(Wr(U.beforeSanitizeElements,be,null),be!==Ke&&b(be)===null)return!0;if(yt(be))return mt(be),!0;let pt=ie(E?E(be):be.nodeName);if(Wr(U.uponSanitizeElement,be,{tagName:pt,allowedTags:ye}),be!==Ke&&b(be)===null)return!0;if(Te(be,pt))return mt(be),!0;if(at[pt]||!(ge.tagCheck instanceof Function&&ge.tagCheck(pt))&&!ye[pt]){let Bt=nr(be,pt);return Bt===!1&&Wr(U.afterSanitizeElements,be,null),Bt}if((v?v(be):be.nodeType)===Oa.element&&!it(be)||(pt==="noscript"||pt==="noembed"||pt==="noframes")&&es(X3e,be.innerHTML))return mt(be),!0;if(ne&&be.nodeType===Oa.text){let Bt=Lt(be.textContent);be.textContent!==Bt&&(jp(t.removed,{element:be.cloneNode()}),be.textContent=Bt)}return Wr(U.afterSanitizeElements,be,null),!1},"_sanitizeElements"),er=a(function(be,Ke,pt){if(ht[Ke]||re&&Ke==="patchsrc"||re&&Ke==="for"&&be!=="label"&&be!=="output"||ee&&(Ke==="id"||Ke==="name")&&(pt in r||pt in kt))return!1;let Wt=Fe[Ke]||ge.attributeCheck instanceof Function&&ge.attributeCheck(Ke,be);if(!(Le&&es(Z,Ke))){if(!(De&&es(ce,Ke))){if(Wt){if(!Ve[Ke]){if(!es(we,C1(pt,me,""))){if(!((Ke==="src"||Ke==="xlink:href"||Ke==="href")&&be!=="script"&&$z(pt,"data:")===0&&qe[be])){if(!(Ie&&!es(te,C1(pt,me,"")))){if(pt)return!1}}}}}else if(!(ze(be)&&(Me.tagNameCheck instanceof RegExp&&es(Me.tagNameCheck,be)||Me.tagNameCheck instanceof Function&&Me.tagNameCheck(be))&&(Me.attributeNameCheck instanceof RegExp&&es(Me.attributeNameCheck,Ke)||Me.attributeNameCheck instanceof Function&&Me.attributeNameCheck(Ke,be))||Ke==="is"&&Me.allowCustomizedBuiltInElements&&(Me.tagNameCheck instanceof RegExp&&es(Me.tagNameCheck,pt)||Me.tagNameCheck instanceof Function&&Me.tagNameCheck(pt))))return!1}}return!0},"_isValidAttribute"),ur=Xr({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ze=a(function(be){return!ur[S1(be)]&&es(he,be)},"_isBasicCustomElement"),Jr=a(function(be,Ke,pt,Wt){if(S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!pt)switch(f.getAttributeType(be,Ke)){case"TrustedHTML":return G(Wt);case"TrustedScriptURL":return I(Wt)}return Wt},"_applyTrustedTypesToAttribute"),le=a(function(be,Ke,pt,Wt){try{pt?be.setAttributeNS(pt,Ke,Wt):be.setAttribute(Ke,Wt),yt(be)?mt(be):Pz(t.removed)}catch{Dt(Ke,be)}},"_setAttributeValue"),Er=a(function(be){Wr(U.beforeSanitizeAttributes,be,null);let Ke=be.attributes;if(!Ke||yt(be))return;let pt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Fe,forceKeepAttr:void 0},Wt=Ke.length,Bt=ie(be.nodeName);for(;Wt--;){let Ht=Ke[Wt],En=Ht.name,zn=Ht.namespaceURI,wi=Ht.value,_i=ie(En),Xn=wi,Kr=En==="value"?Xn:D3e(Xn);if(pt.attrName=_i,pt.attrValue=Kr,pt.keepAttr=!0,pt.forceKeepAttr=void 0,Wr(U.uponSanitizeAttribute,be,pt),Kr=pt.attrValue,Y&&(_i==="id"||_i==="name")&&$z(Kr,q)!==0&&(Dt(En,be),Kr=q+Kr),re&&es(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Kr)){Dt(En,be);continue}if(_i==="attributename"&&Bz(Kr,"href")){Dt(En,be);continue}if(!pt.forceKeepAttr){if(!pt.keepAttr){Dt(En,be);continue}if(!Q&&es(Q3e,Kr)){Dt(En,be);continue}if(ne&&(Kr=Lt(Kr)),!er(Bt,_i,Kr)){Dt(En,be);continue}Kr=Jr(Bt,_i,zn,Kr),Kr!==Xn&&le(be,En,zn,Kr)}}Wr(U.afterSanitizeAttributes,be,null)},"_sanitizeAttributes"),ue=a(function(be){let Ke=null,pt=St(be);for(Wr(U.beforeSanitizeShadowDOM,be,null);Ke=pt.nextNode();)if(Wr(U.uponSanitizeShadowNode,Ke,null),Mt(Ke,be),Er(Ke),Kt(Ke.content)&&ue(Ke.content),(v?v(Ke):Ke.nodeType)===Oa.element){let Bt=T(Ke);Kt(Bt)&&(Gr(Bt),ue(Bt))}Wr(U.afterSanitizeShadowDOM,be,null)},"_sanitizeShadowDOM"),Gr=a(function(be){let Ke=[{node:be,shadow:null}];for(;Ke.length>0;){let pt=Ke.pop();if(pt.shadow){ue(pt.shadow);continue}let Wt=pt.node,Ht=(v?v(Wt):Wt.nodeType)===Oa.element,En=x(Wt);if(En)for(let zn=En.length-1;zn>=0;--zn)Ke.push({node:En[zn],shadow:null});if(Ht){let zn=E?E(Wt):null;if(typeof zn=="string"&&ie(zn)==="template"){let wi=Wt.content;Kt(wi)&&Ke.push({node:wi,shadow:null})}}if(Ht){let zn=T(Wt);Kt(zn)&&Ke.push({node:null,shadow:zn},{node:zn,shadow:null})}}},"_sanitizeAttachedShadowRoots");return t.sanitize=function(Et){let be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ke=null,pt=null,Wt=null,Bt=null;if(Ut=!Et,Ut&&(Et=""),typeof Et!="string"&&!pe(Et)&&(Et=B3e(Et),typeof Et!="string"))throw pd("dirty is not a string, aborting");if(!t.isSupported)return Et;fe?(ye=J,Fe=L):Ne(be),(U.uponSanitizeElement.length>0||U.uponSanitizeAttribute.length>0)&&(ye=Gs(ye)),U.uponSanitizeAttribute.length>0&&(Fe=Gs(Fe)),t.removed=[];let Ht=Se&&typeof Et!="string"&&pe(Et);if(Ht){ar(Et);let _i=E?E(Et):Et.nodeName;if(typeof _i=="string"){let Xn=ie(_i);if(!ye[Xn]||at[Xn])throw wt(Et),pd("root node is forbidden and cannot be sanitized in-place")}if(yt(Et))throw wt(Et),pd("root node is clobbered and cannot be sanitized in-place");try{Gr(Et)}catch(Xn){throw wt(Et),Xn}}else if(pe(Et))Ke=Yt(""),pt=Ke.ownerDocument.importNode(Et,!0),pt.nodeType===Oa.element&&pt.nodeName==="BODY"||pt.nodeName==="HTML"?Ke=pt:Ke.appendChild(pt),Gr(pt);else{if(!ae&&!ne&&!se&&Et.indexOf("<")===-1)return S&&xe?G(Et):Et;if(Ke=Yt(Et),!Ke)return ae?null:xe?_:""}Ke&&W&&mt(Ke.firstChild);let En=Ht?Et:Ke,zn=St(En);try{for(;Wt=zn.nextNode();)Mt(Wt,En),Er(Wt),Kt(Wt.content)&&ue(Wt.content)}catch(_i){throw Ht&&(wt(Et),Wp(t.removed,Xn=>{Xn.element&&mr(Xn.element)})),_i}if(Ht)return Wp(t.removed,_i=>{_i.element&&mr(_i.element)}),ne&&Pt(Et),Et;if(ae){if(ne&&Pt(Ke),X)for(Bt=R.call(Ke.ownerDocument);Ke.firstChild;)Bt.appendChild(Ke.firstChild);else Bt=Ke;return(Fe.shadowroot||Fe.shadowrootmode)&&(Bt=V.call(n,Bt,!0)),Bt}let wi=se?Ke.outerHTML:Ke.innerHTML;return se&&ye["!doctype"]&&Ke.ownerDocument&&Ke.ownerDocument.doctype&&Ke.ownerDocument.doctype.name&&es(Y3e,Ke.ownerDocument.doctype.name)&&(wi=" +`+wi),ne&&(wi=Lt(wi)),S&&xe?G(wi):wi},t.setConfig=function(){let Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ne(Et),fe=!0,J=ye,L=Fe},t.clearConfig=function(){xt=null,fe=!1,J=null,L=null,S=A,_=""},t.isValidAttribute=function(Et,be,Ke){xt||Ne({});let pt=ie(Et),Wt=ie(be);return er(pt,Wt,Ke)},t.addHook=function(Et,be){typeof be=="function"&&ts(U,Et)&&jp(U[Et],be)},t.removeHook=function(Et,be){if(ts(U,Et)){if(be!==void 0){let Ke=L3e(U[Et],be);return Ke===-1?void 0:I3e(U[Et],Ke,1)[0]}return Pz(U[Et])}},t.removeHooks=function(Et){ts(U,Et)&&(U[Et]=[])},t.removeAllHooks=function(){U=Yz()},t}var Kz,Oz,_3e,A3e,R3e,ms,gs,qp,Xz,LL,IL,Wp,L3e,Pz,jp,I3e,Iu,S1,vL,Bz,C1,$z,D3e,N3e,M3e,Fz,Gz,ts,k1,es,pd,Vz,wL,_L,F3e,AL,G3e,zz,Uz,RL,Wz,IC,V3e,z3e,U3e,W3e,j3e,jz,q3e,H3e,Y3e,K3e,qz,Hz,X3e,Q3e,Oa,Z3e,J3e,Yz,Lu,Es,md=w(()=>{"use strict";a(Mz,"_arrayLikeToArray");a(k3e,"_arrayWithHoles");a(S3e,"_iterableToArrayLimit");a(E3e,"_nonIterableRest");a(v3e,"_slicedToArray");a(w3e,"_unsupportedIterableToArray");Kz=Object.entries,Oz=Object.setPrototypeOf,_3e=Object.isFrozen,A3e=Object.getPrototypeOf,R3e=Object.getOwnPropertyDescriptor,ms=Object.freeze,gs=Object.seal,qp=Object.create,Xz=typeof Reflect<"u"&&Reflect,LL=Xz.apply,IL=Xz.construct;ms||(ms=a(function(t){return t},"freeze"));gs||(gs=a(function(t){return t},"seal"));LL||(LL=a(function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s1?r-1:0),i=1;i"u"?null:Ii(BigInt.prototype.toString),Gz=typeof Symbol>"u"?null:Ii(Symbol.prototype.toString),ts=Ii(Object.prototype.hasOwnProperty),k1=Ii(Object.prototype.toString),es=Ii(RegExp.prototype.test),pd=O3e(TypeError);a(Ii,"unapply");a(O3e,"unconstruct");a(Xr,"addToSet");a(P3e,"cleanArray");a(Gs,"clone");a(B3e,"stringifyValue");a(Tl,"lookupGetter");a($3e,"isRegex");Vz=ms(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),wL=ms(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_L=ms(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F3e=ms(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),AL=ms(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),G3e=ms(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zz=ms(["#text"]),Uz=ms(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),RL=ms(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wz=ms(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),IC=ms(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V3e=gs(/{{[\w\W]*|^[\w\W]*}}/g),z3e=gs(/<%[\w\W]*|^[\w\W]*%>/g),U3e=gs(/\${[\w\W]*/g),W3e=gs(/^data-[\-\w.\u00B7-\uFFFF]+$/),j3e=gs(/^aria-[\-\w]+$/),jz=gs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q3e=gs(/^(?:\w+script|data):/i),H3e=gs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y3e=gs(/^html$/i),K3e=gs(/^[a-z][.\w]*(-[.\w]+)+$/i),qz=gs(/<[/\w!]/g),Hz=gs(/<[/\w]/g),X3e=gs(/<\/no(script|embed|frames)/i),Q3e=gs(/\/>/i),Oa={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Z3e=a(function(){return typeof window>"u"?null:window},"getGlobal"),J3e=a(function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},"_createTrustedTypesPolicy"),Yz=a(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),Lu=a(function(t,r,n,i){return ts(t,r)&&Iu(t[r])?Xr(i.base?Gs(i.base):{},t[r],i.transform):n},"_resolveSetOption");a(Qz,"createDOMPurify");Es=Qz()});function nIe(){let e="data-temp-href-target";Es.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Es.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}var Hp,eIe,tIe,rIe,Jz,Zz,vr,iIe,sIe,aIe,oIe,eU,ML,lIe,cIe,Cl,DL,uIe,hIe,dIe,NL,Un,gd,fIe,Yp,gt,Ir=w(()=>{"use strict";md();Tr();Hp=/<\/?br\s*\/?>/gi,eIe=new RegExp(Hp.source,"i"),tIe=a(e=>e?eU(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),rIe=(()=>{let e=!1;return()=>{e||(nIe(),e=!0)}})();a(nIe,"setupDompurifyHooks");Jz=a(e=>(rIe(),Es.sanitize(e)),"removeScript"),Zz=a((e,t)=>{if(vn(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Jz(e):r!=="loose"&&(e=eU(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=oIe(e))}return e},"sanitizeMore"),vr=a((e,t)=>e&&(t.dompurifyConfig?e=Es.sanitize(Zz(e,t),t.dompurifyConfig).toString():e=Es.sanitize(Zz(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),iIe=a((e,t)=>typeof e=="string"?vr(e,t):e.flat().map(r=>vr(r,t)),"sanitizeTextOrArray"),sIe=a(e=>eIe.test(e),"hasBreaks"),aIe=a(e=>e.split(Hp),"splitBreaks"),oIe=a(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),eU=a(e=>e.replace(Hp,"#br#"),"breakToPlaceholder"),ML=a(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),lIe=a(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),cIe=a(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Cl=a(function(e){let t=e.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,e.split(t).length-1),"countOccurrence"),uIe=a((e,t)=>{let r=DL(e,"~"),n=DL(t,"~");return r===1&&n===1},"shouldCombineSets"),hIe=a(e=>{let t=DL(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),s=n.lastIndexOf("~");for(;i!==-1&&s!==-1&&i!==s;)n[i]="<",n[s]=">",i=n.indexOf("~"),s=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),dIe=a(()=>window.MathMLElement!==void 0,"isMathMLSupported"),NL=/\$\$(.*?)\$\$/g,Un=a(e=>(e.match(NL)?.length??0)>0,"hasKatex"),gd=a(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await Yp(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),fIe=a(async(e,t)=>Un(e)?dIe()||t.legacyMathML||t.forceLegacyMathML?e.replace(NL,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library."):e.replace(NL,"MathML is unsupported in this environment."):e,"renderKatexUnsanitized"),Yp=a(async(e,t)=>vr(await fIe(e,t),t),"renderKatexSanitized"),gt={getRows:tIe,sanitizeText:vr,sanitizeTextOrArray:iIe,hasBreaks:sIe,splitBreaks:aIe,lineBreakRegex:Hp,removeScript:Jz,getUrl:ML,evaluate:Ji,getMax:lIe,getMin:cIe}});var pIe,OL,tU,DC,rU,NC,na,Sc=w(()=>{"use strict";SV();Tr();Ir();bt();pIe={body:'?',height:80,width:80},OL=new Map,tU=new Map,DC=a(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(H.debug("Registering icon pack:",t.name),"loader"in t)tU.set(t.name,t.loader);else if("icons"in t)OL.set(t.name,t.icons);else throw H.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),rU=a(async(e,t)=>{let r=KR(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=OL.get(n);if(!i){let o=tU.get(n);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await o(),prefix:n},OL.set(n,i)}catch(l){throw H.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let s=QR(i,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),NC=a(async e=>{try{return await rU(e),!0}catch{return!1}},"isIconAvailable"),na=a(async(e,t,r)=>{let n;try{n=await rU(e,t?.fallbackPrefix)}catch(o){H.error(o),n=pIe}let i=JR(n,t),s=tL(eL(i.body),{...i.attributes,...r});return vr(s,Ct())},"getIconSVG")});function MC(e){for(var t=[],r=1;r{"use strict";a(MC,"dedent")});var yd,PC,nU,OC,mIe,BC,$C=w(()=>{"use strict";yd=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,PC=/\s/,nU=a(e=>{let t="",r=0,n=0;for(;nr&&PC.test(e[o-1]);)o--;t+=e.slice(r,o)+` +`,r=s+1,n=r}return t+e.slice(r)},"stripAnyComments"),OC=a(e=>e===` +`||e==="\r","isLineBreak"),mIe=a((e,t)=>{let r=-1;for(let n=t;n{let t=0;for(;tOC(e[d])&&e.startsWith(i,d+1)?mIe(e,d+1+i.length):-1,"closingEnd"),o=n[0]+1,l=-1;for(let d=o;d{"use strict";Kp=class extends Error{static{a(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}});var Ec,Du,FC,$L,iU,Nu=w(()=>{"use strict";bt();$C();BL();Ec={},Du=a(function(e,t){let r=BC(e);e=nU((r?e.slice(r.length):e).replace(yd,""));for(let[n,{detector:i}]of Object.entries(Ec))if(i(e,t))return n;throw new Kp(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),FC=a((...e)=>{for(let{id:t,detector:r,loader:n}of e)$L(t,r,n)},"registerLazyLoadedDiagrams"),$L=a((e,t,r)=>{Ec[e]&&H.warn(`Detector with key ${e} already exists. Overwriting.`),Ec[e]={detector:t,loader:r},H.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),iU=a(e=>Ec[e].loader,"getDiagramLoader")});var E1,sU,FL=w(()=>{"use strict";E1=(function(){var e=a(function(ne,re,se,fe){for(se=se||{},fe=ne.length;fe--;se[ne[fe]]=re);return se},"o"),t=[1,24],r=[1,25],n=[1,26],i=[1,27],s=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],x=[1,32],b=[1,33],T=[1,34],C=[1,35],v=[1,36],E=[1,37],S=[1,38],_=[1,39],A=[1,40],B=[1,41],$=[1,42],O=[1,43],G=[1,44],I=[1,45],F=[1,46],N=[1,47],D=[1,48],M=[1,50],R=[1,51],P=[1,52],V=[1,53],U=[1,54],z=[1,55],j=[1,56],K=[1,57],Z=[1,58],ce=[1,59],te=[1,60],me=[14,42],he=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],we=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ye=[1,82],ke=[1,83],Fe=[1,84],Ge=[1,85],Me=[12,14,42],at=[12,14,33,42],ht=[12,14,33,42,76,77,79,80],ge=[12,33],De=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Le={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:a(function(re,se,fe,J,L,W,ae){var X=W.length-1;switch(L){case 3:J.setDirection("TB");break;case 4:J.setDirection("BT");break;case 5:J.setDirection("RL");break;case 6:J.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:J.setC4Type(W[X-3]);break;case 19:J.setTitle(W[X].substring(6)),this.$=W[X].substring(6);break;case 20:J.setAccDescription(W[X].substring(15)),this.$=W[X].substring(15);break;case 21:this.$=W[X].trim(),J.setTitle(this.$);break;case 22:case 23:this.$=W[X].trim(),J.setAccDescription(this.$);break;case 28:W[X].splice(2,0,"ENTERPRISE"),J.addPersonOrSystemBoundary(...W[X]),this.$=W[X];break;case 29:W[X].splice(2,0,"SYSTEM"),J.addPersonOrSystemBoundary(...W[X]),this.$=W[X];break;case 30:J.addPersonOrSystemBoundary(...W[X]),this.$=W[X];break;case 31:W[X].splice(2,0,"CONTAINER"),J.addContainerBoundary(...W[X]),this.$=W[X];break;case 32:J.addDeploymentNode("node",...W[X]),this.$=W[X];break;case 33:J.addDeploymentNode("nodeL",...W[X]),this.$=W[X];break;case 34:J.addDeploymentNode("nodeR",...W[X]),this.$=W[X];break;case 35:J.popBoundaryParseStack();break;case 39:J.addPersonOrSystem("person",...W[X]),this.$=W[X];break;case 40:J.addPersonOrSystem("external_person",...W[X]),this.$=W[X];break;case 41:J.addPersonOrSystem("system",...W[X]),this.$=W[X];break;case 42:J.addPersonOrSystem("system_db",...W[X]),this.$=W[X];break;case 43:J.addPersonOrSystem("system_queue",...W[X]),this.$=W[X];break;case 44:J.addPersonOrSystem("external_system",...W[X]),this.$=W[X];break;case 45:J.addPersonOrSystem("external_system_db",...W[X]),this.$=W[X];break;case 46:J.addPersonOrSystem("external_system_queue",...W[X]),this.$=W[X];break;case 47:J.addContainer("container",...W[X]),this.$=W[X];break;case 48:J.addContainer("container_db",...W[X]),this.$=W[X];break;case 49:J.addContainer("container_queue",...W[X]),this.$=W[X];break;case 50:J.addContainer("external_container",...W[X]),this.$=W[X];break;case 51:J.addContainer("external_container_db",...W[X]),this.$=W[X];break;case 52:J.addContainer("external_container_queue",...W[X]),this.$=W[X];break;case 53:J.addComponent("component",...W[X]),this.$=W[X];break;case 54:J.addComponent("component_db",...W[X]),this.$=W[X];break;case 55:J.addComponent("component_queue",...W[X]),this.$=W[X];break;case 56:J.addComponent("external_component",...W[X]),this.$=W[X];break;case 57:J.addComponent("external_component_db",...W[X]),this.$=W[X];break;case 58:J.addComponent("external_component_queue",...W[X]),this.$=W[X];break;case 60:J.addRel("rel",...W[X]),this.$=W[X];break;case 61:J.addRel("birel",...W[X]),this.$=W[X];break;case 62:J.addRel("rel_u",...W[X]),this.$=W[X];break;case 63:J.addRel("rel_d",...W[X]),this.$=W[X];break;case 64:J.addRel("rel_l",...W[X]),this.$=W[X];break;case 65:J.addRel("rel_r",...W[X]),this.$=W[X];break;case 66:J.addRel("rel_b",...W[X]),this.$=W[X];break;case 67:W[X].splice(0,1),J.addRel("rel",...W[X]),this.$=W[X];break;case 68:J.updateElStyle("update_el_style",...W[X]),this.$=W[X];break;case 69:J.updateRelStyle("update_rel_style",...W[X]),this.$=W[X];break;case 70:J.updateLayoutConfig("update_layout_config",...W[X]),this.$=W[X];break;case 71:this.$=[W[X]];break;case 72:W[X].unshift(W[X-1]),this.$=W[X];break;case 73:case 75:this.$=W[X].trim();break;case 74:let xe={};xe[W[X-1].trim()]=W[X].trim(),this.$=xe;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te},{13:70,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te},{13:71,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te},{13:72,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te},{13:73,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:s,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te},{14:[1,74]},e(me,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te}),e(me,[2,14]),e(he,[2,16],{12:[1,76]}),e(me,[2,36],{12:[1,77]}),e(we,[2,19]),e(we,[2,20]),{25:[1,78]},{27:[1,79]},e(we,[2,23]),{35:80,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:86,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:87,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:88,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:89,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:90,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:91,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:92,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:93,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:94,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:95,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:96,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:97,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:98,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:99,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:100,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:101,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:102,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:103,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:104,75:81,76:ye,77:ke,79:Fe,80:Ge},e(Me,[2,59]),{35:105,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:106,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:107,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:108,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:109,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:110,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:111,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:112,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:113,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:114,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:115,75:81,76:ye,77:ke,79:Fe,80:Ge},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te},{12:[1,118],33:[1,117]},{35:119,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:120,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:121,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:122,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:123,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:124,75:81,76:ye,77:ke,79:Fe,80:Ge},{35:125,75:81,76:ye,77:ke,79:Fe,80:Ge},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(me,[2,15]),e(he,[2,17],{21:22,19:130,22:t,23:r,24:n,26:i,28:s}),e(me,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:n,26:i,28:s,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:x,48:b,49:T,50:C,51:v,52:E,53:S,54:_,55:A,56:B,57:$,58:O,59:G,60:I,61:F,62:N,63:D,64:M,65:R,66:P,67:V,68:U,69:z,70:j,71:K,72:Z,73:ce,74:te}),e(we,[2,21]),e(we,[2,22]),e(Me,[2,39]),e(at,[2,71],{75:81,35:132,76:ye,77:ke,79:Fe,80:Ge}),e(ht,[2,73]),{78:[1,133]},e(ht,[2,75]),e(ht,[2,76]),e(Me,[2,40]),e(Me,[2,41]),e(Me,[2,42]),e(Me,[2,43]),e(Me,[2,44]),e(Me,[2,45]),e(Me,[2,46]),e(Me,[2,47]),e(Me,[2,48]),e(Me,[2,49]),e(Me,[2,50]),e(Me,[2,51]),e(Me,[2,52]),e(Me,[2,53]),e(Me,[2,54]),e(Me,[2,55]),e(Me,[2,56]),e(Me,[2,57]),e(Me,[2,58]),e(Me,[2,60]),e(Me,[2,61]),e(Me,[2,62]),e(Me,[2,63]),e(Me,[2,64]),e(Me,[2,65]),e(Me,[2,66]),e(Me,[2,67]),e(Me,[2,68]),e(Me,[2,69]),e(Me,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ge,[2,28]),e(ge,[2,29]),e(ge,[2,30]),e(ge,[2,31]),e(ge,[2,32]),e(ge,[2,33]),e(ge,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(he,[2,18]),e(me,[2,38]),e(at,[2,72]),e(ht,[2,74]),e(Me,[2,24]),e(Me,[2,35]),e(De,[2,25]),e(De,[2,26],{12:[1,138]}),e(De,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:a(function(re,se){if(se.recoverable)this.trace(re);else{var fe=new Error(re);throw fe.hash=se,fe}},"parseError"),parse:a(function(re){var se=this,fe=[0],J=[],L=[null],W=[],ae=this.table,X="",xe=0,ee=0,Y=0,q=2,ve=1,Se=W.slice.call(arguments,1),Ae=Object.create(this.lexer),Ee={yy:{}};for(var Qe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qe)&&(Ee.yy[Qe]=this.yy[Qe]);Ae.setInput(re,Ee.yy),Ee.yy.lexer=Ae,Ee.yy.parser=this,typeof Ae.yylloc>"u"&&(Ae.yylloc={});var qe=Ae.yylloc;W.push(qe);var lt=Ae.options&&Ae.options.ranges;typeof Ee.yy.parseError=="function"?this.parseError=Ee.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ve(ot){fe.length=fe.length-2*ot,L.length=L.length-ot,W.length=W.length-ot}a(Ve,"popStack");function Ye(){var ot;return ot=J.pop()||Ae.lex()||ve,typeof ot!="number"&&(ot instanceof Array&&(J=ot,ot=J.pop()),ot=se.symbols_[ot]||ot),ot}a(Ye,"lex");for(var Je,Oe,Vt,Ce,Ut,Re,vt={},Zt,_t,qt,At;;){if(Vt=fe[fe.length-1],this.defaultActions[Vt]?Ce=this.defaultActions[Vt]:((Je===null||typeof Je>"u")&&(Je=Ye()),Ce=ae[Vt]&&ae[Vt][Je]),typeof Ce>"u"||!Ce.length||!Ce[0]){var zt="";At=[];for(Zt in ae[Vt])this.terminals_[Zt]&&Zt>q&&At.push("'"+this.terminals_[Zt]+"'");Ae.showPosition?zt="Parse error on line "+(xe+1)+`: +`+Ae.showPosition()+` +Expecting `+At.join(", ")+", got '"+(this.terminals_[Je]||Je)+"'":zt="Parse error on line "+(xe+1)+": Unexpected "+(Je==ve?"end of input":"'"+(this.terminals_[Je]||Je)+"'"),this.parseError(zt,{text:Ae.match,token:this.terminals_[Je]||Je,line:Ae.yylineno,loc:qe,expected:At})}if(Ce[0]instanceof Array&&Ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Vt+", token: "+Je);switch(Ce[0]){case 1:fe.push(Je),L.push(Ae.yytext),W.push(Ae.yylloc),fe.push(Ce[1]),Je=null,Oe?(Je=Oe,Oe=null):(ee=Ae.yyleng,X=Ae.yytext,xe=Ae.yylineno,qe=Ae.yylloc,Y>0&&Y--);break;case 2:if(_t=this.productions_[Ce[1]][1],vt.$=L[L.length-_t],vt._$={first_line:W[W.length-(_t||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(_t||1)].first_column,last_column:W[W.length-1].last_column},lt&&(vt._$.range=[W[W.length-(_t||1)].range[0],W[W.length-1].range[1]]),Re=this.performAction.apply(vt,[X,ee,xe,Ee.yy,Ce[1],L,W].concat(Se)),typeof Re<"u")return Re;_t&&(fe=fe.slice(0,-1*_t*2),L=L.slice(0,-1*_t),W=W.slice(0,-1*_t)),fe.push(this.productions_[Ce[1]][0]),L.push(vt.$),W.push(vt._$),qt=ae[fe[fe.length-2]][fe[fe.length-1]],fe.push(qt);break;case 3:return!0}}return!0},"parse")},Ie=(function(){var ne={EOF:1,parseError:a(function(se,fe){if(this.yy.parser)this.yy.parser.parseError(se,fe);else throw new Error(se)},"parseError"),setInput:a(function(re,se){return this.yy=se||this.yy||{},this._input=re,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var re=this._input[0];this.yytext+=re,this.yyleng++,this.offset++,this.match+=re,this.matched+=re;var se=re.match(/(?:\r\n?|\n).*/g);return se?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),re},"input"),unput:a(function(re){var se=re.length,fe=re.split(/(?:\r\n?|\n)/g);this._input=re+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-se),this.offset-=se;var J=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),fe.length-1&&(this.yylineno-=fe.length-1);var L=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:fe?(fe.length===J.length?this.yylloc.first_column:0)+J[J.length-fe.length].length-fe[0].length:this.yylloc.first_column-se},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-se]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(re){this.unput(this.match.slice(re))},"less"),pastInput:a(function(){var re=this.matched.substr(0,this.matched.length-this.match.length);return(re.length>20?"...":"")+re.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var re=this.match;return re.length<20&&(re+=this._input.substr(0,20-re.length)),(re.substr(0,20)+(re.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var re=this.pastInput(),se=new Array(re.length+1).join("-");return re+this.upcomingInput()+` +`+se+"^"},"showPosition"),test_match:a(function(re,se){var fe,J,L;if(this.options.backtrack_lexer&&(L={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&&(L.yylloc.range=this.yylloc.range.slice(0))),J=re[0].match(/(?:\r\n?|\n).*/g),J&&(this.yylineno+=J.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:J?J[J.length-1].length-J[J.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+re[0].length},this.yytext+=re[0],this.match+=re[0],this.matches=re,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(re[0].length),this.matched+=re[0],fe=this.performAction.call(this,this.yy,this,se,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),fe)return fe;if(this._backtrack){for(var W in L)this[W]=L[W];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var re,se,fe,J;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),W=0;Wse[0].length)){if(se=fe,J=W,this.options.backtrack_lexer){if(re=this.test_match(fe,L[W]),re!==!1)return re;if(this._backtrack){se=!1;continue}else return!1}else if(!this.options.flex)break}return se?(re=this.test_match(se,L[J]),re!==!1?re:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var se=this.next();return se||this.lex()},"lex"),begin:a(function(se){this.conditionStack.push(se)},"begin"),popState:a(function(){var se=this.conditionStack.length-1;return se>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(se){return se=this.conditionStack.length-1-Math.abs(se||0),se>=0?this.conditionStack[se]:"INITIAL"},"topState"),pushState:a(function(se){this.begin(se)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(se,fe,J,L){var W=L;switch(J){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return ne})();Le.lexer=Ie;function Q(){this.yy={}}return a(Q,"Parser"),Q.prototype=Le,Le.Parser=Q,new Q})();E1.parser=E1;sU=E1});var gIe,yIe,Dr,kl,Rn=w(()=>{"use strict";bt();gIe=a(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),yIe=a(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),Dr=a(function(e,t,r,n){let i=yIe(t,r,n);gIe(e,i)},"configureSvgSize"),kl=a(function(e,t,r,n){let i=t.node().getBBox(),s=i.width,o=i.height;H.info(`SVG bounds: ${s}x${o}`,i);let l=0,u=0;H.info(`Graph bounds: ${l}x${u}`,e),l=s+r*2,u=o+r*2,H.info(`Calculated bounds: ${l}x${u}`),Dr(t,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox")});function GL(e){return[...e.cssRules].map(t=>t.cssText).join(` +`)}var GC,xIe,aU,oU,VL=w(()=>{"use strict";bt();GC={};a(GL,"cssStyleSheetToString");xIe=a((e,t,r,n)=>{let i="";return e in GC&&GC[e]?i=GC[e]({...r,svgId:n}):H.warn(`No theme found for ${e}`),`& { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${r.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: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${i} + .node .neo-node { + stroke: ${r.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + [data-look="neo"].swimlane.cluster rect { + filter: none; + } + + + [data-look="neo"].node path { + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + stroke-width: ${r.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${r.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + ${t} +`},"getStyles"),aU=a((e,t)=>{t!==void 0&&(GC[e]=t)},"addStylesForDiagram"),oU=xIe});var v1={};ir(v1,{clear:()=>or,getAccDescription:()=>yr,getAccTitle:()=>gr,getDiagramTitle:()=>xr,setAccDescription:()=>fr,setAccTitle:()=>hr,setDiagramTitle:()=>Cr});var zL,UL,WL,jL,or,hr,gr,fr,yr,Cr,xr,fn=w(()=>{"use strict";Ir();Tr();zL="",UL="",WL="",jL=a(e=>vr(e,Ct()),"sanitizeText"),or=a(()=>{zL="",WL="",UL=""},"clear"),hr=a(e=>{zL=jL(e).replace(/^\s+/g,"")},"setAccTitle"),gr=a(()=>zL,"getAccTitle"),fr=a(e=>{WL=jL(e).replace(/\n\s+/g,` +`)},"setAccDescription"),yr=a(()=>WL,"getAccDescription"),Cr=a(e=>{UL=jL(e)},"setDiagramTitle"),xr=a(()=>UL,"getDiagramTitle")});var lU,bIe,_e,xd,Xp,w1,_1,TIe,VC,bd,A1,qL,Gt=w(()=>{"use strict";Nu();bt();Tr();Ir();Rn();VL();fn();lU=H,bIe=f1,_e=Ct,xd=LC,Xp=xl,w1=a(e=>vr(e,_e()),"sanitizeText"),_1=kl,TIe=a(()=>v1,"getCommonDb"),VC={},bd=a((e,t,r)=>{VC[e]&&lU.warn(`Diagram with id ${e} already registered. Overwriting.`),VC[e]=t,r&&$L(e,r),aU(e,t.styles),t.injectUtils?.(lU,bIe,_e,w1,_1,TIe(),()=>{})},"registerDiagram"),A1=a(e=>{if(e in VC)return VC[e];throw new qL(e)},"getDiagram"),qL=class extends Error{static{a(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});var zC,HL=w(()=>{"use strict";Gt();zC=a(e=>_e()[e],"getRequiredConfig")});var io,Td,cU,Mo,Mu,Vs,No,Oo,R1,YL,KL,UC,WC,uU,CIe,kIe,SIe,EIe,vIe,wIe,_Ie,AIe,RIe,LIe,IIe,DIe,NIe,MIe,OIe,PIe,BIe,hU,$Ie,FIe,dU,GIe,VIe,zIe,UIe,Ou,WIe,jIe,qIe,HIe,YIe,L1,XL=w(()=>{"use strict";Gt();HL();Ir();fn();io=new Set(["label","descr","techn","type"]),Td=a((e,t)=>{for(let[r,n]of Object.entries(t))if(n!==void 0)if(typeof n=="object"){let[i,s]=Object.entries(n)[0];e[i]=io.has(i)?{text:s}:s}else e[r]=n},"assignAttributes"),cU=a(()=>({alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}),"createGlobalBoundary"),Mo=[],Mu=[""],Vs="global",No="",Oo=[cU()],R1=[],YL="",KL=!1,UC=4,WC=2,CIe=a(function(){return uU},"getC4Type"),kIe=a(function(e){uU=vr(e,_e())},"setC4Type"),SIe=a(function(e,t,r,n,i,s,o,l,u){if(e==null||t===void 0||t===null||r===void 0||r===null||n===void 0||n===null)return;let h={},d=R1.find(f=>f.from===t&&f.to===r);if(d?h=d:R1.push(h),h.type=e,h.from=t,h.to=r,h.label={text:n},i==null)h.techn??={text:""};else if(typeof i=="object"){let[f,p]=Object.entries(i)[0];h[f]=io.has(f)?{text:p}:p}else h.techn={text:i};if(s==null)h.descr??={text:""};else if(typeof s=="object"){let[f,p]=Object.entries(s)[0];h[f]=io.has(f)?{text:p}:p}else h.descr={text:s};Td(h,{sprite:o,tags:l,link:u}),h.wrap=Ou()},"addRel"),EIe=a(function(e,t,r,n,i,s,o){if(t===null||r===null)return;let l={},u=Mo.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,Mo.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr??={text:""};else if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]=io.has(h)?{text:d}:d}else l.descr={text:n};Td(l,{sprite:i,tags:s,link:o}),l.typeC4Shape={text:e},l.parentBoundary=Vs,l.wrap=Ou()},"addPersonOrSystem"),vIe=a(function(e,t,r,n,i,s,o,l){if(t===null||r===null)return;let u={},h=Mo.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,Mo.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn??={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]=io.has(d)?{text:f}:f}else u.techn={text:n};if(i==null)u.descr??={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]=io.has(d)?{text:f}:f}else u.descr={text:i};Td(u,{sprite:s,tags:o,link:l}),u.wrap=Ou(),u.typeC4Shape={text:e},u.parentBoundary=Vs},"addContainer"),wIe=a(function(e,t,r,n,i,s,o,l){if(t===null||r===null)return;let u={},h=Mo.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,Mo.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn??={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]=io.has(d)?{text:f}:f}else u.techn={text:n};if(i==null)u.descr??={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]=io.has(d)?{text:f}:f}else u.descr={text:i};Td(u,{sprite:s,tags:o,link:l}),u.wrap=Ou(),u.typeC4Shape={text:e},u.parentBoundary=Vs},"addComponent"),_Ie=a(function(e,t,r,n,i){if(e===null||t===null)return;let s={},o=Oo.find(l=>l.alias===e);if(o&&e===o.alias?s=o:(s.alias=e,Oo.push(s)),t==null?s.label={text:""}:s.label={text:t},r==null)s.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];s[l]=io.has(l)?{text:u}:u}else s.type={text:r};Td(s,{tags:n,link:i}),s.parentBoundary=Vs,s.wrap=Ou(),No=Vs,Vs=e,Mu.push(No)},"addPersonOrSystemBoundary"),AIe=a(function(e,t,r,n,i){if(e===null||t===null)return;let s={},o=Oo.find(l=>l.alias===e);if(o&&e===o.alias?s=o:(s.alias=e,Oo.push(s)),t==null?s.label={text:""}:s.label={text:t},r==null)s.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];s[l]=io.has(l)?{text:u}:u}else s.type={text:r};Td(s,{tags:n,link:i}),s.parentBoundary=Vs,s.wrap=Ou(),No=Vs,Vs=e,Mu.push(No)},"addContainerBoundary"),RIe=a(function(e,t,r,n,i,s,o,l){if(t===null||r===null)return;let u={},h=Oo.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,Oo.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]=io.has(d)?{text:f}:f}else u.type={text:n};if(i==null)u.descr??={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]=io.has(d)?{text:f}:f}else u.descr={text:i};Td(u,{tags:o,link:l}),u.nodeType=e,u.parentBoundary=Vs,u.wrap=Ou(),No=Vs,Vs=t,Mu.push(No)},"addDeploymentNode"),LIe=a(function(){Vs=No,Mu.pop(),No=Mu.pop(),Mu.push(No)},"popBoundaryParseStack"),IIe=a(function(e,t,r,n,i,s,o,l,u,h,d){let f=Mo.find(p=>p.alias===t);if(!(f===void 0&&(f=Oo.find(p=>p.alias===t),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];f[p]=m}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];f[p]=m}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];f[p]=m}else f.borderColor=i;if(s!=null)if(typeof s=="object"){let[p,m]=Object.entries(s)[0];f[p]=m}else f.shadowing=s;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];f[p]=m}else f.shape=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];f[p]=m}else f.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];f[p]=m}else f.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];f[p]=m}else f.legendText=h;if(d!=null)if(typeof d=="object"){let[p,m]=Object.entries(d)[0];f[p]=m}else f.legendSprite=d}},"updateElStyle"),DIe=a(function(e,t,r,n,i,s,o){let l=R1.find(u=>u.from===t&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(s);if(o!=null)if(typeof o=="object"){let[u,h]=Object.entries(o)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(o)}},"updateRelStyle"),NIe=a(function(e,t,r){let n=UC,i=WC;if(typeof t=="object"){let s=Object.values(t)[0];n=parseInt(s)}else n=parseInt(t);if(typeof r=="object"){let s=Object.values(r)[0];i=parseInt(s)}else i=parseInt(r);n>=1&&(UC=n),i>=1&&(WC=i)},"updateLayoutConfig"),MIe=a(function(){return UC},"getC4ShapeInRow"),OIe=a(function(){return WC},"getC4BoundaryInRow"),PIe=a(function(){return Vs},"getCurrentBoundaryParse"),BIe=a(function(){return No},"getParentBoundaryParse"),hU=a(function(e){return e==null?Mo:Mo.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),$Ie=a(function(e){return Mo.find(t=>t.alias===e)??Oo.find(t=>t.alias===e)},"getC4Shape"),FIe=a(function(e){return Object.keys(hU(e))},"getC4ShapeKeys"),dU=a(function(e){return e==null?Oo:Oo.filter(t=>t.parentBoundary===e)},"getBoundaries"),GIe=dU,VIe=a(function(){return R1},"getRels"),zIe=a(function(){return YL},"getTitle"),UIe=a(function(e){KL=e},"setWrap"),Ou=a(function(){return KL},"autoWrap"),WIe=a(function(){Mo=[],Oo=[cU()],No="",Vs="global",Mu=[""],R1=[],Mu=[""],YL="",KL=!1,UC=4,WC=2},"clear"),jIe={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},qIe={FILLED:0,OPEN:1},HIe={LEFTOF:0,RIGHTOF:1,OVER:2},YIe=a(function(e){YL=vr(e,_e())},"setTitle"),L1={addPersonOrSystem:EIe,addPersonOrSystemBoundary:_Ie,addContainer:vIe,addContainerBoundary:AIe,addComponent:wIe,addDeploymentNode:RIe,popBoundaryParseStack:LIe,addRel:SIe,updateElStyle:IIe,updateRelStyle:DIe,updateLayoutConfig:NIe,autoWrap:Ou,setWrap:UIe,getC4ShapeArray:hU,getC4Shape:$Ie,getC4ShapeKeys:FIe,getBoundaries:dU,getBoundarys:GIe,getCurrentBoundaryParse:PIe,getParentBoundaryParse:BIe,getRels:VIe,getTitle:zIe,getC4Type:CIe,getC4ShapeInRow:MIe,getC4BoundaryInRow:OIe,setAccTitle:hr,getAccTitle:gr,getAccDescription:yr,setAccDescription:fr,getConfig:a(()=>zC("c4"),"getConfig"),clear:WIe,LINETYPE:jIe,ARROWTYPE:qIe,PLACEMENT:HIe,setTitle:YIe,setC4Type:kIe}});var fU=dd(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.BLANK_URL=rs.relativeFirstCharacters=rs.whitespaceEscapeCharsRegex=rs.urlSchemeRegex=rs.ctrlCharactersRegex=rs.htmlCtrlEntityRegex=rs.htmlEntitiesRegex=rs.invalidProtocolRegex=void 0;rs.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;rs.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;rs.htmlCtrlEntityRegex=/&(newline|tab);/gi;rs.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;rs.urlSchemeRegex=/^.+(:|:)/gim;rs.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;rs.relativeFirstCharacters=[".","/"];rs.BLANK_URL="about:blank"});var I1=dd(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});QL.sanitizeUrl=ZIe;var vs=fU();function KIe(e){return vs.relativeFirstCharacters.indexOf(e[0])>-1}a(KIe,"isRelativeUrlWithoutProtocol");function XIe(e){var t=e.replace(vs.ctrlCharactersRegex,"");return t.replace(vs.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}a(XIe,"decodeHtmlCharacters");function QIe(e){return URL.canParse(e)}a(QIe,"isValidUrl");function pU(e){try{return decodeURIComponent(e)}catch{return e}}a(pU,"decodeURI");function ZIe(e){if(!e)return vs.BLANK_URL;var t,r=pU(e.trim());do r=XIe(r).replace(vs.htmlCtrlEntityRegex,"").replace(vs.ctrlCharactersRegex,"").replace(vs.whitespaceEscapeCharsRegex,"").trim(),r=pU(r),t=r.match(vs.ctrlCharactersRegex)||r.match(vs.htmlEntitiesRegex)||r.match(vs.htmlCtrlEntityRegex)||r.match(vs.whitespaceEscapeCharsRegex);while(t&&t.length>0);var n=r;if(!n)return vs.BLANK_URL;if(KIe(n))return n;var i=n.trimStart(),s=i.match(vs.urlSchemeRegex);if(!s)return n;var o=s[0].toLowerCase().trim();if(vs.invalidProtocolRegex.test(o))return vs.BLANK_URL;var l=i.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return l;if(o==="http:"||o==="https:"){if(!QIe(l))return vs.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}a(ZIe,"sanitizeUrl")});function Cd(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var ZL=w(()=>{"use strict";a(Cd,"ascending")});function JL(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var mU=w(()=>{"use strict";a(JL,"descending")});function kd(e){let t,r,n;e.length!==2?(t=Cd,r=a((l,u)=>Cd(e(l),u),"compare2"),n=a((l,u)=>e(l)-u,"delta")):(t=e===Cd||e===JL?e:JIe,r=e,n=e);function i(l,u,h=0,d=l.length){if(h>>1;r(l[f],u)<0?h=f+1:d=f}while(h>>1;r(l[f],u)<=0?h=f+1:d=f}while(hh&&n(l[f-1],u)>-n(l[f],u)?f-1:f}return a(o,"center"),{left:i,center:o,right:s}}function JIe(){return 0}var e3=w(()=>{"use strict";ZL();mU();a(kd,"bisector");a(JIe,"zero")});function t3(e){return e===null?NaN:+e}var gU=w(()=>{"use strict";a(t3,"number")});var yU,xU,eDe,tDe,r3,bU=w(()=>{"use strict";ZL();e3();gU();yU=kd(Cd),xU=yU.right,eDe=yU.left,tDe=kd(t3).center,r3=xU});function TU({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function rDe({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function nDe({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function iDe(e){return e!==null&&typeof e=="object"?e.valueOf():e}var Qp,CU=w(()=>{"use strict";Qp=class extends Map{static{a(this,"InternMap")}constructor(t,r=iDe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(TU(this,t))}has(t){return super.has(TU(this,t))}set(t,r){return super.set(rDe(this,t),r)}delete(t){return super.delete(nDe(this,t))}};a(TU,"intern_get");a(rDe,"intern_set");a(nDe,"intern_delete");a(iDe,"keyof")});function jC(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),s=n/Math.pow(10,i),o=s>=sDe?10:s>=aDe?5:s>=oDe?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/o,l=Math.round(e*h),u=Math.round(t*h),l/ht&&--u,h=-h):(h=Math.pow(10,i)*o,l=Math.round(e/h),u=Math.round(t/h),l*ht&&--u),u0))return[];if(e===t)return[e];let n=t=i))return[];let l=s-i+1,u=new Array(l);if(n)if(o<0)for(let h=0;h{"use strict";sDe=Math.sqrt(50),aDe=Math.sqrt(10),oDe=Math.sqrt(2);a(jC,"tickSpec");a(qC,"ticks");a(D1,"tickIncrement");a(Zp,"tickStep")});function HC(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var SU=w(()=>{"use strict";a(HC,"max")});function YC(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var EU=w(()=>{"use strict";a(YC,"min")});function KC(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(i);++n{"use strict";a(KC,"range")});var Pu=w(()=>{"use strict";bU();e3();SU();EU();vU();kU();CU()});function n3(e){return e}var wU=w(()=>{"use strict";a(n3,"default")});function lDe(e){return"translate("+e+",0)"}function cDe(e){return"translate(0,"+e+")"}function uDe(e){return t=>+e(t)}function hDe(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function dDe(){return!this.__axis}function AU(e,t){var r=[],n=null,i=null,s=6,o=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===QC||e===XC?-1:1,d=e===XC||e===i3?"x":"y",f=e===QC||e===s3?lDe:cDe;function p(m){var g=n??(t.ticks?t.ticks.apply(t,r):t.domain()),y=i??(t.tickFormat?t.tickFormat.apply(t,r):n3),x=Math.max(s,0)+l,b=t.range(),T=+b[0]+u,C=+b[b.length-1]+u,v=(t.bandwidth?hDe:uDe)(t.copy(),u),E=m.selection?m.selection():m,S=E.selectAll(".domain").data([null]),_=E.selectAll(".tick").data(g,t).order(),A=_.exit(),B=_.enter().append("g").attr("class","tick"),$=_.select("line"),O=_.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(B),$=$.merge(B.append("line").attr("stroke","currentColor").attr(d+"2",h*s)),O=O.merge(B.append("text").attr("fill","currentColor").attr(d,h*x).attr("dy",e===QC?"0em":e===s3?"0.71em":"0.32em")),m!==E&&(S=S.transition(m),_=_.transition(m),$=$.transition(m),O=O.transition(m),A=A.transition(m).attr("opacity",_U).attr("transform",function(G){return isFinite(G=v(G))?f(G+u):this.getAttribute("transform")}),B.attr("opacity",_U).attr("transform",function(G){var I=this.parentNode.__axis;return f((I&&isFinite(I=I(G))?I:v(G))+u)})),A.remove(),S.attr("d",e===XC||e===i3?o?"M"+h*o+","+T+"H"+u+"V"+C+"H"+h*o:"M"+u+","+T+"V"+C:o?"M"+T+","+h*o+"V"+u+"H"+C+"V"+h*o:"M"+T+","+u+"H"+C),_.attr("opacity",1).attr("transform",function(G){return f(v(G)+u)}),$.attr(d+"2",h*s),O.attr(d,h*x).text(y),E.filter(dDe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===i3?"start":e===XC?"end":"middle"),E.each(function(){this.__axis=v})}return a(p,"axis"),p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(s=o=+m,p):s},p.tickSizeInner=function(m){return arguments.length?(s=+m,p):s},p.tickSizeOuter=function(m){return arguments.length?(o=+m,p):o},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function a3(e){return AU(QC,e)}function o3(e){return AU(s3,e)}var QC,i3,s3,XC,_U,RU=w(()=>{"use strict";wU();QC=1,i3=2,s3=3,XC=4,_U=1e-6;a(lDe,"translateX");a(cDe,"translateY");a(uDe,"number");a(hDe,"center");a(dDe,"entering");a(AU,"axis");a(a3,"axisTop");a(o3,"axisBottom")});var LU=w(()=>{"use strict";RU()});function DU(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function mDe(e,t){for(var r=0,n=e.length,i;r{"use strict";fDe={value:a(()=>{},"value")};a(DU,"dispatch");a(ZC,"Dispatch");a(pDe,"parseTypenames");ZC.prototype=DU.prototype={constructor:ZC,on:a(function(e,t){var r=this._,n=pDe(e+"",r),i,s=-1,o=n.length;if(arguments.length<2){for(;++s0)for(var r=new Array(i),n=0,i,s;n{"use strict";NU()});var JC,u3,h3=w(()=>{"use strict";JC="http://www.w3.org/1999/xhtml",u3={svg:"http://www.w3.org/2000/svg",xhtml:JC,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Sl(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),u3.hasOwnProperty(t)?{space:u3[t],local:e}:e}var ek=w(()=>{"use strict";h3();a(Sl,"default")});function gDe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===JC&&t.documentElement.namespaceURI===JC?t.createElement(e):t.createElementNS(r,e)}}function yDe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function N1(e){var t=Sl(e);return(t.local?yDe:gDe)(t)}var d3=w(()=>{"use strict";ek();h3();a(gDe,"creatorInherit");a(yDe,"creatorFixed");a(N1,"default")});function xDe(){}function Bu(e){return e==null?xDe:function(){return this.querySelector(e)}}var tk=w(()=>{"use strict";a(xDe,"none");a(Bu,"default")});function f3(e){typeof e!="function"&&(e=Bu(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";Po();tk();a(f3,"default")});function p3(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var OU=w(()=>{"use strict";a(p3,"array")});function bDe(){return[]}function Jp(e){return e==null?bDe:function(){return this.querySelectorAll(e)}}var m3=w(()=>{"use strict";a(bDe,"empty");a(Jp,"default")});function TDe(e){return function(){return p3(e.apply(this,arguments))}}function g3(e){typeof e=="function"?e=TDe(e):e=Jp(e);for(var t=this._groups,r=t.length,n=[],i=[],s=0;s{"use strict";Po();OU();m3();a(TDe,"arrayAll");a(g3,"default")});function em(e){return function(){return this.matches(e)}}function rk(e){return function(t){return t.matches(e)}}var M1=w(()=>{"use strict";a(em,"default");a(rk,"childMatcher")});function kDe(e){return function(){return CDe.call(this.children,e)}}function SDe(){return this.firstElementChild}function y3(e){return this.select(e==null?SDe:kDe(typeof e=="function"?e:rk(e)))}var CDe,BU=w(()=>{"use strict";M1();CDe=Array.prototype.find;a(kDe,"childFind");a(SDe,"childFirst");a(y3,"default")});function vDe(){return Array.from(this.children)}function wDe(e){return function(){return EDe.call(this.children,e)}}function x3(e){return this.selectAll(e==null?vDe:wDe(typeof e=="function"?e:rk(e)))}var EDe,$U=w(()=>{"use strict";M1();EDe=Array.prototype.filter;a(vDe,"children");a(wDe,"childrenFilter");a(x3,"default")});function b3(e){typeof e!="function"&&(e=em(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";Po();M1();a(b3,"default")});function O1(e){return new Array(e.length)}var T3=w(()=>{"use strict";a(O1,"default")});function C3(){return new oi(this._enter||this._groups.map(O1),this._parents)}function P1(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var k3=w(()=>{"use strict";T3();Po();a(C3,"default");a(P1,"EnterNode");P1.prototype={constructor:P1,appendChild:a(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:a(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:a(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:a(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function S3(e){return function(){return e}}var GU=w(()=>{"use strict";a(S3,"default")});function _De(e,t,r,n,i,s){for(var o=0,l,u=t.length,h=s.length;o=C&&(C=T+1);!(E=x[C])&&++C{"use strict";Po();k3();GU();a(_De,"bindIndex");a(ADe,"bindKey");a(RDe,"datum");a(E3,"default");a(LDe,"arraylike")});function v3(){return new oi(this._exit||this._groups.map(O1),this._parents)}var zU=w(()=>{"use strict";T3();Po();a(v3,"default")});function w3(e,t,r){var n=this.enter(),i=this,s=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?s.remove():r(s),n&&i?n.merge(i).order():i}var UU=w(()=>{"use strict";a(w3,"default")});function _3(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,s=n.length,o=Math.min(i,s),l=new Array(i),u=0;u{"use strict";Po();a(_3,"default")});function A3(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(o=n[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}var jU=w(()=>{"use strict";a(A3,"default")});function R3(e){e||(e=IDe);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}a(t,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),s=0;st?1:e>=t?0:NaN}var qU=w(()=>{"use strict";Po();a(R3,"default");a(IDe,"ascending")});function L3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var HU=w(()=>{"use strict";a(L3,"default")});function I3(){return Array.from(this)}var YU=w(()=>{"use strict";a(I3,"default")});function D3(){for(var e=this._groups,t=0,r=e.length;t{"use strict";a(D3,"default")});function N3(){let e=0;for(let t of this)++e;return e}var XU=w(()=>{"use strict";a(N3,"default")});function M3(){return!this.node()}var QU=w(()=>{"use strict";a(M3,"default")});function O3(e){for(var t=this._groups,r=0,n=t.length;r{"use strict";a(O3,"default")});function DDe(e){return function(){this.removeAttribute(e)}}function NDe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function MDe(e,t){return function(){this.setAttribute(e,t)}}function ODe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function PDe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function BDe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function P3(e,t){var r=Sl(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?NDe:DDe:typeof t=="function"?r.local?BDe:PDe:r.local?ODe:MDe)(r,t))}var JU=w(()=>{"use strict";ek();a(DDe,"attrRemove");a(NDe,"attrRemoveNS");a(MDe,"attrConstant");a(ODe,"attrConstantNS");a(PDe,"attrFunction");a(BDe,"attrFunctionNS");a(P3,"default")});function B1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var B3=w(()=>{"use strict";a(B1,"default")});function $De(e){return function(){this.style.removeProperty(e)}}function FDe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function GDe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function $3(e,t,r){return arguments.length>1?this.each((t==null?$De:typeof t=="function"?GDe:FDe)(e,t,r??"")):$u(this.node(),e)}function $u(e,t){return e.style.getPropertyValue(t)||B1(e).getComputedStyle(e,null).getPropertyValue(t)}var F3=w(()=>{"use strict";B3();a($De,"styleRemove");a(FDe,"styleConstant");a(GDe,"styleFunction");a($3,"default");a($u,"styleValue")});function VDe(e){return function(){delete this[e]}}function zDe(e,t){return function(){this[e]=t}}function UDe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function G3(e,t){return arguments.length>1?this.each((t==null?VDe:typeof t=="function"?UDe:zDe)(e,t)):this.node()[e]}var eW=w(()=>{"use strict";a(VDe,"propertyRemove");a(zDe,"propertyConstant");a(UDe,"propertyFunction");a(G3,"default")});function tW(e){return e.trim().split(/^|\s+/)}function V3(e){return e.classList||new rW(e)}function rW(e){this._node=e,this._names=tW(e.getAttribute("class")||"")}function nW(e,t){for(var r=V3(e),n=-1,i=t.length;++n{"use strict";a(tW,"classArray");a(V3,"classList");a(rW,"ClassList");rW.prototype={add:a(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:a(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:a(function(e){return this._names.indexOf(e)>=0},"contains")};a(nW,"classedAdd");a(iW,"classedRemove");a(WDe,"classedTrue");a(jDe,"classedFalse");a(qDe,"classedFunction");a(z3,"default")});function HDe(){this.textContent=""}function YDe(e){return function(){this.textContent=e}}function KDe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function U3(e){return arguments.length?this.each(e==null?HDe:(typeof e=="function"?KDe:YDe)(e)):this.node().textContent}var aW=w(()=>{"use strict";a(HDe,"textRemove");a(YDe,"textConstant");a(KDe,"textFunction");a(U3,"default")});function XDe(){this.innerHTML=""}function QDe(e){return function(){this.innerHTML=e}}function ZDe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function W3(e){return arguments.length?this.each(e==null?XDe:(typeof e=="function"?ZDe:QDe)(e)):this.node().innerHTML}var oW=w(()=>{"use strict";a(XDe,"htmlRemove");a(QDe,"htmlConstant");a(ZDe,"htmlFunction");a(W3,"default")});function JDe(){this.nextSibling&&this.parentNode.appendChild(this)}function j3(){return this.each(JDe)}var lW=w(()=>{"use strict";a(JDe,"raise");a(j3,"default")});function eNe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function q3(){return this.each(eNe)}var cW=w(()=>{"use strict";a(eNe,"lower");a(q3,"default")});function H3(e){var t=typeof e=="function"?e:N1(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var uW=w(()=>{"use strict";d3();a(H3,"default")});function tNe(){return null}function Y3(e,t){var r=typeof e=="function"?e:N1(e),n=t==null?tNe:typeof t=="function"?t:Bu(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var hW=w(()=>{"use strict";d3();tk();a(tNe,"constantNull");a(Y3,"default")});function rNe(){var e=this.parentNode;e&&e.removeChild(this)}function K3(){return this.each(rNe)}var dW=w(()=>{"use strict";a(rNe,"remove");a(K3,"default")});function nNe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iNe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function X3(e){return this.select(e?iNe:nNe)}var fW=w(()=>{"use strict";a(nNe,"selection_cloneShallow");a(iNe,"selection_cloneDeep");a(X3,"default")});function Q3(e){return arguments.length?this.property("__data__",e):this.node().__data__}var pW=w(()=>{"use strict";a(Q3,"default")});function sNe(e){return function(t){e.call(this,t,this.__data__)}}function aNe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function oNe(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,s;r{"use strict";a(sNe,"contextListener");a(aNe,"parseTypenames");a(oNe,"onRemove");a(lNe,"onAdd");a(Z3,"default")});function gW(e,t,r){var n=B1(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function cNe(e,t){return function(){return gW(this,e,t)}}function uNe(e,t){return function(){return gW(this,e,t.apply(this,arguments))}}function J3(e,t){return this.each((typeof t=="function"?uNe:cNe)(e,t))}var yW=w(()=>{"use strict";B3();a(gW,"dispatchEvent");a(cNe,"dispatchConstant");a(uNe,"dispatchFunction");a(J3,"default")});function*eI(){for(var e=this._groups,t=0,r=e.length;t{"use strict";a(eI,"default")});function oi(e,t){this._groups=e,this._parents=t}function bW(){return new oi([[document.documentElement]],tI)}function hNe(){return this}var tI,vc,Po=w(()=>{"use strict";MU();PU();BU();$U();FU();VU();k3();zU();UU();WU();jU();qU();HU();YU();KU();XU();QU();ZU();JU();F3();eW();sW();aW();oW();lW();cW();uW();hW();dW();fW();pW();mW();yW();xW();tI=[null];a(oi,"Selection");a(bW,"selection");a(hNe,"selection_selection");oi.prototype=bW.prototype={constructor:oi,select:f3,selectAll:g3,selectChild:y3,selectChildren:x3,filter:b3,data:E3,enter:C3,exit:v3,join:w3,merge:_3,selection:hNe,order:A3,sort:R3,call:L3,nodes:I3,node:D3,size:N3,empty:M3,each:O3,attr:P3,style:$3,property:G3,classed:z3,text:U3,html:W3,raise:j3,lower:q3,append:H3,insert:Y3,remove:K3,clone:X3,datum:Q3,on:Z3,dispatch:J3,[Symbol.iterator]:eI};vc=bW});function st(e){return typeof e=="string"?new oi([[document.querySelector(e)]],[document.documentElement]):new oi([[e]],tI)}var TW=w(()=>{"use strict";Po();a(st,"default")});var Bo=w(()=>{"use strict";M1();ek();TW();Po();tk();m3();F3()});var CW=w(()=>{"use strict"});function Fu(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function tm(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var rI=w(()=>{"use strict";a(Fu,"default");a(tm,"extend")});function Gu(){}function SW(){return this.rgb().formatHex()}function bNe(){return this.rgb().formatHex8()}function TNe(){return LW(this).formatHsl()}function EW(){return this.rgb().formatRgb()}function Fo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=dNe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?vW(t):r===3?new ys(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nk(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nk(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=fNe.exec(e))?new ys(t[1],t[2],t[3],1):(t=pNe.exec(e))?new ys(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mNe.exec(e))?nk(t[1],t[2],t[3],t[4]):(t=gNe.exec(e))?nk(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yNe.exec(e))?AW(t[1],t[2]/100,t[3]/100,1):(t=xNe.exec(e))?AW(t[1],t[2]/100,t[3]/100,t[4]):kW.hasOwnProperty(e)?vW(kW[e]):e==="transparent"?new ys(NaN,NaN,NaN,0):null}function vW(e){return new ys(e>>16&255,e>>8&255,e&255,1)}function nk(e,t,r,n){return n<=0&&(e=t=r=NaN),new ys(e,t,r,n)}function iI(e){return e instanceof Gu||(e=Fo(e)),e?(e=e.rgb(),new ys(e.r,e.g,e.b,e.opacity)):new ys}function nm(e,t,r,n){return arguments.length===1?iI(e):new ys(e,t,r,n??1)}function ys(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function wW(){return`#${Sd(this.r)}${Sd(this.g)}${Sd(this.b)}`}function CNe(){return`#${Sd(this.r)}${Sd(this.g)}${Sd(this.b)}${Sd((isNaN(this.opacity)?1:this.opacity)*255)}`}function _W(){let e=ak(this.opacity);return`${e===1?"rgb(":"rgba("}${Ed(this.r)}, ${Ed(this.g)}, ${Ed(this.b)}${e===1?")":`, ${e})`}`}function ak(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ed(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sd(e){return e=Ed(e),(e<16?"0":"")+e.toString(16)}function AW(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new $o(e,t,r,n)}function LW(e){if(e instanceof $o)return new $o(e.h,e.s,e.l,e.opacity);if(e instanceof Gu||(e=Fo(e)),!e)return new $o;if(e instanceof $o)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=NaN,l=s-i,u=(s+i)/2;return l?(t===s?o=(r-n)/l+(r0&&u<1?0:o,new $o(o,l,u,e.opacity)}function IW(e,t,r,n){return arguments.length===1?LW(e):new $o(e,t,r,n??1)}function $o(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function RW(e){return e=(e||0)%360,e<0?e+360:e}function ik(e){return Math.max(0,Math.min(1,e||0))}function nI(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var $1,sk,rm,F1,El,dNe,fNe,pNe,mNe,gNe,yNe,xNe,kW,sI=w(()=>{"use strict";rI();a(Gu,"Color");$1=.7,sk=1/$1,rm="\\s*([+-]?\\d+)\\s*",F1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",El="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dNe=/^#([0-9a-f]{3,8})$/,fNe=new RegExp(`^rgb\\(${rm},${rm},${rm}\\)$`),pNe=new RegExp(`^rgb\\(${El},${El},${El}\\)$`),mNe=new RegExp(`^rgba\\(${rm},${rm},${rm},${F1}\\)$`),gNe=new RegExp(`^rgba\\(${El},${El},${El},${F1}\\)$`),yNe=new RegExp(`^hsl\\(${F1},${El},${El}\\)$`),xNe=new RegExp(`^hsla\\(${F1},${El},${El},${F1}\\)$`),kW={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fu(Gu,Fo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:SW,formatHex:SW,formatHex8:bNe,formatHsl:TNe,formatRgb:EW,toString:EW});a(SW,"color_formatHex");a(bNe,"color_formatHex8");a(TNe,"color_formatHsl");a(EW,"color_formatRgb");a(Fo,"color");a(vW,"rgbn");a(nk,"rgba");a(iI,"rgbConvert");a(nm,"rgb");a(ys,"Rgb");Fu(ys,nm,tm(Gu,{brighter(e){return e=e==null?sk:Math.pow(sk,e),new ys(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$1:Math.pow($1,e),new ys(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ys(Ed(this.r),Ed(this.g),Ed(this.b),ak(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:wW,formatHex:wW,formatHex8:CNe,formatRgb:_W,toString:_W}));a(wW,"rgb_formatHex");a(CNe,"rgb_formatHex8");a(_W,"rgb_formatRgb");a(ak,"clampa");a(Ed,"clampi");a(Sd,"hex");a(AW,"hsla");a(LW,"hslConvert");a(IW,"hsl");a($o,"Hsl");Fu($o,IW,tm(Gu,{brighter(e){return e=e==null?sk:Math.pow(sk,e),new $o(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$1:Math.pow($1,e),new $o(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ys(nI(e>=240?e-240:e+120,i,n),nI(e,i,n),nI(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new $o(RW(this.h),ik(this.s),ik(this.l),ak(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ak(this.opacity);return`${e===1?"hsl(":"hsla("}${RW(this.h)}, ${ik(this.s)*100}%, ${ik(this.l)*100}%${e===1?")":`, ${e})`}`}}));a(RW,"clamph");a(ik,"clampt");a(nI,"hsl2rgb")});var DW,NW,MW=w(()=>{"use strict";DW=Math.PI/180,NW=180/Math.PI});function GW(e){if(e instanceof vl)return new vl(e.l,e.a,e.b,e.opacity);if(e instanceof wc)return VW(e);e instanceof ys||(e=iI(e));var t=cI(e.r),r=cI(e.g),n=cI(e.b),i=aI((.2225045*t+.7168786*r+.0606169*n)/PW),s,o;return t===r&&r===n?s=o=i:(s=aI((.4360747*t+.3850649*r+.1430804*n)/OW),o=aI((.0139322*t+.0971045*r+.7141733*n)/BW)),new vl(116*i-16,500*(s-i),200*(i-o),e.opacity)}function uI(e,t,r,n){return arguments.length===1?GW(e):new vl(e,t,r,n??1)}function vl(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function aI(e){return e>kNe?Math.pow(e,1/3):e/FW+$W}function oI(e){return e>im?e*e*e:FW*(e-$W)}function lI(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cI(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function SNe(e){if(e instanceof wc)return new wc(e.h,e.c,e.l,e.opacity);if(e instanceof vl||(e=GW(e)),e.a===0&&e.b===0)return new wc(NaN,0{"use strict";rI();sI();MW();ok=18,OW=.96422,PW=1,BW=.82521,$W=4/29,im=6/29,FW=3*im*im,kNe=im*im*im;a(GW,"labConvert");a(uI,"lab");a(vl,"Lab");Fu(vl,uI,tm(Gu,{brighter(e){return new vl(this.l+ok*(e??1),this.a,this.b,this.opacity)},darker(e){return new vl(this.l-ok*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=OW*oI(t),e=PW*oI(e),r=BW*oI(r),new ys(lI(3.1338561*t-1.6168667*e-.4906146*r),lI(-.9787684*t+1.9161415*e+.033454*r),lI(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));a(aI,"xyz2lab");a(oI,"lab2xyz");a(lI,"lrgb2rgb");a(cI,"rgb2lrgb");a(SNe,"hclConvert");a(G1,"hcl");a(wc,"Hcl");a(VW,"hcl2lab");Fu(wc,G1,tm(Gu,{brighter(e){return new wc(this.h,this.c,this.l+ok*(e??1),this.opacity)},darker(e){return new wc(this.h,this.c,this.l-ok*(e??1),this.opacity)},rgb(){return VW(this).rgb()}}))});var sm=w(()=>{"use strict";sI();zW()});function hI(e,t,r,n,i){var s=e*e,o=s*e;return((1-3*e+3*s-o)*t+(4-6*s+3*o)*r+(1+3*e+3*s-3*o)*n+o*i)/6}function dI(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],s=e[n+1],o=n>0?e[n-1]:2*i-s,l=n{"use strict";a(hI,"basis");a(dI,"default")});function pI(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],s=e[n%t],o=e[(n+1)%t],l=e[(n+2)%t];return hI((r-n/t)*t,i,s,o,l)}}var UW=w(()=>{"use strict";fI();a(pI,"default")});var am,mI=w(()=>{"use strict";am=a(e=>()=>e,"default")});function WW(e,t){return function(r){return e+r*t}}function ENe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function jW(e,t){var r=t-e;return r?WW(e,r>180||r<-180?r-360*Math.round(r/360):r):am(isNaN(e)?t:e)}function qW(e){return(e=+e)==1?_c:function(t,r){return r-t?ENe(t,r,e):am(isNaN(t)?r:t)}}function _c(e,t){var r=t-e;return r?WW(e,r):am(isNaN(e)?t:e)}var gI=w(()=>{"use strict";mI();a(WW,"linear");a(ENe,"exponential");a(jW,"hue");a(qW,"gamma");a(_c,"nogamma")});function HW(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),s=new Array(r),o,l;for(o=0;o{"use strict";sm();fI();UW();gI();vd=a((function e(t){var r=qW(t);function n(i,s){var o=r((i=nm(i)).r,(s=nm(s)).r),l=r(i.g,s.g),u=r(i.b,s.b),h=_c(i.opacity,s.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=u(d),i.opacity=h(d),i+""}}return a(n,"rgb"),n.gamma=e,n}),"rgbGamma")(1);a(HW,"rgbSpline");vNe=HW(dI),wNe=HW(pI)});function xI(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(s){for(i=0;i{"use strict";a(xI,"default");a(YW,"isNumberArray")});function XW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),s=new Array(r),o;for(o=0;o{"use strict";lk();a(XW,"genericArray")});function bI(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var ZW=w(()=>{"use strict";a(bI,"default")});function ns(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var V1=w(()=>{"use strict";a(ns,"default")});function TI(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Vu(e[i],t[i]):n[i]=t[i];return function(s){for(i in r)n[i]=r[i](s);return n}}var JW=w(()=>{"use strict";lk();a(TI,"default")});function _Ne(e){return function(){return e}}function ANe(e){return function(t){return e(t)+""}}function om(e,t){var r=kI.lastIndex=CI.lastIndex=0,n,i,s,o=-1,l=[],u=[];for(e=e+"",t=t+"";(n=kI.exec(e))&&(i=CI.exec(t));)(s=i.index)>r&&(s=t.slice(r,s),l[o]?l[o]+=s:l[++o]=s),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:ns(n,i)})),r=CI.lastIndex;return r{"use strict";V1();kI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,CI=new RegExp(kI.source,"g");a(_Ne,"zero");a(ANe,"one");a(om,"default")});function Vu(e,t){var r=typeof t,n;return t==null||r==="boolean"?am(t):(r==="number"?ns:r==="string"?(n=Fo(t))?(t=n,vd):om:t instanceof Fo?vd:t instanceof Date?bI:YW(t)?xI:Array.isArray(t)?XW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?TI:ns)(e,t)}var lk=w(()=>{"use strict";sm();yI();QW();ZW();V1();JW();SI();mI();KW();a(Vu,"default")});function ck(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var ej=w(()=>{"use strict";a(ck,"default")});function hk(e,t,r,n,i,s){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),e*n{"use strict";tj=180/Math.PI,uk={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};a(hk,"default")});function nj(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?uk:hk(t.a,t.b,t.c,t.d,t.e,t.f)}function ij(e){return e==null?uk:(dk||(dk=document.createElementNS("http://www.w3.org/2000/svg","g")),dk.setAttribute("transform",e),(e=dk.transform.baseVal.consolidate())?(e=e.matrix,hk(e.a,e.b,e.c,e.d,e.e,e.f)):uk)}var dk,sj=w(()=>{"use strict";rj();a(nj,"parseCss");a(ij,"parseSvg")});function aj(e,t,r,n){function i(h){return h.length?h.pop()+" ":""}a(i,"pop");function s(h,d,f,p,m,g){if(h!==f||d!==p){var y=m.push("translate(",null,t,null,r);g.push({i:y-4,x:ns(h,f)},{i:y-2,x:ns(d,p)})}else(f||p)&&m.push("translate("+f+t+p+r)}a(s,"translate");function o(h,d,f,p){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),p.push({i:f.push(i(f)+"rotate(",null,n)-2,x:ns(h,d)})):d&&f.push(i(f)+"rotate("+d+n)}a(o,"rotate");function l(h,d,f,p){h!==d?p.push({i:f.push(i(f)+"skewX(",null,n)-2,x:ns(h,d)}):d&&f.push(i(f)+"skewX("+d+n)}a(l,"skewX");function u(h,d,f,p,m,g){if(h!==f||d!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:ns(h,f)},{i:y-2,x:ns(d,p)})}else(f!==1||p!==1)&&m.push(i(m)+"scale("+f+","+p+")")}return a(u,"scale"),function(h,d){var f=[],p=[];return h=e(h),d=e(d),s(h.translateX,h.translateY,d.translateX,d.translateY,f,p),o(h.rotate,d.rotate,f,p),l(h.skewX,d.skewX,f,p),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,f,p),h=d=null,function(m){for(var g=-1,y=p.length,x;++g{"use strict";V1();sj();a(aj,"interpolateTransform");EI=aj(nj,"px, ","px)","deg)"),vI=aj(ij,", ",")",")")});function lj(e){return function(t,r){var n=e((t=G1(t)).h,(r=G1(r)).h),i=_c(t.c,r.c),s=_c(t.l,r.l),o=_c(t.opacity,r.opacity);return function(l){return t.h=n(l),t.c=i(l),t.l=s(l),t.opacity=o(l),t+""}}}var wI,RNe,cj=w(()=>{"use strict";sm();gI();a(lj,"hcl");wI=lj(jW),RNe=lj(_c)});var lm=w(()=>{"use strict";lk();V1();ej();SI();oj();yI();cj()});function H1(){return wd||(dj(LNe),wd=j1.now()+mk)}function LNe(){wd=0}function q1(){this._call=this._time=this._next=null}function gk(e,t,r){var n=new q1;return n.restart(e,t,r),n}function fj(){H1(),++cm;for(var e=fk,t;e;)(t=wd-e._time)>=0&&e._call.call(void 0,t),e=e._next;--cm}function uj(){wd=(pk=j1.now())+mk,cm=U1=0;try{fj()}finally{cm=0,DNe(),wd=0}}function INe(){var e=j1.now(),t=e-pk;t>hj&&(mk-=t,pk=e)}function DNe(){for(var e,t=fk,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:fk=r);W1=e,_I(n)}function _I(e){if(!cm){U1&&(U1=clearTimeout(U1));var t=e-wd;t>24?(e<1/0&&(U1=setTimeout(uj,e-j1.now()-mk)),z1&&(z1=clearInterval(z1))):(z1||(pk=j1.now(),z1=setInterval(INe,hj)),cm=1,dj(uj))}}var cm,U1,z1,hj,fk,W1,pk,wd,mk,j1,dj,AI=w(()=>{"use strict";cm=0,U1=0,z1=0,hj=1e3,pk=0,wd=0,mk=0,j1=typeof performance=="object"&&performance.now?performance:Date,dj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};a(H1,"now");a(LNe,"clearNow");a(q1,"Timer");q1.prototype=gk.prototype={constructor:q1,restart:a(function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?H1():+r)+(t==null?0:+t),!this._next&&W1!==this&&(W1?W1._next=this:fk=this,W1=this),this._call=e,this._time=r,_I()},"restart"),stop:a(function(){this._call&&(this._call=null,this._time=1/0,_I())},"stop")};a(gk,"timer");a(fj,"timerFlush");a(uj,"wake");a(INe,"poke");a(DNe,"nap");a(_I,"sleep")});function Y1(e,t,r){var n=new q1;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var pj=w(()=>{"use strict";AI();a(Y1,"default")});var yk=w(()=>{"use strict";AI();pj()});function Ac(e,t,r,n,i,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;ONe(e,r,{name:t,index:n,group:i,on:NNe,tween:MNe,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:yj})}function X1(e,t){var r=Vi(e,t);if(r.state>yj)throw new Error("too late; already scheduled");return r}function xs(e,t){var r=Vi(e,t);if(r.state>xk)throw new Error("too late; already running");return r}function Vi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function ONe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=gk(s,0,r.time);function s(h){r.state=mj,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}a(s,"schedule");function o(h){var d,f,p,m;if(r.state!==mj)return u();for(d in n)if(m=n[d],m.name===r.name){if(m.state===xk)return Y1(o);m.state===gj?(m.state=K1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete n[d]):+d{"use strict";c3();yk();NNe=l3("start","end","cancel","interrupt"),MNe=[],yj=0,mj=1,bk=2,xk=3,gj=4,Tk=5,K1=6;a(Ac,"default");a(X1,"init");a(xs,"set");a(Vi,"get");a(ONe,"create")});function Q1(e,t){var r=e.__transition,n,i,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((n=r[o]).name!==t){s=!1;continue}i=n.state>bk&&n.state{"use strict";ia();a(Q1,"default")});function RI(e){return this.each(function(){Q1(this,e)})}var bj=w(()=>{"use strict";xj();a(RI,"default")});function PNe(e,t){var r,n;return function(){var i=xs(this,e),s=i.tween;if(s!==r){n=r=s;for(var o=0,l=n.length;o{"use strict";ia();a(PNe,"tweenRemove");a(BNe,"tweenFunction");a(LI,"default");a(um,"tweenValue")});function J1(e,t){var r;return(typeof t=="number"?ns:t instanceof Fo?vd:(r=Fo(t))?(t=r,vd):om)(e,t)}var II=w(()=>{"use strict";sm();lm();a(J1,"default")});function $Ne(e){return function(){this.removeAttribute(e)}}function FNe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function GNe(e,t,r){var n,i=r+"",s;return function(){var o=this.getAttribute(e);return o===i?null:o===n?s:s=t(n=o,r)}}function VNe(e,t,r){var n,i=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===n?s:s=t(n=o,r)}}function zNe(e,t,r){var n,i,s;return function(){var o,l=r(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===n&&u===i?s:(i=u,s=t(n=o,l)))}}function UNe(e,t,r){var n,i,s;return function(){var o,l=r(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===n&&u===i?s:(i=u,s=t(n=o,l)))}}function DI(e,t){var r=Sl(e),n=r==="transform"?vI:J1;return this.attrTween(e,typeof t=="function"?(r.local?UNe:zNe)(r,n,um(this,"attr."+e,t)):t==null?(r.local?FNe:$Ne)(r):(r.local?VNe:GNe)(r,n,t))}var Tj=w(()=>{"use strict";lm();Bo();Z1();II();a($Ne,"attrRemove");a(FNe,"attrRemoveNS");a(GNe,"attrConstant");a(VNe,"attrConstantNS");a(zNe,"attrFunction");a(UNe,"attrFunctionNS");a(DI,"default")});function WNe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function jNe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function qNe(e,t){var r,n;function i(){var s=t.apply(this,arguments);return s!==n&&(r=(n=s)&&jNe(e,s)),r}return a(i,"tween"),i._value=t,i}function HNe(e,t){var r,n;function i(){var s=t.apply(this,arguments);return s!==n&&(r=(n=s)&&WNe(e,s)),r}return a(i,"tween"),i._value=t,i}function NI(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Sl(e);return this.tween(r,(n.local?qNe:HNe)(n,t))}var Cj=w(()=>{"use strict";Bo();a(WNe,"attrInterpolate");a(jNe,"attrInterpolateNS");a(qNe,"attrTweenNS");a(HNe,"attrTween");a(NI,"default")});function YNe(e,t){return function(){X1(this,e).delay=+t.apply(this,arguments)}}function KNe(e,t){return t=+t,function(){X1(this,e).delay=t}}function MI(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?YNe:KNe)(t,e)):Vi(this.node(),t).delay}var kj=w(()=>{"use strict";ia();a(YNe,"delayFunction");a(KNe,"delayConstant");a(MI,"default")});function XNe(e,t){return function(){xs(this,e).duration=+t.apply(this,arguments)}}function QNe(e,t){return t=+t,function(){xs(this,e).duration=t}}function OI(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?XNe:QNe)(t,e)):Vi(this.node(),t).duration}var Sj=w(()=>{"use strict";ia();a(XNe,"durationFunction");a(QNe,"durationConstant");a(OI,"default")});function ZNe(e,t){if(typeof t!="function")throw new Error;return function(){xs(this,e).ease=t}}function PI(e){var t=this._id;return arguments.length?this.each(ZNe(t,e)):Vi(this.node(),t).ease}var Ej=w(()=>{"use strict";ia();a(ZNe,"easeConstant");a(PI,"default")});function JNe(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;xs(this,e).ease=r}}function BI(e){if(typeof e!="function")throw new Error;return this.each(JNe(this._id,e))}var vj=w(()=>{"use strict";ia();a(JNe,"easeVarying");a(BI,"default")});function $I(e){typeof e!="function"&&(e=em(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";Bo();_d();a($I,"default")});function FI(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,s=Math.min(n,i),o=new Array(n),l=0;l{"use strict";_d();a(FI,"default")});function e4e(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function t4e(e,t,r){var n,i,s=e4e(t)?X1:xs;return function(){var o=s(this,e),l=o.on;l!==n&&(i=(n=l).copy()).on(t,r),o.on=i}}function GI(e,t){var r=this._id;return arguments.length<2?Vi(this.node(),r).on.on(e):this.each(t4e(r,e,t))}var Aj=w(()=>{"use strict";ia();a(e4e,"start");a(t4e,"onFunction");a(GI,"default")});function r4e(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function VI(){return this.on("end.remove",r4e(this._id))}var Rj=w(()=>{"use strict";a(r4e,"removeFunction");a(VI,"default")});function zI(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bu(e));for(var n=this._groups,i=n.length,s=new Array(i),o=0;o{"use strict";Bo();_d();ia();a(zI,"default")});function UI(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Jp(e));for(var n=this._groups,i=n.length,s=[],o=[],l=0;l{"use strict";Bo();_d();ia();a(UI,"default")});function WI(){return new n4e(this._groups,this._parents)}var n4e,Dj=w(()=>{"use strict";Bo();n4e=vc.prototype.constructor;a(WI,"default")});function i4e(e,t){var r,n,i;return function(){var s=$u(this,e),o=(this.style.removeProperty(e),$u(this,e));return s===o?null:s===r&&o===n?i:i=t(r=s,n=o)}}function Nj(e){return function(){this.style.removeProperty(e)}}function s4e(e,t,r){var n,i=r+"",s;return function(){var o=$u(this,e);return o===i?null:o===n?s:s=t(n=o,r)}}function a4e(e,t,r){var n,i,s;return function(){var o=$u(this,e),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),$u(this,e))),o===u?null:o===n&&u===i?s:(i=u,s=t(n=o,l))}}function o4e(e,t){var r,n,i,s="style."+t,o="end."+s,l;return function(){var u=xs(this,e),h=u.on,d=u.value[s]==null?l||(l=Nj(t)):void 0;(h!==r||i!==d)&&(n=(r=h).copy()).on(o,i=d),u.on=n}}function jI(e,t,r){var n=(e+="")=="transform"?EI:J1;return t==null?this.styleTween(e,i4e(e,n)).on("end.style."+e,Nj(e)):typeof t=="function"?this.styleTween(e,a4e(e,n,um(this,"style."+e,t))).each(o4e(this._id,e)):this.styleTween(e,s4e(e,n,t),r).on("end.style."+e,null)}var Mj=w(()=>{"use strict";lm();Bo();ia();Z1();II();a(i4e,"styleNull");a(Nj,"styleRemove");a(s4e,"styleConstant");a(a4e,"styleFunction");a(o4e,"styleMaybeRemove");a(jI,"default")});function l4e(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function c4e(e,t,r){var n,i;function s(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&l4e(e,o,r)),n}return a(s,"tween"),s._value=t,s}function qI(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,c4e(e,t,r??""))}var Oj=w(()=>{"use strict";a(l4e,"styleInterpolate");a(c4e,"styleTween");a(qI,"default")});function u4e(e){return function(){this.textContent=e}}function h4e(e){return function(){var t=e(this);this.textContent=t??""}}function HI(e){return this.tween("text",typeof e=="function"?h4e(um(this,"text",e)):u4e(e==null?"":e+""))}var Pj=w(()=>{"use strict";Z1();a(u4e,"textConstant");a(h4e,"textFunction");a(HI,"default")});function d4e(e){return function(t){this.textContent=e.call(this,t)}}function f4e(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&d4e(i)),t}return a(n,"tween"),n._value=e,n}function YI(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,f4e(e))}var Bj=w(()=>{"use strict";a(d4e,"textInterpolate");a(f4e,"textTween");a(YI,"default")});function KI(){for(var e=this._name,t=this._id,r=Ck(),n=this._groups,i=n.length,s=0;s{"use strict";_d();ia();a(KI,"default")});function XI(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(s,o){var l={value:o},u={value:a(function(){--i===0&&s()},"value")};r.each(function(){var h=xs(this,n),d=h.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),h.on=t}),i===0&&s()})}var Fj=w(()=>{"use strict";ia();a(XI,"default")});function zs(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Gj(e){return vc().transition(e)}function Ck(){return++p4e}var p4e,Rc,_d=w(()=>{"use strict";Bo();Tj();Cj();kj();Sj();Ej();vj();wj();_j();Aj();Rj();Lj();Ij();Dj();Mj();Oj();Pj();Bj();$j();Z1();Fj();p4e=0;a(zs,"Transition");a(Gj,"transition");a(Ck,"newId");Rc=vc.prototype;zs.prototype=Gj.prototype={constructor:zs,select:zI,selectAll:UI,selectChild:Rc.selectChild,selectChildren:Rc.selectChildren,filter:$I,merge:FI,selection:WI,transition:KI,call:Rc.call,nodes:Rc.nodes,node:Rc.node,size:Rc.size,empty:Rc.empty,each:Rc.each,on:GI,attr:DI,attrTween:NI,style:jI,styleTween:qI,text:HI,textTween:YI,remove:VI,tween:LI,delay:MI,duration:OI,ease:PI,easeVarying:BI,end:XI,[Symbol.iterator]:Rc[Symbol.iterator]}});function kk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Vj=w(()=>{"use strict";a(kk,"cubicInOut")});var QI=w(()=>{"use strict";Vj()});function g4e(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function ZI(e){var t,r;e instanceof zs?(t=e._id,e=e._name):(t=Ck(),(r=m4e).time=H1(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,s=0;s{"use strict";_d();ia();QI();yk();m4e={time:null,delay:0,duration:250,ease:kk};a(g4e,"inherit");a(ZI,"default")});var Uj=w(()=>{"use strict";Bo();bj();zj();vc.prototype.interrupt=RI;vc.prototype.transition=ZI});var Sk=w(()=>{"use strict";Uj()});var Wj=w(()=>{"use strict"});var jj=w(()=>{"use strict"});var qj=w(()=>{"use strict"});function Hj(e){return[+e[0],+e[1]]}function y4e(e){return[Hj(e[0]),Hj(e[1])]}function JI(e){return{type:e}}var ivt,svt,avt,ovt,lvt,cvt,Yj=w(()=>{"use strict";Sk();Wj();jj();qj();({abs:ivt,max:svt,min:avt}=Math);a(Hj,"number1");a(y4e,"number2");ovt={name:"x",handles:["w","e"].map(JI),input:a(function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),output:a(function(e){return e&&[e[0][0],e[1][0]]},"output")},lvt={name:"y",handles:["n","s"].map(JI),input:a(function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),output:a(function(e){return e&&[e[0][1],e[1][1]]},"output")},cvt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(JI),input:a(function(e){return e==null?null:y4e(e)},"input"),output:a(function(e){return e},"output")};a(JI,"type")});var Kj=w(()=>{"use strict";Yj()});function Xj(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Xj;let r=10**t;return function(n){this._+=n[0];for(let i=1,s=n.length;i{"use strict";eD=Math.PI,tD=2*eD,Ad=1e-6,x4e=tD-Ad;a(Xj,"append");a(b4e,"appendRound");Rd=class{static{a(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Xj:b4e(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,s,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,n,i,s){if(t=+t,r=+r,n=+n,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,u=n-t,h=i-r,d=o-t,f=l-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>Ad)if(!(Math.abs(f*u-h*d)>Ad)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-o,g=i-l,y=u*u+h*h,x=m*m+g*g,b=Math.sqrt(y),T=Math.sqrt(p),C=s*Math.tan((eD-Math.acos((y+p-x)/(2*b*T)))/2),v=C/T,E=C/b;Math.abs(v-1)>Ad&&this._append`L${t+v*d},${r+v*f}`,this._append`A${s},${s},0,0,${+(f*m>d*g)},${this._x1=t+E*u},${this._y1=r+E*h}`}}arc(t,r,n,i,s,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=t+l,d=r+u,f=1^o,p=o?i-s:s-i;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>Ad||Math.abs(this._y1-d)>Ad)&&this._append`L${h},${d}`,n&&(p<0&&(p=p%tD+tD),p>x4e?this._append`A${n},${n},0,1,${f},${t-l},${r-u}A${n},${n},0,1,${f},${this._x1=h},${this._y1=d}`:p>Ad&&this._append`A${n},${n},0,${+(p>=eD)},${f},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};a(Qj,"path");Qj.prototype=Rd.prototype});var rD=w(()=>{"use strict";Zj()});var Jj=w(()=>{"use strict"});var eq=w(()=>{"use strict"});var tq=w(()=>{"use strict"});var rq=w(()=>{"use strict"});var nq=w(()=>{"use strict"});var iq=w(()=>{"use strict"});var sq=w(()=>{"use strict"});function nD(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ld(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var e0=w(()=>{"use strict";a(nD,"default");a(Ld,"formatDecimalParts")});function Go(e){return e=Ld(Math.abs(e)),e?e[1]:NaN}var t0=w(()=>{"use strict";e0();a(Go,"default")});function iD(e,t){return function(r,n){for(var i=r.length,s=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),s.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return s.reverse().join(t)}}var aq=w(()=>{"use strict";a(iD,"default")});function sD(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var oq=w(()=>{"use strict";a(sD,"default")});function zu(e){if(!(t=T4e.exec(e)))throw new Error("invalid format: "+e);var t;return new Ek({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ek(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var T4e,aD=w(()=>{"use strict";T4e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;a(zu,"formatSpecifier");zu.prototype=Ek.prototype;a(Ek,"FormatSpecifier");Ek.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 oD(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var lq=w(()=>{"use strict";a(oD,"default")});function cD(e,t){var r=Ld(e,t);if(!r)return e+"";var n=r[0],i=r[1],s=i-(lD=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return s===o?n:s>o?n+new Array(s-o+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+Ld(e,Math.max(0,t+s-1))[0]}var lD,uD=w(()=>{"use strict";e0();a(cD,"default")});function vk(e,t){var r=Ld(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var cq=w(()=>{"use strict";e0();a(vk,"default")});var hD,uq=w(()=>{"use strict";e0();uD();cq();hD={"%":a((e,t)=>(e*100).toFixed(t),"%"),b:a(e=>Math.round(e).toString(2),"b"),c:a(e=>e+"","c"),d:nD,e:a((e,t)=>e.toExponential(t),"e"),f:a((e,t)=>e.toFixed(t),"f"),g:a((e,t)=>e.toPrecision(t),"g"),o:a(e=>Math.round(e).toString(8),"o"),p:a((e,t)=>vk(e*100,t),"p"),r:vk,s:cD,X:a(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:a(e=>Math.round(e).toString(16),"x")}});function wk(e){return e}var hq=w(()=>{"use strict";a(wk,"default")});function dD(e){var t=e.grouping===void 0||e.thousands===void 0?wk:iD(dq.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?wk:sD(dq.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"\u2212":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function h(f){f=zu(f);var p=f.fill,m=f.align,g=f.sign,y=f.symbol,x=f.zero,b=f.width,T=f.comma,C=f.precision,v=f.trim,E=f.type;E==="n"?(T=!0,E="g"):hD[E]||(C===void 0&&(C=12),v=!0,E="g"),(x||p==="0"&&m==="=")&&(x=!0,p="0",m="=");var S=y==="$"?r:y==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",_=y==="$"?n:/[%p]/.test(E)?o:"",A=hD[E],B=/[defgprs%]/.test(E);C=C===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function $(O){var G=S,I=_,F,N,D;if(E==="c")I=A(O)+I,O="";else{O=+O;var M=O<0||1/O<0;if(O=isNaN(O)?u:A(Math.abs(O),C),v&&(O=oD(O)),M&&+O==0&&g!=="+"&&(M=!1),G=(M?g==="("?g:l:g==="-"||g==="("?"":g)+G,I=(E==="s"?fq[8+lD/3]:"")+I+(M&&g==="("?")":""),B){for(F=-1,N=O.length;++FD||D>57){I=(D===46?i+O.slice(F+1):O.slice(F))+I,O=O.slice(0,F);break}}}T&&!x&&(O=t(O,1/0));var R=G.length+O.length+I.length,P=R>1)+G+O+I+P.slice(R);break;default:O=P+G+O+I;break}return s(O)}return a($,"format"),$.toString=function(){return f+""},$}a(h,"newFormat");function d(f,p){var m=h((f=zu(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Go(p)/3)))*3,y=Math.pow(10,-g),x=fq[8+g/3];return function(b){return m(y*b)+x}}return a(d,"formatPrefix"),{format:h,formatPrefix:d}}var dq,fq,pq=w(()=>{"use strict";t0();aq();oq();aD();lq();uq();uD();hq();dq=Array.prototype.map,fq=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];a(dD,"default")});function fD(e){return _k=dD(e),wl=_k.format,Ak=_k.formatPrefix,_k}var _k,wl,Ak,mq=w(()=>{"use strict";pq();fD({thousands:",",grouping:[3],currency:["$",""]});a(fD,"defaultLocale")});function Rk(e){return Math.max(0,-Go(Math.abs(e)))}var gq=w(()=>{"use strict";t0();a(Rk,"default")});function Lk(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Go(t)/3)))*3-Go(Math.abs(e)))}var yq=w(()=>{"use strict";t0();a(Lk,"default")});function Ik(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Go(t)-Go(e))+1}var xq=w(()=>{"use strict";t0();a(Ik,"default")});var pD=w(()=>{"use strict";mq();aD();gq();yq();xq()});var bq=w(()=>{"use strict"});function C4e(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function mD(){return this.eachAfter(C4e)}var Tq=w(()=>{"use strict";a(C4e,"count");a(mD,"default")});function gD(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}var Cq=w(()=>{"use strict";a(gD,"default")});function yD(e,t){for(var r=this,n=[r],i,s,o=-1;r=n.pop();)if(e.call(t,r,++o,this),i=r.children)for(s=i.length-1;s>=0;--s)n.push(i[s]);return this}var kq=w(()=>{"use strict";a(yD,"default")});function xD(e,t){for(var r=this,n=[r],i=[],s,o,l,u=-1;r=n.pop();)if(i.push(r),s=r.children)for(o=0,l=s.length;o{"use strict";a(xD,"default")});function bD(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}var Eq=w(()=>{"use strict";a(bD,"default")});function TD(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}var vq=w(()=>{"use strict";a(TD,"default")});function CD(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var wq=w(()=>{"use strict";a(CD,"default")});function kD(e){for(var t=this,r=k4e(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function k4e(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var _q=w(()=>{"use strict";a(kD,"default");a(k4e,"leastCommonAncestor")});function SD(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Aq=w(()=>{"use strict";a(SD,"default")});function ED(){return Array.from(this)}var Rq=w(()=>{"use strict";a(ED,"default")});function vD(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var Lq=w(()=>{"use strict";a(vD,"default")});function wD(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var Iq=w(()=>{"use strict";a(wD,"default")});function*_D(){var e=this,t,r=[e],n,i,s;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,s=n.length;i{"use strict";a(_D,"default")});function hm(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=v4e)):t===void 0&&(t=E4e);for(var r=new r0(e),n,i=[r],s,o,l,u;n=i.pop();)if((o=t(n.data))&&(u=(o=Array.from(o)).length))for(n.children=o,l=u-1;l>=0;--l)i.push(s=o[l]=new r0(o[l])),s.parent=n,s.depth=n.depth+1;return r.eachBefore(_4e)}function S4e(){return hm(this).eachBefore(w4e)}function E4e(e){return e.children}function v4e(e){return Array.isArray(e)?e[1]:null}function w4e(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function _4e(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function r0(e){this.data=e,this.depth=this.height=0,this.parent=null}var Nq=w(()=>{"use strict";Tq();Cq();kq();Sq();Eq();vq();wq();_q();Aq();Rq();Lq();Iq();Dq();a(hm,"hierarchy");a(S4e,"node_copy");a(E4e,"objectChildren");a(v4e,"mapChildren");a(w4e,"copyData");a(_4e,"computeHeight");a(r0,"Node");r0.prototype=hm.prototype={constructor:r0,count:mD,each:gD,eachAfter:xD,eachBefore:yD,find:bD,sum:TD,sort:CD,path:kD,ancestors:SD,descendants:ED,leaves:vD,links:wD,copy:S4e,[Symbol.iterator]:_D}});function Mq(e){if(typeof e!="function")throw new Error;return e}var Oq=w(()=>{"use strict";a(Mq,"required")});function dm(){return 0}function Id(e){return function(){return e}}var Pq=w(()=>{"use strict";a(dm,"constantZero");a(Id,"default")});function AD(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var Bq=w(()=>{"use strict";a(AD,"default")});function RD(e,t,r,n,i){for(var s=e.children,o,l=-1,u=s.length,h=e.value&&(n-t)/e.value;++l{"use strict";a(RD,"default")});function LD(e,t,r,n,i){for(var s=e.children,o,l=-1,u=s.length,h=e.value&&(i-r)/e.value;++l{"use strict";a(LD,"default")});function R4e(e,t,r,n,i,s){for(var o=[],l=t.children,u,h,d=0,f=0,p=l.length,m,g,y=t.value,x,b,T,C,v,E,S;dT&&(T=h),S=x*x*E,C=Math.max(T/S,S/b),C>v){x-=h;break}v=C}o.push(u={value:x,dice:m{"use strict";$q();Fq();A4e=(1+Math.sqrt(5))/2;a(R4e,"squarifyRatio");Gq=a((function e(t){function r(n,i,s,o,l){R4e(t,n,i,s,o,l)}return a(r,"squarify"),r.ratio=function(n){return e((n=+n)>1?n:1)},r}),"custom")(A4e)});function Dk(){var e=Gq,t=!1,r=1,n=1,i=[0],s=dm,o=dm,l=dm,u=dm,h=dm;function d(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(f),i=[0],t&&p.eachBefore(AD),p}a(d,"treemap");function f(p){var m=i[p.depth],g=p.x0+m,y=p.y0+m,x=p.x1-m,b=p.y1-m;x{"use strict";Bq();Vq();Oq();Pq();a(Dk,"default")});var Uq=w(()=>{"use strict";Nq();zq()});var Wq=w(()=>{"use strict"});var jq=w(()=>{"use strict"});function Uu(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var n0=w(()=>{"use strict";a(Uu,"initRange")});function Pa(){var e=new Qp,t=[],r=[],n=ID;function i(s){let o=e.get(s);if(o===void 0){if(n!==ID)return n;e.set(s,o=t.push(s)-1)}return r[o%r.length]}return a(i,"scale"),i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Qp;for(let o of s)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Pa(t,r).unknown(n)},Uu.apply(i,arguments),i}var ID,DD=w(()=>{"use strict";Pu();n0();ID=Symbol("implicit");a(Pa,"ordinal")});function fm(){var e=Pa().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,s,o,l=!1,u=0,h=0,d=.5;delete e.unknown;function f(){var p=t().length,m=i{"use strict";Pu();n0();DD();a(fm,"band")});function ND(e){return function(){return e}}var Hq=w(()=>{"use strict";a(ND,"constants")});function MD(e){return+e}var Yq=w(()=>{"use strict";a(MD,"number")});function pm(e){return e}function OD(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:ND(isNaN(t)?NaN:.5)}function L4e(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function I4e(e,t,r){var n=e[0],i=e[1],s=t[0],o=t[1];return i2?D4e:I4e,u=h=null,f}a(d,"rescale");function f(p){return p==null||isNaN(p=+p)?s:(u||(u=l(e.map(n),t,r)))(n(o(p)))}return a(f,"scale"),f.invert=function(p){return o(i((h||(h=l(t,e.map(n),ns)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,MD),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),r=ck,d()},f.clamp=function(p){return arguments.length?(o=p?!0:pm,d()):o!==pm},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,m){return n=p,i=m,d()}}function i0(){return N4e()(pm,pm)}var Kq,PD=w(()=>{"use strict";Pu();lm();Hq();Yq();Kq=[0,1];a(pm,"identity");a(OD,"normalize");a(L4e,"clamper");a(I4e,"bimap");a(D4e,"polymap");a(Nk,"copy");a(N4e,"transformer");a(i0,"continuous")});function BD(e,t,r,n){var i=Zp(e,t,r),s;switch(n=zu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=Lk(i,o))&&(n.precision=s),Ak(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=Ik(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=Rk(i))&&(n.precision=s-(n.type==="%")*2);break}}return wl(n)}var Xq=w(()=>{"use strict";Pu();pD();a(BD,"tickFormat")});function M4e(e){var t=e.domain;return e.ticks=function(r){var n=t();return qC(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return BD(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,s=n.length-1,o=n[i],l=n[s],u,h,d=10;for(l0;){if(h=D1(o,l,r),h===u)return n[i]=o,n[s]=l,t(n);if(h>0)o=Math.floor(o/h)*h,l=Math.ceil(l/h)*h;else if(h<0)o=Math.ceil(o*h)/h,l=Math.floor(l*h)/h;else break;u=h}return e},e}function Vo(){var e=i0();return e.copy=function(){return Nk(e,Vo())},Uu.apply(e,arguments),M4e(e)}var Qq=w(()=>{"use strict";Pu();PD();n0();Xq();a(M4e,"linearish");a(Vo,"linear")});function $D(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],s=e[n],o;return s{"use strict";a($D,"nice")});function wn(e,t,r,n){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a(i,"interval"),i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{let o=i(s),l=i.ceil(s);return s-o(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{let u=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s0))return u;let h;do u.push(h=new Date(+s)),t(s,l),e(s);while(hwn(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!s(o););else for(;--l>=0;)for(;t(o,1),!s(o););}),r&&(i.count=(s,o)=>(FD.setTime(+s),GD.setTime(+o),e(FD),e(GD),Math.floor(r(FD,GD))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(n?o=>n(o)%s===0:o=>i.count(0,o)%s===0):i)),i}var FD,GD,Lc=w(()=>{"use strict";FD=new Date,GD=new Date;a(wn,"timeInterval")});var _l,Jq,VD=w(()=>{"use strict";Lc();_l=wn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);_l.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?wn(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):_l);Jq=_l.range});var Ba,eH,zD=w(()=>{"use strict";Lc();Ba=wn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),eH=Ba.range});var Ic,O4e,Mk,P4e,UD=w(()=>{"use strict";Lc();Ic=wn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),O4e=Ic.range,Mk=wn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),P4e=Mk.range});var Dc,B4e,Ok,$4e,WD=w(()=>{"use strict";Lc();Dc=wn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),B4e=Dc.range,Ok=wn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),$4e=Ok.range});var so,F4e,a0,G4e,Pk,V4e,jD=w(()=>{"use strict";Lc();so=wn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),F4e=so.range,a0=wn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),G4e=a0.range,Pk=wn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),V4e=Pk.range});function Md(e){return wn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}function Od(e){return wn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var zo,Wu,Bk,$k,Rl,Fk,Gk,rH,z4e,U4e,W4e,j4e,q4e,H4e,Pd,mm,nH,iH,ju,sH,aH,oH,Y4e,K4e,X4e,Q4e,Z4e,J4e,qD=w(()=>{"use strict";Lc();a(Md,"timeWeekday");zo=Md(0),Wu=Md(1),Bk=Md(2),$k=Md(3),Rl=Md(4),Fk=Md(5),Gk=Md(6),rH=zo.range,z4e=Wu.range,U4e=Bk.range,W4e=$k.range,j4e=Rl.range,q4e=Fk.range,H4e=Gk.range;a(Od,"utcWeekday");Pd=Od(0),mm=Od(1),nH=Od(2),iH=Od(3),ju=Od(4),sH=Od(5),aH=Od(6),oH=Pd.range,Y4e=mm.range,K4e=nH.range,X4e=iH.range,Q4e=ju.range,Z4e=sH.range,J4e=aH.range});var Nc,eMe,Vk,tMe,HD=w(()=>{"use strict";Lc();Nc=wn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),eMe=Nc.range,Vk=wn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),tMe=Vk.range});var $a,rMe,Uo,nMe,YD=w(()=>{"use strict";Lc();$a=wn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());$a.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:wn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});rMe=$a.range,Uo=wn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:wn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});nMe=Uo.range});function cH(e,t,r,n,i,s){let o=[[Ba,1,1e3],[Ba,5,5*1e3],[Ba,15,15*1e3],[Ba,30,30*1e3],[s,1,6e4],[s,5,5*6e4],[s,15,15*6e4],[s,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function l(h,d,f){let p=dx).right(o,p);if(m===o.length)return e.every(Zp(h/31536e6,d/31536e6,f));if(m===0)return _l.every(Math.max(Zp(h,d,f),1));let[g,y]=o[p/o[m-1][2]{"use strict";Pu();VD();zD();UD();WD();jD();qD();HD();YD();a(cH,"ticker");[sMe,aMe]=cH(Uo,Vk,Pd,Pk,Ok,Mk),[KD,XD]=cH($a,Nc,zo,so,Dc,Ic)});var zk=w(()=>{"use strict";VD();zD();UD();WD();jD();qD();HD();YD();uH()});function QD(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ZD(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function o0(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function JD(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,s=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,h=l0(i),d=c0(i),f=l0(s),p=c0(s),m=l0(o),g=c0(o),y=l0(l),x=c0(l),b=l0(u),T=c0(u),C={a:M,A:R,b:P,B:V,c:null,d:gH,e:gH,f:RMe,g:FMe,G:VMe,H:wMe,I:_Me,j:AMe,L:CH,m:LMe,M:IMe,p:U,q:z,Q:bH,s:TH,S:DMe,u:NMe,U:MMe,V:OMe,w:PMe,W:BMe,x:null,X:null,y:$Me,Y:GMe,Z:zMe,"%":xH},v={a:j,A:K,b:Z,B:ce,c:null,d:yH,e:yH,f:qMe,g:rOe,G:iOe,H:UMe,I:WMe,j:jMe,L:SH,m:HMe,M:YMe,p:te,q:me,Q:bH,s:TH,S:KMe,u:XMe,U:QMe,V:ZMe,w:JMe,W:eOe,x:null,X:null,y:tOe,Y:nOe,Z:sOe,"%":xH},E={a:$,A:O,b:G,B:I,c:F,d:pH,e:pH,f:kMe,g:fH,G:dH,H:mH,I:mH,j:xMe,L:CMe,m:yMe,M:bMe,p:B,q:gMe,Q:EMe,s:vMe,S:TMe,u:hMe,U:dMe,V:fMe,w:uMe,W:pMe,x:N,X:D,y:fH,Y:dH,Z:mMe,"%":SMe};C.x=S(r,C),C.X=S(n,C),C.c=S(t,C),v.x=S(r,v),v.X=S(n,v),v.c=S(t,v);function S(he,we){return function(ye){var ke=[],Fe=-1,Ge=0,Me=he.length,at,ht,ge;for(ye instanceof Date||(ye=new Date(+ye));++Fe53)return null;"w"in ke||(ke.w=1),"Z"in ke?(Ge=ZD(o0(ke.y,0,1)),Me=Ge.getUTCDay(),Ge=Me>4||Me===0?mm.ceil(Ge):mm(Ge),Ge=a0.offset(Ge,(ke.V-1)*7),ke.y=Ge.getUTCFullYear(),ke.m=Ge.getUTCMonth(),ke.d=Ge.getUTCDate()+(ke.w+6)%7):(Ge=QD(o0(ke.y,0,1)),Me=Ge.getDay(),Ge=Me>4||Me===0?Wu.ceil(Ge):Wu(Ge),Ge=so.offset(Ge,(ke.V-1)*7),ke.y=Ge.getFullYear(),ke.m=Ge.getMonth(),ke.d=Ge.getDate()+(ke.w+6)%7)}else("W"in ke||"U"in ke)&&("w"in ke||(ke.w="u"in ke?ke.u%7:"W"in ke?1:0),Me="Z"in ke?ZD(o0(ke.y,0,1)).getUTCDay():QD(o0(ke.y,0,1)).getDay(),ke.m=0,ke.d="W"in ke?(ke.w+6)%7+ke.W*7-(Me+5)%7:ke.w+ke.U*7-(Me+6)%7);return"Z"in ke?(ke.H+=ke.Z/100|0,ke.M+=ke.Z%100,ZD(ke)):QD(ke)}}a(_,"newParse");function A(he,we,ye,ke){for(var Fe=0,Ge=we.length,Me=ye.length,at,ht;Fe=Me)return-1;if(at=we.charCodeAt(Fe++),at===37){if(at=we.charAt(Fe++),ht=E[at in hH?we.charAt(Fe++):at],!ht||(ke=ht(he,ye,ke))<0)return-1}else if(at!=ye.charCodeAt(ke++))return-1}return ke}a(A,"parseSpecifier");function B(he,we,ye){var ke=h.exec(we.slice(ye));return ke?(he.p=d.get(ke[0].toLowerCase()),ye+ke[0].length):-1}a(B,"parsePeriod");function $(he,we,ye){var ke=m.exec(we.slice(ye));return ke?(he.w=g.get(ke[0].toLowerCase()),ye+ke[0].length):-1}a($,"parseShortWeekday");function O(he,we,ye){var ke=f.exec(we.slice(ye));return ke?(he.w=p.get(ke[0].toLowerCase()),ye+ke[0].length):-1}a(O,"parseWeekday");function G(he,we,ye){var ke=b.exec(we.slice(ye));return ke?(he.m=T.get(ke[0].toLowerCase()),ye+ke[0].length):-1}a(G,"parseShortMonth");function I(he,we,ye){var ke=y.exec(we.slice(ye));return ke?(he.m=x.get(ke[0].toLowerCase()),ye+ke[0].length):-1}a(I,"parseMonth");function F(he,we,ye){return A(he,t,we,ye)}a(F,"parseLocaleDateTime");function N(he,we,ye){return A(he,r,we,ye)}a(N,"parseLocaleDate");function D(he,we,ye){return A(he,n,we,ye)}a(D,"parseLocaleTime");function M(he){return o[he.getDay()]}a(M,"formatShortWeekday");function R(he){return s[he.getDay()]}a(R,"formatWeekday");function P(he){return u[he.getMonth()]}a(P,"formatShortMonth");function V(he){return l[he.getMonth()]}a(V,"formatMonth");function U(he){return i[+(he.getHours()>=12)]}a(U,"formatPeriod");function z(he){return 1+~~(he.getMonth()/3)}a(z,"formatQuarter");function j(he){return o[he.getUTCDay()]}a(j,"formatUTCShortWeekday");function K(he){return s[he.getUTCDay()]}a(K,"formatUTCWeekday");function Z(he){return u[he.getUTCMonth()]}a(Z,"formatUTCShortMonth");function ce(he){return l[he.getUTCMonth()]}a(ce,"formatUTCMonth");function te(he){return i[+(he.getUTCHours()>=12)]}a(te,"formatUTCPeriod");function me(he){return 1+~~(he.getUTCMonth()/3)}return a(me,"formatUTCQuarter"),{format:a(function(he){var we=S(he+="",C);return we.toString=function(){return he},we},"format"),parse:a(function(he){var we=_(he+="",!1);return we.toString=function(){return he},we},"parse"),utcFormat:a(function(he){var we=S(he+="",v);return we.toString=function(){return he},we},"utcFormat"),utcParse:a(function(he){var we=_(he+="",!0);return we.toString=function(){return he},we},"utcParse")}}function rn(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",s=i.length;return n+(s[t.toLowerCase(),r]))}function uMe(e,t,r){var n=is.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function hMe(e,t,r){var n=is.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function dMe(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fMe(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function pMe(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function dH(e,t,r){var n=is.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function fH(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function mMe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function gMe(e,t,r){var n=is.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function yMe(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function pH(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function xMe(e,t,r){var n=is.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function mH(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function bMe(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function TMe(e,t,r){var n=is.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function CMe(e,t,r){var n=is.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function kMe(e,t,r){var n=is.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function SMe(e,t,r){var n=oMe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function EMe(e,t,r){var n=is.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function vMe(e,t,r){var n=is.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function gH(e,t){return rn(e.getDate(),t,2)}function wMe(e,t){return rn(e.getHours(),t,2)}function _Me(e,t){return rn(e.getHours()%12||12,t,2)}function AMe(e,t){return rn(1+so.count($a(e),e),t,3)}function CH(e,t){return rn(e.getMilliseconds(),t,3)}function RMe(e,t){return CH(e,t)+"000"}function LMe(e,t){return rn(e.getMonth()+1,t,2)}function IMe(e,t){return rn(e.getMinutes(),t,2)}function DMe(e,t){return rn(e.getSeconds(),t,2)}function NMe(e){var t=e.getDay();return t===0?7:t}function MMe(e,t){return rn(zo.count($a(e)-1,e),t,2)}function kH(e){var t=e.getDay();return t>=4||t===0?Rl(e):Rl.ceil(e)}function OMe(e,t){return e=kH(e),rn(Rl.count($a(e),e)+($a(e).getDay()===4),t,2)}function PMe(e){return e.getDay()}function BMe(e,t){return rn(Wu.count($a(e)-1,e),t,2)}function $Me(e,t){return rn(e.getFullYear()%100,t,2)}function FMe(e,t){return e=kH(e),rn(e.getFullYear()%100,t,2)}function GMe(e,t){return rn(e.getFullYear()%1e4,t,4)}function VMe(e,t){var r=e.getDay();return e=r>=4||r===0?Rl(e):Rl.ceil(e),rn(e.getFullYear()%1e4,t,4)}function zMe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rn(t/60|0,"0",2)+rn(t%60,"0",2)}function yH(e,t){return rn(e.getUTCDate(),t,2)}function UMe(e,t){return rn(e.getUTCHours(),t,2)}function WMe(e,t){return rn(e.getUTCHours()%12||12,t,2)}function jMe(e,t){return rn(1+a0.count(Uo(e),e),t,3)}function SH(e,t){return rn(e.getUTCMilliseconds(),t,3)}function qMe(e,t){return SH(e,t)+"000"}function HMe(e,t){return rn(e.getUTCMonth()+1,t,2)}function YMe(e,t){return rn(e.getUTCMinutes(),t,2)}function KMe(e,t){return rn(e.getUTCSeconds(),t,2)}function XMe(e){var t=e.getUTCDay();return t===0?7:t}function QMe(e,t){return rn(Pd.count(Uo(e)-1,e),t,2)}function EH(e){var t=e.getUTCDay();return t>=4||t===0?ju(e):ju.ceil(e)}function ZMe(e,t){return e=EH(e),rn(ju.count(Uo(e),e)+(Uo(e).getUTCDay()===4),t,2)}function JMe(e){return e.getUTCDay()}function eOe(e,t){return rn(mm.count(Uo(e)-1,e),t,2)}function tOe(e,t){return rn(e.getUTCFullYear()%100,t,2)}function rOe(e,t){return e=EH(e),rn(e.getUTCFullYear()%100,t,2)}function nOe(e,t){return rn(e.getUTCFullYear()%1e4,t,4)}function iOe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ju(e):ju.ceil(e),rn(e.getUTCFullYear()%1e4,t,4)}function sOe(){return"+0000"}function xH(){return"%"}function bH(e){return+e}function TH(e){return Math.floor(+e/1e3)}var hH,is,oMe,lMe,vH=w(()=>{"use strict";zk();a(QD,"localDate");a(ZD,"utcDate");a(o0,"newDate");a(JD,"formatLocale");hH={"-":"",_:" ",0:"0"},is=/^\s*\d+/,oMe=/^%/,lMe=/[\\^$*+?|[\]().{}]/g;a(rn,"pad");a(cMe,"requote");a(l0,"formatRe");a(c0,"formatLookup");a(uMe,"parseWeekdayNumberSunday");a(hMe,"parseWeekdayNumberMonday");a(dMe,"parseWeekNumberSunday");a(fMe,"parseWeekNumberISO");a(pMe,"parseWeekNumberMonday");a(dH,"parseFullYear");a(fH,"parseYear");a(mMe,"parseZone");a(gMe,"parseQuarter");a(yMe,"parseMonthNumber");a(pH,"parseDayOfMonth");a(xMe,"parseDayOfYear");a(mH,"parseHour24");a(bMe,"parseMinutes");a(TMe,"parseSeconds");a(CMe,"parseMilliseconds");a(kMe,"parseMicroseconds");a(SMe,"parseLiteralPercent");a(EMe,"parseUnixTimestamp");a(vMe,"parseUnixTimestampSeconds");a(gH,"formatDayOfMonth");a(wMe,"formatHour24");a(_Me,"formatHour12");a(AMe,"formatDayOfYear");a(CH,"formatMilliseconds");a(RMe,"formatMicroseconds");a(LMe,"formatMonthNumber");a(IMe,"formatMinutes");a(DMe,"formatSeconds");a(NMe,"formatWeekdayNumberMonday");a(MMe,"formatWeekNumberSunday");a(kH,"dISO");a(OMe,"formatWeekNumberISO");a(PMe,"formatWeekdayNumberSunday");a(BMe,"formatWeekNumberMonday");a($Me,"formatYear");a(FMe,"formatYearISO");a(GMe,"formatFullYear");a(VMe,"formatFullYearISO");a(zMe,"formatZone");a(yH,"formatUTCDayOfMonth");a(UMe,"formatUTCHour24");a(WMe,"formatUTCHour12");a(jMe,"formatUTCDayOfYear");a(SH,"formatUTCMilliseconds");a(qMe,"formatUTCMicroseconds");a(HMe,"formatUTCMonthNumber");a(YMe,"formatUTCMinutes");a(KMe,"formatUTCSeconds");a(XMe,"formatUTCWeekdayNumberMonday");a(QMe,"formatUTCWeekNumberSunday");a(EH,"UTCdISO");a(ZMe,"formatUTCWeekNumberISO");a(JMe,"formatUTCWeekdayNumberSunday");a(eOe,"formatUTCWeekNumberMonday");a(tOe,"formatUTCYear");a(rOe,"formatUTCYearISO");a(nOe,"formatUTCFullYear");a(iOe,"formatUTCFullYearISO");a(sOe,"formatUTCZone");a(xH,"formatLiteralPercent");a(bH,"formatUnixTimestamp");a(TH,"formatUnixTimestampSeconds")});function eN(e){return gm=JD(e),Bd=gm.format,wH=gm.parse,_H=gm.utcFormat,AH=gm.utcParse,gm}var gm,Bd,wH,_H,AH,RH=w(()=>{"use strict";vH();eN({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});a(eN,"defaultLocale")});var tN=w(()=>{"use strict";RH()});function aOe(e){return new Date(e)}function oOe(e){return e instanceof Date?+e:+new Date(+e)}function LH(e,t,r,n,i,s,o,l,u,h){var d=i0(),f=d.invert,p=d.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),x=h("%I %p"),b=h("%a %d"),T=h("%b %d"),C=h("%B"),v=h("%Y");function E(S){return(u(S){"use strict";zk();tN();PD();n0();Zq();a(aOe,"date");a(oOe,"number");a(LH,"calendar");a(Uk,"time")});var DH=w(()=>{"use strict";qq();Qq();DD();IH()});function rN(e){for(var t=e.length/6|0,r=new Array(t),n=0;n{"use strict";a(rN,"default")});var nN,MH=w(()=>{"use strict";NH();nN=rN("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var OH=w(()=>{"use strict";MH()});function Bn(e){return a(function(){return e},"constant")}var Wk=w(()=>{"use strict";a(Bn,"default")});function BH(e){return e>1?0:e<-1?ym:Math.acos(e)}function sN(e){return e>=1?u0:e<=-1?-u0:Math.asin(e)}var iN,bs,qu,PH,jk,Wo,$d,ss,ym,u0,xm,qk=w(()=>{"use strict";iN=Math.abs,bs=Math.atan2,qu=Math.cos,PH=Math.max,jk=Math.min,Wo=Math.sin,$d=Math.sqrt,ss=1e-12,ym=Math.PI,u0=ym/2,xm=2*ym;a(BH,"acos");a(sN,"asin")});function Hk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Rd(t)}var aN=w(()=>{"use strict";rD();a(Hk,"withPath")});function lOe(e){return e.innerRadius}function cOe(e){return e.outerRadius}function uOe(e){return e.startAngle}function hOe(e){return e.endAngle}function dOe(e){return e&&e.padAngle}function fOe(e,t,r,n,i,s,o,l){var u=r-e,h=n-t,d=o-i,f=l-s,p=f*u-d*h;if(!(p*pF*F+N*N&&(A=$,B=O),{cx:A,cy:B,x01:-d,y01:-f,x11:A*(i/E-1),y11:B*(i/E-1)}}function jo(){var e=lOe,t=cOe,r=Bn(0),n=null,i=uOe,s=hOe,o=dOe,l=null,u=Hk(h);function h(){var d,f,p=+e.apply(this,arguments),m=+t.apply(this,arguments),g=i.apply(this,arguments)-u0,y=s.apply(this,arguments)-u0,x=iN(y-g),b=y>g;if(l||(l=d=u()),mss))l.moveTo(0,0);else if(x>xm-ss)l.moveTo(m*qu(g),m*Wo(g)),l.arc(0,0,m,g,y,!b),p>ss&&(l.moveTo(p*qu(y),p*Wo(y)),l.arc(0,0,p,y,g,b));else{var T=g,C=y,v=g,E=y,S=x,_=x,A=o.apply(this,arguments)/2,B=A>ss&&(n?+n.apply(this,arguments):$d(p*p+m*m)),$=jk(iN(m-p)/2,+r.apply(this,arguments)),O=$,G=$,I,F;if(B>ss){var N=sN(B/p*Wo(A)),D=sN(B/m*Wo(A));(S-=N*2)>ss?(N*=b?1:-1,v+=N,E-=N):(S=0,v=E=(g+y)/2),(_-=D*2)>ss?(D*=b?1:-1,T+=D,C-=D):(_=0,T=C=(g+y)/2)}var M=m*qu(T),R=m*Wo(T),P=p*qu(E),V=p*Wo(E);if($>ss){var U=m*qu(C),z=m*Wo(C),j=p*qu(v),K=p*Wo(v),Z;if(xss?G>ss?(I=Yk(j,K,M,R,m,G,b),F=Yk(U,z,P,V,m,G,b),l.moveTo(I.cx+I.x01,I.cy+I.y01),G<$?l.arc(I.cx,I.cy,G,bs(I.y01,I.x01),bs(F.y01,F.x01),!b):(l.arc(I.cx,I.cy,G,bs(I.y01,I.x01),bs(I.y11,I.x11),!b),l.arc(0,0,m,bs(I.cy+I.y11,I.cx+I.x11),bs(F.cy+F.y11,F.cx+F.x11),!b),l.arc(F.cx,F.cy,G,bs(F.y11,F.x11),bs(F.y01,F.x01),!b))):(l.moveTo(M,R),l.arc(0,0,m,T,C,!b)):l.moveTo(M,R),!(p>ss)||!(S>ss)?l.lineTo(P,V):O>ss?(I=Yk(P,V,U,z,p,-O,b),F=Yk(M,R,j,K,p,-O,b),l.lineTo(I.cx+I.x01,I.cy+I.y01),O<$?l.arc(I.cx,I.cy,O,bs(I.y01,I.x01),bs(F.y01,F.x01),!b):(l.arc(I.cx,I.cy,O,bs(I.y01,I.x01),bs(I.y11,I.x11),!b),l.arc(0,0,p,bs(I.cy+I.y11,I.cx+I.x11),bs(F.cy+F.y11,F.cx+F.x11),b),l.arc(F.cx,F.cy,O,bs(F.y11,F.x11),bs(F.y01,F.x01),!b))):l.arc(0,0,p,E,v,b)}if(l.closePath(),d)return l=null,d+""||null}return a(h,"arc"),h.centroid=function(){var d=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-ym/2;return[qu(f)*d,Wo(f)*d]},h.innerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:Bn(+d),h):e},h.outerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:Bn(+d),h):t},h.cornerRadius=function(d){return arguments.length?(r=typeof d=="function"?d:Bn(+d),h):r},h.padRadius=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Bn(+d),h):n},h.startAngle=function(d){return arguments.length?(i=typeof d=="function"?d:Bn(+d),h):i},h.endAngle=function(d){return arguments.length?(s=typeof d=="function"?d:Bn(+d),h):s},h.padAngle=function(d){return arguments.length?(o=typeof d=="function"?d:Bn(+d),h):o},h.context=function(d){return arguments.length?(l=d??null,h):l},h}var $H=w(()=>{"use strict";Wk();qk();aN();a(lOe,"arcInnerRadius");a(cOe,"arcOuterRadius");a(uOe,"arcStartAngle");a(hOe,"arcEndAngle");a(dOe,"arcPadAngle");a(fOe,"intersect");a(Yk,"cornerTangents");a(jo,"default")});function h0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var HRt,oN=w(()=>{"use strict";HRt=Array.prototype.slice;a(h0,"default")});function FH(e){this._context=e}function Ll(e){return new FH(e)}var lN=w(()=>{"use strict";a(FH,"Linear");FH.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}},"point")};a(Ll,"default")});function GH(e){return e[0]}function VH(e){return e[1]}var zH=w(()=>{"use strict";a(GH,"x");a(VH,"y")});function Fd(e,t){var r=Bn(!0),n=null,i=Ll,s=null,o=Hk(l);e=typeof e=="function"?e:e===void 0?GH:Bn(e),t=typeof t=="function"?t:t===void 0?VH:Bn(t);function l(u){var h,d=(u=h0(u)).length,f,p=!1,m;for(n==null&&(s=i(m=o())),h=0;h<=d;++h)!(h{"use strict";oN();Wk();lN();aN();zH();a(Fd,"default")});function cN(e,t){return te?1:t>=e?0:NaN}var WH=w(()=>{"use strict";a(cN,"default")});function uN(e){return e}var jH=w(()=>{"use strict";a(uN,"default")});function Kk(){var e=uN,t=cN,r=null,n=Bn(0),i=Bn(xm),s=Bn(0);function o(l){var u,h=(l=h0(l)).length,d,f,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),x=Math.min(xm,Math.max(-xm,i.apply(this,arguments)-y)),b,T=Math.min(Math.abs(x)/h,s.apply(this,arguments)),C=T*(x<0?-1:1),v;for(u=0;u0&&(p+=v);for(t!=null?m.sort(function(E,S){return t(g[E],g[S])}):r!=null&&m.sort(function(E,S){return r(l[E],l[S])}),u=0,f=p?(x-h*C)/p:0;u0?v*f:0)+C,g[d]={data:l[d],index:u,value:v,startAngle:y,endAngle:b,padAngle:T};return g}return a(o,"pie"),o.value=function(l){return arguments.length?(e=typeof l=="function"?l:Bn(+l),o):e},o.sortValues=function(l){return arguments.length?(t=l,r=null,o):t},o.sort=function(l){return arguments.length?(r=l,t=null,o):r},o.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Bn(+l),o):n},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Bn(+l),o):i},o.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Bn(+l),o):s},o}var qH=w(()=>{"use strict";oN();Wk();WH();jH();qk();a(Kk,"default")});function d0(e){return new Xk(e,!0)}function f0(e){return new Xk(e,!1)}var Xk,HH=w(()=>{"use strict";Xk=class{static{a(this,"Bump")}constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}};a(d0,"bumpX");a(f0,"bumpY")});function Fa(){}var p0=w(()=>{"use strict";a(Fa,"default")});function bm(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function m0(e){this._context=e}function Gd(e){return new m0(e)}var g0=w(()=>{"use strict";a(bm,"point");a(m0,"Basis");m0.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 3:bm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};a(Gd,"default")});function YH(e){this._context=e}function Qk(e){return new YH(e)}var KH=w(()=>{"use strict";p0();g0();a(YH,"BasisClosed");YH.prototype={areaStart:Fa,areaEnd:Fa,lineStart:a(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:bm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};a(Qk,"default")});function XH(e){this._context=e}function Zk(e){return new XH(e)}var QH=w(()=>{"use strict";g0();a(XH,"BasisOpen");XH.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:bm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};a(Zk,"default")});function ZH(e,t){this._basis=new m0(e),this._beta=t}var hN,JH=w(()=>{"use strict";g0();a(ZH,"Bundle");ZH.prototype={lineStart:a(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:a(function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],s=e[r]-n,o=t[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(n+u*s),this._beta*t[l]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:a(function(e,t){this._x.push(+e),this._y.push(+t)},"point")};hN=a((function e(t){function r(n){return t===1?new m0(n):new ZH(n,t)}return a(r,"bundle"),r.beta=function(n){return e(+n)},r}),"custom")(.85)});function Tm(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Jk(e,t){this._context=e,this._k=(1-t)/6}var y0,x0=w(()=>{"use strict";a(Tm,"point");a(Jk,"Cardinal");Jk.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Tm(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Tm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};y0=a((function e(t){function r(n){return new Jk(n,t)}return a(r,"cardinal"),r.tension=function(n){return e(+n)},r}),"custom")(0)});function e2(e,t){this._context=e,this._k=(1-t)/6}var dN,fN=w(()=>{"use strict";p0();x0();a(e2,"CardinalClosed");e2.prototype={areaStart:Fa,areaEnd:Fa,lineStart:a(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Tm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};dN=a((function e(t){function r(n){return new e2(n,t)}return a(r,"cardinal"),r.tension=function(n){return e(+n)},r}),"custom")(0)});function t2(e,t){this._context=e,this._k=(1-t)/6}var pN,mN=w(()=>{"use strict";x0();a(t2,"CardinalOpen");t2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};pN=a((function e(t){function r(n){return new t2(n,t)}return a(r,"cardinal"),r.tension=function(n){return e(+n)},r}),"custom")(0)});function b0(e,t,r){var n=e._x1,i=e._y1,s=e._x2,o=e._y2;if(e._l01_a>ss){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>ss){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*h+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(n,i,s,o,e._x2,e._y2)}function eY(e,t){this._context=e,this._alpha=t}var T0,r2=w(()=>{"use strict";qk();x0();a(b0,"point");a(eY,"CatmullRom");eY.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b0(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};T0=a((function e(t){function r(n){return t?new eY(n,t):new Jk(n,0)}return a(r,"catmullRom"),r.alpha=function(n){return e(+n)},r}),"custom")(.5)});function tY(e,t){this._context=e,this._alpha=t}var gN,rY=w(()=>{"use strict";fN();p0();r2();a(tY,"CatmullRomClosed");tY.prototype={areaStart:Fa,areaEnd:Fa,lineStart:a(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:a(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b0(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};gN=a((function e(t){function r(n){return t?new tY(n,t):new e2(n,0)}return a(r,"catmullRom"),r.alpha=function(n){return e(+n)},r}),"custom")(.5)});function nY(e,t){this._context=e,this._alpha=t}var yN,iY=w(()=>{"use strict";mN();r2();a(nY,"CatmullRomOpen");nY.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:a(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b0(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")};yN=a((function e(t){function r(n){return t?new nY(n,t):new t2(n,0)}return a(r,"catmullRom"),r.alpha=function(n){return e(+n)},r}),"custom")(.5)});function sY(e){this._context=e}function n2(e){return new sY(e)}var aY=w(()=>{"use strict";p0();a(sY,"LinearClosed");sY.prototype={areaStart:Fa,areaEnd:Fa,lineStart:a(function(){this._point=0},"lineStart"),lineEnd:a(function(){this._point&&this._context.closePath()},"lineEnd"),point:a(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")};a(n2,"default")});function oY(e){return e<0?-1:1}function lY(e,t,r){var n=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(s*i+o*n)/(n+i);return(oY(s)+oY(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function cY(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function xN(e,t,r){var n=e._x0,i=e._y0,s=e._x1,o=e._y1,l=(s-n)/3;e._context.bezierCurveTo(n+l,i+l*t,s-l,o-l*r,s,o)}function i2(e){this._context=e}function uY(e){this._context=new hY(e)}function hY(e){this._context=e}function C0(e){return new i2(e)}function k0(e){return new uY(e)}var dY=w(()=>{"use strict";a(oY,"sign");a(lY,"slope3");a(cY,"slope2");a(xN,"point");a(i2,"MonotoneX");i2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:a(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xN(this,this._t0,cY(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:a(function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,xN(this,cY(this,r=lY(this,e,t)),r);break;default:xN(this,this._t0,r=lY(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")};a(uY,"MonotoneY");(uY.prototype=Object.create(i2.prototype)).point=function(e,t){i2.prototype.point.call(this,t,e)};a(hY,"ReflectContext");hY.prototype={moveTo:a(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:a(function(){this._context.closePath()},"closePath"),lineTo:a(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:a(function(e,t,r,n,i,s){this._context.bezierCurveTo(t,e,n,r,s,i)},"bezierCurveTo")};a(C0,"monotoneX");a(k0,"monotoneY")});function pY(e){this._context=e}function fY(e){var t,r=e.length-1,n,i=new Array(r),s=new Array(r),o=new Array(r);for(i[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/s[t];for(s[r-1]=(e[r]+i[r-1])/2,t=0;t{"use strict";a(pY,"Natural");pY.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:a(function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=fY(e),i=fY(t),s=0,o=1;o{"use strict";a(s2,"Step");s2.prototype={areaStart:a(function(){this._line=0},"areaStart"),areaEnd:a(function(){this._line=NaN},"areaEnd"),lineStart:a(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:a(function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:a(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t},"point")};a(km,"default");a(S0,"stepBefore");a(E0,"stepAfter")});var yY=w(()=>{"use strict";$H();UH();qH();KH();QH();g0();HH();JH();fN();mN();x0();rY();iY();r2();aY();lN();dY();mY();gY()});var xY=w(()=>{"use strict"});var bY=w(()=>{"use strict"});function Hu(e,t,r){this.k=e,this.x=t,this.y=r}function TN(e){for(;!e.__zoom;)if(!(e=e.parentNode))return bN;return e.__zoom}var bN,CN=w(()=>{"use strict";a(Hu,"Transform");Hu.prototype={constructor:Hu,scale:a(function(e){return e===1?this:new Hu(this.k*e,this.x,this.y)},"scale"),translate:a(function(e,t){return e===0&t===0?this:new Hu(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:a(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:a(function(e){return e*this.k+this.x},"applyX"),applyY:a(function(e){return e*this.k+this.y},"applyY"),invert:a(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:a(function(e){return(e-this.x)/this.k},"invertX"),invertY:a(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:a(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:a(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:a(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};bN=new Hu(1,0,0);TN.prototype=Hu.prototype;a(TN,"transform")});var TY=w(()=>{"use strict"});var CY=w(()=>{"use strict";Sk();xY();bY();CN();TY()});var kY=w(()=>{"use strict";CY();CN()});var Lr=w(()=>{"use strict";Pu();LU();Kj();Jj();sm();eq();tq();c3();CW();rq();QI();nq();sq();pD();bq();Uq();lm();rD();Wq();iq();jq();DH();OH();Bo();yY();zk();tN();yk();Sk();kY()});var kN,Vd,a2,SY,o2,l2,Us,v0,Yu,Mc=w(()=>{"use strict";kN=Io(I1(),1);Lr();Ir();Vd=a((e,t)=>{let r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),t.attrs!==void 0)for(let n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),a2=a((e,t)=>{let r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};Vd(e,r).lower()},"drawBackgroundRect"),SY=a((e,t)=>{let r=t.text.replace(Hp," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),o2=a((e,t,r,n)=>{let i=e.append("image");i.attr("x",t),i.attr("y",r);let s=(0,kN.sanitizeUrl)(n);i.attr("xlink:href",s)},"drawImage"),l2=a((e,t,r,n)=>{let i=e.append("use");i.attr("x",t),i.attr("y",r);let s=(0,kN.sanitizeUrl)(n);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),Us=a(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),v0=a(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),Yu=a(()=>{let e=st(".mermaidTooltip");return e.empty()&&(e=st("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")),e},"createTooltip")});var EY,pOe,mOe,gOe,yOe,xOe,bOe,TOe,COe,kOe,w0,Il,vY=w(()=>{"use strict";Ir();Mc();EY=a(function(e,t){return Vd(e,t)},"drawRect"),pOe=a((e,t,r,n)=>{let i=e.append("g"),s=0;for(let o of t){let l=o.textColor?o.textColor:"#444444",u=o.lineColor?o.lineColor:"#444444",h=o.offsetX?parseInt(String(o.offsetX)):0,d=o.offsetY?parseInt(String(o.offsetY)):0,f="";if(s===0){let g=i.append("line");g.attr("x1",o.startPoint.x),g.attr("y1",o.startPoint.y),g.attr("x2",o.endPoint.x),g.attr("y2",o.endPoint.y),g.attr("stroke-width","1"),g.attr("stroke",u),g.style("fill","none"),o.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)"),s=-1}else{let g=i.append("path");g.attr("fill","none").attr("stroke-width","1").attr("stroke",u).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",o.startPoint.x).replaceAll("starty",o.startPoint.y).replaceAll("controlx",o.startPoint.x+(o.endPoint.x-o.startPoint.x)/2-(o.endPoint.x-o.startPoint.x)/4).replaceAll("controly",o.startPoint.y+(o.endPoint.y-o.startPoint.y)/2).replaceAll("stopx",o.endPoint.x).replaceAll("stopy",o.endPoint.y)),o.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)")}let p=o.label.width,m=r.messageFont();w0(r)(o.label.text,i,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+d,p,o.label.height,{fill:l},m),o.techn&&o.techn.text!==""&&(m=r.messageFont(),w0(r)("["+o.techn.text+"]",i,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+r.messageFontSize+5+d,Math.max(p,o.techn.width),o.techn.height,{fill:l,"font-style":"italic"},m))}},"drawRels"),mOe=a(function(e,t,r){let n=e.append("g"),i=t.bgColor?t.bgColor:"none",s=t.borderColor?t.borderColor:"#444444",o=t.fontColor?t.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(l={"stroke-width":1});let u={x:t.x,y:t.y,fill:i,stroke:s,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:l};EY(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=o,w0(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},h),t.type&&t.type.text!==""&&(h=r.boundaryFont(),h.fontColor=o,w0(r)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},h)),t.descr&&t.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=o,w0(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},h))},"drawBoundary"),gOe=a(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"),yOe=a(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"),xOe=a(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"),bOe=a(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),TOe=a(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),COe=a(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),kOe=a(function(e,t){let n=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=(function(){function e(i,s,o,l,u,h,d){let f=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(f,d)}a(e,"byText");function t(i,s,o,l,u,h,d,f){let{fontSize:p,fontFamily:m,fontWeight:g}=f,y=i.split(gt.lineBreakRegex);for(let x=0;x=0}var _Y=w(()=>{"use strict";a(wY,"isLength")});function u2(e){return e!=null&&typeof e!="function"&&wY(e.length)}var SN=w(()=>{"use strict";_Y();a(u2,"isArrayLike")});function AY(e){return e==="__proto__"}var RY=w(()=>{"use strict";a(AY,"isUnsafeProperty")});function Ku(e){return e==null||typeof e!="object"&&typeof e!="function"}var _0=w(()=>{"use strict";a(Ku,"isPrimitive")});function h2(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var EN=w(()=>{"use strict";a(h2,"getSymbols")});function Oc(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var A0=w(()=>{"use strict";a(Oc,"getTag")});var R0,Xu,zd,Ud,Wd,L0,I0,D0,N0,d2,M0,Sm,O0,f2,p2,m2,g2,y2,x2,b2,T2,C2,k2=w(()=>{"use strict";R0="[object RegExp]",Xu="[object String]",zd="[object Number]",Ud="[object Boolean]",Wd="[object Arguments]",L0="[object Symbol]",I0="[object Date]",D0="[object Map]",N0="[object Set]",d2="[object Array]",M0="[object ArrayBuffer]",Sm="[object Object]",O0="[object DataView]",f2="[object Uint8Array]",p2="[object Uint8ClampedArray]",m2="[object Uint16Array]",g2="[object Uint32Array]",y2="[object Int8Array]",x2="[object Int16Array]",b2="[object Int32Array]",T2="[object Float32Array]",C2="[object Float64Array]"});function Em(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var S2=w(()=>{"use strict";a(Em,"isTypedArray")});function LY(e,t){return vm(e,void 0,e,new Map,t)}function vm(e,t,r,n=new Map,i=void 0){let s=i?.(e,t,r,n);if(s!==void 0)return s;if(Ku(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){let o=new Array(e.length);n.set(e,o);for(let l=0;l{"use strict";EN();A0();k2();_0();S2();a(LY,"cloneDeepWith");a(vm,"cloneDeepWithImpl");a(ao,"copyProperties");a(SOe,"isCloneableObject")});function DY(e,t){return LY(e,(r,n,i,s)=>{let o=t?.(r,n,i,s);if(o!==void 0)return o;if(typeof e=="object"){if(Oc(e)===Sm&&typeof e.constructor!="function"){let l={};return s.set(e,l),ao(l,e,i,s),l}switch(Object.prototype.toString.call(e)){case zd:case Xu:case Ud:{let l=new e.constructor(e?.valueOf());return ao(l,e),l}case Wd:{let l={};return ao(l,e),l.length=e.length,l[Symbol.iterator]=e[Symbol.iterator],l}default:return}}})}var NY=w(()=>{"use strict";IY();A0();k2();a(DY,"cloneDeepWith")});function vN(e){return DY(e)}var MY=w(()=>{"use strict";NY();a(vN,"cloneDeep")});function P0(e){return e!==null&&typeof e=="object"&&Oc(e)==="[object Arguments]"}var wN=w(()=>{"use strict";A0();a(P0,"isArguments")});function B0(e){return typeof e=="object"&&e!==null}var _N=w(()=>{"use strict";a(B0,"isObjectLike")});function OY(e){return B0(e)&&u2(e)}var PY=w(()=>{"use strict";SN();_N();a(OY,"isArrayLikeObject")});function BY(e){return Array.isArray(e)}var $Y=w(()=>{"use strict";a(BY,"isArray")});function jd(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");let r=a(function(...i){let s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);let l=e.apply(this,i);return r.cache=o.set(s,l)||o,l},"memoized"),n=jd.Cache||Map;return r.cache=new n,r}var FY=w(()=>{"use strict";a(jd,"memoize");jd.Cache=Map});function GY(){}var VY=w(()=>{"use strict";a(GY,"noop")});function zY(e){let t=e?.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}var UY=w(()=>{"use strict";a(zY,"isPrototype")});function Qu(e){return Em(e)}var E2=w(()=>{"use strict";S2();a(Qu,"isTypedArray")});function RN(e){if(Ku(e))return e;let t=Oc(e);if(!EOe(e))return{};if(BY(e)){let n=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(n.index=e.index,n.input=e.input),n}if(Qu(e)){let n=e,i=n.constructor;return new i(n.buffer,n.byteOffset,n.length)}if(t===M0)return new ArrayBuffer(e.byteLength);if(t===O0){let n=e,i=n.buffer,s=n.byteOffset,o=n.byteLength,l=new ArrayBuffer(o),u=new Uint8Array(i,s,o);return new Uint8Array(l).set(u),new DataView(l)}if(t===Ud||t===zd||t===Xu){let n=e.constructor,i=new n(e.valueOf());return t===Xu?wOe(i,e):AN(i,e),i}if(t===I0)return new Date(Number(e));if(t===R0){let n=e,i=new RegExp(n.source,n.flags);return i.lastIndex=n.lastIndex,i}if(t===L0)return Object(Symbol.prototype.valueOf.call(e));if(t===D0){let n=e,i=new Map;return n.forEach((s,o)=>{i.set(o,s)}),i}if(t===N0){let n=e,i=new Set;return n.forEach(s=>{i.add(s)}),i}if(t===Wd){let n=e,i={};return AN(i,n),i.length=n.length,i[Symbol.iterator]=n[Symbol.iterator],i}let r={};return _Oe(r,e),AN(r,e),vOe(r,e),r}function EOe(e){switch(Oc(e)){case Wd:case d2:case M0:case O0:case Ud:case I0:case T2:case C2:case y2:case x2:case b2:case D0:case zd:case Sm:case R0:case N0:case Xu:case L0:case f2:case p2:case m2:case g2:return!0;default:return!1}}function AN(e,t){for(let r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function vOe(e,t){let r=Object.getOwnPropertySymbols(t);for(let n=0;n=r)&&(e[n]=t[n])}function _Oe(e,t){let r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}var WY=w(()=>{"use strict";_0();A0();k2();$Y();E2();a(RN,"clone");a(EOe,"isCloneableObject");a(AN,"copyOwnProperties");a(vOe,"copySymbolProperties");a(wOe,"cloneStringObjectProperties");a(_Oe,"copyPrototype")});function v2(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){let r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var jY=w(()=>{"use strict";a(v2,"isPlainObject")});function qY(e){if(Ku(e))return e;if(Array.isArray(e)||Em(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let n=new r(e);return n.lastIndex=e.lastIndex,n}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let n;return e instanceof AggregateError?n=new r(e.errors,e.message,{cause:e.cause}):n=new r(e.message,{cause:e.cause}),n.stack=e.stack,Object.assign(n,e),n}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){let n=Object.create(t);return Object.assign(n,e)}return e}var HY=w(()=>{"use strict";_0();S2();a(qY,"clone")});function YY(e,...t){let r=t.slice(0,-1),n=t[t.length-1],i=e;for(let s=0;s{"use strict";MY();RY();HY();_0();EN();wN();PY();_N();jY();E2();a(YY,"mergeWith");a(w2,"mergeWithDeep")});function LN(e,...t){return YY(e,...t,GY)}var XY=w(()=>{"use strict";KY();VY();a(LN,"merge")});function _2(e){if(e==null)return!0;if(u2(e))return typeof e.splice!="function"&&typeof e!="string"&&(typeof Buffer>"u"||!Buffer.isBuffer(e))&&!Qu(e)&&!P0(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return zY(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var QY=w(()=>{"use strict";wN();SN();E2();UY();a(_2,"isEmpty")});var A2=w(()=>{"use strict";FY();WY();XY();QY()});function NN(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return AOe[r]??t}function DOe(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,eK.sanitizeUrl)(r):r}function nK(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function MOe(e){let t,r=0;e.forEach(i=>{r+=nK(i,t),t=i});let n=r/2;return MN(e,n)}function OOe(e){return e.length===1?e[0]:MOe(e)}function BOe(e,t,r){let n=structuredClone(r);H.info("our points",n),t!=="start_left"&&t!=="start_right"&&n.reverse();let i=25+e,s=MN(n,i),o=10+e*.5,l=Math.atan2(n[0].y-s.y,n[0].x-s.x),u={x:0,y:0};return t==="start_left"?(u.x=Math.sin(l+Math.PI)*o+(n[0].x+s.x)/2,u.y=-Math.cos(l+Math.PI)*o+(n[0].y+s.y)/2):t==="end_right"?(u.x=Math.sin(l-Math.PI)*o+(n[0].x+s.x)/2,u.y=-Math.cos(l-Math.PI)*o+(n[0].y+s.y)/2):(u.x=Math.sin(l)*o+(n[0].x+s.x)/2,u.y=-Math.cos(l)*o+(n[0].y+s.y)/2),u}function ON(e){let t="",r="";for(let n of e)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function $Oe(e){let t="",r="0123456789abcdef",n=r.length;for(let i=0;iMath.round(parseFloat(s)).toString());return i.includes(r.toString())||i.includes(n.toString())}var eK,DN,AOe,ROe,LOe,tK,rK,IOe,NOe,ZY,MN,POe,JY,PN,BN,FOe,GOe,qd,VOe,$0,IN,R2,zOe,UOe,sa,Xt,sK,aa,oo,jt=w(()=>{"use strict";eK=Io(I1(),1);Lr();Ir();_C();bt();Nu();Gp();A2();$C();DN="\u200B",AOe={curveBasis:Gd,curveBasisClosed:Qk,curveBasisOpen:Zk,curveBumpX:d0,curveBumpY:f0,curveBundle:hN,curveCardinalClosed:dN,curveCardinalOpen:pN,curveCardinal:y0,curveCatmullRomClosed:gN,curveCatmullRomOpen:yN,curveCatmullRom:T0,curveLinear:Ll,curveLinearClosed:n2,curveMonotoneX:C0,curveMonotoneY:k0,curveNatural:Cm,curveStep:km,curveStepAfter:E0,curveStepBefore:S0},ROe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,LOe=a(function(e,t){let r=tK(e,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let o=r.map(l=>l.args);zp(o),n=Pn(n,[...o])}else n=r.args;if(!n)return;let i=Du(e,t),s="config";return n[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[s],delete n[s]),n},"detectInit"),tK=a(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${ROe.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n,i=[];for(;(n=yd.exec(e))!==null;)if(n.index===yd.lastIndex&&yd.lastIndex++,n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t)){let s=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:s,args:o})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(r){return H.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),rK=a(function(e){return e.replace(yd,"")},"removeDirectives"),IOe=a(function(e,t){for(let[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");a(NN,"interpolateToCurve");a(DOe,"formatUrl");NOe=a((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],s=window;for(let o=0;o{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),MN=a((e,t)=>{let r,n=t;for(let i of e){if(r){let s=nK(i,r);if(s===0)return r;if(s=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:ZY((1-o)*r.x+o*i.x,5),y:ZY((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),POe=a((e,t,r)=>{H.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=MN(t,25),s=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(o)*s+(t[0].x+i.x)/2,l.y=-Math.cos(o)*s+(t[0].y+i.y)/2,l},"calcCardinalityPosition");a(BOe,"calcTerminalLabelPosition");a(ON,"getStylesFromArray");JY=0,PN=a(()=>(JY++,"id-"+Math.random().toString(36).substr(2,12)+"-"+JY),"generateId");a($Oe,"makeRandomHex");BN=a(e=>$Oe(e.length),"random"),FOe=a(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),GOe=a(function(e,t){let r=t.text.replace(gt.lineBreakRegex," "),[,n]=sa(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);let s=i.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),i},"drawSimpleText"),qd=jd((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),gt.hasBreaks(e)))return e;let n=e.split(" ").filter(Boolean),i=[],s="";return n.forEach((o,l)=>{let u=Ts(`${o} `,r),h=Ts(s,r);if(u>t){let{hyphenatedStrings:p,remainingWord:m}=VOe(o,t,"-",r);i.push(s,...p),s=m}else h+u>=t?(i.push(s),s=o):s=[s,o].filter(Boolean).join(" ");l+1===n.length&&i.push(s)}),i.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),VOe=jd((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...e],s=[],o="";return i.forEach((l,u)=>{let h=`${o}${l}`;if(Ts(h,n)>=t){let f=u+1,p=i.length===f,m=`${h}${r}`;s.push(p?h:m),o=""}else o=h}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);a(L2,"calculateTextHeight");a(Ts,"calculateTextWidth");$0=jd((e,t)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,s]=sa(r),o=["sans-serif",n],l=e.split(gt.lineBreakRegex),u=[],h=st("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let d=h.append("svg");for(let p of o){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let x=FOe();x.text=y||DN;let b=GOe(d,x).style("font-size",s).style("font-weight",i).style("font-family",p),T=(b._groups||b)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,T.width)),m=Math.round(T.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}d.remove();let f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),IN=class{constructor(t=!1,r){this.count=0;this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{a(this,"InitIDGenerator")}},zOe=a(function(e){return R2=R2||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),R2.innerHTML=e,unescape(R2.textContent)},"entityDecode");a($N,"isDetailedError");a(iK,"getErrorMessage");UOe=a((e,t,r,n)=>{if(!n)return;let i=e.node()?.getBBox();i&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),sa=a(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");a(Nr,"cleanAndMerge");Xt={assignWithDepth:Pn,wrapLabel:qd,calculateTextHeight:L2,calculateTextWidth:Ts,calculateTextDimensions:$0,cleanAndMerge:Nr,detectInit:LOe,detectDirective:tK,isSubstringInArray:IOe,interpolateToCurve:NN,calcLabelPosition:OOe,calcCardinalityPosition:POe,calcTerminalLabelPosition:BOe,formatUrl:DOe,getStylesFromArray:ON,generateId:PN,random:BN,runFunc:NOe,entityDecode:zOe,insertTitle:UOe,isLabelCoordinateInPath:WOe,parseFontSize:sa,InitIDGenerator:IN},sK=a(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),t},"encodeEntities"),aa=a(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),oo=a((e,t,{counter:r=0,prefix:n,suffix:i},s)=>s||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");a(Hr,"handleUndefinedAttr");a(WOe,"isLabelCoordinateInPath")});var aK,oK=w(()=>{"use strict";Lr();aK=a((e,t)=>{if(t==="sandbox"){let n=st("#i"+e).node()?.contentDocument;if(!n)throw new Error(`Sandbox iframe #i${e} is missing its content document`);return{root:st(n.body),doc:n}}return{root:st("body"),doc:document}},"getDiagramRoot")});var NNt,wm=w(()=>{"use strict";NNt=typeof performance<"u"&&typeof performance.now=="function";globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"}});function zN(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function fK(e){Yd=e}function pn(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:a((i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Ws.caret,"$1"),r=r.replace(i,o),n},"replace"),getRegex:a(()=>new RegExp(r,t),"getRegex")};return n}function Dl(e,t){if(t){if(Ws.escapeTest.test(e))return e.replace(Ws.escapeReplace,cK)}else if(Ws.escapeTestNoEncode.test(e))return e.replace(Ws.escapeReplaceNoEncode,cK);return e}function uK(e){try{e=encodeURI(e).replace(Ws.percentDecode,"%")}catch{return null}return e}function hK(e,t){let r=e.replace(Ws.findPipe,(s,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(Ws.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function dK(e,t,r,n,i){let s=t.href,o=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function v5e(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(` +`).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[l]=o;return l.length>=i.length?s.slice(i.length):s}).join(` +`)}function cn(e,t){return Hd.parse(e,t)}var Yd,z0,Ws,jOe,qOe,HOe,U0,YOe,UN,pK,mK,KOe,WN,XOe,jN,QOe,ZOe,O2,qN,JOe,gK,e5e,HN,lK,t5e,r5e,n5e,i5e,yK,s5e,P2,YN,xK,a5e,bK,o5e,l5e,c5e,TK,u5e,h5e,CK,d5e,f5e,p5e,m5e,g5e,y5e,x5e,D2,b5e,kK,SK,T5e,KN,C5e,FN,k5e,I2,F0,S5e,cK,N2,Pc,M2,XN,Bc,V0,w5e,Hd,PNt,BNt,$Nt,FNt,GNt,VNt,zNt,EK=w(()=>{"use strict";a(zN,"L");Yd=zN();a(fK,"G");z0={exec:a(()=>null,"exec")};a(pn,"h");Ws={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:a(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},jOe=/^(?:[ \t]*(?:\n|$))+/,qOe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,HOe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,U0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,YOe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,UN=/(?:[*+-]|\d{1,9}[.)])/,pK=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mK=pn(pK).replace(/bull/g,UN).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(),KOe=pn(pK).replace(/bull/g,UN).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(),WN=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XOe=/^[^\n]+/,jN=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,QOe=pn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",jN).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ZOe=pn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,UN).getRegex(),O2="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",qN=/|$))/,JOe=pn("^ {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",qN).replace("tag",O2).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),gK=pn(WN).replace("hr",U0).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",O2).getRegex(),e5e=pn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",gK).getRegex(),HN={blockquote:e5e,code:qOe,def:QOe,fences:HOe,heading:YOe,hr:U0,html:JOe,lheading:mK,list:ZOe,newline:jOe,paragraph:gK,table:z0,text:XOe},lK=pn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",U0).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",O2).getRegex(),t5e={...HN,lheading:KOe,table:lK,paragraph:pn(WN).replace("hr",U0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",lK).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",O2).getRegex()},r5e={...HN,html:pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",qN).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:z0,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pn(WN).replace("hr",U0).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",mK).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},n5e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,i5e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yK=/^( {2,}|\\)\n(?!\s*$)/,s5e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,TK=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,u5e=pn(TK,"u").replace(/punct/g,P2).getRegex(),h5e=pn(TK,"u").replace(/punct/g,bK).getRegex(),CK="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",d5e=pn(CK,"gu").replace(/notPunctSpace/g,xK).replace(/punctSpace/g,YN).replace(/punct/g,P2).getRegex(),f5e=pn(CK,"gu").replace(/notPunctSpace/g,l5e).replace(/punctSpace/g,o5e).replace(/punct/g,bK).getRegex(),p5e=pn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xK).replace(/punctSpace/g,YN).replace(/punct/g,P2).getRegex(),m5e=pn(/\\(punct)/,"gu").replace(/punct/g,P2).getRegex(),g5e=pn(/^<(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(),y5e=pn(qN).replace("(?:-->|$)","-->").getRegex(),x5e=pn("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",y5e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D2=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,b5e=pn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",D2).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kK=pn(/^!?\[(label)\]\[(ref)\]/).replace("label",D2).replace("ref",jN).getRegex(),SK=pn(/^!?\[(ref)\](?:\[\])?/).replace("ref",jN).getRegex(),T5e=pn("reflink|nolink(?!\\()","g").replace("reflink",kK).replace("nolink",SK).getRegex(),KN={_backpedal:z0,anyPunctuation:m5e,autolink:g5e,blockSkip:c5e,br:yK,code:i5e,del:z0,emStrongLDelim:u5e,emStrongRDelimAst:d5e,emStrongRDelimUnd:p5e,escape:n5e,link:b5e,nolink:SK,punctuation:a5e,reflink:kK,reflinkSearch:T5e,tag:x5e,text:s5e,url:z0},C5e={...KN,link:pn(/^!?\[(label)\]\((.*?)\)/).replace("label",D2).getRegex(),reflink:pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D2).getRegex()},FN={...KN,emStrongRDelimAst:f5e,emStrongLDelim:h5e,url:pn(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},cK=a(e=>S5e[e],"ke");a(Dl,"w");a(uK,"J");a(hK,"V");a(G0,"z");a(E5e,"ge");a(dK,"fe");a(v5e,"Je");N2=class{static{a(this,"y")}options;rules;lexer;constructor(e){this.options=e||Yd}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:G0(r,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=v5e(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=G0(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:G0(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=G0(t[0],` +`).split(` +`),n="",i="",s=[];for(;r.length>0;){let o=!1,l=[],u;for(u=0;u1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let s=this.rules.other.listItemRegex(r),o=!1;for(;e;){let u=!1,h="",d="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let f=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),p=e.split(` +`,1)[0],m=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):m?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=t[1].length),m&&this.rules.other.blankLine.test(p)&&(h+=p+` +`,e=e.substring(p.length+1),u=!0),!u){let b=this.rules.other.nextBulletRegex(g),T=this.rules.other.hrRegex(g),C=this.rules.other.fencesBeginRegex(g),v=this.rules.other.headingBeginRegex(g),E=this.rules.other.htmlBeginRegex(g);for(;e;){let S=e.split(` +`,1)[0],_;if(p=S,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),_=p):_=p.replace(this.rules.other.tabCharGlobal," "),C.test(p)||v.test(p)||E.test(p)||b.test(p)||T.test(p))break;if(_.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=` +`+_.slice(g);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||v.test(f)||T.test(f))break;d+=` +`+p}!m&&!p.trim()&&(m=!0),h+=S+` +`,e=e.substring(S.length+1),f=_.slice(g)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),i.raw+=h}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let u=0;uf.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=d}if(i.loose)for(let u=0;u({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[u]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=G0(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=E5e(t[2],"()");if(s===-2)return;if(s>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),dK(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[n.toLowerCase()];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return dK(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,s,o,l=i,u=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+i);(n=h.exec(t))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&i%3&&!((i+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let d=[...n[0]][0].length,f=e.slice(0,i+n.index+d+o);if(Math.min(i,o)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Pc=class GN{static{a(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Yd,this.options.tokenizer=this.options.tokenizer||new N2,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:Ws,block:I2.normal,inline:F0.normal};this.options.pedantic?(r.block=I2.pedantic,r.inline=F0.pedantic):this.options.gfm&&(r.block=I2.gfm,this.options.breaks?r.inline=F0.breaks:r.inline=F0.gfm),this.tokenizer.rules=r}static get rules(){return{block:I2,inline:F0}}static lex(t,r){return new GN(r).lex(t)}static lexInline(t,r){return new GN(r).inlineTokens(t)}lex(t){t=t.replace(Ws.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=` +`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),n=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,n,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},M2=class{static{a(this,"P")}options;parser;constructor(e){this.options=e||Yd}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(Ws.notSpaceStart)?.[0],i=e.replace(Ws.endingNewline,"")+` +`;return n?'
'+(r?i:Dl(i,!0))+`
+`:"
"+(r?i:Dl(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o +`+n+" +`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+Dl(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

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

    An error occurred:

    "+Dl(r.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Hd=new w5e;a(cn,"d");cn.options=cn.setOptions=function(e){return Hd.setOptions(e),cn.defaults=Hd.defaults,fK(cn.defaults),cn};cn.getDefaults=zN;cn.defaults=Yd;cn.use=function(...e){return Hd.use(...e),cn.defaults=Hd.defaults,fK(cn.defaults),cn};cn.walkTokens=function(e,t){return Hd.walkTokens(e,t)};cn.parseInline=Hd.parseInline;cn.Parser=Bc;cn.parser=Bc.parse;cn.Renderer=M2;cn.TextRenderer=XN;cn.Lexer=Pc;cn.lexer=Pc.lex;cn.Tokenizer=N2;cn.Hooks=V0;cn.parse=cn;PNt=cn.options,BNt=cn.setOptions,$Nt=cn.use,FNt=cn.walkTokens,GNt=cn.parseInline,VNt=Bc.parse,zNt=Pc.lex});function _5e(e,{markdownAutoWrap:t}){let n=e.replace(//g,` +`).replace(/\n{2,}/g,` +`);return MC(n)}function vK(e){return e.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function B2(e,t={}){let r=_5e(e,t),n=cn.lexer(r),i=[[]],s=0;function o(l,u="normal"){l.type==="text"?l.text.split(` +`).forEach((d,f)=>{f!==0&&(s++,i.push([])),d.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&i[s].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&i[s].push({content:l.text,type:"normal"})}return a(o,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"?i[s].push({content:l.text,type:"normal"}):i[s].push({content:l.raw,type:"normal"})}),i}function wK(e){return e?`

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

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

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

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(H.warn(`Unsupported markdown: ${i.type}`),i.raw)}return a(n,"output"),r.map(n).join("")}var QN=w(()=>{"use strict";EK();PL();bt();a(_5e,"preprocessMarkdown");a(vK,"nonMarkdownToLines");a(B2,"markdownToLines");a(wK,"nonMarkdownToHTML");a(_K,"markdownToHTML")});var AK,RK=w(()=>{"use strict";AK=(function(e){"use strict";var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function n(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e),t("initialized",h)}a(n,"FastDom"),n.prototype={constructor:n,runTasks:a(function(h){t("run tasks");for(var d;d=h.shift();)d()},"runTasks"),measure:a(function(h,d){t("measure");var f=d?h.bind(d):h;return this.reads.push(f),i(this),f},"measure"),mutate:a(function(h,d){t("mutate");var f=d?h.bind(d):h;return this.writes.push(f),i(this),f},"mutate"),clear:a(function(h){return t("clear",h),o(this.reads,h)||o(this.writes,h)},"clear"),extend:a(function(h){if(t("extend",h),typeof h!="object")throw new Error("expected object");var d=Object.create(this);return l(d,h),d.fastdom=this,d.initialize&&d.initialize(),d},"extend"),catch:null};function i(h){h.scheduled||(h.scheduled=!0,h.raf(s.bind(null,h)),t("flush scheduled"))}a(i,"scheduleFlush");function s(h){t("flush");var d=h.writes,f=h.reads,p;try{t("flushing reads",f.length),h.runTasks(f),t("flushing writes",d.length),h.runTasks(d)}catch(m){p=m}if(h.scheduled=!1,(f.length||d.length)&&i(h),p)if(t("task errored",p.message),h.catch)h.catch(p);else throw p}a(s,"flush");function o(h,d){var f=h.indexOf(d);return!!~f&&!!h.splice(f,1)}a(o,"remove");function l(h,d){for(var f in d)d.hasOwnProperty(f)&&(h[f]=d[f])}a(l,"mixin");var u=e.fastdom=e.fastdom||new n;return u})(typeof window<"u"?window:globalThis)});function LK(e,t,r,n){var i=e._tasks,s=e.fastdom,o,l=new Promise(function(u,h){o=s[t](function(){i.delete(l);try{u(n?r.call(n):r())}catch(d){h(d)}},n)});return i.set(l,o),l}var IK,n4t,i4t,s4t,a4t,DK,NK=w(()=>{"use strict";IK={initialize:a(function(){this._tasks=new Map},"initialize"),mutate:a(function(e,t){return LK(this,"mutate",e,t)},"mutate"),measure:a(function(e,t){return LK(this,"measure",e,t)},"measure"),clear:a(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};a(LK,"create");({initialize:n4t,mutate:i4t,measure:s4t,clear:a4t}=IK),DK=IK});var A5e,Nl,$2=w(()=>{"use strict";RK();NK();A5e=AK.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(DK),Nl=A5e});function R5e(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function L5e(e,t){let r=R5e(t.content);return MK(e,[],r,t.type)}function MK(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];let[i,...s]=r,o=[...t,i];return e([{content:o.join(""),type:n}])?MK(e,o,s,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function OK(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ZN(e,t)}function ZN(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());let s=e.shift()??{content:" ",type:"normal"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(s),t(o))return ZN(e,t,r,o);if(n.length>0)r.push(n),e.unshift(s);else if(s.content){let[l,u]=L5e(t,s);r.push([l]),u.content&&e.unshift(u)}return ZN(e,t,r)}var PK=w(()=>{"use strict";a(R5e,"splitTextToChars");a(L5e,"splitWordToFitWidth");a(MK,"splitWordToFitWidthRecursion");a(OK,"splitLineToFitWidth");a(ZN,"splitLineToFitWidthRecursion")});function BK(e,t){t&&e.attr("style",t)}async function I5e(e,t,r,n,i=!1,s=Ct(),o=0){let l=e.append("foreignObject");l.attr("width",`${Math.min(10*r,$K)}px`),l.attr("height",`${Math.min(10*r,$K)}px`);let u=l.append("xhtml:div"),h=Un(t.label)?await Yp(t.label.replace(gt.lineBreakRegex,` +`),s):vr(t.label,s),d=t.isNode?"nodeLabel":"edgeLabel",f=u.append("span");f.html(h),BK(f,t.labelStyle),f.attr("class",`${d} ${n}`),BK(u,t.labelStyle),u.style("display","table-cell"),u.style("white-space","nowrap"),u.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(u.style("max-width",r+"px"),u.style("text-align","center")),u.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&u.attr("class","labelBkg");let p=await Nl.measure(()=>u.node().getBoundingClientRect());return p.width===r?(u.style("display","table"),u.style("white-space","break-spaces"),u.style("width",r+"px")):p.widthD5e(o,1.1,m)<=e,"checkWidth"),p=f(d)?[d]:OK(d,f);for(let m of p){let g=JN(u,h,1.1,i);e4(g,m),h++}}if(n){let d=u.node().getBBox(),f=2;return l.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return u.node()}function FK(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function e4(e,t){e.text(""),t.forEach((r,n)=>{let i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(FK(r.content)):i.text(" "+FK(r.content))})}async function M5e(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,s,o)=>(r.push((async()=>{let l=`${s}:${o}`;return await NC(l)?await na(l,void 0,{class:"label-icon"}):``})()),i));let n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var $K,li,qo=w(()=>{"use strict";Lr();Ir();bt();wm();QN();jt();$2();Sc();PK();Tr();a(BK,"applyStyle");$K=16384;a(I5e,"addHtmlSpan");a(JN,"createTspan");a(D5e,"computeWidthOfText");a(GK,"computeDimensionOfText");a(N5e,"createFormattedText");a(FK,"decodeHTMLEntities");a(e4,"updateTextContentAndStyles");a(M5e,"replaceIconSubstring");li=a(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:s=!0,markdown:o=!0,isNode:l=!0,width:u=200,minWidth:h=0,addSvgBackground:d=!1}={},f)=>{if(H.debug("XYZ createText",t,r,n,i,s,l,"addSvgBackground: ",d),s){let p=o?_K(t,f):wK(t),m=await M5e(aa(p),f),g=t.replace(/\\\\/g,"\\"),y={isNode:l,label:Un(t)?g:m,labelStyle:r.replace("fill:","color:")};return await I5e(e,y,u,i,d,f,h)}else{let p=aa(t.replace(//g,"
    ")),m=o?B2(p.replace("
    ","
    "),f):vK(p),g=N5e(u,e,m,t?d:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");st(g).attr("style",y)}else{let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");st(g).select("rect").attr("style",y.replace(/background:/g,"fill:"));let x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");st(g).select("text").attr("style",x)}return n?st(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):st(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText")});async function F2(e){let t=e.getElementsByTagName("img");if(!t||t.length===0)return;let r=!VK(e);await Promise.all([...t].map(n=>new Promise(i=>{function s(){if(n.style.display="flex",n.style.flexDirection="column",r){let o=_e().fontSize?_e().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[u=dr.fontSize]=sa(o),h=u*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";i(n)}a(s,"setupImage"),setTimeout(()=>{n.complete&&s()}),n.addEventListener("error",s),n.addEventListener("load",s)})))}function VK(e){return e.nodeType===P5e?e.textContent?.trim()!=="":e.nodeType!==O5e||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(VK)}var O5e,P5e,t4=w(()=>{"use strict";Gt();Gi();jt();O5e=1,P5e=3;a(F2,"configureLabelImages");a(VK,"hasTextBesidesImages")});var zK,B5e,UK,WK=w(()=>{"use strict";Lr();qo();Gt();Ir();jt();zK=3,B5e=32,UK=a(async(e,t,r)=>{let n=_e(),i=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),s=i.insert("g").attr("class","label").attr("style",Hr(t.labelStyle)),l=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(b=>({text:b,cssClass:"c4-descr"}))].filter(b=>b.text),u=t.width?Math.max(t.width-2*(t.padding??0),B5e):_e().flowchart?.wrappingWidth??200,d=n.c4?.wrap??!0?u:Number.POSITIVE_INFINITY,f=await Promise.all(l.map(async b=>{let T=s.append("g").attr("class",b.cssClass),C=await li(T,vr(aa(b.text??""),n),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:t.labelStyle},n);return st(C).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),st(C).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:T,box:T.node().getBBox()}})),p=Math.max(...f.map(({box:b})=>b.width),0),m=0;for(let{el:b,box:T}of f)b.attr("transform",`translate(${p/2-T.x-T.width/2}, ${m-T.y})`),m+=T.height+zK;let g=f.length>0?m-zK:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-p/2}, ${-g/2})`);let y=s.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:i,bbox:y,halfPadding:x,label:s}},"c4LabelHelper")});function rr(e){let t=e.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function lo(e,t,r,n,i,s){let o=[],u=r-e,h=n-t,d=u/s,f=2*Math.PI/d,p=t+h/2;for(let m=0;m<=50;m++){let g=m/50,y=e+g*u,x=p+i*Math.sin(f*(y-e));o.push({x:y,y:x})}return o}function Ga(e,t,r,n,i,s){let o=[],l=i*Math.PI/180,d=(s*Math.PI/180-l)/(n-1);for(let f=0;fu.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=t.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",n);let i=t.find(u=>u.getAttribute("fill")!=="none"),s=t.find(u=>u.getAttribute("stroke")!=="none"),o=a((u,h)=>u?.getAttribute(h)??void 0,"getAttr");if(i){let u={fill:o(i,"fill"),"fill-opacity":o(i,"fill-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}if(s){let u={stroke:o(s,"stroke"),"stroke-width":o(s,"stroke-width")??"1","stroke-opacity":o(s,"stroke-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}let l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}var jK,ct,Ho,tt,ut,It=w(()=>{"use strict";qo();$2();Gt();Tr();Lr();Ir();jt();t4();wm();WK();jK=a((e,t)=>{let{x:r,y:n,width:i,height:s}=e;return i>=t?e:"left"in e?{x:r,y:n,width:t,height:s,top:n,left:r,bottom:n+s,right:r+t,toJSON:a(()=>({}),"toJSON")}:{x:r-(t-i)/2,y:n,width:t,height:s}},"withMinWidth"),ct=a(async(e,t,r,{ignoreMinWidth:n=!1}={})=>{if(t.stereotype!==void 0)return UK(e,t,r);let i,s=t.useHtmlLabels||Ji(_e()?.htmlLabels);r?i=r:i="node default";let o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),l=o.insert("g").attr("class","label").attr("style",Hr(t.labelStyle)),u;t.label===void 0?u="":u=typeof t.label=="string"?t.label:t.label[0];let h=!!t.icon||!!t.img,d=t.labelType==="markdown",f=u&&!t.width&&!n?t.minWidth??0:0,p=await li(l,vr(aa(u),_e()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||_e().flowchart?.wrappingWidth,minWidth:f,classes:d?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:d},_e()),m=(t?.padding??0)/2,g;if(s){let y=p.children[0],x=st(p);await F2(y),g=await Nl.measure(()=>y.getBoundingClientRect()),g=jK(g,f),x.attr("width",g.width),x.attr("height",g.height)}else g=await Nl.measure(()=>p.getBBox()),g=jK(g,f);return s?l.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):l.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:g,halfPadding:m,label:l}},"labelHelper"),Ho=a(async(e,t,r)=>{let n=r.useHtmlLabels??vn(_e()),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await li(i,vr(aa(t),_e()),{useHtmlLabels:n,width:r.width||_e()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2,l;if(vn(_e())){let u=s.children[0],h=st(s);l=await Nl.measure(()=>u.getBoundingClientRect()),h.attr("width",l.width),h.attr("height",l.height)}else l=await Nl.measure(()=>s.getBBox());return n?i.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):i.attr("transform","translate(0, "+-l.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:l,halfPadding:o,label:i}},"insertLabel"),tt=a((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}let n=t.node().getBBox();e.width=n.width,e.height=n.height},"updateNodeBounds"),ut=a((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");a(rr,"createPathFromPoints");a(lo,"generateFullSineWavePoints");a(Ga,"generateCirclePoints");a(r4,"mergePaths")});function $5e(e,t){return e.intersect(t)}var qK,HK=w(()=>{"use strict";a($5e,"intersectNode");qK=$5e});function F5e(e,t,r,n){var i=e.x,s=e.y,o=i-n.x,l=s-n.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);n.x{"use strict";a(F5e,"intersectEllipse");G2=F5e});function G5e(e,t,r){return G2(e,t,t,r)}var YK,KK=w(()=>{"use strict";n4();a(G5e,"intersectCircle");YK=G5e});function V5e(e,t,r,n){{let i=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,l=i*r.x+s*r.y+o,u=i*n.x+s*n.y+o,h=1e-6;if(l!==0&&u!==0&&XK(l,u))return;let d=n.y-r.y,f=r.x-n.x,p=n.x*r.y-r.x*n.y,m=d*e.x+f*e.y+p,g=d*t.x+f*t.y+p;if(Math.abs(m)0}var QK,ZK=w(()=>{"use strict";a(V5e,"intersectLine");a(XK,"sameSign");QK=V5e});function z5e(e,t,r){let n=e.x,i=e.y,s=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){o=Math.min(o,d.x),l=Math.min(l,d.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let u=n-e.width/2-o,h=i-e.height/2-l;for(let d=0;d1&&s.sort(function(d,f){let p=d.x-r.x,m=d.y-r.y,g=Math.sqrt(p*p+m*m),y=f.x-r.x,x=f.y-r.y,b=Math.sqrt(y*y+x*x);return g{"use strict";ZK();a(z5e,"intersectPolygon");JK=z5e});var U5e,co,V2=w(()=>{"use strict";U5e=a((e,t)=>{var r=e.x,n=e.y,i=t.x-r,s=t.y-n,o=e.width/2,l=e.height/2,u,h;return Math.abs(s)*o>Math.abs(i)*l?(s<0&&(l=-l),u=s===0?0:l*i/s,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*s/i),{x:r+u,y:n+h}},"intersectRect"),co=U5e});var He,Ft=w(()=>{"use strict";HK();KK();n4();eX();V2();He={node:qK,circle:YK,ellipse:G2,polygon:JK,rect:co}});var tX,W5e,oa,j5e,W0,Ze,et,q5e,Ot=w(()=>{"use strict";Gt();tX=a(e=>{let{handDrawnSeed:t}=_e();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),W5e=a(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),oa=a(e=>{let t=j5e([...e.cssCompiledStyles||[],...e.cssStyles||[],...W5e(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),j5e=a(e=>{let t=new Map;return e.forEach(r=>{let[n,i]=r.split(":");t.set(n.trim(),i?.trim())}),t},"styles2Map"),W0=a(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),Ze=a(e=>{let{stylesArray:t}=oa(e),r=[],n=[],i=[],s=[];return t.forEach(o=>{let l=o[0];W0(l)?r.push(o.join(":")+" !important"):(n.push(o.join(":")+" !important"),l.includes("stroke")&&i.push(o.join(":")+" !important"),l==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:s}},"styles2String"),et=a((e,t)=>{let{themeVariables:r,handDrawnSeed:n}=_e(),{nodeBorder:i,mainBkg:s}=r,{stylesMap:o}=oa(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:o.get("stroke")||i,seed:n,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:q5e(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),q5e=a(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let i=isNaN(t[0])?0:t[0];return[i,i]}let r=isNaN(t[0])?0:t[0],n=isNaN(t[1])?0:t[1];return[r,n]},"getStrokeDashArray")});function i4(e,t,r){if(e&&e.length){let[n,i]=t,s=Math.PI/180*r,o=Math.cos(s),l=Math.sin(s);for(let u of e){let[h,d]=u;u[0]=(h-n)*o-(d-i)*l+n,u[1]=(h-n)*l+(d-i)*o+i}}}function H5e(e,t){return e[0]===t[0]&&e[1]===t[1]}function Y5e(e,t,r,n=1){let i=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(i)for(let h of o)i4(h,l,i);let u=(function(h,d,f){let p=[];for(let T of h){let C=[...T];H5e(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&p.push(C)}let m=[];d=Math.max(d,.1);let g=[];for(let T of p)for(let C=0;CT.yminC.ymin?1:T.xC.x?1:T.ymax===C.ymax?0:(T.ymax-C.ymax)/Math.abs(T.ymax-C.ymax))),!g.length)return m;let y=[],x=g[0].ymin,b=0;for(;y.length||g.length;){if(g.length){let T=-1;for(let C=0;Cx);C++)T=C;g.splice(0,T+1).forEach((C=>{y.push({s:x,edge:C})}))}if(y=y.filter((T=>!(T.edge.ymax<=x))),y.sort(((T,C)=>T.edge.x===C.edge.x?0:(T.edge.x-C.edge.x)/Math.abs(T.edge.x-C.edge.x))),(f!==1||b%d==0)&&y.length>1)for(let T=0;T=y.length)break;let v=y[T].edge,E=y[C].edge;m.push([[Math.round(v.x),x],[Math.round(E.x),x]])}x+=f,y.forEach((T=>{T.edge.x=T.edge.x+f*T.edge.islope})),b++}return m})(o,s,n);if(i){for(let h of o)i4(h,l,-i);(function(h,d,f){let p=[];h.forEach((m=>p.push(...m))),i4(p,d,f)})(u,l,-i)}return u}function Y0(e,t){var r;let n=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=i),Y5e(e,i,n,s||1)}function X2(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function a4(e,t){return e.type===t}function T4(e){let t=[],r=(function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:K5e,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:s4,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:rX,text:""},l})(e),n="BOD",i=0,s=r[i];for(;!a4(s,rX);){let o=0,l=[];if(n==="BOD"){if(s.text!=="M"&&s.text!=="m")return T4("M0,0"+e);i++,o=z2[s.text],n=s.text}else a4(s,s4)?o=z2[n]:(i++,o=z2[s.text],n=s.text);if(!(i+od%2?h+r:h+t));s.push({key:"C",data:u}),t=u[4],r=u[5];break}case"Q":s.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{let u=l.map(((h,d)=>d%2?h+r:h+t));s.push({key:"Q",data:u}),t=u[2],r=u[3];break}case"A":s.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],s.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":s.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{let u=l.map(((h,d)=>d%2?h+r:h+t));s.push({key:"S",data:u}),t=u[2],r=u[3];break}case"T":s.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=n,r=i}return s}function hX(e){let t=[],r="",n=0,i=0,s=0,o=0,l=0,u=0;for(let{key:h,data:d}of e){switch(h){case"M":t.push({key:"M",data:[...d]}),[n,i]=d,[s,o]=d;break;case"C":t.push({key:"C",data:[...d]}),n=d[4],i=d[5],l=d[2],u=d[3];break;case"L":t.push({key:"L",data:[...d]}),[n,i]=d;break;case"H":n=d[0],t.push({key:"L",data:[n,i]});break;case"V":i=d[0],t.push({key:"L",data:[n,i]});break;case"S":{let f=0,p=0;r==="C"||r==="S"?(f=n+(n-l),p=i+(i-u)):(f=n,p=i),t.push({key:"C",data:[f,p,...d]}),l=d[0],u=d[1],n=d[2],i=d[3];break}case"T":{let[f,p]=d,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,x=i+2*(g-i)/3,b=f+2*(m-f)/3,T=p+2*(g-p)/3;t.push({key:"C",data:[y,x,b,T,f,p]}),l=m,u=g,n=f,i=p;break}case"Q":{let[f,p,m,g]=d,y=n+2*(f-n)/3,x=i+2*(p-i)/3,b=m+2*(f-m)/3,T=g+2*(p-g)/3;t.push({key:"C",data:[y,x,b,T,m,g]}),l=f,u=p,n=m,i=g;break}case"A":{let f=Math.abs(d[0]),p=Math.abs(d[1]),m=d[2],g=d[3],y=d[4],x=d[5],b=d[6];f===0||p===0?(t.push({key:"C",data:[n,i,x,b,x,b]}),n=x,i=b):(n!==x||i!==b)&&(dX(n,i,x,b,f,p,m,g,y).forEach((function(T){t.push({key:"C",data:T})})),n=x,i=b);break}case"Z":t.push({key:"Z",data:[]}),n=s,i=o}r=h}return t}function j0(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function dX(e,t,r,n,i,s,o,l,u,h){let d=(f=o,Math.PI*f/180);var f;let p=[],m=0,g=0,y=0,x=0;if(h)[m,g,y,x]=h;else{[e,t]=j0(e,t,-d),[r,n]=j0(r,n,-d);let I=(e-r)/2,F=(t-n)/2,N=I*I/(i*i)+F*F/(s*s);N>1&&(N=Math.sqrt(N),i*=N,s*=N);let D=i*i,M=s*s,R=D*M-D*F*F-M*I*I,P=D*F*F+M*I*I,V=(l===u?-1:1)*Math.sqrt(Math.abs(R/P));y=V*i*F/s+(e+r)/2,x=V*-s*I/i+(t+n)/2,m=Math.asin(parseFloat(((t-x)/s).toFixed(9))),g=Math.asin(parseFloat(((n-x)/s).toFixed(9))),eg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let b=g-m;if(Math.abs(b)>120*Math.PI/180){let I=g,F=r,N=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=dX(r=y+i*Math.cos(g),n=x+s*Math.sin(g),F,N,i,s,o,0,u,[g,I,y,x])}b=g-m;let T=Math.cos(m),C=Math.sin(m),v=Math.cos(g),E=Math.sin(g),S=Math.tan(b/4),_=4/3*i*S,A=4/3*s*S,B=[e,t],$=[e+_*C,t-A*T],O=[r+_*E,n-A*v],G=[r,n];if($[0]=2*B[0]-$[0],$[1]=2*B[1]-$[1],h)return[$,O,G].concat(p);{p=[$,O,G].concat(p);let I=[];for(let F=0;F2){let i=[];for(let s=0;s2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,x=Math.min(y/2,(g-m)/2),b=lX(x,h,d,f,p,m,g,1,u);if(!u.disableMultiStroke){let T=lX(x,h,d,f,p,m,g,1.5,u);b.push(...T)}return o&&(l?b.push(...Zu(h,d,h+f*Math.cos(m),d+p*Math.sin(m),u),...Zu(h,d,h+f*Math.cos(g),d+p*Math.sin(g),u)):b.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+f*Math.cos(m),d+p*Math.sin(m)]})),{type:"path",ops:b}}function sX(e,t){let r=hX(uX(T4(e))),n=[],i=[0,0],s=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":s=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Zu(s[0],s[1],l[0],l[1],t)),s=[l[0],l[1]];break;case"C":{let[u,h,d,f,p,m]=l;n.push(...Z5e(u,h,d,f,p,m,s,t)),s=[p,m];break}case"Z":n.push(...Zu(s[0],s[1],i[0],i[1],t)),s=[i[0],i[1]]}return{type:"path",ops:n}}function o4(e,t){let r=[];for(let n of e)if(n.length){let i=t.maxRandomnessOffset||0,s=n.length;if(s>2){r.push({op:"move",data:[n[0][0]+br(i,t),n[0][1]+br(i,t)]});for(let o=1;o500?.4:-.0016668*u+1.233334;let d=i.maxRandomnessOffset||0;d*d*100>l&&(d=u/10);let f=d/2,p=.2+.2*mX(i),m=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;m=br(m,i,h),g=br(g,i,h);let y=[],x=a(()=>br(f,i,h),"M"),b=a(()=>br(d,i,h),"k"),T=i.preserveVertices;return s&&(o?y.push({op:"move",data:[e+(T?0:x()),t+(T?0:x())]}):y.push({op:"move",data:[e+(T?0:br(d,i,h)),t+(T?0:br(d,i,h))]})),o?y.push({op:"bcurveTo",data:[m+e+(r-e)*p+x(),g+t+(n-t)*p+x(),m+e+2*(r-e)*p+x(),g+t+2*(n-t)*p+x(),r+(T?0:x()),n+(T?0:x())]}):y.push({op:"bcurveTo",data:[m+e+(r-e)*p+b(),g+t+(n-t)*p+b(),m+e+2*(r-e)*p+b(),g+t+2*(n-t)*p+b(),r+(T?0:b()),n+(T?0:b())]}),y}function U2(e,t,r){if(!e.length)return[];let n=[];n.push([e[0][0]+br(t,r),e[0][1]+br(t,r)]),n.push([e[0][0]+br(t,r),e[0][1]+br(t,r)]);for(let i=1;i3){let s=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+21&&i.push(l)):i.push(l),i.push(e[t+3])}else{let u=e[t+0],h=e[t+1],d=e[t+2],f=e[t+3],p=Kd(u,h,.5),m=Kd(h,d,.5),g=Kd(d,f,.5),y=Kd(p,m,.5),x=Kd(m,g,.5),b=Kd(y,x,.5);y4([u,p,y,b],0,r,i),y4([b,x,g,f],0,r,i)}var s,o;return i}function ePe(e,t){return K2(e,0,e.length,t)}function K2(e,t,r,n,i){let s=i||[],o=e[t],l=e[r-1],u=0,h=1;for(let d=t+1;du&&(u=f,h=d)}return Math.sqrt(u)>n?(K2(e,t,h+1,n,s),K2(e,h,r,n,s)):(s.length||s.push(o),s.push(l)),s}function l4(e,t=.15,r){let n=[],i=(e.length-1)/3;for(let s=0;s0?K2(n,0,n.length,r):n}var H0,c4,u4,h4,d4,f4,la,p4,K5e,s4,rX,z2,X5e,Va,Am,x4,W2,b4,Xe,$t=w(()=>{"use strict";a(i4,"t");a(H5e,"e");a(Y5e,"s");a(Y0,"n");H0=class{static{a(this,"o")}constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let n=Y0(t,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(t,r){let n=[];for(let i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};a(X2,"a");c4=class extends H0{static{a(this,"h")}fillPolygons(t,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=Y0(t,Object.assign({},r,{hachureGap:n})),s=Math.PI/180*r.hachureAngle,o=[],l=.5*n*Math.cos(s),u=.5*n*Math.sin(s);for(let[h,d]of i)X2([h,d])&&o.push([[h[0]-l,h[1]+u],[...d]],[[h[0]+l,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},u4=class extends H0{static{a(this,"r")}fillPolygons(t,r){let n=this._fillPolygons(t,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,i);return n.ops=n.ops.concat(s.ops),n}},h4=class{static{a(this,"i")}constructor(t){this.helper=t}fillPolygons(t,r){let n=Y0(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(t,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);let o=i/4;for(let l of t){let u=X2(l),h=u/i,d=Math.ceil(h)-1,f=u-d*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=X2(o),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,d=o[0],f=o[1];d[0]>f[0]&&(d=o[1],f=o[0]);let p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let m=0;m{let o=X2(s),l=Math.round(o/(2*r)),u=s[0],h=s[1];u[0]>h[0]&&(u=s[1],h=s[0]);let d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f2*Math.PI&&(_=0,A=2*Math.PI);let B=(A-_)/T.curveStepCount,$=[];for(let O=_;O<=A;O+=B)$.push([C+E*Math.cos(O),v+S*Math.sin(O)]);return $.push([C+E*Math.cos(A),v+S*Math.sin(A)]),$.push([C,v]),_m([$],T)})(t,r,n,i,s,o,h));return h.stroke!==Va&&d.push(f),this._d("arc",d,h)}curve(t,r){let n=this._o(r),i=[],s=nX(t,n);if(n.fill&&n.fill!==Va)if(n.fillStyle==="solid"){let o=nX(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=t;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...l4(cX([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):o.push(...l4(cX(h),10,(1+n.roughness)/2))}o.length&&i.push(_m([o],n))}return n.stroke!==Va&&i.push(s),this._d("curve",i,n)}polygon(t,r){let n=this._o(r),i=[],s=j2(t,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(o4([t],n)):i.push(_m([t],n))),n.stroke!==Va&&i.push(s),this._d("polygon",i,n)}path(t,r){let n=this._o(r),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let s=n.fill&&n.fill!=="transparent"&&n.fill!==Va,o=n.stroke!==Va,l=!!(n.simplification&&n.simplification<1),u=(function(d,f,p){let m=hX(uX(T4(d))),g=[],y=[],x=[0,0],b=[],T=a(()=>{b.length>=4&&y.push(...l4(b,f)),b=[]},"i"),C=a(()=>{T(),y.length&&(g.push(y),y=[])},"c");for(let{key:E,data:S}of m)switch(E){case"M":C(),x=[S[0],S[1]],y.push(x);break;case"L":T(),y.push([S[0],S[1]]);break;case"C":if(!b.length){let _=y.length?y[y.length-1]:x;b.push([_[0],_[1]])}b.push([S[0],S[1]]),b.push([S[2],S[3]]),b.push([S[4],S[5]]);break;case"Z":T(),y.push([x[0],x[1]])}if(C(),!p)return g;let v=[];for(let E of g){let S=ePe(E,p);S.length&&v.push(S)}return v})(t,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=sX(t,n);if(s)if(n.fillStyle==="solid")if(u.length===1){let d=sX(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else i.push(o4(u,n));else i.push(_m(u,n));return o&&(l?u.forEach((d=>{i.push(j2(d,!1,n))})):i.push(h)),this._d("path",i,n)}opsToPath(t,r){let n="";for(let i of t.ops){let s=typeof r=="number"&&r>=0?i.data.map((o=>+o.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":n+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":n+=`L${s[0]} ${s[1]} `}}return n.trim()}toPaths(t){let r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(let s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Va};break;case"fillPath":o={d:this.opsToPath(s),stroke:Va,strokeWidth:0,fill:n.fill||Va};break;case"fillSketch":o=this.fillSketch(s,n)}o&&i.push(o)}return i}fillSketch(t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Va,strokeWidth:n,fill:Va}}_mergedShape(t){return t.filter(((r,n)=>n===0||r.op!=="move"))}},x4=class{static{a(this,"st")}constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Am(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,o,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,s,l),i.restore();break}case"fillSketch":this.fillSketch(i,o,n)}}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=i,this._drawToContext(t,r,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,n,i="nonzero"){t.beginPath();for(let s of r.ops){let o=typeof n=="number"&&n>=0?s.data.map((l=>+l.toFixed(n))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,n,i,s){let o=this.gen.line(t,r,n,i,s);return this.draw(o),o}rectangle(t,r,n,i,s){let o=this.gen.rectangle(t,r,n,i,s);return this.draw(o),o}ellipse(t,r,n,i,s){let o=this.gen.ellipse(t,r,n,i,s);return this.draw(o),o}circle(t,r,n,i){let s=this.gen.circle(t,r,n,i);return this.draw(s),s}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n),n}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n),n}arc(t,r,n,i,s,o,l=!1,u){let h=this.gen.arc(t,r,n,i,s,o,l,u);return this.draw(h),h}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n),n}path(t,r){let n=this.gen.path(t,r);return this.draw(n),n}},W2="http://www.w3.org/2000/svg",b4=class{static{a(this,"ot")}constructor(t,r){this.svg=t,this.gen=new Am(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(W2,"g"),o=t.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(W2,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(W2,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&s.appendChild(u)}return s}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let s=t.createElementNS(W2,"path");return s.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),s.setAttribute("stroke",n.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),n.fillLineDash&&s.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,n,i,s){let o=this.gen.line(t,r,n,i,s);return this.draw(o)}rectangle(t,r,n,i,s){let o=this.gen.rectangle(t,r,n,i,s);return this.draw(o)}ellipse(t,r,n,i,s){let o=this.gen.ellipse(t,r,n,i,s);return this.draw(o)}circle(t,r,n,i){let s=this.gen.circle(t,r,n,i);return this.draw(s)}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n)}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n)}arc(t,r,n,i,s,o,l=!1,u){let h=this.gen.arc(t,r,n,i,s,o,l,u);return this.draw(h)}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n)}path(t,r){let n=this.gen.path(t,r);return this.draw(n)}},Xe={canvas:a((e,t)=>new x4(e,t),"canvas"),svg:a((e,t)=>new b4(e,t),"svg"),generator:a(e=>new Am(e),"generator"),newSeed:a(()=>Am.newSeed(),"newSeed")}});function gX(e,t){let{labelStyles:r}=Ze(t);t.labelStyle=r;let n=ut(t),i=n;n||(i="anchor");let s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=1,{cssStyles:l}=t,u=Xe.svg(s),h=et(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let d=u.circle(0,0,o*2,h),f=s.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",Hr(l)),tt(t,f),t.intersect=function(p){return H.info("Circle intersect",t,o,p),He.circle(t,o,p)},s}var yX=w(()=>{"use strict";bt();It();Ft();Ot();$t();jt();a(gX,"anchor")});function xX(e,t,r,n,i,s,o){let u=(e+r)/2,h=(t+n)/2,d=Math.atan2(n-t,r-e),f=(r-e)/2,p=(n-t)/2,m=f/i,g=p/s,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let x=Math.sqrt(1-y**2),b=u+x*s*Math.sin(d)*(o?-1:1),T=h-x*i*Math.cos(d)*(o?-1:1),C=Math.atan2((t-T)/s,(e-b)/i),E=Math.atan2((n-T)/s,(r-b)/i)-C;o&&E<0&&(E+=2*Math.PI),!o&&E>0&&(E-=2*Math.PI);let S=[];for(let _=0;_<20;_++){let A=_/19,B=C+A*E,$=b+i*Math.cos(B),O=T+s*Math.sin(B);S.push({x:$,y:O})}return S}function tPe(e,t,r){let[n,i]=[t,r].sort((s,o)=>o-s);return i*(1-Math.sqrt(1-(e/n/2)**2))}async function bX(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=a(B=>B+o,"calcTotalHeight"),u=a(B=>{let $=B/2;return[$/(2.5+B/50),$]},"calcEllipseRadius"),{shapeSvg:h,bbox:d}=await ct(e,t,ut(t)),f=l(t?.height?t?.height:d.height),[p,m]=u(f),g=tPe(f,p,m),x=(t?.width?t?.width:d.width)+s*2+g-g,b=f,{cssStyles:T}=t,C=[{x:x/2,y:-b/2},{x:-x/2,y:-b/2},...xX(-x/2,-b/2,-x/2,b/2,p,m,!1),{x:x/2,y:b/2},...xX(x/2,b/2,x/2,-b/2,p,m,!0)],v=Xe.svg(h),E=et(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let S=rr(C),_=v.path(S,E),A=h.insert(()=>_,":first-child");return A.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",T),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${p/2}, 0)`),tt(t,A),t.intersect=function(B){return He.polygon(t,C,B)},h}var TX=w(()=>{"use strict";It();Ft();Ot();$t();a(xX,"generateArcPoints");a(tPe,"calculateArcSagitta");a(bX,"bowTieRect")});async function CX(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let{shapeSvg:s,bbox:o,label:l}=await ct(e,t,ut(t)),u=r?.nodeBorder??r?.lineColor??"currentColor",h=t.padding??12,d=Math.max(o.width+h*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(o.height+h*2+f,t.height??0),m=-p/2+f,g=p/2,y=d*.72,x=[`M${-d/2},${m}`,`L${-y/2},${g}`,`A${y/2},${f} 0 0 0 ${y/2},${g}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,"Z"].join(" "),{cssStyles:b}=t,T=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let A=Xe.svg(s).path(x,et(t,{}));T.node()?.appendChild(A),b&&T.attr("style",b)}else T.append("path").attr("d",x).attr("style",i);T.append("ellipse").attr("cx",0).attr("cy",m).attr("rx",d/2).attr("ry",f).attr("style",`fill:none;stroke:${u};stroke-width:1px`),tt(t,T);let C=m+(g-m)/2;l.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`);let v=12,E=a((_,A,B)=>Array.from({length:v+1},($,O)=>{let G=Math.PI-O*Math.PI/v;return{x:_*Math.cos(G),y:A+B*f*Math.sin(G)}}),"arc"),S=[...E(d/2,m,-1),...E(y/2,g,1).reverse()];return t.intersect=function(_){return He.polygon(t,S,_)},s}var kX=w(()=>{"use strict";It();Ft();Ot();$t();a(CX,"bucket")});var Zn,Yo=w(()=>{"use strict";Zn=a((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD")});var K0,rPe,nPe,zi,Ui,iPe,Di,Ml,uo,ci,Wi=w(()=>{"use strict";K0=new Set(["redux-color","redux-dark-color"]),rPe=12,nPe=64,zi=a(e=>Array.isArray(e)&&e.length>0,"hasPalette"),Ui=a((e,t)=>e!=null&&K0.has(e)&&zi(t),"isColorTheme"),iPe=/^[\w-]+$/,Di=a(e=>{let t=typeof e=="string"||typeof e=="number"?String(e):"";return iPe.test(t)?t:"classic"},"safeLook"),Ml=a(e=>zi(e)?e.length:0,"paletteSlotCount"),uo=a((e,t)=>zi(t)?Ml(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=nPe?e:rPe,"colorSlotCount"),ci=a((e,t,r,n)=>{if(t===void 0||!Ui(r,n))return;let i=t%Ml(n);e.attr("data-color-id",`color-${i}`)},"stampColorSlot")});function oPe(e){let{themeVariables:t}=_e(),r=t.clusterBkg,n=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:aPe,fill:r,stroke:n,cssClass:"collapsed-group"}}}async function SX(e,t){let r=oPe(t.metadata?.containerType),{fill:n,stroke:i}=r,{nodeStyles:s}=Ze(t),{shapeSvg:o,bbox:l}=await ct(e,t,ut(t)),{theme:u,themeVariables:h}=_e();ci(o,t.colorIndex,u,h.borderColorArray);let d=t.padding??8,f=l.height,p=Math.max(l.width+d*2,sPe,t?.width??0),m=Math.max(f+k4+C4+d*2,t?.height??0),g=-p/2,y=-m/2,x=-(k4+C4)/2,b=o.select(".label");b&&(t.useHtmlLabels??vn(_e())?b.attr("transform",`translate(${-l.width/2}, ${-l.height/2+x})`):b.attr("transform",`translate(0, ${-l.height/2+x})`));let T;if(t.look==="handDrawn"){let _=Xe.svg(o),A=et(t,{fill:n,stroke:i,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...n==="none"?{fillWeight:0}:{fillStyle:"solid"}}),B=_.path(Zn(g,y,p,m,r.rx),A);T=o.insert(()=>B,":first-child"),T.attr("class","basic label-container "+r.cssClass).attr("style",Hr(t.cssStyles))}else T=o.insert("rect",":first-child"),T.attr("class","basic label-container "+r.cssClass).attr("style",s).attr("rx",r.rx).attr("ry",r.rx).attr("x",g).attr("y",y).attr("width",p).attr("height",m).attr("fill",n).attr("stroke",i),r.strokeWidth!==void 0&&T.attr("stroke-width",r.strokeWidth+"px");let C=y+d+f+k4;o.append("line").attr("class","collapsed-separator").attr("x1",g+8).attr("y1",C).attr("x2",g+p-8).attr("y2",C).attr("stroke",i).attr("stroke-dasharray","3, 3");let v=C+C4/2,E=2.5,S=10;for(let _=-1;_<=1;_++)o.append("circle").attr("class","collapsed-indicator").attr("cx",_*S).attr("cy",v).attr("r",E).attr("fill",i);return tt(t,T),t.calcIntersect=function(_,A){return He.rect(_,A)},t.intersect=function(_){return He.rect(t,_)},o}var C4,k4,sPe,aPe,EX=w(()=>{"use strict";Gt();Tr();It();Ft();Yo();Ot();$t();jt();Wi();C4=20,k4=8,sPe=80,aPe=8;a(oPe,"getCollapsedStyle");a(SX,"collapsedGroup")});function as(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var Ol=w(()=>{"use strict";a(as,"insertPolygonShape")});async function wX(e,t){let r=t,{shapeSvg:n,bbox:i}=await ct(e,r,ut(r)),s=r.padding??0,o=i.height+2*s,l=o/2,u=i.width+2*l+s,h=r.width??0,f=r.positioned&&(r.widthInColumns??1)>1&&h>u?h:u,p=hPe(r.directions??[],i,r,f),m=as(n,f,o,p);return m.attr("style",r.style??null),tt(r,m),r.intersect=function(g){return He.polygon(r,p,g)},n}var lPe,S4,cPe,uPe,vX,hPe,_X=w(()=>{"use strict";Ft();Ol();It();lPe=["right","left","up","down"],S4="point",cPe=a(e=>{let t=new Set;for(let r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),uPe=a(e=>lPe.filter(t=>e.has(t)).join("|")||S4,"getDirectionKey"),vX={"right|left|up|down":a(({height:e,midpoint:t,padding:r,width:n})=>[{x:0,y:0},{x:t,y:0},{x:n/2,y:2*r},{x:n-t,y:0},{x:n,y:0},{x:n,y:-e/3},{x:n+2*r,y:-e/2},{x:n,y:-2*e/3},{x:n,y:-e},{x:n-t,y:-e},{x:n/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":a(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":a(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":a(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":a(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":a(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:0},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":a(({height:e,midpoint:t,padding:r,width:n})=>[{x:n/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:n/2,y:-e},{x:n,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r},{x:n,y:-r}],"up|down"),"right|up":a(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":a(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":a(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":a(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:a(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:-r},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:a(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:0},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:a(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:n/2,y:-e},{x:n,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r}],"up"),down:a(({height:e,midpoint:t,padding:r,width:n})=>[{x:n/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r},{x:n,y:-r}],"down"),[S4]:()=>[{x:0,y:0}]},hPe=a((e,t,r,n)=>{let i=cPe(e),s=(r.padding??0)/2,o=t.height+4*s,l=o/2,u=n??t.width+2*l+2*s,h=uPe(i);return(vX[h]??vX[S4])({height:o,midpoint:l,padding:s,width:u})},"getArrowPoints");a(wX,"block_arrow")});async function AX(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let{shapeSvg:s,bbox:o,label:l}=await ct(e,t,ut(t)),u=r?.nodeBorder??r?.lineColor??"currentColor",h=t.padding??12,d=18,f=12,p=Math.max(o.width+h*2,t.width??0,90),m=Math.max(o.height+h*2+d,t.height??0),g=-m/2,{cssStyles:y}=t,x=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let C=Xe.svg(s).path(Zn(-p/2,g,p,m,f),et(t,{}));x.node()?.appendChild(C),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",g).attr("width",p).attr("height",m).attr("rx",f).attr("ry",f).attr("style",i);x.append("line").attr("x1",-p/2).attr("y1",g+d).attr("x2",p/2).attr("y2",g+d).attr("style",`stroke:${u};stroke-width:1px`);for(let T=0;T<3;T++)x.append("circle").attr("cx",-p/2+12+T*9).attr("cy",g+d/2).attr("r",2.5).attr("style",`fill:${u};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",g+4).attr("width",Math.max(p-56,10)).attr("height",d-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${u};stroke-width:1px;opacity:0.6`),tt(t,x);let b=g+d+(m-d)/2;return l.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(T){return He.rect(t,T)},s}var RX=w(()=>{"use strict";It();Ft();Yo();Ot();$t();a(AX,"browser")});async function LX(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?28:i,o=t.look==="neo"?24:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=(t?.width??u.width)+(t.look==="neo"?s*2:s+Q2),d=(t?.height??u.height)+(t.look==="neo"?o*2:o),f=0,p=h,m=-d,g=0,y=[{x:f+Q2,y:m},{x:p,y:m},{x:p,y:g},{x:f,y:g},{x:f,y:m+Q2},{x:f+Q2,y:m}],x,{cssStyles:b}=t;if(t.look==="handDrawn"){let T=Xe.svg(l),C=et(t,{}),v=rr(y),E=T.path(v,C);x=l.insert(()=>E,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),b&&x.attr("style",b)}else x=as(l,h,d,y);return n&&x.attr("style",n),tt(t,x),t.intersect=function(T){return He.polygon(t,y,T)},l}var Q2,IX=w(()=>{"use strict";It();Ft();Ot();$t();Ol();It();Q2=12;a(LX,"card")});function DX(e,t){let{nodeStyles:r}=Ze(t);t.label="";let n=e.insert("g").attr("class",ut(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=Xe.svg(n),u=et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=rr(o),d=l.path(h,u),f=n.insert(()=>d,":first-child");return i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return He.polygon(t,o,p)},n}var NX=w(()=>{"use strict";Ft();$t();Ot();It();a(DX,"choice")});async function Z2(e,t,r){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let{shapeSvg:s,bbox:o,halfPadding:l}=await ct(e,t,ut(t),{ignoreMinWidth:!0}),u=16,h=r?.padding??l,d=Math.sqrt(o.width**2+o.height**2)/2,f=t.look==="neo"?d+u:d+h,p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(s),y=et(t,{}),x=g.circle(0,0,f*2,y);p=s.insert(()=>x,":first-child"),p.attr("class","basic label-container").attr("style",Hr(m))}else p=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",f).attr("cx",0).attr("cy",0);return tt(t,p),t.calcIntersect=function(g,y){let x=g.width/2;return He.circle(g,x,y)},t.intersect=function(g){return H.info("Circle intersect",t,f,g),He.circle(t,f,g)},s}var E4=w(()=>{"use strict";$t();bt();jt();Ft();Ot();It();a(Z2,"circle")});async function MX(e,t){let r=t,n=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:i,bbox:s,halfPadding:o}=await ct(e,r,n),l=i.insert("rect",":first-child"),u=r.padding??0,h=r.positioned?r.width??0:s.width+u,d=r.positioned?r.height??0:s.height+u,f=r.positioned?-h/2:-s.width/2-o,p=r.positioned?-d/2:-s.height/2-o;return l.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",f).attr("y",p).attr("width",h).attr("height",d),tt(r,l),r.intersect=function(m){return He.rect(r,m)},i}var OX=w(()=>{"use strict";Ft();It();a(MX,"composite")});async function PX(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let{shapeSvg:s,bbox:o,label:l}=await ct(e,t,ut(t)),u=r?.nodeBorder??r?.lineColor??"currentColor",h=t.padding??12,d=20,f=12,p=Math.max(o.width+h*2,t.width??0,90),m=Math.max(o.height+h*2+d,t.height??0),g=-m/2,{cssStyles:y}=t,x=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){let C=Xe.svg(s).path(Zn(-p/2,g,p,m,f),et(t,{}));x.node()?.appendChild(C),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",g).attr("width",p).attr("height",m).attr("rx",f).attr("ry",f).attr("style",i);x.append("text").attr("x",-p/2+12).attr("y",g+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${u}`).text(">_"),tt(t,x);let b=g+d+(m-d)/2;return l.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(T){return He.rect(t,T)},s}var BX=w(()=>{"use strict";It();Ft();Yo();Ot();$t();a(PX,"consoleWindow")});function dPe(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=e*2,i={x:n/2*t,y:n/2*r},s={x:-(n/2)*t,y:n/2*r},o={x:-(n/2)*t,y:-(n/2)*r},l={x:n/2*t,y:-(n/2)*r};return`M ${s.x},${s.y} L ${l.x},${l.y} + M ${i.x},${i.y} L ${o.x},${o.y}`}function $X(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",ut(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,l=Xe.svg(i),u=et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,s*2,u),d=dPe(s),f=l.path(d,u),p=i.insert(()=>h,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),tt(t,p),t.intersect=function(m){return H.info("crossedCircle intersect",t,{radius:s,point:m}),He.circle(t,s,m)},i}var FX=w(()=>{"use strict";bt();It();Ot();$t();Ft();a(dPe,"createLine");a($X,"crossedCircle")});function Ju(e,t,r,n=100,i=0,s=180){let o=[],l=i*Math.PI/180,d=(s*Math.PI/180-l)/(n-1);for(let f=0;fE,":first-child").attr("stroke-opacity",0),S.insert(()=>C,":first-child"),S.attr("class","text"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${f}, 0)`),o.attr("transform",`translate(${-h/2+f-(s.x-(s.left??0))},${-d/2+(t.padding??0)/2-(s.y-(s.top??0))})`),tt(t,S),t.intersect=function(_){return He.polygon(t,g,_)},i}var VX=w(()=>{"use strict";It();Ft();Ot();$t();a(Ju,"generateCirclePoints");a(GX,"curlyBraceLeft")});function eh(e,t,r,n=100,i=0,s=180){let o=[],l=i*Math.PI/180,d=(s*Math.PI/180-l)/(n-1);for(let f=0;fE,":first-child").attr("stroke-opacity",0),S.insert(()=>C,":first-child"),S.attr("class","text"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-f}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-d/2+(t.padding??0)/2-(s.y-(s.top??0))})`),tt(t,S),t.intersect=function(_){return He.polygon(t,g,_)},i}var UX=w(()=>{"use strict";It();Ft();Ot();$t();a(eh,"generateCirclePoints");a(zX,"curlyBraceRight")});function ws(e,t,r,n=100,i=0,s=180){let o=[],l=i*Math.PI/180,d=(s*Math.PI/180-l)/(n-1);for(let f=0;fB,":first-child").attr("stroke-opacity",0),$.insert(()=>v,":first-child"),$.insert(()=>_,":first-child"),$.attr("class","text"),p&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(${f-f/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-d/2+(t.padding??0)/2-(s.y-(s.top??0))})`),tt(t,$),t.intersect=function(O){return He.polygon(t,y,O)},i}var jX=w(()=>{"use strict";It();Ft();Ot();$t();a(ws,"generateCirclePoints");a(WX,"curlyBraces")});async function qX(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=20,u=5,{shapeSvg:h,bbox:d}=await ct(e,t,ut(t)),f=Math.max(u,d.height+o*2,t?.height??0),p=f/2,m=p-Math.sqrt(Math.max(0,p**2-(d.height/2)**2)),g=Math.max(f/4,m),y=Math.max(l,d.width+s*2+g*2,(d.width+s*2)*1.25,t?.width??0),{cssStyles:x}=t,b=Xe.svg(h),T=et(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=y,v=f,E=C-p,S=v/4,_=[{x:E,y:0},{x:S,y:0},{x:0,y:v/2},{x:S,y:v},{x:E,y:v},...Ga(-E,-v/2,p,50,270,90)],A=rr(_),B=b.path(A,T),$=h.insert(()=>B,":first-child");return $.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",x),n&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",n),$.attr("transform",`translate(${-y/2}, ${-f/2})`),tt(t,$),t.intersect=function(O){return He.polygon(t,_,O)},h}var HX=w(()=>{"use strict";It();Ft();Ot();$t();a(qX,"curvedTrapezoid")});async function YX(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await ct(e,t,ut(t)),l=t.padding??20,u=Math.max(s.width+l*2,t.width??0,100),h=Math.min(Math.max(u*.23,16),56),d=h*.27,f=Math.max(s.height+l*2,t.height?t.height-(2*h-d):0),p=Math.min(u*.177,f*.45),m=f+2*h-d,g=-m/2,y=g+2*h-d,x=i.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:b}=t;if(t.look==="handDrawn"){let A=Xe.svg(i),B=et(t,{}),$=A.path(Zn(-u/2,y,u,f,p),B),O=A.circle(0,g+h,h*2,B);x.insert(()=>O,":first-child"),x.insert(()=>$,":first-child"),b&&x.attr("style",b)}else x.append("rect").attr("x",-u/2).attr("y",y).attr("width",u).attr("height",f).attr("rx",p).attr("ry",p).attr("style",n),x.append("circle").attr("cx",0).attr("cy",g+h).attr("r",h).attr("style",n);tt(t,x);let T=y+f/2;o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${T-s.height/2-(s.y-(s.top??0))})`);let C=g+h,v=Math.asin(Math.min(1,(y-C)/h))*180/Math.PI,_=[...Ga(0,-C,h,24,180+v,-v),...Ga(-(-u/2+p),-(y+p),p,12,90,0),...Ga(-(-u/2+p),-(m/2-p),p,12,360,270),...Ga(-(u/2-p),-(m/2-p),p,12,270,180),...Ga(-(u/2-p),-(y+p),p,12,180,90)];return t.intersect=function(A){return He.polygon(t,_,A)},i}var KX=w(()=>{"use strict";It();Ft();Ot();$t();Yo();a(YX,"person")});async function ZX(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?24:i,o=t.look==="neo"?24:i,l=t.width??0;if(t.width&&(t.width=t.width-o,t.widthS,":first-child"),y=u.insert(()=>E,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{let b=fPe(0,0,f,g,p,m);y=u.insert("path",":first-child").attr("d",b).attr("class","basic label-container outer-path").attr("style",Hr(x)).attr("style",n)}return y.attr("label-offset-y",m),y.attr("transform",`translate(${-f/2}, ${-(g/2+m)})`),tt(t,y),d.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(b){let T=He.rect(t,b),C=T.x-(t.x??0);if(p!=0&&(Math.abs(C)<(t.width??0)/2||Math.abs(C)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-m)){let v=m*m*(1-C*C/(p*p));v>0&&(v=Math.sqrt(v)),v=m-v,b.y-(t.y??0)>0&&(v=-v),T.y+=v}return T},u}var fPe,pPe,mPe,XX,QX,JX=w(()=>{"use strict";It();Ft();Ot();$t();jt();fPe=a((e,t,r,n,i,s)=>[`M${e},${t+s}`,`a${i},${s} 0,0,0 ${r},0`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),pPe=a((e,t,r,n,i,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),mPe=a((e,t,r,n,i,s)=>[`M${e-r/2},${-n/2}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),XX=8,QX=8;a(ZX,"cylinder")});async function Ko(e,t,r){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let{shapeSvg:s,bbox:o}=await ct(e,t,ut(t)),l=Math.max(o.width+r.labelPaddingX*2,t?.width||0),u=Math.max(o.height+r.labelPaddingY*2,t?.height||0),h=-l/2,d=-u/2,f,{rx:p,ry:m}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),t.look==="handDrawn"){let y=Xe.svg(s),x=et(t,{}),b=p||m?y.path(Zn(h,d,l,u,p||0),x):y.rectangle(h,d,l,u,x);f=s.insert(()=>b,":first-child"),f.attr("class","basic label-container").attr("style",Hr(g))}else f=s.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",Hr(p)).attr("ry",Hr(m)).attr("x",h).attr("y",d).attr("width",l).attr("height",u);return tt(t,f,t.look==="handDrawn"?void 0:{width:l,height:u}),t.calcIntersect=function(y,x){return He.rect(y,x)},t.intersect=function(y){return He.rect(t,y)},s}var Xd=w(()=>{"use strict";It();Ft();Yo();Ot();$t();jt();a(Ko,"drawRect")});async function eQ(e,t){let{cssClasses:r,labelPaddingX:n,labelPaddingY:i,padding:s,width:o,height:l}=t,u={rx:0,ry:0,classes:r??"",labelPaddingX:n??(s??0)*2,labelPaddingY:i??s??0},h=await Ko(e,t,u);if(t.look==="handDrawn"){let m=Xe.svg(h),g=et(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return h;let b=null;if(x instanceof SVGGraphicsElement)b=x.getBBox();else return h;return h.insert(()=>m.line(b.x,b.y,b.x+b.width,b.y,g),".basic.label-container g.label"),h.insert(()=>m.line(b.x,b.y+b.height,b.x+b.width,b.y+b.height,g),".basic.label-container g.label"),y.remove(),h}let d=h.select(".basic.label-container"),f=(Number(d.attr("width"))||o)??0,p=(Number(d.attr("height"))||l)??0;return f>0&&p>0&&d.attr("stroke-dasharray",`${f} ${p}`),h}var tQ=w(()=>{"use strict";Xd();Ot();$t();a(eQ,"datastore")});async function rQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await ct(e,t,ut(t)),h=l.width+i,d=l.height+s,f=d*.2,p=-h/2,m=-d/2-f/2,{cssStyles:g}=t,y=Xe.svg(o),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],T=y.polygon(b.map(v=>[v.x,v.y]),x),C=o.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),u.attr("transform",`translate(${p+(t.padding??0)/2-(l.x-(l.left??0))}, ${m+f+(t.padding??0)/2-(l.y-(l.top??0))})`),tt(t,C),t.intersect=function(v){return He.rect(t,v)},o}var nQ=w(()=>{"use strict";It();Ft();Ot();$t();a(rQ,"dividedRectangle")});async function iQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t),i=t.look==="neo"?12:5;t.labelStyle=r;let s=t.padding??0,o=t.look==="neo"?16:s,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t),{ignoreMinWidth:!0}),h=Math.sqrt(u.width**2+u.height**2)/2,d=(t?.width?t?.width/2:h)+(o??0),f=d+i,p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(l),y=et(t,{roughness:.2,strokeWidth:2.5}),x=et(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,f*2,y),T=g.circle(0,0,d*2,x);p=l.insert("g",":first-child"),p.attr("class",Hr(t.cssClasses)).attr("style",Hr(m)),p.node()?.appendChild(b),p.node()?.appendChild(T)}else{p=l.insert("g",":first-child");let g=p.insert("circle",":first-child"),y=p.insert("circle");p.attr("class","basic label-container").attr("style",n),g.attr("class","outer-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0)}return tt(t,p),t.intersect=function(g){return H.info("DoubleCircle intersect",t,f,g),He.circle(t,f,g)},l}var sQ=w(()=>{"use strict";bt();It();Ft();Ot();$t();jt();a(iQ,"doublecircle")});async function aQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,halfPadding:o}=await ct(e,t,ut(t)),{theme:l,themeVariables:u}=_e();ci(i,t.colorIndex,l,u.borderColorArray);let h=o??10,d=s.width/2+h*2,f=s.height/2+h*2,p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(i),y=et(t,{}),x=g.ellipse(0,0,d*2,f*2,y);p=i.insert(()=>x,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else p=i.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",n).attr("rx",d).attr("ry",f).attr("cx",0).attr("cy",0);return t.width=d*2,t.height=f*2,tt(t,p),t.calcIntersect=function(g,y){let x=g.width/2,b=g.height/2;return He.ellipse(g,x,b,y)},t.intersect=function(g){return He.ellipse(t,d,f,g)},i}var oQ=w(()=>{"use strict";$t();Gt();Wi();Ft();Ot();It();a(aQ,"usecaseEllipse")});function lQ(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.label="",t.labelStyle=n;let s=e.insert("g").attr("class",ut(t)).attr("id",t.domId??t.id),o=7,{cssStyles:l}=t,u=Xe.svg(s),{nodeBorder:h}=r,d=et(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);let f=u.circle(0,0,o*2,d),p=s.insert(()=>f,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),tt(t,p),t.intersect=function(m){return H.info("filledCircle intersect",t,{radius:o,point:m}),He.circle(t,o,m)},s}var cQ=w(()=>{"use strict";$t();bt();Ft();Ot();It();a(lQ,"filledCircle")});async function dQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.heightb,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),t.width=h,t.height=d,tt(t,T),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-d/2+(t.padding??0)/2+(l.y-(l.top??0))})`),t.intersect=function(C){return H.info("Triangle intersect",t,p,C),He.polygon(t,p,C)},o}var uQ,hQ,fQ=w(()=>{"use strict";bt();It();Ft();Ot();$t();It();uQ=10,hQ=10;a(dQ,"flippedTriangle")});async function pQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await ct(e,t,ut(t)),l=t.padding??12,u=Math.max(s.width+l*2,t.width??0,90),h=s.height+l*2,d=Math.max(Math.min(h*.16,14),8),f=Math.max(h+d,t.height??0),p=f-d,m=Math.max(u*.38,28),g=-f/2,y=[{x:-u/2,y:g},{x:-u/2+m,y:g},{x:-u/2+m,y:g+d},{x:u/2,y:g+d},{x:u/2,y:f/2},{x:-u/2,y:f/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(v=>`L${v.x},${v.y}`),"Z"].join(" "),{cssStyles:b}=t,T;if(t.look==="handDrawn"){let E=Xe.svg(i).path(x,et(t,{}));T=i.insert(()=>E,":first-child").attr("class","basic label-container"),b&&T.attr("style",b)}else T=i.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",n);t.look==="handDrawn"?tt(t,T):tt(t,T,{width:u,height:f});let C=g+d+p/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${C-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(v){return He.polygon(t,y,v)},i}var mQ=w(()=>{"use strict";It();Ft();Ot();$t();a(pQ,"folder")});function gQ(e,t,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:s}=Ze(t);t.label="";let o=e.insert("g").attr("class",ut(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,u=Math.max(70,t?.width??0),h=Math.max(10,t?.height??0);(r==="LR"||r==="RL")&&(u=Math.max(10,t?.width??0),h=Math.max(70,t?.height??0));let d=-1*u/2,f=-1*h/2,p=Xe.svg(o),m=et(t,{stroke:i.lineColor,fill:i.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(d,f,u,h,m),y=o.insert(()=>g,":first-child");l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),tt(t,y);let x=n?.padding??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(b){return He.rect(t,b)},o}var yQ=w(()=>{"use strict";$t();Ft();Ot();It();a(gQ,"forkJoin")});async function xQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=15,s=10,o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-l*2,t.heightC,":first-child");return v.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",g),n&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),tt(t,v),t.intersect=function(E){return H.info("Pill intersect",t,{radius:f,point:E}),He.polygon(t,b,E)},u}var bQ=w(()=>{"use strict";bt();It();Ft();Ot();$t();a(xQ,"halfRoundedRectangle")});async function TQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t),i=t.look==="neo"?3.5:4;t.labelStyle=r;let s=t.padding??0,o=70,l=32,u=t.look==="neo"?o:s,h=t.look==="neo"?l:s;if(t.width||t.height){let C=(t.height??0)/i;t.width=(t?.width??0)-2*C-h,t.height=(t.height??0)-u}let{shapeSvg:d,bbox:f}=await ct(e,t,ut(t)),p=(t?.height?t?.height:f.height)+u,m=p/i,g=(t?.width?t?.width:f.width)+2*m+h,y=[{x:m,y:0},{x:g-m,y:0},{x:g,y:-p/2},{x:g-m,y:-p},{x:m,y:-p},{x:0,y:-p/2}],x,{cssStyles:b}=t;if(t.look==="handDrawn"){let T=Xe.svg(d),C=et(t,{}),v=gPe(0,0,g,p,m),E=T.path(v,C);x=d.insert(()=>E,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),b&&x.attr("style",b)}else x=as(d,g,p,y);return n&&x.attr("style",n),t.width=g,t.height=p,tt(t,x),t.intersect=function(T){return He.polygon(t,y,T)},d}var gPe,CQ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();gPe=a((e,t,r,n,i)=>[`M${e+i},${t}`,`L${e+r-i},${t}`,`L${e+r},${t-n/2}`,`L${e+r-i},${t-n}`,`L${e+i},${t-n}`,`L${e},${t-n/2}`,"Z"].join(" "),"createHexagonPathD");a(TQ,"hexagon")});async function kQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.label="",t.labelStyle=r;let{shapeSvg:i}=await ct(e,t,ut(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:l}=t,u=Xe.svg(i),h=et(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let d=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],f=rr(d),p=u.path(f,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-s/2}, ${-o/2})`),tt(t,m),t.intersect=function(g){return H.info("Pill intersect",t,{points:d}),He.polygon(t,d,g)},i}var SQ=w(()=>{"use strict";bt();It();Ft();Ot();$t();a(kQ,"hourglass")});async function EQ(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ze(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await ct(e,t,"icon-shape default"),p=t.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:x}=oa(t),b=-g/2,T=-m/2,C=t.label?8:0,v=Xe.svg(h),E=et(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let S=v.rectangle(b,T,g,m,E),_=Math.max(g,d.width),A=m+d.height+C,B=v.rectangle(-_/2,-A/2,_,A,{...E,fill:"transparent",stroke:"none"}),$=h.insert(()=>S,":first-child"),O=h.insert(()=>B);if(t.icon){let G=h.append("g");G.html(`${await na(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let I=G.node().getBBox(),F=I.width,N=I.height,D=I.x,M=I.y;G.attr("transform",`translate(${-F/2-D},${p?d.height/2+C/2-N/2-M:-d.height/2-C/2-N/2-M})`),G.attr("style",`color: ${x.get("stroke")??y};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),$.attr("transform",`translate(0,${p?d.height/2+C/2:-d.height/2-C/2})`),tt(t,O),t.intersect=function(G){if(H.info("iconSquare intersect",t,G),!t.label)return He.rect(t,G);let I=t.x??0,F=t.y??0,N=t.height??0,D=[];return p?D=[{x:I-d.width/2,y:F-N/2},{x:I+d.width/2,y:F-N/2},{x:I+d.width/2,y:F-N/2+d.height+C},{x:I+g/2,y:F-N/2+d.height+C},{x:I+g/2,y:F+N/2},{x:I-g/2,y:F+N/2},{x:I-g/2,y:F-N/2+d.height+C},{x:I-d.width/2,y:F-N/2+d.height+C}]:D=[{x:I-g/2,y:F-N/2},{x:I+g/2,y:F-N/2},{x:I+g/2,y:F-N/2+m},{x:I+d.width/2,y:F-N/2+m},{x:I+d.width/2/2,y:F+N/2},{x:I-d.width/2,y:F+N/2},{x:I-d.width/2,y:F-N/2+m},{x:I-g/2,y:F-N/2+m}],He.polygon(t,D,G)},h}var vQ=w(()=>{"use strict";$t();bt();Sc();Ft();Ot();It();a(EQ,"icon")});async function wQ(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ze(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await ct(e,t,"icon-shape default"),p=20,m=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=oa(t),T=Xe.svg(h),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let v=b.get("fill");C.stroke=v??x;let E=h.append("g");t.icon&&E.html(`${await na(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let S=E.node().getBBox(),_=S.width,A=S.height,B=S.x,$=S.y,O=Math.max(_,A)*Math.SQRT2+p*2,G=T.circle(0,0,O,C),I=Math.max(O,d.width),F=O+d.height+m,N=T.rectangle(-I/2,-F/2,I,F,{...C,fill:"transparent",stroke:"none"}),D=h.insert(()=>G,":first-child"),M=h.insert(()=>N);return E.attr("transform",`translate(${-_/2-B},${g?d.height/2+m/2-A/2-$:-d.height/2-m/2-A/2-$})`),E.attr("style",`color: ${b.get("stroke")??y};`),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-F/2:F/2-d.height})`),D.attr("transform",`translate(0,${g?d.height/2+m/2:-d.height/2-m/2})`),tt(t,M),t.intersect=function(R){return H.info("iconSquare intersect",t,R),He.rect(t,R)},h}var _Q=w(()=>{"use strict";$t();bt();Sc();Ft();Ot();It();a(wQ,"iconCircle")});async function AQ(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ze(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await ct(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:x,mainBkg:b}=r,{stylesMap:T}=oa(t),C=-y/2,v=-g/2,E=t.label?8:0,S=Xe.svg(h),_=et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let A=T.get("fill");_.stroke=A??b;let B=S.path(Zn(C,v,y,g,5),_),$=Math.max(y,d.width),O=g+d.height+E,G=S.rectangle(-$/2,-O/2,$,O,{..._,fill:"transparent",stroke:"none"}),I=h.insert(()=>B,":first-child").attr("class","icon-shape2"),F=h.insert(()=>G);if(t.icon){let N=h.append("g");N.html(`${await na(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let D=N.node().getBBox(),M=D.width,R=D.height,P=D.x,V=D.y;N.attr("transform",`translate(${-M/2-P},${m?d.height/2+E/2-R/2-V:-d.height/2-E/2-R/2-V})`),N.attr("style",`color: ${T.get("stroke")??x};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-O/2:O/2-d.height})`),I.attr("transform",`translate(0,${m?d.height/2+E/2:-d.height/2-E/2})`),tt(t,F),t.intersect=function(N){if(H.info("iconSquare intersect",t,N),!t.label)return He.rect(t,N);let D=t.x??0,M=t.y??0,R=t.height??0,P=[];return m?P=[{x:D-d.width/2,y:M-R/2},{x:D+d.width/2,y:M-R/2},{x:D+d.width/2,y:M-R/2+d.height+E},{x:D+y/2,y:M-R/2+d.height+E},{x:D+y/2,y:M+R/2},{x:D-y/2,y:M+R/2},{x:D-y/2,y:M-R/2+d.height+E},{x:D-d.width/2,y:M-R/2+d.height+E}]:P=[{x:D-y/2,y:M-R/2},{x:D+y/2,y:M-R/2},{x:D+y/2,y:M-R/2+g},{x:D+d.width/2,y:M-R/2+g},{x:D+d.width/2/2,y:M+R/2},{x:D-d.width/2,y:M+R/2},{x:D-d.width/2,y:M-R/2+g},{x:D-y/2,y:M-R/2+g}],He.polygon(t,P,N)},h}var RQ=w(()=>{"use strict";$t();bt();Sc();Ft();Ot();Yo();It();a(AQ,"iconRounded")});async function LQ(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Ze(t);t.labelStyle=i;let s=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(s,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await ct(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:x,mainBkg:b}=r,{stylesMap:T}=oa(t),C=-y/2,v=-g/2,E=t.label?8:0,S=Xe.svg(h),_=et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let A=T.get("fill");_.stroke=A??b;let B=S.path(Zn(C,v,y,g,.1),_),$=Math.max(y,d.width),O=g+d.height+E,G=S.rectangle(-$/2,-O/2,$,O,{..._,fill:"transparent",stroke:"none"}),I=h.insert(()=>B,":first-child"),F=h.insert(()=>G);if(t.icon){let N=h.append("g");N.html(`${await na(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let D=N.node().getBBox(),M=D.width,R=D.height,P=D.x,V=D.y;N.attr("transform",`translate(${-M/2-P},${m?d.height/2+E/2-R/2-V:-d.height/2-E/2-R/2-V})`),N.attr("style",`color: ${T.get("stroke")??x};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-O/2:O/2-d.height})`),I.attr("transform",`translate(0,${m?d.height/2+E/2:-d.height/2-E/2})`),tt(t,F),t.intersect=function(N){if(H.info("iconSquare intersect",t,N),!t.label)return He.rect(t,N);let D=t.x??0,M=t.y??0,R=t.height??0,P=[];return m?P=[{x:D-d.width/2,y:M-R/2},{x:D+d.width/2,y:M-R/2},{x:D+d.width/2,y:M-R/2+d.height+E},{x:D+y/2,y:M-R/2+d.height+E},{x:D+y/2,y:M+R/2},{x:D-y/2,y:M+R/2},{x:D-y/2,y:M-R/2+d.height+E},{x:D-d.width/2,y:M-R/2+d.height+E}]:P=[{x:D-y/2,y:M-R/2},{x:D+y/2,y:M-R/2},{x:D+y/2,y:M-R/2+g},{x:D+d.width/2,y:M-R/2+g},{x:D+d.width/2/2,y:M+R/2},{x:D-d.width/2,y:M+R/2},{x:D-d.width/2,y:M-R/2+g},{x:D-y/2,y:M-R/2+g}],He.polygon(t,P,N)},h}var IQ=w(()=>{"use strict";$t();bt();Sc();Ft();Yo();Ot();It();a(LQ,"iconSquare")});async function DQ(e,t,{config:{flowchart:r}}){let n=new Image;n.src=t?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),s=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/s;let{labelStyles:o}=Ze(t);t.labelStyle=o;let l=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let u=Math.max(t.label?l??0:0,t?.assetWidth??i),h=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:u,d=t.constraint==="on"?h/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(h,l??0);let{shapeSvg:f,bbox:p,label:m}=await ct(e,t,"image-shape default"),g=t.pos==="t",y=-h/2,x=-d/2,b=t.label?8:0,T=Xe.svg(f),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let v=T.rectangle(y,x,h,d,C),E=Math.max(h,p.width),S=d+p.height+b,_=T.rectangle(-E/2,-S/2,E,S,{...C,fill:"none",stroke:"none"}),A=f.insert(()=>v,":first-child"),B=f.insert(()=>_);if(t.img){let $=f.append("image");$.attr("href",t.img),$.attr("width",h),$.attr("height",d),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-h/2},${g?S/2-d:-S/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),A.attr("transform",`translate(0,${g?p.height/2+b/2:-p.height/2-b/2})`),tt(t,B),t.intersect=function($){if(H.info("iconSquare intersect",t,$),!t.label)return He.rect(t,$);let O=t.x??0,G=t.y??0,I=t.height??0,F=[];return g?F=[{x:O-p.width/2,y:G-I/2},{x:O+p.width/2,y:G-I/2},{x:O+p.width/2,y:G-I/2+p.height+b},{x:O+h/2,y:G-I/2+p.height+b},{x:O+h/2,y:G+I/2},{x:O-h/2,y:G+I/2},{x:O-h/2,y:G-I/2+p.height+b},{x:O-p.width/2,y:G-I/2+p.height+b}]:F=[{x:O-h/2,y:G-I/2},{x:O+h/2,y:G-I/2},{x:O+h/2,y:G-I/2+d},{x:O+p.width/2,y:G-I/2+d},{x:O+p.width/2/2,y:G+I/2},{x:O-p.width/2,y:G+I/2},{x:O-p.width/2,y:G-I/2+d},{x:O-h/2,y:G-I/2+d}],He.polygon(t,F,$)},f}var NQ=w(()=>{"use strict";$t();bt();Ft();Ot();It();a(DQ,"imageSquare")});async function MQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=i,o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=Math.max(u.height+s*2,t.height??0),d=Math.max(u.width+o*2,(t.width??0)-h),f=[{x:0,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:-3*h/6,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(l),y=et(t,{}),x=rr(f),b=g.path(x,y);p=l.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=as(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,tt(t,p),t.intersect=function(g){return He.polygon(t,f,g)},l}var OQ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();a(MQ,"inv_trapezoid")});async function PQ(e,t){let{shapeSvg:r,bbox:n,label:i}=await ct(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),tt(t,s),t.intersect=function(u){return He.rect(t,u)},r}var BQ=w(()=>{"use strict";Xd();It();Ft();a(PQ,"labelRect")});async function $Q(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=i,o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=Math.max(u.height+s,t.height??0),d=Math.max(u.width+o,(t.width??0)-h),f=[{x:0,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:-(3*h)/6,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(l),y=et(t,{}),x=rr(f),b=g.path(x,y);p=l.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=as(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,tt(t,p),t.intersect=function(g){return He.polygon(t,f,g)},l}var FQ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();a($Q,"lean_left")});async function GQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=i,o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=Math.max(u.height+s,t.height??0),d=Math.max(u.width+o,(t.width??0)-h),f=[{x:-3*h/6,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(l),y=et(t,{}),x=rr(f),b=g.path(x,y);p=l.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=as(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,tt(t,p),t.intersect=function(g){return He.polygon(t,f,g)},l}var VQ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();a(GQ,"lean_right")});function zQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",ut(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),u=7,h=[{x:o,y:0},{x:0,y:l+u/2},{x:o-2*u,y:l+u/2},{x:0,y:2*l},{x:o,y:l-u/2},{x:2*u,y:l-u/2}],d=Xe.svg(i),f=et(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let p=rr(h),m=d.path(p,f),g=i.insert(()=>m,":first-child");return g.attr("class","outer-path"),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${o/2},${-l})`),tt(t,g),t.intersect=function(y){return H.info("lightningBolt intersect",t,y),He.polygon(t,h,y)},i}var UQ=w(()=>{"use strict";bt();It();Ot();$t();Ft();It();a(zQ,"lightningBolt")});async function qQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?24:i;if(t.width||t.height){let b=t.width??0;t.width=(t.width??0)-s,t.widthS,":first-child").attr("class","line"),y=l.insert(()=>E,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{let b=yPe(0,0,d,m,f,p,g);y=l.insert("path",":first-child").attr("d",b).attr("class","basic label-container outer-path").attr("style",Hr(x)).attr("style",n)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),tt(t,y),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),t.intersect=function(b){let T=He.rect(t,b),C=T.x-(t.x??0);if(f!=0&&(Math.abs(C)<(t.width??0)/2||Math.abs(C)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-p)){let v=p*p*(1-C*C/(f*f));v>0&&(v=Math.sqrt(v)),v=p-v,b.y-(t.y??0)>0&&(v=-v),T.y+=v}return T},l}var yPe,xPe,bPe,WQ,jQ,HQ=w(()=>{"use strict";It();Ft();Ot();$t();jt();yPe=a((e,t,r,n,i,s,o)=>[`M${e},${t+s}`,`a${i},${s} 0,0,0 ${r},0`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+s+o}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),xPe=a((e,t,r,n,i,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${i},${s} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${s} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+s+o}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),bPe=a((e,t,r,n,i,s)=>[`M${e-r/2},${-n/2}`,`a${i},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),WQ=10,jQ=10;a(qQ,"linedCylinder")});async function YQ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i;if(t.width||t.height){let v=t.width;t.width=(v??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10)}let{shapeSvg:l,bbox:u,label:h}=await ct(e,t,ut(t)),d=(t?.width?t?.width:u.width)+(s??0)*2,f=(t?.height?t?.height:u.height)+(o??0)*2,p=t.look==="neo"?f/4:f/8,m=f+p,{cssStyles:g}=t,y=Xe.svg(l),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...lo(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],T=y.polygon(b.map(v=>[v.x,v.y]),x),C=l.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)+d/2*.1/2-(u.x-(u.left??0))},${-f/2+(t.padding??0)-p-(u.y-(u.top??0))})`),tt(t,C),t.intersect=function(v){return He.polygon(t,b,v)},l}var KQ=w(()=>{"use strict";It();Ft();$t();Ot();a(YQ,"linedWaveEdgedRect")});async function Qd(e,t,r,n){let{labelStyles:i,nodeStyles:s}=Ze(t);t.labelStyle=i;let o=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:l,bbox:u,label:h}=await ct(e,o,ut(t,`usecase-actor-variant usecase-actor-${r}`)),d=t.accessibleName??t.label;d&&l.attr("role","img").attr("aria-label",d),h.attr("class","label actor-label usecase-actor-label");let{theme:f,themeVariables:p}=_e();ci(l,t.colorIndex,f,p.borderColorArray);let m,g;if(t.stereotype){let A=await Ho(l,`\xAB${t.stereotype}\xBB`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});m=A.label.attr("class","label usecase-stereotype"),g=A.bbox}let y=l.append("g").attr("class",`usecase-actor-glyph ${kPe[r]}`).attr("style",s||null);await n(y,t),EPe(y,t,r);let x=t.padding??CPe,b=g?.height??0,T=v4+XQ+u.height+(g?b+QQ:0),C=Math.max(TPe,u.width,g?.width??0)+x*2,v=T+x*2,E=-T/2;y.attr("transform",`translate(0,${E+v4/2})`);let S=E+v4+XQ;m&&g&&(S+=b/2,eZ(m,g,S),S+=b/2+QQ),eZ(h,u,S+u.height/2);let _=l.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-C/2).attr("y",-v/2).attr("width",C).attr("height",v).attr("opacity",0).attr("aria-hidden","true");return tt(t,_),t.intersect=A=>He.rect(t,A),l}async function rZ(e,t){return Qd(e,t,"normal",(r,n)=>{X0(r,n,vPe,"usecase-actor-stick")})}var TPe,v4,XQ,QQ,CPe,kPe,ZQ,JQ,w4,SPe,eZ,X0,tZ,EPe,vPe,Q0=w(()=>{"use strict";$t();Gt();Wi();Ft();Ot();It();TPe=56,v4=72,XQ=8,QQ=2,CPe=8,kPe={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},ZQ=Math.PI/3,JQ=.6,w4=a((e,t)=>{let r=t*JQ,n=t*Math.sqrt(1-JQ**2),i=Math.cos(ZQ),s=-Math.sin(ZQ),o=r*-s,l=e+r*i,u=n*i,h=n*s;return`M ${o-u} ${l-h} L ${o+u} ${l+h}`},"businessMarkerPathForCircle"),SPe={normal:w4(-24,12),hollow:w4(-23,9),awesome:w4(-21,13),icon:"M 12 -8 L 26 -26"},eZ=a((e,t,r)=>{let n=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-n},${r-t.height/2-i})`)},"positionLabel"),X0=a((e,t,r,n,i=!1)=>{if(t.look==="handDrawn"){let l=Xe.svg(e).path(r,et(t,i?{fill:"none"}:{}));return e.insert(()=>l,":first-child").attr("class",n)}let s=e.append("path").attr("class",n).attr("d",r);return i&&s.attr("fill","none"),s},"appendActorPath"),tZ=a((e,t,r,n,i,s,o=!1)=>{if(t.look==="handDrawn"){let h=Xe.svg(e).circle(r,n,i*2,et(t,o?{fill:"none"}:{}));return e.insert(()=>h,":first-child").attr("class",s)}let l=e.append("circle").attr("class",s).attr("cx",r).attr("cy",n).attr("r",i);return o&&l.attr("fill","none"),l},"appendActorCircle"),EPe=a((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",SPe[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");a(Qd,"renderUsecaseActor");vPe=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");a(rZ,"usecaseActor")});async function nZ(e,t){return Qd(e,t,"awesome",(r,n)=>{X0(r,n,wPe,"usecase-actor-awesome-silhouette")})}var wPe,iZ=w(()=>{"use strict";Q0();wPe=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");a(nZ,"usecaseActorAwesome")});async function sZ(e,t){return Qd(e,t,"hollow",(r,n)=>{tZ(r,n,0,-23,9,"usecase-actor-hollow-head",!0),X0(r,n,_Pe,"usecase-actor-hollow-body",!0)})}var _Pe,aZ=w(()=>{"use strict";Q0();_Pe=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");a(sZ,"usecaseActorHollow")});async function cZ(e,t){return Qd(e,t,"icon",APe)}var Rm,oZ,lZ,APe,uZ=w(()=>{"use strict";$t();Sc();Ot();Q0();Rm=52,oZ=42,lZ=-2,APe=a(async(e,t)=>{let r=-Rm/2,n=lZ-Rm/2;if(t.look==="handDrawn"){let d=Xe.svg(e).rectangle(r,n,Rm,Rm,et(t,{}));e.insert(()=>d,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",n).attr("width",Rm).attr("height",Rm).attr("rx",4).attr("ry",4);let i=t.icon??"",s=await NC(i.includes(":")?i:`fa:${i}`),o=await na(i,{height:oZ,width:oZ,fallbackPrefix:"fa"}),l=e.append("g").attr("class",`usecase-actor-icon-symbol${s?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`${o}`),u=l.node()?.getBBox();u&&l.attr("transform",`translate(${-u.width/2-u.x},${lZ-u.height/2-u.y})`)},"drawIconActor");a(cZ,"usecaseActorIcon")});async function dZ(e,t){let r=t,{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let s=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:o,bbox:l,halfPadding:u,label:h}=await ct(e,s,ut(t,"usecase-business-shape"));h.attr("class","label usecase-label");let{theme:d,themeVariables:f}=_e();ci(o,t.colorIndex,d,f.borderColorArray);let p,m;if(r.stereotype){let I=await Ho(o,`\xAB${r.stereotype}\xBB`,{labelStyle:n,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});p=I.label.attr("class","label usecase-stereotype"),m=I.bbox}let g=m?2:0,y=l.height+(m?.height??0)+g,x=Math.max(l.width,m?.width??0),b=u??10,T=x/2+b*2,C=y/2+b*2,v=Math.min(Math.max(b/5,1),b/2),E=x/2+v,S=T-v,_=E/T,A=S/T,B=C*Math.sqrt(Math.max(0,1-_*_)),$=-C*Math.sqrt(Math.max(0,1-A*A));p&&m&&hZ(p,m,-y/2+m.height/2),hZ(h,l,y/2-l.height/2);let O;if(t.look==="handDrawn"){let F=Xe.svg(o).ellipse(0,0,T*2,C*2,et(t,{}));O=o.insert(()=>F,":first-child").attr("class","basic label-container usecase-business-ellipse")}else O=o.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",i).attr("rx",T).attr("ry",C).attr("cx",0).attr("cy",0);o.append("path").attr("class","usecase-business-marker").attr("d",`M ${E} ${B} L ${S} ${$}`).attr("fill","none").attr("style",i||null);let G=r.accessibleName??r.label;return G&&o.attr("role","img").attr("aria-label",G),tt(t,O),t.calcIntersect=(I,F)=>He.ellipse(I,I.width/2,I.height/2,F),t.intersect=I=>He.ellipse(t,T,C,I),o}var hZ,fZ=w(()=>{"use strict";$t();Gt();Wi();Ft();Ot();It();hZ=a((e,t,r)=>{let n=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-n},${r-t.height/2-i})`)},"positionLabel");a(dZ,"usecaseBusiness")});async function mZ(e,t){let r=t,{labelStyles:n,nodeStyles:i}=Ze(t),{stylesMap:s}=oa(t);t.labelStyle=n;let{shapeSvg:o,bbox:l,label:u}=await ct(e,t,ut(t,"usecase-json-table"));o.attr("role","img"),r.accessibleName&&o.attr("aria-label",r.accessibleName),u.attr("class","label usecase-json-title");let h=o.append("g").attr("class","usecase-json-table-grid"),d=[];for(let I of r.jsonRows??[]){let F=await Ho(h,I.key,{labelStyle:n,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),N=await Ho(h,I.value,{labelStyle:n,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});d.push({key:{label:F.label.attr("class","label usecase-json-key"),bbox:F.bbox},value:{label:N.label.attr("class","label usecase-json-value"),bbox:N.bbox}})}let f=Math.max(0,...d.map(({key:I})=>I.bbox.width))+_4*2,p=Math.max(0,...d.map(({value:I})=>I.bbox.width))+_4*2,m=l.width+_4*2,g=Math.max(m,f+p),y=p+Math.max(0,g-f-p),x=l.height+pZ*2,b=d.map(({key:I,value:F})=>Math.max(I.bbox.height,F.bbox.height)+pZ*2),T=x+b.reduce((I,F)=>I+F,0),C=LPe(s.get("stroke-width")),v=g+C*2,E=T+C*2,S=-g/2,_=-T/2,A=t.look==="handDrawn"?Xe.svg(o):void 0,B=A?et(t,{}):void 0,$=a((I,F,N,D,M,R)=>{if(A&&B){let P=A.rectangle(N,D,M,R,B);return I.insert(()=>P,":first-child").attr("class",F)}return I.insert("rect",":first-child").attr("class",F).attr("x",N).attr("y",D).attr("width",M).attr("height",R).attr("style",i)},"insertCell"),O=$(o,"label-container usecase-json-border",-v/2,-E/2,v,E);$(h,"usecase-json-cell usecase-json-title-cell",S,_,g,x),h.node()?.append(u.node()),A4(u,l,0,_+x/2);let G=_+x;return d.forEach(({key:I,value:F},N)=>{let D=b[N],M=h.append("g").attr("class","usecase-json-row").attr("data-row-index",N).attr("transform",`translate(0,${G})`);$(M,"usecase-json-cell usecase-json-key-cell",S,0,f,D),$(M,"usecase-json-cell usecase-json-value-cell",S+f,0,y,D),M.node()?.append(I.label.node(),F.label.node()),A4(I.label,I.bbox,S+f/2,D/2),A4(F.label,F.bbox,S+f+y/2,D/2),G+=D}),tt(t,O),t.intersect=I=>He.rect(t,I),o}var _4,pZ,RPe,A4,LPe,gZ=w(()=>{"use strict";$t();Ft();Ot();It();_4=8,pZ=4,RPe=1,A4=a((e,t,r,n)=>{let i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-i},${n-t.height/2-s})`)},"positionLabel"),LPe=a(e=>{let t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:RPe},"numericStrokeWidth");a(mZ,"usecaseJsonTable")});async function yZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-2*l,10),t.height=Math.max((t?.height??0)-o*2-2*l,10));let{shapeSvg:u,bbox:h,label:d}=await ct(e,t,ut(t)),f=(t?.width?t?.width:h.width)+s*2+2*l,p=(t?.height?t?.height:h.height)+o*2+2*l,m=f-2*l,g=p-2*l,y=-m/2,x=-g/2,{cssStyles:b}=t,T=Xe.svg(u),C=et(t,{}),v=[{x:y-l,y:x+l},{x:y-l,y:x+g+l},{x:y+m-l,y:x+g+l},{x:y+m-l,y:x+g},{x:y+m,y:x+g},{x:y+m,y:x+g-l},{x:y+m+l,y:x+g-l},{x:y+m+l,y:x-l},{x:y+l,y:x-l},{x:y+l,y:x},{x:y,y:x},{x:y,y:x+l}],E=[{x:y,y:x+l},{x:y+m-l,y:x+l},{x:y+m-l,y:x+g},{x:y+m,y:x+g},{x:y+m,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let S=rr(v),_=T.path(S,C),A=rr(E),B=T.path(A,C);t.look!=="handDrawn"&&(_=r4(_),B=r4(B));let $=u.insert("g",":first-child");return $.insert(()=>_),$.insert(()=>B),$.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",n),d.attr("transform",`translate(${-(h.width/2)-l-(h.x-(h.left??0))}, ${-(h.height/2)+l-(h.y-(h.top??0))})`),tt(t,$),t.intersect=function(O){return He.polygon(t,v,O)},u}var xZ=w(()=>{"use strict";It();Ot();$t();Ft();a(yZ,"multiRect")});async function bZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await ct(e,t,ut(t)),l=t.padding??0,u=t.look==="neo"?16:l,h=t.look==="neo"?12:l,d=!0;(t.width||t.height)&&(d=!1,t.width=(t?.width??0)-u*2,t.height=(t?.height??0)-h*3);let f=Math.max(s.width,t?.width??0)+u*2,p=Math.max(s.height,t?.height??0)+h*3,m=t.look==="neo"?p/4:p/8,g=p+(d?m/2:-m/2),y=-f/2,x=-g/2,b=10,{cssStyles:T}=t,C=lo(y-b,x+g+b,y+f-b,x+g+b,m,.8),v=C?.[C.length-1],E=[{x:y-b,y:x+b},{x:y-b,y:x+g+b},...C,{x:y+f-b,y:v.y-b},{x:y+f,y:v.y-b},{x:y+f,y:v.y-2*b},{x:y+f+b,y:v.y-2*b},{x:y+f+b,y:x-b},{x:y+b,y:x-b},{x:y+b,y:x},{x:y,y:x},{x:y,y:x+b}],S=[{x:y,y:x+b},{x:y+f-b,y:x+b},{x:y+f-b,y:v.y-b},{x:y+f,y:v.y-b},{x:y+f,y:x},{x:y,y:x}],_=Xe.svg(i),A=et(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=rr(E),$=_.path(B,A),O=rr(S),G=_.path(O,A),I=i.insert(()=>$,":first-child");return I.insert(()=>G),I.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",T),n&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",n),I.attr("transform",`translate(0,${-m/2})`),o.attr("transform",`translate(${-(s.width/2)-b-(s.x-(s.left??0))}, ${-(s.height/2)+b-m-(s.y-(s.top??0))})`),tt(t,I),t.intersect=function(F){return He.polygon(t,E,F)},i}var TZ=w(()=>{"use strict";It();Ft();$t();Ot();a(bZ,"multiWaveEdgedRectangle")});async function CZ(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n,t.useHtmlLabels||vn(Ct())||(t.centerLabel=!0);let{shapeSvg:o,bbox:l,label:u}=await ct(e,t,ut(t)),h=Math.max(l.width+(t.padding??0)*2,t?.width??0),d=Math.max(l.height+(t.padding??0)*2,t?.height??0),f=-h/2,p=-d/2,{cssStyles:m}=t,g=Xe.svg(o),y=et(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=g.rectangle(f,p,h,d,y),b=o.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),tt(t,b),t.intersect=function(T){return He.rect(t,T)},o}var kZ=w(()=>{"use strict";$t();Ft();Ot();It();Tr();Tr();a(CZ,"note")});async function SZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await ct(e,t,ut(t)),o=s.width+(t.padding??0),l=s.height+(t.padding??0),u=o+l,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=Xe.svg(i),g=et(t,{}),y=IPe(0,0,u),x=m.path(y,g);f=i.insert(()=>x,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&f.attr("style",p)}else f=as(i,u,u,d),f.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&f.attr("style",n),tt(t,f),t.calcIntersect=function(m,g){let y=m.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return He.polygon(m,x,g)},t.intersect=function(m){return this.calcIntersect(t,m)},i}var IPe,EZ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();IPe=a((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");a(SZ,"question")});async function vZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?21:i??0,o=t.look==="neo"?12:i??0,{shapeSvg:l,bbox:u,label:h}=await ct(e,t,ut(t)),d=u.width+(t.look==="neo"?s*2:s),f=Math.max(u.height+(t.look==="neo"?o*2:o),t.height??0),p=f/4,g=-Math.max(d,(t.width??0)-p)/2,y=-f/2,x=y/2,b=[{x:g+x,y},{x:g,y:0},{x:g+x,y:-y},{x:-g,y:-y},{x:-g,y}],{cssStyles:T}=t,C=Xe.svg(l),v=et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let E=rr(b),S=C.path(E,v),_=l.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",T),n&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-x/2},0)`),h.attr("transform",`translate(${-x/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),tt(t,_),t.intersect=function(A){return He.polygon(t,b,A)},l}var wZ=w(()=>{"use strict";It();Ft();Ot();$t();a(vZ,"rect_left_inv_arrow")});var DPe,ho,J2=w(()=>{"use strict";Tr();Gt();qo();DPe=a(async(e,t,r,n=!1,i=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);let o=_e(),l=vn(o);return await li(e,s,{style:r,isTitle:n,useHtmlLabels:l,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ho=DPe});async function _Z(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i;t.cssClasses?i="node "+t.cssClasses:i="node default";let s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g"),l=s.insert("g").attr("class","label").attr("style",n),u=t.description,h=t.label,d=await ho(l,h,t.labelStyle,!0,!0),f={width:0,height:0};if(vn(_e())){let A=d.children[0],B=st(d);f=A.getBoundingClientRect(),B.attr("width",f.width),B.attr("height",f.height)}H.info("Text 2",u);let p=u||[],m=d.getBBox(),g=await ho(l,Array.isArray(p)?p.join("
    "):p,t.labelStyle,!0,!0),y=g.children[0],x=st(g);f=y.getBoundingClientRect(),x.attr("width",f.width),x.attr("height",f.height);let b=(t.padding||0)/2;st(g).attr("transform","translate( "+(f.width>m.width?0:(m.width-f.width)/2)+", "+(m.height+b+5)+")"),st(d).attr("transform","translate( "+(f.width(H.debug("Rough node insert CXC",$),O),":first-child"),S=s.insert(()=>(H.debug("Rough node insert CXC",$),$),":first-child")}else S=o.insert("rect",":first-child"),_=o.insert("line"),S.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-b).attr("y",-f.height/2-b).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),_.attr("class","divider").attr("x1",-f.width/2-b).attr("x2",f.width/2+b).attr("y1",-f.height/2-b+m.height+b).attr("y2",-f.height/2-b+m.height+b);return tt(t,S),t.intersect=function(A){return He.rect(t,A)},s}var AZ=w(()=>{"use strict";Lr();It();J2();Ft();Ot();$t();Gt();Yo();bt();Tr();a(_Z,"rectWithTitle")});async function RZ(e,t,{config:{themeVariables:r}}){let n=r?.radius??5,i={rx:n,ry:n,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Ko(e,t,i)}var LZ=w(()=>{"use strict";Xd();a(RZ,"roundedRect")});async function IZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await ct(e,t,ut(t)),h=(t?.width??l.width)+i*2+(t.look==="neo"?Zd:Zd*2),d=(t?.height??l.height)+s*2,f=h-Zd,p=d,m=Zd-h/2,g=-d/2,{cssStyles:y}=t,x=Xe.svg(o),b=et(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let T=[{x:m,y:g},{x:m+f,y:g},{x:m+f,y:g+p},{x:m-Zd,y:g+p},{x:m-Zd,y:g},{x:m,y:g},{x:m,y:g+p}],C=x.polygon(T.map(E=>[E.x,E.y]),b),v=o.insert(()=>C,":first-child");return v.attr("class","basic label-container outer-path").attr("style",Hr(y)),n&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",n),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",n),u.attr("transform",`translate(${Zd/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),tt(t,v),t.intersect=function(E){return He.rect(t,E)},o}var Zd,DZ=w(()=>{"use strict";It();Ft();Ot();$t();jt();Zd=8;a(IZ,"shadedProcess")});async function NZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:l,bbox:u,label:h}=await ct(e,t,ut(t)),d=(t?.width?t?.width:u.width)+s*2,f=((t?.height?t?.height:u.height)+o*2)*1.5,p=d,m=f/1.5,g=-p/2,y=-m/2,{cssStyles:x}=t,b=Xe.svg(l),T=et(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=[{x:g,y},{x:g,y:y+m},{x:g+p,y:y+m},{x:g+p,y:y-m/2}],v=rr(C),E=b.path(v,T),S=l.insert(()=>E,":first-child");return S.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",x),n&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",n),S.attr("transform",`translate(0, ${m/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(u.x-(u.left??0))}, ${-m/4+(t.padding??0)-(u.y-(u.top??0))})`),tt(t,S),t.intersect=function(_){return He.polygon(t,C,_)},l}var MZ=w(()=>{"use strict";It();Ft();Ot();$t();a(NZ,"slopedRect")});async function OZ(e,t){let r=t.padding??0,n=t.look==="neo"?16:r*2,i=t.look==="neo"?12:r,s={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??n,labelPaddingY:i},o=await Ko(e,t,s);if(t.colorIndex!==void 0){let{theme:l,themeVariables:u}=_e();ci(o,t.colorIndex,l,u.borderColorArray)}return o}var PZ=w(()=>{"use strict";Gt();Wi();Xd();a(OZ,"squareRect")});async function BZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?40:i,o=t.look==="neo"?24:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),{w:h,h:d}=NPe(u,s,o),f=d/2,{cssStyles:p}=t,m=Xe.svg(l),g=et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-h/2+f,y:-d/2},{x:h/2-f,y:-d/2},...Ga(-h/2+f,0,f,R4,90,270),{x:h/2-f,y:d/2},...Ga(h/2-f,0,f,R4,270,450)],x=rr(y),b=m.path(x,g),T=l.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),tt(t,T),t.intersect=function(C){return He.polygon(t,y,C)},l}var R4,NPe,$Z=w(()=>{"use strict";It();Ft();Ot();$t();R4=50,NPe=a((e,t,r)=>{let n=e.height+r,i=n*Math.cos(Math.PI/(2*(R4-1))),s=Math.sqrt(Math.max(0,i**2-e.height**2));return{w:Math.max(e.width+n/4+t,1.5*n+(n-i),e.width+t+n-s),h:n}},"stadiumDimensions");a(BZ,"stadium")});async function FZ(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Ko(e,t,r)}var GZ=w(()=>{"use strict";Xd();a(FZ,"state")});function VZ(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n;let{cssStyles:s}=t,{lineColor:o,stateBorder:l,nodeBorder:u,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let d=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=Xe.svg(d),p=et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),g=l??u,y=(t.width??0)*5/14,x=f.circle(0,0,y,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),b=d.insert(()=>m,":first-child");if(b.insert(()=>x),t.look!=="handDrawn"&&b.attr("class","outer-path"),s&&b.selectAll("path").attr("style",s),i&&b.selectAll("path").attr("style",i),t.width<25&&h&&t.look!=="handDrawn"){let T=e.node()?.ownerSVGElement?.id??"",C=T?`${T}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${C})`)}return tt(t,b),t.intersect=function(T){return He.circle(t,(t.width??0)/2,T)},d}var zZ=w(()=>{"use strict";$t();Ft();Ot();It();a(VZ,"stateEnd")});function UZ(e,t,{config:{themeVariables:r}}){let{lineColor:n,nodeShadow:i}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o;if(t.look==="handDrawn"){let u=Xe.svg(s).circle(0,0,t.width,tX(n));o=s.insert(()=>u),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&i&&t.look!=="handDrawn"){let l=e.node()?.ownerSVGElement?.id??"",u=l?`${l}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${u})`)}return tt(t,o),t.intersect=function(l){return He.circle(t,(t.width??7)/2,l)},s}var WZ=w(()=>{"use strict";$t();Ft();Ot();It();a(UZ,"stateStart")});async function jZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t?.padding??8,s=t.look==="neo"?28:i,o=t.look==="neo"?12:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=Math.max(u.width+2*Lm+s,t.width??0),d=Math.max(u.height+o,t.height??0),f=h-2*Lm,p=d,m=-h/2,g=-d/2,y=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){let x=Xe.svg(l),b=et(t,{}),T=x.rectangle(m,g,f+16,p,b),C=x.line(m+Lm,g,m+Lm,g+p,b),v=x.line(m+Lm+f,g,m+Lm+f,g+p,b);l.insert(()=>C,":first-child"),l.insert(()=>v,":first-child");let E=l.insert(()=>T,":first-child"),{cssStyles:S}=t;E.attr("class","basic label-container").attr("style",Hr(S)),tt(t,E)}else{let x=as(l,f,p,y);n&&x.attr("style",n),tt(t,x)}return t.intersect=function(x){return He.polygon(t,y,x)},l}var Lm,qZ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();jt();Lm=8;a(jZ,"subroutine")});async function HZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-s*2-L4*(t.height+o*2),10));let{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=(t?.height?t?.height:u.height)+o*2,d=L4*h,f=L4*h,m=(t?.width?t?.width:u.width)+s*2+d-d,g=h,y=-m/2,x=-g/2,{cssStyles:b}=t,T=Xe.svg(l),C=et(t,{}),v=[{x:y-d/2,y:x},{x:y+m+d/2,y:x},{x:y+m+d/2,y:x+g},{x:y-d/2,y:x+g}],E=[{x:y+m-d/2,y:x+g},{x:y+m+d/2,y:x+g},{x:y+m+d/2,y:x+g-f}];t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let S=rr(v),_=T.path(S,C),A=rr(E),B=T.path(A,{...C,fillStyle:"solid"}),$=l.insert(()=>B,":first-child");return $.insert(()=>_,":first-child"),$.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",n),tt(t,$),t.intersect=function(O){return He.polygon(t,v,O)},l}var L4,YZ=w(()=>{"use strict";It();Ot();$t();Ft();L4=.2;a(HZ,"taggedRect")});async function KZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,label:o}=await ct(e,t,ut(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=u/8,d=.2*l,f=.2*u,p=u+h,{cssStyles:m}=t,g=Xe.svg(i),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-l/2-l/2*.1,y:p/2},...lo(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],b=-l/2+l/2*.1,T=-p/2-f*.4,C=[{x:b+l-d,y:(T+u)*1.3},{x:b+l,y:T+u-f},{x:b+l,y:(T+u)*.9},...lo(b+l,(T+u)*1.25,b+l-d,(T+u)*1.3,-u*.02,.5)],v=rr(x),E=g.path(v,y),S=rr(C),_=g.path(S,{...y,fillStyle:"solid"}),A=i.insert(()=>_,":first-child");return A.insert(()=>E,":first-child"),A.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(s.x-(s.left??0))},${-u/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),tt(t,A),t.intersect=function(B){return He.polygon(t,x,B)},i}var XZ=w(()=>{"use strict";It();Ft();$t();Ot();a(KZ,"taggedWaveEdgedRectangle")});async function QZ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s}=await ct(e,t,ut(t)),o=Math.max(s.width+(t.padding??0),t?.width||0),l=Math.max(s.height+(t.padding??0),t?.height||0),u=-o/2,h=-l/2,d=i.insert("rect",":first-child");return d.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",o).attr("height",l),tt(t,d),t.intersect=function(f){return He.rect(t,f)},i}var ZZ=w(()=>{"use strict";It();Ft();Ot();a(QZ,"text")});async function tJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?12:i/2,o=t.height??0;if(t.height&&(t.height=t.height-s,t.heightv,":first-child"),y=l.insert(()=>C,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{let x=MPe(0,0,m,d,p,f);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",Hr(g)).attr("style",n),y.attr("class","basic label-container outer-path"),g&&y.selectAll("path").attr("style",g),n&&y.selectAll("path").attr("style",n)}return y.attr("label-offset-x",p),y.attr("transform",`translate(${-m/2}, ${d/2} )`),h.attr("transform",`translate(${-(u.width/2)-p-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),tt(t,y),t.intersect=function(x){let b=He.rect(t,x),T=b.y-(t.y??0);if(f!=0&&(Math.abs(T)<(t.height??0)/2||Math.abs(T)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-p)){let C=p*p*(1-T*T/(f*f));C!=0&&(C=Math.sqrt(Math.abs(C))),C=p-C,x.x-(t.x??0)>0&&(C=-C),b.x+=C}return b},l}var MPe,OPe,PPe,JZ,eJ,rJ=w(()=>{"use strict";It();Ot();$t();Ft();jt();MPe=a((e,t,r,n,i,s)=>`M${e},${t} + a${i},${s} 0,0,1 0,${-n} + l${r},0 + a${i},${s} 0,0,1 0,${n} + M${r},${-n} + a${i},${s} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),OPe=a((e,t,r,n,i,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${s} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${s} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),PPe=a((e,t,r,n,i,s)=>[`M${e+r/2},${-n/2}`,`a${i},${s} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),JZ=5,eJ=10;a(tJ,"tiltedCylinder")});async function nJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=(t.look==="neo",i),o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=Math.max(u.height+s,t.height??0),d=Math.max(u.width+o,(t.width??0)-h),f=[{x:-3*h/6,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=Xe.svg(l),y=et(t,{}),x=rr(f),b=g.path(x,y);p=l.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=as(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,tt(t,p),t.intersect=function(g){return He.polygon(t,f,g)},l}var iJ=w(()=>{"use strict";It();Ft();Ot();$t();Ol();a(nJ,"trapezoid")});async function sJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=15,u=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.heightT,":first-child");return C.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",m),n&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",n),tt(t,C),t.intersect=function(v){return He.polygon(t,x,v)},h}var aJ=w(()=>{"use strict";It();Ft();Ot();$t();a(sJ,"trapezoidalPentagon")});async function cJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.widthT,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",g),n&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",n),t.width=d,t.height=f,tt(t,C),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${f/2-(l.height+(t.padding??0)/(h?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(v){return H.info("Triangle intersect",t,m,v),He.polygon(t,m,v)},o}var oJ,lJ,uJ=w(()=>{"use strict";bt();It();Ft();Ot();$t();It();Ir();Gt();oJ=10,lJ=10;a(cJ,"triangle")});async function hJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-s*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:u,bbox:h,label:d}=await ct(e,t,ut(t)),f=(t?.width?t?.width:h.width)+(s??0)*2,p=(t?.height?t?.height:h.height)+(o??0)*2,m=t.look==="neo"?p/4:p/8,g=p+(l?m:-m),{cssStyles:y}=t,b=14-f,T=b>0?b/2:0,C=Xe.svg(u),v=et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let E=[{x:-f/2-T,y:g/2},...lo(-f/2-T,g/2,f/2+T,g/2,m,.8),{x:f/2+T,y:-g/2},{x:-f/2-T,y:-g/2}],S=rr(E),_=C.path(S,v),A=u.insert(()=>_,":first-child");return A.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",y),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-m/2})`),d.attr("transform",`translate(${-f/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-m-(h.y-(h.top??0))})`),tt(t,A),t.intersect=function(B){return He.polygon(t,E,B)},u}var dJ=w(()=>{"use strict";It();Ft();$t();Ot();a(hJ,"waveEdgedRectangle")});async function fJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.padding??0,s=t.look==="neo"?16:i,o=t.look==="neo"?20:i;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 v=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-v*(20/9)),t.width=t.width-s*2}let{shapeSvg:l,bbox:u}=await ct(e,t,ut(t)),h=(t?.width?t?.width:u.width)+s*2,d=(t?.height?t?.height:u.height)+o,f=d/8,p=d+f*2,{cssStyles:m}=t,g=Xe.svg(l),y=et(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let x=[{x:-h/2,y:p/2},...lo(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},...lo(h/2,-p/2,-h/2,-p/2,f,-1)],b=rr(x),T=g.path(b,y),C=l.insert(()=>T,":first-child");return C.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),tt(t,C),t.intersect=function(v){return He.polygon(t,x,v)},l}var pJ=w(()=>{"use strict";It();Ft();Ot();$t();a(fJ,"waveRectangle")});async function mJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-ui,10),t.height=Math.max((t?.height??0)-s*2-ui,10));let{shapeSvg:o,bbox:l,label:u}=await ct(e,t,ut(t)),h=(t?.width?t?.width:l.width)+i*2+ui,d=(t?.height?t?.height:l.height)+s*2+ui,f=h-ui,p=d-ui,m=-f/2,g=-p/2,{cssStyles:y}=t,x=Xe.svg(o),b=et(t,{}),T=[{x:m-ui,y:g-ui},{x:m-ui,y:g+p},{x:m+f,y:g+p},{x:m+f,y:g-ui}],C=`M${m-ui},${g-ui} L${m+f},${g-ui} L${m+f},${g+p} L${m-ui},${g+p} L${m-ui},${g-ui} + M${m-ui},${g} L${m+f},${g} + M${m},${g-ui} L${m},${g+p}`;t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=x.path(C,b),E=o.insert(()=>v,":first-child");return E.attr("transform",`translate(${ui/2}, ${ui/2})`),E.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",y),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(l.width/2)+ui/2-(l.x-(l.left??0))}, ${-(l.height/2)+ui/2-(l.y-(l.top??0))})`),tt(t,E),t.intersect=function(S){return He.polygon(t,T,S)},o}var ui,gJ=w(()=>{"use strict";It();Ot();$t();Ft();ui=10;a(mJ,"windowPane")});async function I4(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:n,themeVariables:i}=Ct(),{rowEven:s,rowOdd:o,nodeBorder:l,borderColorArray:u}=i;if(t.look==="handDrawn"){let{themeVariables:ce}=Ct(),{background:te}=ce,me={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${te}`]};await I4(e,me)}let h=Ct();t.useHtmlLabels=h.htmlLabels;let d=h.er?.diagramPadding??10,f=h.er?.entityPadding??6,{cssStyles:p}=t,{labelStyles:m,nodeStyles:g}=Ze(t);if(r.attributes.length===0&&t.label){let ce={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:""};Ts(t.label,h)+ce.labelPaddingX*20){let ce=b.width+d*2-(E+S+_+A);E+=ce/O,S+=ce/O,_>0&&(_+=ce/O),A>0&&(A+=ce/O)}let I=E+S+_+A,F=Xe.svg(x),N=et(t,{});t.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");let D=0;v.length>0&&(D=v.reduce((ce,te)=>ce+(te?.rowHeight??0),0));let M=Math.max(G.width+d*2,t?.width||0,I),R=Math.max((D??0)+b.height,t?.height||0),P=-M/2,V=-R/2;if(x.selectAll("g:not(:first-child)").each((ce,te,me)=>{let he=st(me[te]),we=he.attr("transform"),ye=0,ke=0;if(we){let Ge=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(we);Ge&&(ye=parseFloat(Ge[1]),ke=parseFloat(Ge[2]),he.attr("class").includes("attribute-name")?ye+=E:he.attr("class").includes("attribute-keys")?ye+=E+S:he.attr("class").includes("attribute-comment")&&(ye+=E+S+_))}he.attr("transform",`translate(${P+d/2+ye}, ${ke+V+b.height+f/2})`)}),x.select(".name").attr("transform","translate("+-b.width/2+", "+(V+f/2)+")"),n!=null&&yJ.has(n)){let ce=r.colorIndex??0;x.attr("data-color-id",`color-${ce%u.length}`)}let U=F.rectangle(P,V,M,R,N),z=x.insert(()=>U,":first-child").attr("class","outer-path").attr("style",p.join(""));C.push(0);for(let[ce,te]of v.entries()){let he=(ce+1)%2===0&&te.yOffset!==0,we=F.rectangle(P,b.height+V+te?.yOffset,M,te?.rowHeight,{...N,fill:he?s:o,stroke:l});x.insert(()=>we,"g.label").attr("style",p.join("")).attr("class",`row-rect-${he?"even":"odd"}`)}let j=1e-4,K=J0(P,b.height+V,M+P,b.height+V,j),Z=F.polygon(K.map(ce=>[ce.x,ce.y]),N);if(x.insert(()=>Z).attr("class","divider"),K=J0(E+P,b.height+V,E+P,R+V,j),Z=F.polygon(K.map(ce=>[ce.x,ce.y]),N),x.insert(()=>Z).attr("class","divider"),B){let ce=E+S+P;K=J0(ce,b.height+V,ce,R+V,j),Z=F.polygon(K.map(te=>[te.x,te.y]),N),x.insert(()=>Z).attr("class","divider")}if($){let ce=E+S+_+P;K=J0(ce,b.height+V,ce,R+V,j),Z=F.polygon(K.map(te=>[te.x,te.y]),N),x.insert(()=>Z).attr("class","divider")}for(let ce of C){let te=b.height+V+ce;K=J0(P,te,M+P,te,j),Z=F.polygon(K.map(me=>[me.x,me.y]),N),x.insert(()=>Z).attr("class","divider")}if(tt(t,z),g&&t.look!=="handDrawn")if(n!=null&&BPe.has(n))x.selectAll("path").attr("style",g);else{let te=g.split(";")?.filter(me=>me.includes("stroke"))?.map(me=>`${me}`).join("; ");x.selectAll("path").attr("style",te??""),x.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(ce){return He.rect(t,ce)},x}async function Z0(e,t,r,n=0,i=0,s=[],o=""){let l=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",o);t!==Cl(t)&&(t=Cl(t),t=t.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await li(l,t,{width:Ts(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let d=u.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(Ji(r.htmlLabels)){let d=u.children[0];d.style.textAlign="start";let f=st(u);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}return h}function J0(e,t,r,n,i){return e===r?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:r+i/2,y:n},{x:r-i/2,y:n}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:r,y:n+i/2},{x:r,y:n-i/2}]}var yJ,BPe,xJ=w(()=>{"use strict";It();Ft();Ot();$t();Xd();Tr();qo();Ir();Lr();jt();yJ=new Set(["redux-color","redux-dark-color"]),BPe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);a(I4,"erBox");a(Z0,"addText");a(J0,"lineToPolygon")});async function bJ(e,t,r,n,i=r.class.padding??12){let s=n?0:3,o=e.insert("g").attr("class",ut(t)).attr("id",t.domId||t.id),l=null,u=null,h=null,d=null,f=0,p=0,m=0;if(l=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let T=t.annotations[0];await eS(l,{text:`\xAB${T}\xBB`},0),f=l.node().getBBox().height}u=o.insert("g").attr("class","label-group text"),await eS(u,t,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(let T of t.members){let C=await eS(h,T,y,[T.parseClassifier()]);y+=C+s}m=h.node().getBBox().height,m<=0&&(m=i/2),d=o.insert("g").attr("class","methods-group text");let x=0;for(let T of t.methods){let C=await eS(d,T,x,[T.parseClassifier()]);x+=C+s}let b=o.node().getBBox();if(l!==null){let T=l.node().getBBox();l.attr("transform",`translate(${-T.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${f})`),b=o.node().getBBox(),h.attr("transform",`translate(0, ${f+p+i*2})`),b=o.node().getBBox(),d.attr("transform",`translate(0, ${f+p+(m?m+i*4:i*2)})`),b=o.node().getBBox(),{shapeSvg:o,bbox:b}}async function eS(e,t,r,n=[]){let i=e.insert("g").attr("class","label").attr("style",n.join("; ")),s=Ct(),o="useHtmlLabels"in t?t.useHtmlLabels:Ji(s.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!o&&l.startsWith("\\")&&(l=l.substring(1)),Un(l)&&(o=!0);let u=await li(i,w1(aa(l)),{width:Ts(l,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s),h,d=1;if(o){let f=u.children[0],p=st(u);d=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(d+=f.innerHTML.split("").length-1),await F2(f),h=f.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&st(u).selectAll("tspan").attr("font-weight",""),d=u.children.length;let f=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(f.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*d)+r)+")"),h.height}var TJ=w(()=>{"use strict";Lr();Tr();It();jt();Gt();qo();t4();Ir();a(bJ,"textHelper");a(eS,"addText")});async function CJ(e,t){let r=_e(),{theme:n,themeVariables:i}=r,{useGradient:s,borderColorArray:o}=i,l=r.class.padding??12,u=l,h=t.useHtmlLabels??Ji(r.htmlLabels)??!0,d=t;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];let{shapeSvg:f,bbox:p}=await bJ(e,t,r,h,u);ci(f,t.colorIndex,n,o);let{labelStyles:m,nodeStyles:g}=Ze(t);t.labelStyle=m,t.cssStyles=d.styles||"";let y=d.styles?.join(";")||g||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));let x=d.members.length===0&&d.methods.length===0&&!r.class?.hideEmptyMembersBox,b=Xe.svg(f),T=et(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=Math.max(t.width??0,p.width),v=Math.max(t.height??0,p.height),E=(t.height??0)>p.height;d.members.length===0&&d.methods.length===0?v+=u:d.members.length>0&&d.methods.length===0&&(v+=u*2);let S=-C/2,_=-v/2,A=x?l*2:d.members.length===0&&d.methods.length===0?-l:0;E&&(A=l*2);let B=b.rectangle(S-l,_-l-(x?l:d.members.length===0&&d.methods.length===0?-l/2:0),C+2*l,v+2*l+A,T),$=f.insert(()=>B,":first-child");$.attr("class","basic label-container outer-path");let O=$.node().getBBox(),G=f.select(".annotation-group").node().getBBox().height-(x?l/2:0)||0,I=f.select(".label-group").node().getBBox().height-(x?l/2:0)||0,F=f.select(".members-group").node().getBBox().height-(x?l/2:0)||0,N=(G+I+_+l-(_-l-(x?l:d.members.length===0&&d.methods.length===0?-l/2:0)))/2;if(f.selectAll(".text").each((D,M,R)=>{let P=st(R[M]),V=P.attr("transform"),U=0;if(V){let Z=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(V);Z&&(U=parseFloat(Z[2]))}let z=U+_+l-(x?l:d.members.length===0&&d.methods.length===0?-l/2:0);if(P.attr("class").includes("methods-group")){let K=Math.max(F,u/2);E?z=Math.max(N,G+I+K+_+u*2+l)+u*2:z=G+I+K+_+u*4+l}d.members.length===0&&d.methods.length===0&&r.class?.hideEmptyMembersBox&&(d.annotations.length>0?z=U-u:z=U),h||(z-=4);let j=S;(P.attr("class").includes("label-group")||P.attr("class").includes("annotation-group"))&&(j=-P.node()?.getBBox().width/2||0,f.selectAll("text").each(function(K,Z,ce){window.getComputedStyle(ce[Z]).textAnchor==="middle"&&(j=0)})),P.attr("transform",`translate(${j}, ${z})`)}),d.members.length>0||d.methods.length>0||x){let D=G+I+_+l,M=b.line(O.x,D,O.x+O.width,D+.001,T);f.insert(()=>M).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",y)}if(x||d.members.length>0||d.methods.length>0){let D=G+I+F+_+u*2+l,M=b.line(O.x,E?Math.max(N,D):D,O.x+O.width,(E?Math.max(N,D):D)+.001,T);f.insert(()=>M).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",y)}if(d.look!=="handDrawn"&&f.selectAll("path").attr("style",y),$.select(":nth-child(2)").attr("style",y),f.selectAll(".divider").select("path").attr("style",y),t.labelStyle?f.selectAll("span").attr("style",t.labelStyle):f.selectAll("span").attr("style",y),!h){let D=RegExp(/color\s*:\s*([^;]*)/),M=D.exec(y);if(M){let R=M[0].replace("color","fill");f.selectAll("tspan").attr("style",R)}else if(m){let R=D.exec(m);if(R){let P=R[0].replace("color","fill");f.selectAll("tspan").attr("style",P)}}}return tt(t,$),t.intersect=function(D){return He.rect(t,D)},f}var kJ=w(()=>{"use strict";It();Gt();Lr();$t();Ot();Ft();TJ();Ir();Wi();a(CJ,"classBox")});async function SJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let i=t,s=t,o=20,l=20,u="verifyMethod"in t,h=ut(t),d=_e(),{themeVariables:f}=d,{borderColorArray:p,requirementEdgeLabelBackground:m}=f,g=d.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id),x;u?x=await $c(y,`<<${i.type}>>`,0,t.labelStyle):x=await $c(y,"<<Element>>",0,t.labelStyle);let b=x,T=await $c(y,i.name,b,t.labelStyle+"; font-weight: bold;");if(b+=T+l,u){let O=await $c(y,`${i.requirementId?`ID: ${i.requirementId}`:""}`,b,t.labelStyle,g);b+=O;let G=await $c(y,`${i.text?`Text: ${i.text}`:""}`,b,t.labelStyle,g);b+=G;let I=await $c(y,`${i.risk?`Risk: ${i.risk}`:""}`,b,t.labelStyle,g);b+=I,await $c(y,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,b,t.labelStyle,g)}else{let O=await $c(y,`${s.type?`Type: ${s.type}`:""}`,b,t.labelStyle,g);b+=O,await $c(y,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,b,t.labelStyle,g)}let C=(y.node()?.getBBox().width??200)+o,v=(y.node()?.getBBox().height??200)+o,E=-C/2,S=-v/2,_=Xe.svg(y),A=et(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let B=_.rectangle(E,S,C,v,A),$=y.insert(()=>B,":first-child");if($.attr("class","basic label-container outer-path").attr("style",n),p?.length){let O=t.colorIndex??0;y.attr("data-color-id",`color-${O%p.length}`)}if(y.selectAll(".label").each((O,G,I)=>{let F=st(I[G]),N=F.attr("transform"),D=0,M=0;if(N){let U=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);U&&(D=parseFloat(U[1]),M=parseFloat(U[2]))}let R=M-v/2,P=E+o/2;(G===0||G===1)&&(P=D),F.attr("transform",`translate(${P}, ${R+o})`)}),b>x+T+l){let O=S+x+T+l,G;if(t.look==="neo"){let N=[[E,O],[E+C,O],[E+C,O+.001],[E,O+.001]];G=_.polygon(N,A)}else G=_.line(E,O,E+C,O,A);y.insert(()=>G).attr("class","divider")}return tt(t,$),t.intersect=function(O){return He.rect(t,O)},n&&t.look!=="handDrawn"&&(m||p?.length)&&y.selectAll("path").attr("style",n),y}async function $c(e,t,r,n="",i="center"){if(t==="")return 0;let s=e.insert("g").attr("class","label").attr("style",n),o=_e(),l=o.htmlLabels??!0,u=await li(s,w1(aa(t)),{width:Ts(t,o)+50,classes:"markdown-node-label",useHtmlLabels:l,style:n},o),h;if(l){let d=u.children[0],f=st(u);i==="start"&&st(d).style("text-align","left"),h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{let d=u.children[0];for(let f of d.children)n&&f.setAttribute("style",n);if(i==="start"){d.setAttribute("text-anchor","start");for(let f of d.children)f.setAttribute("text-anchor","start")}h=u.getBBox(),h.height+=6}return s.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}var EJ=w(()=>{"use strict";It();Ft();Ot();$t();jt();Gt();qo();Lr();a(SJ,"requirementBox");a($c,"addText")});async function vJ(e,t,{config:r}){let{labelStyles:n,nodeStyles:i}=Ze(t);t.labelStyle=n||"";let s=10,o=t.width;t.width=(t.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await ct(e,t,ut(t)),d=t.padding||10,f="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await Ho(p,"ticket"in t&&t.ticket||"",m):{label:g,bbox:y}=await Ho(l,"ticket"in t&&t.ticket||"",m);let{label:x,bbox:b}=await Ho(l,"assigned"in t&&t.assigned||"",m);t.width=o;let T=10,C=t?.width||0,v=Math.max(y.height,b.height)/2,E=Math.max(u.height+T*2,t?.height||0)+v,S=-C/2,_=-E/2;h.attr("transform","translate("+(d-C/2)+", "+(-v-u.height/2)+")"),g.attr("transform","translate("+(d-C/2)+", "+(-v+u.height/2)+")"),x.attr("transform","translate("+(d+C/2-b.width-2*s)+", "+(-v+u.height/2)+")");let A,{rx:B,ry:$}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){let G=Xe.svg(l),I=et(t,{}),F=B||$?G.path(Zn(S,_,C,E,B||0),I):G.rectangle(S,_,C,E,I);A=l.insert(()=>F,":first-child"),A.attr("class","basic label-container").attr("style",O||null)}else{A=l.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",B??5).attr("ry",$??5).attr("x",S).attr("y",_).attr("width",C).attr("height",E);let G="priority"in t&&t.priority;if(G){let I=l.append("line"),F=S+2,N=_+Math.floor((B??0)/2),D=_+E-Math.floor((B??0)/2);I.attr("x1",F).attr("y1",N).attr("x2",F).attr("y2",D).attr("stroke-width","4").attr("stroke",$Pe(G))}}return tt(t,A),t.height=E,t.intersect=function(G){return He.rect(t,G)},l}var $Pe,wJ=w(()=>{"use strict";It();Ft();Yo();Ot();$t();$Pe=a(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");a(vJ,"kanbanItem")});async function _J(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,halfPadding:o,label:l}=await ct(e,t,ut(t)),u=s.width+10*o,h=s.height+8*o,d=.15*u,{cssStyles:f}=t,p=s.width+20,m=s.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let x,b=`M0 0 + a${d},${d} 1 0,0 ${g*.25},${-1*y*.1} + a${d},${d} 1 0,0 ${g*.25},0 + a${d},${d} 1 0,0 ${g*.25},0 + a${d},${d} 1 0,0 ${g*.25},${y*.1} + + a${d},${d} 1 0,0 ${g*.15},${y*.33} + a${d*.8},${d*.8} 1 0,0 0,${y*.34} + a${d},${d} 1 0,0 ${-1*g*.15},${y*.33} + + a${d},${d} 1 0,0 ${-1*g*.25},${y*.15} + a${d},${d} 1 0,0 ${-1*g*.25},0 + a${d},${d} 1 0,0 ${-1*g*.25},0 + a${d},${d} 1 0,0 ${-1*g*.25},${-1*y*.15} + + a${d},${d} 1 0,0 ${-1*g*.1},${-1*y*.33} + a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34} + a${d},${d} 1 0,0 ${g*.1},${-1*y*.33} + H0 V0 Z`;if(t.look==="handDrawn"){let T=Xe.svg(i),C=et(t,{}),v=T.path(b,C);x=i.insert(()=>v,":first-child"),x.attr("class","basic label-container").attr("style",Hr(f))}else x=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",b);return x.attr("transform",`translate(${-g/2}, ${-y/2})`),tt(t,x),t.calcIntersect=function(T,C){return He.rect(T,C)},t.intersect=function(T){return H.info("Bang intersect",t,T),He.rect(t,T)},i}var AJ=w(()=>{"use strict";bt();It();Ft();Ot();$t();jt();a(_J,"bang")});async function RJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,halfPadding:o,label:l}=await ct(e,t,ut(t)),u=s.width+2*o,h=s.height+2*o,d=.15*u,f=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=t,y,x=`M0 0 + a${d},${d} 0 0,1 ${u*.25},${-1*u*.1} + a${p},${p} 1 0,1 ${u*.4},${-1*u*.1} + a${f},${f} 1 0,1 ${u*.35},${u*.2} + + a${d},${d} 1 0,1 ${u*.15},${h*.35} + a${m},${m} 1 0,1 ${-1*u*.15},${h*.65} + + a${f},${d} 1 0,1 ${-1*u*.25},${u*.15} + a${p},${p} 1 0,1 ${-1*u*.5},0 + a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15} + + a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35} + a${m},${m} 1 0,1 ${u*.1},${-1*h*.65} + H0 V0 Z`;if(t.look==="handDrawn"){let b=Xe.svg(i),T=et(t,{}),C=b.path(x,T);y=i.insert(()=>C,":first-child"),y.attr("class","basic label-container").attr("style",Hr(g))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),tt(t,y),t.calcIntersect=function(b,T){return He.rect(b,T)},t.intersect=function(b){return H.info("Cloud intersect",t,b),He.rect(t,b)},i}var LJ=w(()=>{"use strict";$t();bt();jt();Ft();Ot();It();a(RJ,"cloud")});async function IJ(e,t){let{labelStyles:r,nodeStyles:n}=Ze(t);t.labelStyle=r;let{shapeSvg:i,bbox:s,halfPadding:o,label:l}=await ct(e,t,ut(t)),u=s.width+8*o,h=s.height+2*o,d=5,f=t.look==="neo"?` + M${-u/2} ${h/2-d} + v${-h+2*d} + q0,-${d} ${d},-${d} + h${u-2*d} + q${d},0 ${d},${d} + v${h-d} + H${-u/2} + Z + `:` + M${-u/2} ${h/2-d} + v${-h+2*d} + q0,-${d} ${d},-${d} + h${u-2*d} + q${d},0 ${d},${d} + v${h-2*d} + q0,${d} ${-d},${d} + h${-(u-2*d)} + q${-d},0 ${-d},${-d} + Z + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let p=i.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",f);return i.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),i.append(()=>l.node()),tt(t,p),t.calcIntersect=function(m,g){return He.rect(m,g)},t.intersect=function(m){return He.rect(t,m)},i}var DJ=w(()=>{"use strict";Ft();Ot();It();a(IJ,"defaultMindmapNode")});async function NJ(e,t){let r={padding:t.padding??0};return Z2(e,t,r)}var MJ=w(()=>{"use strict";E4();a(NJ,"mindmapCircle")});function tS(e){return e in ex}var FPe,GPe,ex,tx=w(()=>{"use strict";yX();TX();kX();EX();_X();RX();IX();NX();E4();OX();BX();FX();VX();UX();jX();HX();KX();JX();tQ();nQ();sQ();oQ();cQ();fQ();mQ();yQ();bQ();CQ();SQ();vQ();_Q();RQ();IQ();NQ();OQ();BQ();FQ();VQ();UQ();HQ();KQ();Q0();iZ();aZ();uZ();fZ();gZ();xZ();TZ();kZ();EZ();wZ();AZ();LZ();DZ();MZ();PZ();$Z();GZ();zZ();WZ();qZ();YZ();XZ();ZZ();rJ();iJ();aJ();uJ();dJ();pJ();gJ();xJ();kJ();EJ();wJ();AJ();LJ();DJ();MJ();FPe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:OZ},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:RZ},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:BZ},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:jZ},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ZX},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:eQ},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:pQ},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:CX},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:PX},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:AX},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:YX},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Z2},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:_J},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:RJ},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:SZ},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:TQ},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:GQ},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:$Q},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:nJ},{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:MQ},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:iQ},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:QZ},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:LX},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:IZ},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:UZ},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:VZ},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:gQ},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:kQ},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:GX},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:zX},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:WX},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:zQ},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:hJ},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:xQ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tJ},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:qQ},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:qX},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:rQ},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:cJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:mJ},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lQ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:sJ},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:dQ},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:NZ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:bZ},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:yZ},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:bX},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:$X},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:KZ},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:HZ},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:fJ},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:vZ},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:YQ}],GPe=a(()=>{let t=[...Object.entries({state:FZ,choice:DX,note:CZ,composite:MX,rectWithTitle:_Z,labelRect:PQ,block_arrow:wX,collapsedGroup:SX,iconSquare:LQ,iconCircle:wQ,icon:EQ,iconRounded:AQ,imageSquare:DQ,anchor:gX,kanbanItem:vJ,mindmapCircle:NJ,defaultMindmapNode:IJ,classBox:CJ,erBox:I4,requirementBox:SJ,usecaseActor:rZ,usecaseActorHollow:sZ,usecaseActorAwesome:nZ,usecaseActorIcon:cZ,usecaseBusiness:dZ,usecaseEllipse:aQ,usecaseJsonTable:mZ}),...FPe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ex=GPe();a(tS,"isValidShape")});var VPe,zPe,UPe,D4,WPe,jPe,qPe,HPe,YPe,N4,KPe,OJ,XPe,M4,O4=w(()=>{"use strict";VPe=new Set(["system_queue","external_system_queue","container_queue","external_container_queue","component_queue","external_component_queue"]),zPe=new Set(["system_db","external_system_db","container_db","external_container_db","component_db","external_component_db"]),UPe={person:"person",box:"rounded",rounded:"rounded",cylinder:"cylinder",database:"cylinder",db:"cylinder",queue:"h-cyl",pipe:"h-cyl",component:"fr-rect"},D4=a(e=>e?UPe[e.toLowerCase()]:void 0,"keywordShape"),WPe=a(e=>{let t=D4(e.shape)??D4(e.sprite);if(t)return t;if(e.tags)for(let n of e.tags.split(",")){let i=D4(n.trim());if(i)return i}let r=e.typeC4Shape.text;return r==="person"||r==="external_person"?"person":zPe.has(r)?"cylinder":VPe.has(r)?"h-cyl":"rounded"},"resolveNodeShape"),jPe={person:"Person",system:"Software System",container:"Container",component:"Component"},qPe=a(e=>{let t=e.replace(/^external_/,"").replace(/_(db|queue)$/,"");return jPe[t]??t.replace(/_/g," ")},"stereotypeLabel"),HPe=a(e=>e.startsWith("external_"),"isExternal"),YPe=a(e=>{let t=qPe(e.typeC4Shape.text);return e.techn?.text?`[${t}: ${e.techn.text}]`:`[${t}]`},"stereotypeText"),N4=["person","system","system_db","system_queue","container","container_db","container_queue","component","component_db","component_queue"].flatMap(e=>[e,`external_${e}`]),KPe=new Set(N4),OJ=a(e=>KPe.has(e),"isC4ElementType"),XPe=a((e,t)=>{let r=e.typeC4Shape.text,n=e.bgColor??(OJ(r)&&t[`${r}_bg_color`]),i=e.borderColor??(OJ(r)&&t[`${r}_border_color`]),s=[];return n&&s.push(`fill:${n}`),i&&s.push(`stroke:${i}`),s.push(`color:${e.fontColor??"#FFFFFF"}`),s},"elementCssStyles"),M4=a((e,t,r,n,i)=>{let s=e.typeC4Shape.text,o=["c4-shape",`c4-${s}`];HPe(s)&&o.push("c4-external");let l=WPe(e),u=XPe(e,t);return(l==="rounded"||l==="fr-rect")&&u.push("rx:12px","ry:12px"),{id:e.alias,label:e.label.text,stereotype:YPe(e),description:e.descr?.text?[e.descr.text]:void 0,labelType:"string",isGroup:!1,shape:l,cssClasses:o.join(" "),cssStyles:u,padding:r,look:n,useHtmlLabels:!1,width:i}},"buildC4Node")});function Jd(e,t,r,n,i){let s=t[e];if(!s.width)if(r)s.text=qd(s.text,i,n),s.textLines=s.text.split(gt.lineBreakRegex).length,s.width=i,s.height=L2(s.text,n);else{let o=s.text.split(gt.lineBreakRegex);s.textLines=o.length;let l=0;s.height=0,s.width=0;for(let u of o)s.width=Math.max(Ts(u,n),s.width),l=L2(u,n),s.height=s.height+l}return s}async function GJ(e,t,r,n,i){let s=i.db,o=new nS(i);o.data.widthLimit=r.data.widthLimit/Math.min(P4,n.length);for(let[l,u]of n.entries()){let h=0;u.image={width:0,height:0,Y:0},u.sprite&&(u.image.width=48,u.image.height=48,u.image.Y=h,h=u.image.Y+u.image.height);let d=u.wrap&&pr.wrap,f=rS(pr);f.fontSize=f.fontSize+2,f.fontWeight="bold";let p=Jd("label",u,d,f,o.data.widthLimit);if(p.Y=h+8,h=p.Y+p.height,u.type&&u.type.text!==""){u.type.text="["+u.type.text+"]";let x=rS(pr),b=Jd("type",u,d,x,o.data.widthLimit);b.Y=h+5,h=b.Y+b.height}if(u.descr&&u.descr.text!==""){let x=rS(pr);x.fontSize=x.fontSize-2;let b=Jd("descr",u,d,x,o.data.widthLimit);b.Y=h+20,h=b.Y+b.height}if(l==0||l%P4===0){let x=r.data.startx+pr.diagramMarginX,b=r.data.stopy+pr.diagramMarginY+h;o.setData(x,x,b,b)}else{let x=o.data.stopx!==o.data.startx?o.data.stopx+pr.diagramMarginX:o.data.startx,b=o.data.starty;o.setData(x,x,b,b)}o.name=u.alias;let m=s.getC4ShapeArray(u.alias),g=s.getC4ShapeKeys(u.alias);g.length>0&&await FJ(o,e,m,g),t=u.alias;let y=s.getBoundaries(t);y.length>0&&await GJ(e,t,o,y,i),u.alias!=="global"&&$J(e,u,o),r.data.stopy=Math.max(o.data.stopy+pr.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(o.data.stopx+pr.c4ShapeMargin,r.data.stopx),rx=Math.max(rx,r.data.stopx),nx=Math.max(nx,r.data.stopy)}}var rx,nx,BJ,P4,pr,nS,B4,rS,QPe,$J,FJ,$4,PJ,ZPe,JPe,e6e,F4,VJ=w(()=>{"use strict";vY();bt();FL();Ir();XL();Gt();HL();Gp();jt();oK();Rn();tx();O4();Ft();rx=0,nx=0,BJ=4,P4=2;E1.yy=L1;pr={},nS=class{static{a(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,B4(t.db.getConfig())}setData(t,r,n,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(t,r,n,i){t[r]===void 0?t[r]=n:t[r]=i(n,t[r])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.stopx,n=this.data.widthLimit,i=this.nextData.startx===this.nextData.stopx?r+t.margin:r+t.margin*2,s=i+t.width,o=this.nextData.starty+t.margin*2,l=o+t.height;(i>=n||s>=n||this.nextData.cnt>BJ)&&(i=this.nextData.startx+t.margin+pr.nextLinePaddingX,o=this.nextData.stopy+t.margin*2,this.nextData.stopx=s=i+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=o+t.height,this.nextData.cnt=1),t.x=i,t.y=o,this.updateVal(this.data,"startx",i,Math.min),this.updateVal(this.data,"starty",o,Math.min),this.updateVal(this.data,"stopx",s,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",i,Math.min),this.updateVal(this.nextData,"starty",o,Math.min),this.updateVal(this.nextData,"stopx",s,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},B4(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},B4=a(function(e){Pn(pr,e),e?.fontFamily&&(pr.personFontFamily=pr.systemFontFamily=pr.messageFontFamily=e.fontFamily),e?.fontSize&&(pr.personFontSize=pr.systemFontSize=pr.messageFontSize=e.fontSize),e?.fontWeight&&(pr.personFontWeight=pr.systemFontWeight=pr.messageFontWeight=e.fontWeight)},"setConf"),rS=a(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),QPe=a(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");a(Jd,"calcC4ShapeTextWH");$J=a(function(e,t,r){let n=r.data.startx,i=r.data.starty;t.x=n,t.y=i,t.width=r.data.stopx-n,t.height=r.data.stopy-i,t.intersect=u=>He.rect({x:t.x+t.width/2,y:t.y+t.height/2,width:t.width,height:t.height},u),t.label.y=pr.c4ShapeMargin-35;let s=t.wrap&&pr.wrap,o=rS(pr);o.fontSize=o.fontSize+2,o.fontWeight="bold";let l=Ts(t.label.text,o);Jd("label",t,s,o,l),Il.drawBoundary(e,t,pr)},"drawBoundary"),FJ=a(async function(e,t,r,n){let i=_e(),s=i.look??"classic",o={config:i},l=t.attr("id")??"",u=n.map(d=>r[Number(d)]),h=a(d=>{let f=d.shape?ex[d.shape]:void 0;if(!f)throw new Error(`C4: no shape handler for "${d.shape}"`);return f},"shapeHandlerFor");await Promise.all(u.map(async d=>{let f=M4(d,pr,pr.c4ShapePadding,s,pr.width);f.domId=`${l}-${f.id}`;let p=await h(f)(t,f,o);d.width=f.width??pr.width,d.height=f.height??pr.height,d.margin=pr.c4ShapeMargin,p.remove()}));for(let d of u)e.insert(d);await Promise.all(u.map(async d=>{let f=M4(d,pr,pr.c4ShapePadding,s,pr.width);f.domId=`${l}-${f.id}`,f.x=d.x+d.width/2,f.y=d.y+d.height/2;let p=t.append("g").attr("transform",`translate(${d.x+d.width/2}, ${d.y+d.height/2})`);await h(f)(p,f,o),d.intersect=f.intersect})),e.bumpLastMargin(pr.c4ShapeMargin)},"drawC4ShapeArray"),$4=class{static{a(this,"Point")}constructor(t,r){this.x=t,this.y=r}},PJ=a(function(e,t){if(!e.intersect)throw new Error(`C4 element "${e.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);let{x:r,y:n}=e.intersect(t);return new $4(r,n)},"getIntersectPoint"),ZPe=a(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=PJ(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=PJ(t,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),JPe=a(function(e,t,r,n,i){let s=n.db.getC4Type(),o=0;for(let l of t){o=o+1;let u=l.wrap&&pr.wrap,h=QPe(pr);s==="C4Dynamic"&&(l.label.text=o+": "+l.label.text);let d=Ts(l.label.text,h);Jd("label",l,u,h,d),l.techn&&l.techn.text!==""&&(d=Ts(l.techn.text,h),Jd("techn",l,u,h,d)),l.descr&&l.descr.text!==""&&(d=Ts(l.descr.text,h),Jd("descr",l,u,h,d));let f=r(l.from),p=r(l.to);if(!f||!p)throw new Error(`C4 rel "${l.from}" -> "${l.to}" references an unknown shape or boundary`);let m=ZPe(f,p);if(!m.startPoint||!m.endPoint)throw new Error(`Could not calculate intersection points for rel "${l.from}" -> "${l.to}"`);l.startPoint=m.startPoint,l.endPoint=m.endPoint}Il.drawRels(e,t,pr,i)},"drawRels");a(GJ,"drawInsideBoundary");e6e=a(async function(e,t,r,n){pr=zC("c4");let i=_e().securityLevel,{root:s}=aK(t,i),o=n.db;o.setWrap(pr.wrap),BJ=o.getC4ShapeInRow(),P4=o.getC4BoundaryInRow(),H.debug(`C:${JSON.stringify(pr,null,2)}`);let l=s.select(`[id="${t}"]`);Il.insertComputerIcon(l,t),Il.insertDatabaseIcon(l,t),Il.insertClockIcon(l,t);let u=new nS(n);u.setData(pr.diagramMarginX,pr.diagramMarginX,pr.diagramMarginY,pr.diagramMarginY),u.data.widthLimit=screen.availWidth,rx=pr.diagramMarginX,nx=pr.diagramMarginY;let h=o.getTitle(),d=o.getBoundaries("");await GJ(l,"",u,d,n),Il.insertArrowHead(l,t),Il.insertArrowEnd(l,t),Il.insertArrowCrossHead(l,t),Il.insertArrowFilledHead(l,t),JPe(l,o.getRels(),o.getC4Shape,n,t),u.data.stopx=rx,u.data.stopy=nx;let f=u.data,p=f.startx,m=f.starty,y=nx-m+2*pr.diagramMarginY,x=rx-p,b=x+2*pr.diagramMarginX;h&&l.append("text").text(h).attr("x",x/2-4*pr.diagramMarginX).attr("y",m+pr.diagramMarginY),Dr(l,y,b,pr.useMaxWidth);let T=h?60:0;l.attr("viewBox",p-pr.diagramMarginX+" -"+(pr.diagramMarginY+T)+" "+b+" "+(y+T)),H.debug("models:",f)},"draw"),F4={drawPersonOrSystemArray:FJ,drawBoundary:$J,setConf:B4,draw:e6e}});var t6e,r6e,zJ,UJ=w(()=>{"use strict";Gt();O4();t6e=a(()=>{let e=_e().c4??{},t=new CSSStyleSheet;for(let r of N4){let n=t.cssRules[t.insertRule(`.c4-shape.c4-${r} .label {}`,t.cssRules.length)],i=e[`${r}FontFamily`],s=e[`${r}FontSize`],o=e[`${r}FontWeight`];i&&n.style.setProperty("font-family",i),s&&n.style.setProperty("font-size",typeof s=="number"?`${s}px`:s),o&&n.style.setProperty("font-weight",String(o))}return[...t.cssRules].filter(r=>r.style.length>0).map(r=>` ${r.cssText}`).join(` +`)},"elementFontStyles"),r6e=a(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +${t6e()} + + /* The element font colour is set inline per element (default white); the + label text takes it via currentColor. */ + .c4-shape .label, + .c4-shape .label text { + color: inherit; + fill: currentColor; + } + /* Structurizr typography: bold name, smaller stereotype/type and description lines. */ + .c4-shape .label .c4-name { + font-weight: bold; + } + .c4-shape .label .c4-type { + font-size: 0.75em; + } + .c4-shape .label .c4-descr { + font-size: 0.82em; + } + .c4-shape .basic, + .c4-shape rect, + .c4-shape path, + .c4-shape circle, + .c4-shape ellipse, + .c4-shape line { + stroke-width: 2px; + } +`,"getStyles"),zJ=r6e});var WJ={};ir(WJ,{diagram:()=>n6e});var n6e,jJ=w(()=>{"use strict";FL();XL();VJ();UJ();n6e={parser:sU,db:L1,renderer:F4,styles:zJ,init:a(({c4:e,wrap:t})=>{F4.setConf(e),L1.setWrap(t)},"init")}});function o6e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ix(){if(HJ)return th;HJ=1;function e(o){return typeof o>"u"||o===null}a(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}a(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}a(r,"toArray");function n(o,l){if(l){let u=Object.keys(l);for(let h=0,d=u.length;hf&&(h=" ... ",s=l-f+h.length),o-l>f&&(d=" ...",o=l+f-d.length),{str:h+i.slice(s,o).replace(/\t/g,"\u2192")+d,pos:l-s+h.length}}a(t,"getLine");function r(i,s){return e.repeat(" ",s-i.length)+i}a(r,"padStart");function n(i,s){if(s=Object.create(s||null),!i.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);let o=/\r?\n|\r|\0/g,l=[0],u=[],h,d=-1;for(;h=o.exec(i.buffer);)u.push(h.index),l.push(h.index+h[0].length),i.position<=h.index&&d<0&&(d=l.length-2);d<0&&(d=l.length-1);let f="",p=Math.min(i.line+s.linesAfter,u.length).toString().length,m=s.maxLength-(s.indent+p+3);for(let y=1;y<=s.linesBefore&&!(d-y<0);y++){let x=t(i.buffer,l[d-y],u[d-y],i.position-(l[d]-l[d-y]),m);f=e.repeat(" ",s.indent)+r((i.line-y+1).toString(),p)+" | "+x.str+` +`+f}let g=t(i.buffer,l[d],u[d],i.position,m);f+=e.repeat(" ",s.indent)+r((i.line+1).toString(),p)+" | "+g.str+` +`,f+=e.repeat("-",s.indent+p+3+g.pos)+`^ +`;for(let y=1;y<=s.linesAfter&&!(d+y>=u.length);y++){let x=t(i.buffer,l[d+y],u[d+y],i.position-(l[d]-l[d+y]),m);f+=e.repeat(" ",s.indent)+r((i.line+y+1).toString(),p)+" | "+x.str+` +`}return f.replace(/\n$/,"")}return a(n,"makeSnippet"),V4=n,V4}function js(){if(XJ)return z4;XJ=1;let e=sx(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(s){let o={};return s!==null&&Object.keys(s).forEach(function(l){s[l].forEach(function(u){o[String(u)]=l})}),o}a(n,"compileStyleAliases");function i(s,o){if(o=o||{},Object.keys(o).forEach(function(l){if(t.indexOf(l)===-1)throw new e('Unknown option "'+l+'" is met in definition of "'+s+'" YAML type.')}),this.options=o,this.tag=s,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(l){return l},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=n(o.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return a(i,"Type2"),z4=i,z4}function xee(){if(QJ)return U4;QJ=1;let e=sx(),t=js();function r(s,o){let l=[];return s[o].forEach(function(u){let h=l.length;l.forEach(function(d,f){d.tag===u.tag&&d.kind===u.kind&&d.multi===u.multi&&(h=f)}),l[h]=u}),l}a(r,"compileList");function n(){let s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(l){l.multi?(s.multi[l.kind].push(l),s.multi.fallback.push(l)):s[l.kind][l.tag]=s.fallback[l.tag]=l}a(o,"collectType");for(let l=0,u=arguments.length;l=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}a(r,"isHexCode");function n(h){return h>=48&&h<=55}a(n,"isOctCode");function i(h){return h>=48&&h<=57}a(i,"isDecCode");function s(h){if(h===null)return!1;let d=h.length,f=0,p=!1;if(!d)return!1;let m=h[f];if((m==="-"||m==="+")&&(m=h[++f]),m==="0"){if(f+1===d)return!0;if(m=h[++f],m==="b"){for(f++;f=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},"binary"),octal:a(function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},"octal"),decimal:a(function(h){return h.toString(10)},"decimal"),hexadecimal:a(function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),X4}function wee(){if(see)return Q4;see=1;let e=ix(),t=js(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(h){return h===null||!r.test(h)?!1:isFinite(parseFloat(h,10))?!0:n.test(h)}a(i,"resolveYamlFloat");function s(h){let d=h.toLowerCase(),f=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:f*parseFloat(d,10)}a(s,"constructYamlFloat");let o=/^[-+]?[0-9]+e/;function l(h,d){if(isNaN(h))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(h))return"-0.0";let f=h.toString(10);return o.test(f)?f.replace("e",".e"):f}a(l,"representYamlFloat");function u(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||e.isNegativeZero(h))}return a(u,"isFloat"),Q4=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:s,predicate:u,represent:l,defaultStyle:"lowercase"}),Q4}function _ee(){return aee||(aee=1,Z4=kee().extend({implicit:[See(),Eee(),vee(),wee()]})),Z4}function Aee(){return oee||(oee=1,J4=_ee()),J4}function Ree(){if(lee)return eM;lee=1;let e=js(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function n(o){return o===null?!1:t.exec(o)!==null||r.exec(o)!==null}a(n,"resolveYamlTimestamp");function i(o){let l=0,u=null,h=t.exec(o);if(h===null&&(h=r.exec(o)),h===null)throw new Error("Date resolve error");let d=+h[1],f=+h[2]-1,p=+h[3];if(!h[4])return new Date(Date.UTC(d,f,p));let m=+h[4],g=+h[5],y=+h[6];if(h[7]){for(l=h[7].slice(0,3);l.length<3;)l+="0";l=+l}if(h[9]){let b=+h[10],T=+(h[11]||0);u=(b*60+T)*6e4,h[9]==="-"&&(u=-u)}let x=new Date(Date.UTC(d,f,p,m,g,y,l));return u&&x.setTime(x.getTime()-u),x}a(i,"constructYamlTimestamp");function s(o){return o.toISOString()}return a(s,"representYamlTimestamp"),eM=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:s}),eM}function Lee(){if(cee)return tM;cee=1;let e=js();function t(r){return r==="<<"||r===null}return a(t,"resolveYamlMerge"),tM=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),tM}function Iee(){if(uee)return rM;uee=1;let e=js(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function r(o){if(o===null)return!1;let l=0,u=o.length,h=t;for(let d=0;d64)){if(f<0)return!1;l+=6}}return l%8===0}a(r,"resolveYamlBinary");function n(o){let l=o.replace(/[\r\n=]/g,""),u=l.length,h=t,d=0,f=[];for(let m=0;m>16&255),f.push(d>>8&255),f.push(d&255)),d=d<<6|h.indexOf(l.charAt(m));let p=u%4*6;return p===0?(f.push(d>>16&255),f.push(d>>8&255),f.push(d&255)):p===18?(f.push(d>>10&255),f.push(d>>2&255)):p===12&&f.push(d>>4&255),new Uint8Array(f)}a(n,"constructYamlBinary");function i(o){let l="",u=0,h=o.length,d=t;for(let p=0;p>18&63],l+=d[u>>12&63],l+=d[u>>6&63],l+=d[u&63]),u=(u<<8)+o[p];let f=h%3;return f===0?(l+=d[u>>18&63],l+=d[u>>12&63],l+=d[u>>6&63],l+=d[u&63]):f===2?(l+=d[u>>10&63],l+=d[u>>4&63],l+=d[u<<2&63],l+=d[64]):f===1&&(l+=d[u>>2&63],l+=d[u<<4&63],l+=d[64],l+=d[64]),l}a(i,"representYamlBinary");function s(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return a(s,"isBinary"),rM=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:s,represent:i}),rM}function Dee(){if(hee)return nM;hee=1;let e=js(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(s){if(s===null)return!0;let o=[],l=s;for(let u=0,h=l.length;u=48&&L<=57)return L-48;let W=L|32;return W>=97&&W<=102?W-97+10:-1}a(S,"fromHexCode");function _(L){return L===120?2:L===117?4:L===85?8:0}a(_,"escapedHexLen");function A(L){return L>=48&&L<=57?L-48:-1}a(A,"fromDecimalCode");function B(L){switch(L){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return` +`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}a(B,"simpleEscapeSequence");function $(L){return L<=65535?String.fromCharCode(L):String.fromCharCode((L-65536>>10)+55296,(L-65536&1023)+56320)}a($,"charFromCodepoint");function O(L,W,ae){W==="__proto__"?Object.defineProperty(L,W,{configurable:!0,enumerable:!0,writable:!0,value:ae}):L[W]=ae}a(O,"setProperty");let G=new Array(256),I=new Array(256);for(let L=0;L<256;L++)G[L]=B(L)?1:0,I[L]=B(L);function F(L,W){this.input=L,this.filename=W.filename||null,this.schema=W.schema||n,this.onWarning=W.onWarning||null,this.legacy=W.legacy||!1,this.json=W.json||!1,this.listener=W.listener||null,this.maxDepth=typeof W.maxDepth=="number"?W.maxDepth:100,this.maxTotalMergeKeys=typeof W.maxTotalMergeKeys=="number"?W.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=L.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}a(F,"State");function N(L,W){let ae={name:L.filename,buffer:L.input.slice(0,-1),position:L.position,line:L.line,column:L.position-L.lineStart};return ae.snippet=r(ae),new t(W,ae)}a(N,"generateError");function D(L,W){throw N(L,W)}a(D,"throwError");function M(L,W){L.onWarning&&L.onWarning.call(null,N(L,W))}a(M,"throwWarning");function R(L,W,ae){let X=L.anchorMapTransactions;if(X.length!==0){let xe=X[X.length-1];i.call(xe,W)||(xe[W]={existed:i.call(L.anchorMap,W),value:L.anchorMap[W]})}L.anchorMap[W]=ae}a(R,"storeAnchor");function P(L){L.anchorMapTransactions.push(Object.create(null))}a(P,"beginAnchorTransaction");function V(L){let W=L.anchorMapTransactions.pop(),ae=L.anchorMapTransactions;if(ae.length===0)return;let X=ae[ae.length-1],xe=Object.keys(W);for(let ee=0,Y=xe.length;ee=0;X-=1){let xe=W[ae[X]];xe.existed?L.anchorMap[ae[X]]=xe.value:delete L.anchorMap[ae[X]]}}a(U,"rollbackAnchorTransaction");function z(L){return{position:L.position,line:L.line,lineStart:L.lineStart,lineIndent:L.lineIndent,firstTabInLine:L.firstTabInLine,tag:L.tag,anchor:L.anchor,kind:L.kind,result:L.result}}a(z,"snapshotState");function j(L,W){L.position=W.position,L.line=W.line,L.lineStart=W.lineStart,L.lineIndent=W.lineIndent,L.firstTabInLine=W.firstTabInLine,L.tag=W.tag,L.anchor=W.anchor,L.kind=W.kind,L.result=W.result}a(j,"restoreState");let K={YAML:a(function(W,ae,X){W.version!==null&&D(W,"duplication of %YAML directive"),X.length!==1&&D(W,"YAML directive accepts exactly one argument");let xe=/^([0-9]+)\.([0-9]+)$/.exec(X[0]);xe===null&&D(W,"ill-formed argument of the YAML directive");let ee=parseInt(xe[1],10),Y=parseInt(xe[2],10);ee!==1&&D(W,"unacceptable YAML version of the document"),W.version=X[0],W.checkLineBreaks=Y<2,Y!==1&&Y!==2&&M(W,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:a(function(W,ae,X){let xe;X.length!==2&&D(W,"TAG directive accepts exactly two arguments");let ee=X[0];xe=X[1],y.test(ee)||D(W,"ill-formed tag handle (first argument) of the TAG directive"),i.call(W.tagMap,ee)&&D(W,'there is a previously declared suffix for "'+ee+'" tag handle'),x.test(xe)||D(W,"ill-formed tag prefix (second argument) of the TAG directive");try{xe=decodeURIComponent(xe)}catch{D(W,"tag prefix is malformed: "+xe)}W.tagMap[ee]=xe},"handleTagDirective")};function Z(L,W,ae,X){if(W=32&&q<=1114111||D(L,"expected valid JSON character")}else p.test(xe)&&D(L,"the stream contains non-printable characters");L.result+=xe}}a(Z,"captureSegment");function ce(L,W,ae,X){e.isObject(ae)||D(L,"cannot merge mappings; the provided source object is unacceptable");let xe=Object.keys(ae);for(let ee=0,Y=xe.length;eeL.maxTotalMergeKeys&&D(L,"merge keys exceeded maxTotalMergeKeys ("+L.maxTotalMergeKeys+")"),i.call(W,q)||(O(W,q,ae[q]),X[q]=!0)}}a(ce,"mergeMappings");function te(L,W,ae,X,xe,ee,Y,q,ve){if(Array.isArray(xe)){xe=Array.prototype.slice.call(xe);for(let Se=0,Ae=xe.length;Se1&&(L.result+=e.repeat(` +`,W-1))}a(ye,"writeFoldedLines");function ke(L,W,ae){let X,xe,ee,Y,q,ve,Se=L.kind,Ae=L.result,Ee=L.input.charCodeAt(L.position);if(v(Ee)||E(Ee)||Ee===35||Ee===38||Ee===42||Ee===33||Ee===124||Ee===62||Ee===39||Ee===34||Ee===37||Ee===64||Ee===96)return!1;if(Ee===63||Ee===45){let Qe=L.input.charCodeAt(L.position+1);if(v(Qe)||ae&&E(Qe))return!1}for(L.kind="scalar",L.result="",X=xe=L.position,ee=!1;Ee!==0;){if(Ee===58){let Qe=L.input.charCodeAt(L.position+1);if(v(Qe)||ae&&E(Qe))break}else if(Ee===35){let Qe=L.input.charCodeAt(L.position-1);if(v(Qe))break}else{if(L.position===L.lineStart&&we(L)||ae&&E(Ee))break;if(T(Ee))if(Y=L.line,q=L.lineStart,ve=L.lineIndent,he(L,!1,-1),L.lineIndent>=W){ee=!0,Ee=L.input.charCodeAt(L.position);continue}else{L.position=xe,L.line=Y,L.lineStart=q,L.lineIndent=ve;break}}ee&&(Z(L,X,xe,!1),ye(L,L.line-Y),X=xe=L.position,ee=!1),C(Ee)||(xe=L.position+1),Ee=L.input.charCodeAt(++L.position)}return Z(L,X,xe,!1),L.result?!0:(L.kind=Se,L.result=Ae,!1)}a(ke,"readPlainScalar");function Fe(L,W){let ae,X,xe=L.input.charCodeAt(L.position);if(xe!==39)return!1;for(L.kind="scalar",L.result="",L.position++,ae=X=L.position;(xe=L.input.charCodeAt(L.position))!==0;)if(xe===39)if(Z(L,ae,L.position,!0),xe=L.input.charCodeAt(++L.position),xe===39)ae=L.position,L.position++,X=L.position;else return!0;else T(xe)?(Z(L,ae,X,!0),ye(L,he(L,!1,W)),ae=X=L.position):L.position===L.lineStart&&we(L)?D(L,"unexpected end of the document within a single quoted scalar"):(L.position++,C(xe)||(X=L.position));D(L,"unexpected end of the stream within a single quoted scalar")}a(Fe,"readSingleQuotedScalar");function Ge(L,W){let ae,X,xe,ee=L.input.charCodeAt(L.position);if(ee!==34)return!1;for(L.kind="scalar",L.result="",L.position++,ae=X=L.position;(ee=L.input.charCodeAt(L.position))!==0;){if(ee===34)return Z(L,ae,L.position,!0),L.position++,!0;if(ee===92){if(Z(L,ae,L.position,!0),ee=L.input.charCodeAt(++L.position),T(ee))he(L,!1,W);else if(ee<256&&G[ee])L.result+=I[ee],L.position++;else if((xe=_(ee))>0){let Y=xe,q=0;for(;Y>0;Y--)ee=L.input.charCodeAt(++L.position),(xe=S(ee))>=0?q=(q<<4)+xe:D(L,"expected hexadecimal character");L.result+=$(q),L.position++}else D(L,"unknown escape sequence");ae=X=L.position}else T(ee)?(Z(L,ae,X,!0),ye(L,he(L,!1,W)),ae=X=L.position):L.position===L.lineStart&&we(L)?D(L,"unexpected end of the document within a double quoted scalar"):(L.position++,C(ee)||(X=L.position))}D(L,"unexpected end of the stream within a double quoted scalar")}a(Ge,"readDoubleQuotedScalar");function Me(L,W){let ae=!0,X,xe,ee,Y=L.tag,q,ve=L.anchor,Se,Ae,Ee,Qe,qe=Object.create(null),lt,Ve,Ye,Je=L.input.charCodeAt(L.position);if(Je===91)Se=93,Qe=!1,q=[];else if(Je===123)Se=125,Qe=!0,q={};else return!1;for(L.anchor!==null&&R(L,L.anchor,q),Je=L.input.charCodeAt(++L.position);Je!==0;){if(he(L,!0,W),Je=L.input.charCodeAt(L.position),Je===Se)return L.position++,L.tag=Y,L.anchor=ve,L.kind=Qe?"mapping":"sequence",L.result=q,!0;if(ae?Je===44&&D(L,"expected the node content, but found ','"):D(L,"missed comma between flow collection entries"),Ve=lt=Ye=null,Ae=Ee=!1,Je===63){let Oe=L.input.charCodeAt(L.position+1);v(Oe)&&(Ae=Ee=!0,L.position++,he(L,!0,W))}X=L.line,xe=L.lineStart,ee=L.position,ne(L,W,s,!1,!0),Ve=L.tag,lt=L.result,he(L,!0,W),Je=L.input.charCodeAt(L.position),(Ee||L.line===X)&&Je===58&&(Ae=!0,Je=L.input.charCodeAt(++L.position),he(L,!0,W),ne(L,W,s,!1,!0),Ye=L.result),Qe?te(L,q,qe,Ve,lt,Ye,X,xe,ee):Ae?q.push(te(L,null,qe,Ve,lt,Ye,X,xe,ee)):q.push(lt),he(L,!0,W),Je=L.input.charCodeAt(L.position),Je===44?(ae=!0,Je=L.input.charCodeAt(++L.position)):ae=!1}D(L,"unexpected end of the stream within a flow collection")}a(Me,"readFlowCollection");function at(L,W){let ae,X=h,xe=!1,ee=!1,Y=W,q=0,ve=!1,Se,Ae=L.input.charCodeAt(L.position);if(Ae===124)ae=!1;else if(Ae===62)ae=!0;else return!1;for(L.kind="scalar",L.result="";Ae!==0;)if(Ae=L.input.charCodeAt(++L.position),Ae===43||Ae===45)h===X?X=Ae===43?f:d:D(L,"repeat of a chomping mode identifier");else if((Se=A(Ae))>=0)Se===0?D(L,"bad explicit indentation width of a block scalar; it cannot be less than one"):ee?D(L,"repeat of an indentation width identifier"):(Y=W+Se-1,ee=!0);else break;if(C(Ae)){do Ae=L.input.charCodeAt(++L.position);while(C(Ae));if(Ae===35)do Ae=L.input.charCodeAt(++L.position);while(!T(Ae)&&Ae!==0)}for(;Ae!==0;){for(me(L),L.lineIndent=0,Ae=L.input.charCodeAt(L.position);(!ee||L.lineIndentY&&(Y=L.lineIndent),T(Ae)){q++;continue}if(!ee&&Y===0&&D(L,"missing indentation for block scalar"),L.lineIndentW)&&Y!==0)D(L,"bad indentation of a sequence entry");else if(L.lineIndentW)&&(lt&&(xe=L.line,ee=L.lineStart,Y=L.position),ne(L,W,u,!0,X)&&(lt?Qe=L.result:qe=L.result),lt||(te(L,Se,Ae,Ee,Qe,qe,xe,ee,Y),Ee=Qe=qe=null),he(L,!0,-1),Ye=L.input.charCodeAt(L.position)),(L.line===Oe||L.lineIndent>W)&&Ye!==0)D(L,"bad indentation of a mapping entry");else if(L.lineIndent=L.maxDepth&&D(L,"nesting exceeded maxDepth ("+L.maxDepth+")"),L.depth+=1,L.listener!==null&&L.listener("open",L),L.tag=null,L.anchor=null,L.kind=null,L.result=null;let lt=ee=Y=u===ae||l===ae;if(X&&he(L,!0,-1)&&(ve=!0,L.lineIndent>W?q=1:L.lineIndent===W?q=0:L.lineIndentW?q=1:L.lineIndent===W?q=0:L.lineIndent tag; it should be "scalar", not "'+L.kind+'"');for(let Ve=0,Ye=L.implicitTypes.length;Ve"),L.result!==null&&Ee.kind!==L.kind&&D(L,"unacceptable node kind for !<"+L.tag+'> tag; it should be "'+Ee.kind+'", not "'+L.kind+'"'),Ee.resolve(L.result,L.tag)?(L.result=Ee.construct(L.result,L.tag),L.anchor!==null&&R(L,L.anchor,L.result)):D(L,"cannot resolve a node with !<"+L.tag+"> explicit tag")}return L.listener!==null&&L.listener("close",L),L.depth-=1,L.tag!==null||L.anchor!==null||Se}a(ne,"composeNode");function re(L){let W=L.position,ae=!1,X;for(L.version=null,L.checkLineBreaks=L.legacy,L.tagMap=Object.create(null),L.anchorMap=Object.create(null);(X=L.input.charCodeAt(L.position))!==0&&(he(L,!0,-1),X=L.input.charCodeAt(L.position),!(L.lineIndent>0||X!==37));){ae=!0,X=L.input.charCodeAt(++L.position);let xe=L.position;for(;X!==0&&!v(X);)X=L.input.charCodeAt(++L.position);let ee=L.input.slice(xe,L.position),Y=[];for(ee.length<1&&D(L,"directive name must not be less than one character in length");X!==0;){for(;C(X);)X=L.input.charCodeAt(++L.position);if(X===35){do X=L.input.charCodeAt(++L.position);while(X!==0&&!T(X));break}if(T(X))break;for(xe=L.position;X!==0&&!v(X);)X=L.input.charCodeAt(++L.position);Y.push(L.input.slice(xe,L.position))}X!==0&&me(L),i.call(K,ee)?K[ee](L,ee,Y):M(L,'unknown document directive "'+ee+'"')}if(he(L,!0,-1),L.lineIndent===0&&L.input.charCodeAt(L.position)===45&&L.input.charCodeAt(L.position+1)===45&&L.input.charCodeAt(L.position+2)===45?(L.position+=3,he(L,!0,-1)):ae&&D(L,"directives end mark is expected"),ne(L,L.lineIndent-1,u,!1,!0),he(L,!0,-1),L.checkLineBreaks&&m.test(L.input.slice(W,L.position))&&M(L,"non-ASCII line breaks are interpreted as content"),L.documents.push(L.result),L.position===L.lineStart&&we(L)){L.input.charCodeAt(L.position)===46&&(L.position+=3,he(L,!0,-1));return}L.position"u"&&(ae=W,W=null);let X=se(L,ae);if(typeof W!="function")return X;for(let xe=0,ee=X.length;xe=32&&Y<=126||Y>=161&&Y<=55295&&Y!==8232&&Y!==8233||Y>=57344&&Y<=65533&&Y!==s||Y>=65536&&Y<=1114111}a(ce,"isPrintable");function te(Y){return ce(Y)&&Y!==s&&Y!==u&&Y!==l}a(te,"isNsCharOrWhitespace");function me(Y,q,ve){let Se=te(Y),Ae=Se&&!Z(Y);return(ve?Se:Se&&Y!==b&&Y!==A&&Y!==B&&Y!==O&&Y!==I)&&Y!==p&&!(q===C&&!Ae)||te(q)&&!Z(q)&&Y===p||q===C&&Ae}a(me,"isPlainSafe");function he(Y){return ce(Y)&&Y!==s&&!Z(Y)&&Y!==T&&Y!==S&&Y!==C&&Y!==b&&Y!==A&&Y!==B&&Y!==O&&Y!==I&&Y!==p&&Y!==g&&Y!==x&&Y!==d&&Y!==G&&Y!==v&&Y!==E&&Y!==y&&Y!==f&&Y!==m&&Y!==_&&Y!==$}a(he,"isPlainSafeFirst");function we(Y){return!Z(Y)&&Y!==C}a(we,"isPlainSafeLast");function ye(Y,q){let ve=Y.charCodeAt(q),Se;return ve>=55296&&ve<=56319&&q+1=56320&&Se<=57343)?(ve-55296)*1024+Se-56320+65536:ve}a(ye,"codePointAt");function ke(Y){return/^\n* /.test(Y)}a(ke,"needIndentIndicator");let Fe=1,Ge=2,Me=3,at=4,ht=5;function ge(Y,q,ve,Se,Ae,Ee,Qe,qe){let lt,Ve=0,Ye=null,Je=!1,Oe=!1,Vt=Se!==-1,Ce=-1,Ut=he(ye(Y,0))&&we(ye(Y,Y.length-1));if(q||Qe)for(lt=0;lt=65536?lt+=2:lt++){if(Ve=ye(Y,lt),!ce(Ve))return ht;Ut=Ut&&me(Ve,Ye,qe),Ye=Ve}else{for(lt=0;lt=65536?lt+=2:lt++){if(Ve=ye(Y,lt),Ve===l)Je=!0,Vt&&(Oe=Oe||lt-Ce-1>Se&&Y[Ce+1]!==" ",Ce=lt);else if(!ce(Ve))return ht;Ut=Ut&&me(Ve,Ye,qe),Ye=Ve}Oe=Oe||Vt&<-Ce-1>Se&&Y[Ce+1]!==" "}return!Je&&!Oe?Ut&&!Qe&&!Ae(Y)?Fe:Ee===V?ht:Ge:ve>9&&ke(Y)?ht:Qe?Ee===V?ht:Ge:Oe?at:Me}a(ge,"chooseScalarStyle");function De(Y,q,ve,Se,Ae){Y.dump=(function(){if(q.length===0)return Y.quotingType===V?'""':"''";if(!Y.noCompatMode&&(N.indexOf(q)!==-1||D.test(q)))return Y.quotingType===V?'"'+q+'"':"'"+q+"'";let Ee=Y.indent*Math.max(1,ve),Qe=Y.lineWidth===-1?-1:Math.max(Math.min(Y.lineWidth,40),Y.lineWidth-Ee),qe=Se||Y.flowLevel>-1&&ve>=Y.flowLevel;function lt(Ve){return K(Y,Ve)}switch(a(lt,"testAmbiguity"),ge(q,qe,Y.indent,Qe,lt,Y.quotingType,Y.forceQuotes&&!Se,Ae)){case Fe:return q;case Ge:return"'"+q.replace(/'/g,"''")+"'";case Me:return"|"+Le(q,Y.indent)+Ie(z(q,Ee));case at:return">"+Le(q,Y.indent)+Ie(z(Q(q,Qe),Ee));case ht:return'"'+re(q)+'"';default:throw new t("impossible error: invalid scalar style")}})()}a(De,"writeScalar");function Le(Y,q){let ve=ke(Y)?String(q):"",Se=Y[Y.length-1]===` +`,Ee=Se&&(Y[Y.length-2]===` +`||Y===` +`)?"+":Se?"":"-";return ve+Ee+` +`}a(Le,"blockHeader");function Ie(Y){return Y[Y.length-1]===` +`?Y.slice(0,-1):Y}a(Ie,"dropEndingNewline");function Q(Y,q){let ve=/(\n+)([^\n]*)/g,Se=(function(){let qe=Y.indexOf(` +`);return qe=qe!==-1?qe:Y.length,ve.lastIndex=qe,ne(Y.slice(0,qe),q)})(),Ae=Y[0]===` +`||Y[0]===" ",Ee,Qe;for(;Qe=ve.exec(Y);){let qe=Qe[1],lt=Qe[2];Ee=lt[0]===" ",Se+=qe+(!Ae&&!Ee&<!==""?` +`:"")+ne(lt,q),Ae=Ee}return Se}a(Q,"foldString");function ne(Y,q){if(Y===""||Y[0]===" ")return Y;let ve=/ [^ ]/g,Se,Ae=0,Ee,Qe=0,qe=0,lt="";for(;Se=ve.exec(Y);)qe=Se.index,qe-Ae>q&&(Ee=Qe>Ae?Qe:qe,lt+=` +`+Y.slice(Ae,Ee),Ae=Ee+1),Qe=qe;return lt+=` +`,Y.length-Ae>q&&Qe>Ae?lt+=Y.slice(Ae,Qe)+` +`+Y.slice(Qe+1):lt+=Y.slice(Ae),lt.slice(1)}a(ne,"foldLine");function re(Y){let q="",ve=0;for(let Se=0;Se=65536?Se+=2:Se++){ve=ye(Y,Se);let Ae=F[ve];!Ae&&ce(ve)?(q+=Y[Se],ve>=65536&&(q+=Y[Se+1])):q+=Ae||R(ve)}return q}a(re,"escapeString");function se(Y,q,ve){let Se="",Ae=Y.tag;for(let Ee=0,Qe=ve.length;Ee"u"&&ae(Y,q,null,!1,!1))&&(Se!==""&&(Se+=","+(Y.condenseFlow?"":" ")),Se+=Y.dump)}Y.tag=Ae,Y.dump="["+Se+"]"}a(se,"writeFlowSequence");function fe(Y,q,ve,Se){let Ae="",Ee=Y.tag;for(let Qe=0,qe=ve.length;Qe"u"&&ae(Y,q+1,null,!0,!0,!1,!0))&&((!Se||Ae!=="")&&(Ae+=j(Y,q)),Y.dump&&l===Y.dump.charCodeAt(0)?Ae+="-":Ae+="- ",Ae+=Y.dump)}Y.tag=Ee,Y.dump=Ae||"[]"}a(fe,"writeBlockSequence");function J(Y,q,ve){let Se="",Ae=Y.tag,Ee=Object.keys(ve);for(let Qe=0,qe=Ee.length;Qe1024&&(lt+="? "),lt+=Y.dump+(Y.condenseFlow?'"':"")+":"+(Y.condenseFlow?"":" "),ae(Y,q,Ye,!1,!1)&&(lt+=Y.dump,Se+=lt))}Y.tag=Ae,Y.dump="{"+Se+"}"}a(J,"writeFlowMapping");function L(Y,q,ve,Se){let Ae="",Ee=Y.tag,Qe=Object.keys(ve);if(Y.sortKeys===!0)Qe.sort();else if(typeof Y.sortKeys=="function")Qe.sort(Y.sortKeys);else if(Y.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let qe=0,lt=Qe.length;qe1024;Oe&&(Y.dump&&l===Y.dump.charCodeAt(0)?Ve+="?":Ve+="? "),Ve+=Y.dump,Oe&&(Ve+=j(Y,q)),ae(Y,q+1,Je,!0,Oe)&&(Y.dump&&l===Y.dump.charCodeAt(0)?Ve+=":":Ve+=": ",Ve+=Y.dump,Ae+=Ve)}Y.tag=Ee,Y.dump=Ae||"{}"}a(L,"writeBlockMapping");function W(Y,q,ve){let Se=ve?Y.explicitTypes:Y.implicitTypes;for(let Ae=0,Ee=Se.length;Ae tag resolver accepts not "'+qe+'" style');Y.dump=lt}return!0}}return!1}a(W,"detectType");function ae(Y,q,ve,Se,Ae,Ee,Qe){Y.tag=null,Y.dump=ve,W(Y,ve,!1)||W(Y,ve,!0);let qe=n.call(Y.dump),lt=Se;Se&&(Se=Y.flowLevel<0||Y.flowLevel>q);let Ve=qe==="[object Object]"||qe==="[object Array]",Ye,Je;if(Ve&&(Ye=Y.duplicates.indexOf(ve),Je=Ye!==-1),(Y.tag!==null&&Y.tag!=="?"||Je||Y.indent!==2&&q>0)&&(Ae=!1),Je&&Y.usedDuplicates[Ye])Y.dump="*ref_"+Ye;else{if(Ve&&Je&&!Y.usedDuplicates[Ye]&&(Y.usedDuplicates[Ye]=!0),qe==="[object Object]")Se&&Object.keys(Y.dump).length!==0?(L(Y,q,Y.dump,Ae),Je&&(Y.dump="&ref_"+Ye+Y.dump)):(J(Y,q,Y.dump),Je&&(Y.dump="&ref_"+Ye+" "+Y.dump));else if(qe==="[object Array]")Se&&Y.dump.length!==0?(Y.noArrayIndent&&!Qe&&q>0?fe(Y,q-1,Y.dump,Ae):fe(Y,q,Y.dump,Ae),Je&&(Y.dump="&ref_"+Ye+Y.dump)):(se(Y,q,Y.dump),Je&&(Y.dump="&ref_"+Ye+" "+Y.dump));else if(qe==="[object String]")Y.tag!=="?"&&De(Y,Y.dump,q,Ee,lt);else{if(qe==="[object Undefined]")return!1;if(Y.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+qe)}if(Y.tag!==null&&Y.tag!=="?"){let Oe=encodeURI(Y.tag[0]==="!"?Y.tag.slice(1):Y.tag).replace(/!/g,"%21");Y.tag[0]==="!"?Oe="!"+Oe:Oe.slice(0,18)==="tag:yaml.org,2002:"?Oe="!!"+Oe.slice(18):Oe="!<"+Oe+">",Y.dump=Oe+" "+Y.dump}}return!0}a(ae,"writeNode");function X(Y,q){let ve=[],Se=[];xe(Y,ve,Se);let Ae=Se.length;for(let Ee=0;Ee{"use strict";a(o6e,"getDefaultExportFromCjs");_s={},iS={},th={};a(ix,"requireCommon");a(sx,"requireException");a(l6e,"requireSnippet");a(js,"requireType");a(xee,"requireSchema");a(bee,"requireStr");a(Tee,"requireSeq");a(Cee,"requireMap");a(kee,"requireFailsafe");a(See,"require_null");a(Eee,"requireBool");a(vee,"requireInt");a(wee,"requireFloat");a(_ee,"requireJson");a(Aee,"requireCore");a(Ree,"requireTimestamp");a(Lee,"requireMerge");a(Iee,"requireBinary");a(Dee,"requireOmap");a(Nee,"requirePairs");a(Mee,"requireSet");a(lM,"require_default");a(c6e,"requireLoader");oM={};a(u6e,"requireDumper");a(h6e,"requireJsYaml");d6e=h6e(),f6e=o6e(d6e),{Type:nzt,Schema:izt,FAILSAFE_SCHEMA:szt,JSON_SCHEMA:Xo,CORE_SCHEMA:azt,DEFAULT_SCHEMA:ozt,load:Qo,loadAll:lzt,dump:czt,YAMLException:uzt,types:hzt,safeLoad:dzt,safeLoadAll:fzt,safeDump:pzt}=f6e});var p6e,sS,Oee=w(()=>{"use strict";Lr();Im();Gt();bt();tx();jt();Ir();fn();Mc();md();p6e="flowchart-",sS=class{constructor(){this.vertexCounter=0;this.config=_e();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=hr;this.setAccDescription=fr;this.setDiagramTitle=Cr;this.getAccTitle=gr;this.getAccDescription=yr;this.getDiagramTitle=xr;this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{a(this,"FlowDB")}sanitizeText(t){return gt.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,n,i,s,o,l={},u){if(!t||t.trim().length===0)return;let h;if(u!==void 0){let g;u.includes(` +`)?g=u+` +`:g=`{ +`+u+` +}`,h=Qo(g,{schema:Xo})}let d=this.subGraphLookup.get(t);if(d&&h){d.metadata={...d.metadata,...h};return}let f=this.edges.find(g=>g.id===t);if(f){let g=h;g?.animate!==void 0&&(f.animate=g.animate),g?.animation!==void 0&&(f.animation=g.animation),g?.curve!==void 0&&(f.interpolate=g.curve);return}let p,m=this.vertices.get(t);if(m===void 0&&(r===void 0&&n===void 0&&i!==void 0&&i!==null&&H.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),m={id:t,labelType:"text",domId:p6e+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,m)),this.vertexCounter++,r!==void 0?(this.config=_e(),p=this.sanitizeText(r.text.trim()),m.labelType=r.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),m.text=p):m.text===void 0&&(m.text=t),n!==void 0&&(m.type=n),i?.forEach(g=>{m.styles.push(g)}),s?.forEach(g=>{m.classes.push(g)}),o!==void 0&&(m.dir=o),m.props===void 0?m.props=l:l!==void 0&&Object.assign(m.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!tS(h.shape))throw new Error(`No such shape: ${h.shape}.`);m.type=h?.shape}h?.label&&(m.text=h?.label,m.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(m.icon=h?.icon,!h.label?.trim()&&m.text===t&&(m.text="")),h?.form&&(m.form=h?.form),h?.pos&&(m.pos=h?.pos),h?.img&&(m.img=h?.img,!h.label?.trim()&&m.text===t&&(m.text="")),h?.constraint&&(m.constraint=h.constraint),h.w&&(m.assetWidth=Number(h.w)),h.h&&(m.assetHeight=Number(h.h))}}addSingleLink(t,r,n,i){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};H.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(u.type)),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(d=>d.start===l.start&&d.end===l.end);h.length===0?l.id=oo(l.start,l.end,{counter:0,prefix:"L"}):l.id=oo(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))H.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;H.info("addLink",t,r,i);for(let s of t)for(let o of r){let l=s===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(s,o,n,i):this.addSingleLink(s,o,n,void 0)}}updateLinkInterpolate(t,r){t.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(t,r){t.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(t,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(i=>{let s=this.classes.get(i);s===void 0&&(s={id:i,styles:[],textStyles:[]},this.classes.set(i,s)),n?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");s.textStyles.push(l)}s.styles.push(o)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,r){for(let n of t.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let s=this.edges.find(l=>l.id===n);s&&s.classes.push(r);let o=this.subGraphLookup.get(n);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(t,r,n){if(_e().securityLevel!=="loose"||r===void 0)return;let i=[];if(typeof n=="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=this.lookUpDomId(t),l=document.querySelector(`[id="${o}"]`);l!==null&&l.addEventListener("click",()=>{Xt.runFunc(r,...i)},!1)}))}setLink(t,r,n){t.split(",").forEach(i=>{let s=this.vertices.get(i);s!==void 0&&(s.link=Xt.formatUrl(r,this.config),s.linkTarget=n)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=Yu();st(t).select("svg").selectAll("g.node").on("mouseover",s=>{let o=st(s.currentTarget),l=o.attr("title");if(l===null)return;let u=s.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Es.sanitize(l)),o.classed("hover",!0)}).on("mouseout",s=>{r.transition().duration(500).style("opacity",0),st(s.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=_e(),or()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,n){let i=t.text.trim(),s=n.text;t===n&&/\s/.exec(n.text)&&(i=void 0);let l=a(m=>{let g={boolean:{},number:{},string:{}},y=[],x;return{nodeList:m.filter(function(T){let C=typeof T;return T.stmt&&T.stmt==="dir"?(x=T.value,!1):T.trim()===""?!1:C in g?g[C].hasOwnProperty(T)?!1:g[C][T]=!0:y.includes(T)?!1:y.push(T)}),dir:x}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,d=_e().flowchart??{};if(h=h??(d.inheritDir?this.getDirection()??_e().direction??void 0:void 0),this.version==="gen-1")for(let m=0;mm!==i);let p=this.subGraphs.find(m=>m.id===i);return p?p.nodes.push(...f.nodes):this.subGraphs.push(f),this.subGraphLookup.set(i,p??f),i}getPosForId(t){for(let[r,n]of this.subGraphs.entries())if(n.id===t)return r;return-1}indexNodes2(t,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let i=0,s=1;for(;i=0){let l=this.indexNodes2(t,o);if(l.result)return{result:!0,count:s+l.count};s=s+l.count}i=i+1}return{result:!1,count:s}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(t){let r=t.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(t,r){let n=r.length,i=0;for(let s=0;s":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let s="normal",o=n.length-1;n.startsWith("=")&&(s="thick"),n.startsWith("~")&&(s="invisible");let l=this.countChar(".",n);return l&&(s="dotted",o=l),{type:i,stroke:s,length:o}}destructLink(t,r){let n=this.destructEndLink(t),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n}exists(t,r){for(let n of t)if(n.nodes.includes(r))return!0;return!1}makeUniq(t,r){let n=[];return t.nodes.forEach((i,s)=>{this.exists(r,i)||n.push(t.nodes[s])}),{nodes:n}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,r){return t.find(n=>n.id===r)}destructEdgeType(t){let r="none",n="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":n=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(t,r,n,i,s,o){let l=n.get(t.id),u=i.get(t.id)??!1,h=this.findNode(r,t.id);if(h)h.cssStyles=t.styles,h.cssCompiledStyles=this.getCompiledStyles(t.classes),h.cssClasses=t.classes.join(" ");else{let d={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:s.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:o,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?r.push({...d,isGroup:!0,shape:"rect"}):r.push({...d,isGroup:!1,shape:this.getTypeFromVertex(t),minWidth:s.flowchart?.minNodeWidth})}}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(s=>s.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(s=>s.trim()))}return r}getData(){let t=_e(),r=[],n=[],i=this.getSubGraphs(),s=new Map,o=new Map,l=new Map;for(let T of i)for(let C of T.nodes)this.subGraphLookup.has(C)&&l.set(C,T.id);let u=new Map,h=new Map;for(let T of i){let C=l.get(T.id);C!==void 0&&h.set(C,[...h.get(C)??[],T.id])}let d=0,f=a(T=>{u.set(T,d++);for(let C of h.get(T)??[])f(C)},"walk");for(let T of i)l.has(T.id)||f(T.id);let p=a(T=>this.subGraphLookup.get(T)?.metadata?.view==="collapsed","isCollapsed"),m=a(T=>{let C,v=new Set,E=T;for(;E!==void 0&&!v.has(E);)v.add(E),p(E)&&(C=E),E=l.get(E);return C},"outermostCollapsed"),g=new Set,y=new Map;for(let T of i){let C=m(T.id);if(C!==void 0){T.id!==C&&(g.add(T.id),y.set(T.id,C));for(let v of T.nodes)v!==C&&(g.add(v),y.set(v,C))}}for(let T=i.length-1;T>=0;T--){let C=i[T];if(!g.has(C.id)){C.nodes.length>0&&o.set(C.id,!0);for(let v of C.nodes)s.set(v,C.id)}}for(let T=i.length-1;T>=0;T--){let C=i[T];g.has(C.id)||(C.metadata?.view==="collapsed"?r.push({id:C.id,label:C.title,labelStyle:"",labelType:C.labelType,parentId:s.get(C.id),padding:8,cssCompiledStyles:this.getCompiledStyles(C.classes),cssClasses:C.classes.join(" "),shape:"collapsedGroup",dir:C.dir,isGroup:!1,look:t.look,colorIndex:u.get(C.id)}):r.push({id:C.id,label:C.title,labelStyle:"",labelType:C.labelType,parentId:s.get(C.id),padding:8,cssCompiledStyles:this.getCompiledStyles(C.classes),cssClasses:C.classes.join(" "),shape:"rect",dir:C.dir,isGroup:!0,look:t.look,colorIndex:u.get(C.id),metadata:C.metadata}))}this.getVertices().forEach(T=>{g.has(T.id)||this.addNodeFromVertex(T,r,s,o,t,t.look||"classic")});let b=this.getEdges();return b.forEach((T,C)=>{let{arrowTypeStart:v,arrowTypeEnd:E}=this.destructEdgeType(T.type),S=[...b.defaultStyle??[]],_=y.get(T.start)??T.start,A=y.get(T.end)??T.end;if(_===A&&(y.has(T.start)||y.has(T.end)))return;T.style&&S.push(...T.style);let B={id:oo(_,A,{counter:C,prefix:"L"},T.id),isUserDefinedId:T.isUserDefinedId,start:_,end:A,type:T.type??"normal",label:T.text,labelType:T.labelType,labelpos:"c",thickness:T.stroke,minlen:T.length,classes:T?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:T?.stroke==="invisible"||T?.type==="arrow_open"?"none":v,arrowTypeEnd:T?.stroke==="invisible"||T?.type==="arrow_open"?"none":E,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(T.classes),labelStyle:S,style:S,pattern:T.stroke,look:t.look,animate:T.animate,animation:T.animation,curve:T.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};n.push(B)}),{nodes:r,edges:n,other:{},config:t}}defaultConfig(){return Xp.flowchart}}});var ca,rh=w(()=>{"use strict";Lr();ca=a((e,t)=>{let r;return t==="sandbox"&&(r=st("#i"+e)),(t==="sandbox"?st(r.nodes()[0].contentDocument.body):st("body")).select(`[id="${e}"]`)},"getDiagramElement")});var Zo,ox=w(()=>{"use strict";Zo=a(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,n=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var Pee,Bee=w(()=>{"use strict";Gt();Tr();bt();Lr();$t();qo();V2();Ot();Wi();Pee=a(async(e,t)=>{let r=_e(),{theme:n,themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:l,borderColorArray:u}=i,h=l,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=Ze(t),g=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);ci(g,t.colorIndex,n,u);let y=Ji(r.flowchart.htmlLabels),x=t.direction==="LR",b=g.insert("g").attr("class","cluster-label swimlane-label"),T=await li(b,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width}),C=T.getBBox();if(y){let N=T.children[0],D=st(T);C=N.getBoundingClientRect(),D.attr("width",C.width),D.attr("height",C.height)}let v=t.padding??0,E=t.width<=C.width+v?C.width+v:t.width;t.width<=C.width+v?t.diff=(E-t.width)/2-v:t.diff=-v;let S=t.height,_=t.y-S/2,A=t.y+S/2,B=t.x-E/2,$=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:_+S/3,O=x?4:0,G=C.height+2*O,I,F;if(x){let N=Math.max(G,C.height+2*O),D=B+N,M=Math.max(0,E-N);if(t.look==="handDrawn"){let V=Xe.svg(g),U=et(t,{roughness:.7,fill:o,stroke:h,seed:s}),z=et(t,{roughness:.7,fill:"none",stroke:h,seed:s}),j=V.rectangle(B,_,N,S,U);I=g.insert(()=>j,":first-child").attr("class","swimlane-title");let K=V.rectangle(D,_,M,S,z);F=g.insert(()=>K,":first-child").attr("class","swimlane-body"),I.select("path:nth-child(2)").attr("style",p.join(";")),I.select("path").attr("style",m.join(";").replace("fill","stroke"))}else I=g.insert("rect",":first-child"),F=g.insert("rect",":first-child"),I.attr("class","swimlane-title").attr("style",f).attr("x",B).attr("y",_).attr("width",N).attr("height",S).attr("fill",o).attr("stroke",h),F.attr("class","swimlane-body").attr("style",f).attr("x",D).attr("y",_).attr("width",M).attr("height",S).attr("fill","none").attr("stroke",h);let R=B+N/2,P=t.y;b.attr("transform",`translate(${R}, ${P}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{let N=Math.max(0,$-_),D=Math.min(G,N),M=_+D,R=Math.max(0,A-M),P=t.x-E/2;if(t.look==="handDrawn"){let z=Xe.svg(g),j=et(t,{roughness:.7,fill:o,stroke:h,fillWeight:3,seed:s}),K=et(t,{roughness:.7,fill:"none",stroke:h,seed:s}),Z=z.rectangle(P,_,E,D,j);I=g.insert(()=>Z,":first-child").attr("class","swimlane-title");let ce=z.rectangle(P,M,E,R,K);F=g.insert(()=>ce,":first-child").attr("class","swimlane-body"),I.select("path:nth-child(2)").attr("style",p.join(";")),I.select("path").attr("style",m.join(";").replace("fill","stroke"))}else I=g.insert("rect",":first-child"),F=g.insert("rect",":first-child"),I.attr("class","swimlane-title").attr("style",f).attr("x",P).attr("y",_).attr("width",E).attr("height",D).attr("fill",o).attr("stroke",h),F.attr("class","swimlane-body").attr("style",f).attr("x",P).attr("y",M).attr("width",E).attr("height",R).attr("fill","none").attr("stroke",h);let V=t.x-C.width/2,U=_+(D-C.height)/2;b.attr("transform",`translate(${V}, ${U})`)}if(H.trace("Swimlane data ",t,JSON.stringify(t)),d){let N=b.select("span");N&&N.attr("style",d)}return t.offsetX=0,t.width=E,t.height=S,t.offsetY=C.height-v/2,t.intersect=function(N){return co(t,N)},{cluster:g,labelBBox:C}},"swimlane")});var $ee,m6e,g6e,y6e,x6e,b6e,T6e,C6e,k6e,S6e,E6e,Fee,nh,Gee,lx=w(()=>{"use strict";Gt();Tr();bt();ox();Lr();$t();qo();V2();J2();Yo();Ot();Bee();Wi();$ee=a(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);let r=_e(),{theme:n,themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:l,borderColorArray:u}=i,{labelStyles:h,nodeStyles:d,borderStyles:f,backgroundStyles:p}=Ze(t),m=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);ci(m,t.colorIndex,n,u);let g=vn(r),y=m.insert("g").attr("class","cluster-label "),x;t.labelType==="markdown"?x=await li(y,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):x=await ho(y,t.label,t.labelStyle||"",!1,!0);let b=x.getBBox();if(vn(r)){let B=x.children[0],$=st(x);b=B.getBoundingClientRect(),$.attr("width",b.width),$.attr("height",b.height)}let T=t.width<=b.width+t.padding?b.width+t.padding:t.width;t.width<=b.width+t.padding?t.diff=(T-t.width)/2-t.padding:t.diff=-t.padding;let C=t.height,v=t.x-T/2,E=t.y-C/2;H.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let B=Xe.svg(m),$=et(t,{roughness:.7,fill:o,stroke:l,fillWeight:3,seed:s}),O=B.path(Zn(v,E,T,C,0),$);S=m.insert(()=>(H.debug("Rough node insert CXC",O),O),":first-child"),S.select("path:nth-child(2)").attr("style",f.join(";")),S.select("path").attr("style",p.join(";").replace("fill","stroke"))}else S=m.insert("rect",":first-child"),S.attr("style",d).attr("rx",t.rx).attr("ry",t.ry).attr("x",v).attr("y",E).attr("width",T).attr("height",C);let{subGraphTitleTopMargin:_}=Zo(r);if(y.attr("transform",`translate(${t.x-b.width/2}, ${t.y-t.height/2+_})`),h){let B=y.select("span");B&&B.attr("style",h)}let A=S.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=b.height-t.padding/2,t.intersect=function(B){return co(t,B)},{cluster:m,labelBBox:b}},"rect"),m6e=a((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),n=r.insert("rect",":first-child"),i=0*t.padding,s=i/2;n.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");let o=n.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(l){return co(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),g6e=a(async(e,t)=>{let r=_e(),{theme:n,themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,borderColorArray:l,compositeBackground:u,compositeTitleBackground:h,nodeBorder:d}=i,f=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);ci(f,t.colorIndex,n,l);let p=f.insert("g",":first-child"),m=f.insert("g").attr("class","cluster-label"),g=f.append("rect"),y=await ho(m,t.label,t.labelStyle,void 0,!0),x=y.getBBox();if(vn(r)){let O=y.children[0],G=st(y);x=O.getBoundingClientRect(),G.attr("width",x.width),G.attr("height",x.height)}let b=0*t.padding,T=b/2,C=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+b;t.width<=x.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+b,E=t.height+b-x.height-6,S=t.x-C/2,_=t.y-v/2;t.width=C;let A=t.y-t.height/2-T+x.height+2,B;if(t.look==="handDrawn"){let O=t.cssClasses.includes("statediagram-cluster-alt"),G=Xe.svg(f),I=t.rx||t.ry?G.path(Zn(S,_,C,v,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:d,seed:s}):G.rectangle(S,_,C,v,{seed:s});B=f.insert(()=>I,":first-child");let F=G.rectangle(S,A,C,E,{fill:O?o:u,fillStyle:O?"hachure":"solid",stroke:d,seed:s});B=f.insert(()=>I,":first-child"),g=f.insert(()=>F),B.attr("class","outer"),g.attr("class","inner")}else B=p.insert("rect",":first-child"),B.attr("class","outer").attr("x",S).attr("y",_).attr("width",C).attr("height",v).attr("data-look",t.look),g.attr("class","inner").attr("x",S).attr("y",A).attr("width",C).attr("height",E);m.attr("transform",`translate(${t.x-x.width/2}, ${_+1-(vn(r)?0:3)})`);let $=B.node().getBBox();return t.height=$.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(O){return co(t,O)},{cluster:f,labelBBox:x}},"roundedWithTitle"),y6e=a(async(e,t)=>{H.info("Creating subgraph rect for ",t.id,t);let r=_e(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:s,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Ze(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=vn(r),m=f.insert("g").attr("class","cluster-label "),g=await li(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),y=g.getBBox();if(vn(r)){let _=g.children[0],A=st(g);y=_.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}let x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height,T=t.x-x/2,C=t.y-b/2;H.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){let _=Xe.svg(f),A=et(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:i}),B=_.path(Zn(T,C,x,b,t.rx),A);v=f.insert(()=>(H.debug("Rough node insert CXC",B),B),":first-child"),v.select("path:nth-child(2)").attr("style",h.join(";")),v.select("path").attr("style",d.join(";").replace("fill","stroke"))}else v=f.insert("rect",":first-child"),v.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",C).attr("width",x).attr("height",b);let{subGraphTitleTopMargin:E}=Zo(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+E})`),l){let _=m.select("span");_&&_.attr("style",l)}let S=v.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=y.height-t.padding/2,t.intersect=function(_){return co(t,_)},{cluster:f,labelBBox:y}},"kanbanSection"),x6e=a((e,t)=>{let r=_e(),{theme:n,themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,nodeBorder:l,borderColorArray:u}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);ci(h,t.colorIndex,n,u);let d=h.insert("g",":first-child"),f=0*t.padding,p=t.width+f;t.diff=-t.padding;let m=t.height+f,g=t.x-p/2,y=t.y-m/2;t.width=p;let x;if(t.look==="handDrawn"){let C=Xe.svg(h).rectangle(g,y,p,m,{fill:o??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:l,seed:s});x=h.insert(()=>C,":first-child").attr("class","divider")}else{x=d.insert("rect",":first-child");let T="outer";t.look,T="divider",x.attr("class",T).attr("x",g).attr("y",y).attr("width",p).attr("height",m).attr("data-look",t.look)}let b=x.node().getBBox();return t.height=b.height,t.offsetX=0,t.offsetY=0,t.intersect=function(T){return co(t,T)},{cluster:h,labelBBox:{}}},"divider"),b6e=a(async(e,t,r)=>{H.info(`Creating ${r.cssClass} for `,t.id,t);let n=_e(),{theme:i,themeVariables:s,handDrawnSeed:o}=n,{borderColorArray:l}=s,{labelStyles:u,borderStyles:h}=Ze(t),d=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);ci(d,t.colorIndex,i,l);let f=vn(n),p=d.insert("g").attr("class","cluster-label"),m={width:0,height:0},g=t.label?.trim();if(g){let E;if(t.labelType==="markdown"?E=await li(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):E=await ho(p,t.label,t.labelStyle||"",!1,!0),m=E.getBBox(),f){let S=E.children[0],_=st(E);m=S.getBoundingClientRect(),_.attr("width",m.width),_.attr("height",m.height)}}let y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height,b=t.x-y/2,T=t.y-x/2,C;if(t.look==="handDrawn"){let E=Xe.svg(d),S=et(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:o,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),_=E.path(Zn(b,T,y,x,r.rx),S);C=d.insert(()=>_,":first-child"),C.select("path:nth-child(2)").attr("style",h.join(";"))}else C=d.insert("rect",":first-child"),C.attr("rx",r.rx).attr("ry",r.rx).attr("x",b).attr("y",T).attr("width",y).attr("height",x).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&C.attr("stroke-dasharray",r.strokeDash.join(", "));if(g){let{subGraphTitleTopMargin:E}=Zo(n);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+E})`),u){let S=p.select("span");S&&S.attr("style",u)}}let v=C.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(E){return co(t,E)},{cluster:d,labelBBox:m}},"createContainerGroup"),T6e=a(async(e,t)=>{let{themeVariables:r}=_e(),n=r.flowContainerStroke||r.secondaryBorderColor;return b6e(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:n,strokeWidth:.75,roughness:.7})},"flowGroup"),C6e=a((e,t)=>{let r=e.boundaryType||"rect",n=r==="package"?20:e.padding,i=r==="package"?t.height+10:0,s=Math.max(e.width,t.width+n),o=r==="package"?Math.max(e.height,i+e.padding*2):e.height,l=e.x-s/2,u=e.y-o/2;return{boundaryType:r,width:s,height:o,x:l,y:u,bodyY:u+i,bodyHeight:o-i,tabHeight:i,tabWidth:r==="package"?Math.min(s,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),k6e=a(async(e,t)=>{H.info("Creating usecase system boundary for ",t.id,t);let r=_e(),{theme:n,themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:l,borderColorArray:u}=i,{labelStyles:h,nodeStyles:d}=Ze(t),{stylesMap:f}=oa(t),p=t.boundaryType||"rect",m=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${p} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",p).attr("data-look",t.look);ci(m,t.colorIndex,n,u);let g=vn(r),y=m.insert("g").attr("class","cluster-label system-boundary-title"),x=await li(y,t.label,{style:h,useHtmlLabels:g,isNode:!0}),b=x.getBBox();if(g){let I=x.children[0],F=st(x);b=I.getBoundingClientRect(),F.attr("width",b.width),F.attr("height",b.height)}let T=C6e(t,b),{width:C,height:v,x:E,y:S,bodyY:_,bodyHeight:A,tabHeight:B,tabWidth:$}=T;t.diff=t.width<=b.width+t.padding?(C-t.width)/2-t.padding:-t.padding;let O=et(t,{fill:f.get("fill")||o,stroke:f.get("stroke")||l,strokeWidth:f.get("stroke-width")?.replace("px","")||1,seed:s});if(t.look==="handDrawn"){let I=Xe.svg(m),F=I.rectangle(E,_,C,A,O);if(m.insert(()=>F,":first-child").attr("class","boundary-body label-container"),p==="package"){let N=I.rectangle(E,S,$,B,O);m.insert(()=>N,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else m.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",d).attr("x",E).attr("y",_).attr("width",C).attr("height",A),p==="package"&&m.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",d).attr("x",E).attr("y",S).attr("width",$).attr("height",B);let{subGraphTitleTopMargin:G}=Zo(r);return p==="package"?y.attr("transform",`translate(${E+($-b.width)/2}, ${S+(B-b.height)/2})`):y.attr("transform",`translate(${t.x-b.width/2}, ${S+G})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),t.offsetX=0,t.width=C,t.height=v,t.offsetY=b.height-t.padding/2,t.labelBBox=b,t.intersect=function(I){return co(t,I)},{cluster:m,labelBBox:b}},"usecaseSystemBoundary"),S6e=$ee,E6e={rect:$ee,squareRect:S6e,roundedWithTitle:g6e,noteGroup:m6e,divider:x6e,kanbanSection:y6e,flowGroup:T6e,usecaseSystemBoundary:k6e,swimlane:Pee},Fee=new Map,nh=a(async(e,t)=>{let r=t.shape||"rect",n=await E6e[r](e,t);return Fee.set(t.id,n),n},"insertCluster"),Gee=a(()=>{Fee=new Map},"clear")});var Dm,Vee=w(()=>{"use strict";Dm=a((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,n=e.y??0;return"translate("+-(r+e.width/2)+", "+-(n+e.height/2)+")"},"computeLabelTransform")});function aS(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Wn(e),t=Wn(t);let[r,n]=[e.x,e.y],[i,s]=[t.x,t.y],o=i-r,l=s-n;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var Ni,cM,Wn,zee,uM=w(()=>{"use strict";Ni={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},cM={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};a(aS,"calculateDeltaAndAngle");Wn=a(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),zee=a(e=>({x:a(function(t,r,n){let i=0,s=Wn(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ni,e.arrowTypeEnd)){let{angle:m,deltaX:g}=aS(n[n.length-1],n[n.length-2]);i=Ni[e.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let o=Math.abs(Wn(t).x-Wn(n[n.length-1]).x),l=Math.abs(Wn(t).y-Wn(n[n.length-1]).y),u=Math.abs(Wn(t).x-Wn(n[0]).x),h=Math.abs(Wn(t).y-Wn(n[0]).y),d=Ni[e.arrowTypeStart],f=Ni[e.arrowTypeEnd],p=1;if(o0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ni,e.arrowTypeEnd)){let{angle:m,deltaY:g}=aS(n[n.length-1],n[n.length-2]);i=Ni[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let o=Math.abs(Wn(t).y-Wn(n[n.length-1]).y),l=Math.abs(Wn(t).x-Wn(n[n.length-1]).x),u=Math.abs(Wn(t).y-Wn(n[0]).y),h=Math.abs(Wn(t).x-Wn(n[0]).x),d=Ni[e.arrowTypeStart],f=Ni[e.arrowTypeEnd],p=1;if(o0&&l0&&h{"use strict";bt();Wee=a((e,t,r,n,i,s=!1,o)=>{t.arrowTypeStart&&Uee(e,"start",t.arrowTypeStart,r,n,i,s,o),t.arrowTypeEnd&&Uee(e,"end",t.arrowTypeEnd,r,n,i,s,o)},"addEdgeMarkers"),v6e={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},w6e=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Uee=a((e,t,r,n,i,s,o=!1,l)=>{if(!r||r==="none")return;let u=v6e[r],h=u&&w6e.includes(u.type);if(!u){H.warn(`Unknown arrow type: ${r}`);return}let d=u.type,m=`${i}_${s}-${d}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(l&&l.trim()!==""){let g=l.replace(/[^\dA-Za-z]/g,"_"),y=`${m}_${g}`;if(!document.getElementById(y)){let x=document.getElementById(m);if(x){let b=x.cloneNode(!0);b.id=y,b.querySelectorAll("path, circle, line").forEach(C=>{C.setAttribute("stroke",l),u.fill&&C.setAttribute("fill",l)}),x.parentNode?.appendChild(b)}}e.attr(`marker-${t}`,`url(${n}#${y})`)}else e.attr(`marker-${t}`,`url(${n}#${m})`)},"addEdgeMarker")});function oS(e,t,r){e.terminalLabelSizes??={},e.terminalLabelSizes[t]={width:r.width,height:r.height}}function lS(e,t,r){vn(_e())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}function I6e(e){let t=[],r=[];for(let n=1;n5&&Math.abs(s.y-i.y)>5||i.y===s.y&&s.x===o.x&&Math.abs(s.x-i.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}function M6e(e,t){if(e.length<2)return"";let r="",n=e.length,i=1e-5;for(let s=0;s({...i}));if(e.length>=2&&Ni[t.arrowTypeStart]){let i=Ni[t.arrowTypeStart],s=e[0],o=e[1],{angle:l}=Yee(s,o),u=i*Math.cos(l),h=i*Math.sin(l);r[0].x=s.x+u,r[0].y=s.y+h}let n=e.length;if(n>=2&&Ni[t.arrowTypeEnd]){let i=Ni[t.arrowTypeEnd],s=e[n-1],o=e[n-2],{angle:l}=Yee(o,s),u=i*Math.cos(l),h=i*Math.sin(l);r[n-1].x=s.x-u,r[n-1].y=s.y-h}return r}var _6e,ef,ji,Kee,cS,cx,Jo,hM,Nm,A6e,R6e,L6e,qee,Hee,D6e,N6e,ih,Mm=w(()=>{"use strict";Gt();Tr();bt();qo();$2();Vee();jt();uM();ox();Lr();$t();J2();jee();Ot();_6e=a(e=>typeof e=="string"?e:_e()?.flowchart?.curve,"resolveEdgeCurveType"),ef=new Map,ji=new Map,Kee=a(()=>{ef.clear(),ji.clear()},"clear"),cS=a(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),cx=a(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Jo=a(async(e,t)=>{let r=_e(),n=vn(r),{labelStyles:i}=Ze(t);t.labelStyle=i;let s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),l=t.labelType==="markdown",h=await li(e,t.label,{style:cx(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:l,width:l?void 0:void 0},r);o.node().appendChild(h),H.info("abc82",t,t.labelType);let d,f;if(n){let m=h.children[0],g=st(h);d=await Nl.measure(()=>m.getBoundingClientRect()),f=d,g.attr("width",d.width),g.attr("height",d.height)}else{let m=st(h).select("text").node();await Nl.measure(()=>{d=h.getBBox(),m&&typeof m.getBBox=="function"?f=m.getBBox():f=d})}o.attr("transform",Dm(f,n)),ef.set(t.id,s),t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await ho(g,t.startLabelLeft,cx(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(n){let b=y.children[0],T=st(y);x=b.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Dm(x,n)),ji.get(t.id)||ji.set(t.id,{}),ji.get(t.id).startLeft=m,lS(p,t.startLabelLeft,x),oS(t,"startLeft",x)}if(t.startLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await ho(g,t.startLabelRight,cx(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(n){let b=y.children[0],T=st(y);x=b.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Dm(x,n)),ji.get(t.id)||ji.set(t.id,{}),ji.get(t.id).startRight=m,lS(p,t.startLabelRight,x),oS(t,"startRight",x)}if(t.endLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await ho(g,t.endLabelLeft,cx(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(n){let b=y.children[0],T=st(y);x=b.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Dm(x,n)),ji.get(t.id)||ji.set(t.id,{}),ji.get(t.id).endLeft=m,lS(p,t.endLabelLeft,x),oS(t,"endLeft",x)}if(t.endLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await ho(g,t.endLabelRight,cx(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(n){let b=y.children[0],T=st(y);x=b.getBoundingClientRect(),T.attr("width",x.width),T.attr("height",x.height)}g.attr("transform",Dm(x,n)),ji.get(t.id)||ji.set(t.id,{}),ji.get(t.id).endRight=m,lS(p,t.endLabelRight,x),oS(t,"endRight",x)}return h},"insertEdgeLabel");a(oS,"recordTerminalLabelSize");a(lS,"setTerminalWidth");hM=a((e,t)=>{let r=e.x,n=e.y;if(t?.updatedPath){let i=Xt.calcLabelPosition(t.updatedPath);if(t.originalPath){let s=Xt.calcLabelPosition(t.originalPath);r=e.x+(i.x-s.x),n=e.y+(i.y-s.y)}else r=i.x,n=i.y}return{x:r,y:n}},"resolveEdgeLabelPosition"),Nm=a((e,t)=>{H.debug("Moving label abc88 ",e.id,e.label,ef.get(e.id),t);let r=_e(),{subGraphTitleTotalMargin:n}=Zo(r);if(e.label){let s=ef.get(e.id),{x:o,y:l}=hM(e,t);H.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",o,",",l,") abc88"),s.attr("transform",`translate(${o}, ${l+n/2})`)}let i=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){let s=ji.get(e.id).startLeft,o=e.x,l=e.y;if(i){let u=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",i);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let s=ji.get(e.id).startRight,o=e.x,l=e.y;if(i){let u=Xt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",i);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let s=ji.get(e.id).endLeft,o=e.x,l=e.y;if(i){let u=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",i);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let s=ji.get(e.id).endRight,o=e.x,l=e.y;if(i){let u=Xt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",i);o=u.x,l=u.y}s.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),A6e=a((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[r,n]=t,i=Math.abs(n.x-r.x),s=Math.abs(n.y-r.y);return i<.001||s<.001?t:s>=i?[r,{x:r.x,y:n.y},n]:[r,{x:n.x,y:r.y},n]},"orthogonalizeToLabelClippedPoints"),R6e=a((e,t)=>{let r=e.x,n=e.y,i=Math.abs(t.x-r),s=Math.abs(t.y-n),o=e.width/2,l=e.height/2;return i>=o||s>=l},"outsideNode"),L6e=a((e,t,r)=>{H.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,i=e.y,s=Math.abs(n-r.x),o=e.width/2,l=r.xMath.abs(n-t.x)*u){let f=r.y{H.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(s=>{if(H.info("abc88 checking point",s,t),!R6e(t,s)&&!i){let o=L6e(t,n,s);H.debug("abc88 inside",s,n,o),H.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?H.warn("abc88 no intersect",o,r):r.push(o),i=!0}else H.warn("abc88 outside",s,n),n=s,i||r.push(s)}),H.debug("returning points",r),r},"cutPathAtIntersect");a(I6e,"extractCornerPoints");Hee=a(function(e,t,r){let n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i),o=r/s;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),D6e=a(function(e){let{cornerPointPositions:t}=I6e(e),r=[];for(let n=0;n10&&Math.abs(s.y-i.y)>=10){H.debug("Corner point fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+f:l.x+m-f,y:d<0?l.y-f:l.y+f}:p={x:h<0?l.x-f:l.x+f,y:d<0?l.y-m+f:l.y+m-f}}else H.debug("Corner point skipping fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));r.push(p,u)}else r.push(e[n]);return r},"fixCorners"),N6e=a((e,t,r)=>{let n=e-t-r,i=2,s=2,o=i+s,l=Math.floor(n/o),u=Number.isFinite(l)?Math.max(0,l):0,h=Array(u).fill(`${i} ${s}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),ih=a(function(e,t,r,n,i,s,o,l=!1,u=void 0){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:h,layout:d}=_e(),f=u??d,p=t.points,m=!1,g=i;var y=s;let x=[];for(let V in t.cssCompiledStyles)W0(V)||x.push(t.cssCompiledStyles[V]);if(f==="swimlane"){if(!l&&y.intersect&&g.intersect&&Array.isArray(p)&&p.length>=2)if(p.length===2)p=[g.intersect(p[0]),y.intersect(p[1])];else{let V=p.slice(1,-1),U=V[0],z=V[V.length-1],j=.5,K=Math.abs(p[p.length-1].x-z.x)!Number.isNaN(V.y)),C=_6e(t.curve);C!=="rounded"&&(T=D6e(T));let v=Ll;switch(C){case"linear":v=Ll;break;case"basis":v=Gd;break;case"cardinal":v=y0;break;case"bumpX":v=d0;break;case"bumpY":v=f0;break;case"catmullRom":v=T0;break;case"monotoneX":v=C0;break;case"monotoneY":v=k0;break;case"natural":v=Cm;break;case"step":v=km;break;case"stepAfter":v=E0;break;case"stepBefore":v=S0;break;case"rounded":v=Ll;break;default:v=Gd}let{x:E,y:S}=zee(t),_=Fd().x(E).y(S).curve(v),A;switch(t.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(t.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let B,$=C==="rounded"?M6e(O6e(T,t),5):_(T),O=Array.isArray(t.style)?t.style:[t.style],G=O.find(V=>V?.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let F=!1;if(t.look==="handDrawn"){let V=Xe.svg(e);Object.assign([],T);let U=V.path($,{roughness:.3,seed:h});A+=" transition",B=st(U).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+A+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",O?O.reduce((j,K)=>j+";"+K,""):"");let z=B.attr("d");B.attr("d",z),e.node().appendChild(B.node())}else{let V=x.join(";"),U=O?O.reduce((te,me)=>te+me+";",""):"",z=(V?V+";"+U+";":U)+";"+(O?O.reduce((te,me)=>te+";"+me,""):"");B=e.append("path").attr("d",$).attr("id",`${o}-${t.id}`).attr("class"," "+A+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",z),G=z.match(/stroke:([^;]+)/)?.[1],F=t.animate===!0||!!t.animation||V.includes("animation");let j=B.node(),K=typeof j.getTotalLength=="function"?j.getTotalLength():0,Z=cM[t.arrowTypeStart]||0,ce=cM[t.arrowTypeEnd]||0;if(t.look==="neo"&&!F){let me=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?N6e(K,Z,ce):`0 ${Z} ${K-Z-ce} ${ce}`}; stroke-dashoffset: 0;`;B.attr("style",me+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",b),B.attr("data-look",Hr(t.look)),t.showPoints&&T.forEach(V=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",V.x).attr("cy",V.y)});let N="";(_e().flowchart.arrowMarkerAbsolute||_e().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),H.info("arrowTypeStart",t.arrowTypeStart),H.info("arrowTypeEnd",t.arrowTypeEnd);let D=!F&&t?.look==="neo";Wee(B,t,N,o,n,D,G);let M=Math.floor(p.length/2),R=p[M];Xt.isLabelCoordinateInPath(R,B.attr("d"))||(m=!0);let P={};return m&&(P.updatedPath=p),P.originalPath=t.points,P},"insertEdge");a(M6e,"generateRoundedPath");a(Yee,"calculateDeltaAndAngle");a(O6e,"applyMarkerOffsetsToPoints")});var P6e,B6e,$6e,F6e,G6e,V6e,z6e,U6e,W6e,j6e,q6e,H6e,Y6e,K6e,X6e,Q6e,Z6e,J6e,eBe,tBe,rBe,nBe,iBe,sBe,aBe,Om,uS=w(()=>{"use strict";bt();Tr();P6e=a((e,t,r,n)=>{t.forEach(i=>{aBe[i](e,r,n)})},"insertMarkers"),B6e=a((e,t,r)=>{H.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),$6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),F6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),G6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),V6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),z6e=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),U6e=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),W6e=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),j6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),q6e=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{transitionColor:s}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),H6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Y6e=a((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),K6e=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),X6e=a((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Q6e=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{strokeWidth:s}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),Z6e=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{strokeWidth:s,mainBkg:o}=i,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);let u=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),J6e=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{strokeWidth:s}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),eBe=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{strokeWidth:s,mainBkg:o}=i,l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);let u=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),tBe=a((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`)},"requirement_arrow"),rBe=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{strokeWidth:s}=i;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).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"),nBe=a((e,t,r)=>{let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),iBe=a((e,t,r)=>{let n=Ct(),{themeVariables:i}=n,{strokeWidth:s}=i,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),sBe=a((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),aBe={extension:B6e,composition:$6e,aggregation:F6e,dependency:G6e,lollipop:V6e,point:z6e,circle:U6e,cross:W6e,barb:j6e,barbNeo:q6e,hierarchy:sBe,only_one:H6e,zero_or_one:Y6e,one_or_more:K6e,zero_or_more:X6e,only_one_neo:Q6e,zero_or_one_neo:Z6e,one_or_more_neo:J6e,zero_or_more_neo:eBe,requirement_arrow:tBe,requirement_contains:nBe,requirement_arrow_neo:rBe,requirement_contains_neo:iBe},Om=P6e});async function Fc(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let s=t.shape?ex[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await s(n,t,r)}else i=await s(e,t,r),n=i;return n.attr("data-look",Hr(t.look)),t.tooltip&&i.attr("title",t.tooltip),hS.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var hS,Xee,Qee,Pl,tf=w(()=>{"use strict";bt();tx();jt();hS=new Map;a(Fc,"insertNode");Xee=a((e,t)=>{hS.set(t.id,e)},"setNodeElem"),Qee=a(()=>{hS.clear()},"clear"),Pl=a(e=>{let t=hS.get(e.id);H.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var Zee,Jee=w(()=>{"use strict";Tr();Ir();bt();lx();Mm();uS();tf();It();jt();Zee={common:gt,getConfig:Ct,insertCluster:nh,insertEdge:ih,insertEdgeLabel:Jo,insertMarkers:Om,insertNode:Fc,interpolateToCurve:NN,labelHelper:ct,log:H,positionEdgeLabel:Nm}});var dS,dM=w(()=>{"use strict";dS=a((e,t)=>{let{theme:r,themeVariables:n}=t,{useGradient:i,gradientStart:s,gradientStop:o}=n??{},l=e.attr("id"),u=r?.includes("dark")?"#FFFFFF":"#000000",h=a((f,p,m)=>e.append("defs").append("filter").attr("id",f).attr("height",p).attr("width",p).append("feDropShadow").attr("dx",m).attr("dy",m).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u),"dropShadow");if(h(`${l}-drop-shadow`,"130%","4"),h(`${l}-drop-shadow-small`,"150%","2"),!i)return;let d=e.append("linearGradient").attr("id",`${l}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)},"insertLookDefs")});var ete=w(()=>{"use strict"});var oBe,fS,fM=w(()=>{"use strict";oBe=typeof global=="object"&&global&&global.Object===Object&&global,fS=oBe});var lBe,cBe,hi,fo=w(()=>{"use strict";fM();lBe=typeof self=="object"&&self&&self.Object===Object&&self,cBe=fS||lBe||Function("return this")(),hi=cBe});var uBe,os,rf=w(()=>{"use strict";fo();uBe=hi.Symbol,os=uBe});function fBe(e){var t=hBe.call(e,ux),r=e[ux];try{e[ux]=void 0;var n=!0}catch{}var i=dBe.call(e);return n&&(t?e[ux]=r:delete e[ux]),i}var tte,hBe,dBe,ux,rte,nte=w(()=>{"use strict";rf();tte=Object.prototype,hBe=tte.hasOwnProperty,dBe=tte.toString,ux=os?os.toStringTag:void 0;a(fBe,"getRawTag");rte=fBe});function gBe(e){return mBe.call(e)}var pBe,mBe,ite,ste=w(()=>{"use strict";pBe=Object.prototype,mBe=pBe.toString;a(gBe,"objectToString");ite=gBe});function bBe(e){return e==null?e===void 0?xBe:yBe:ate&&ate in Object(e)?rte(e):ite(e)}var yBe,xBe,ate,qs,sh=w(()=>{"use strict";rf();nte();ste();yBe="[object Null]",xBe="[object Undefined]",ate=os?os.toStringTag:void 0;a(bBe,"baseGetTag");qs=bBe});function TBe(e){return e!=null&&typeof e=="object"}var bi,el=w(()=>{"use strict";a(TBe,"isObjectLike");bi=TBe});function kBe(e){return typeof e=="symbol"||bi(e)&&qs(e)==CBe}var CBe,za,nf=w(()=>{"use strict";sh();el();CBe="[object Symbol]";a(kBe,"isSymbol");za=kBe});function SBe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{"use strict";a(SBe,"arrayMap");Bl=SBe});var EBe,Mr,Mi=w(()=>{"use strict";EBe=Array.isArray,Mr=EBe});function cte(e){if(typeof e=="string")return e;if(Mr(e))return Bl(e,cte)+"";if(za(e))return lte?lte.call(e):"";var t=e+"";return t=="0"&&1/e==-vBe?"-0":t}var vBe,ote,lte,ute,hte=w(()=>{"use strict";rf();hx();Mi();nf();vBe=1/0,ote=os?os.prototype:void 0,lte=ote?ote.toString:void 0;a(cte,"baseToString");ute=cte});function _Be(e){for(var t=e.length;t--&&wBe.test(e.charAt(t)););return t}var wBe,dte,fte=w(()=>{"use strict";wBe=/\s/;a(_Be,"trimmedEndIndex");dte=_Be});function RBe(e){return e&&e.slice(0,dte(e)+1).replace(ABe,"")}var ABe,pte,mte=w(()=>{"use strict";fte();ABe=/^\s+/;a(RBe,"baseTrim");pte=RBe});function LBe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var jn,po=w(()=>{"use strict";a(LBe,"isObject");jn=LBe});function OBe(e){if(typeof e=="number")return e;if(za(e))return gte;if(jn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pte(e);var r=DBe.test(e);return r||NBe.test(e)?MBe(e.slice(2),r?2:8):IBe.test(e)?gte:+e}var gte,IBe,DBe,NBe,MBe,yte,xte=w(()=>{"use strict";mte();po();nf();gte=NaN,IBe=/^[-+]0x[0-9a-f]+$/i,DBe=/^0b[01]+$/i,NBe=/^0o[0-7]+$/i,MBe=parseInt;a(OBe,"toNumber");yte=OBe});function BBe(e){if(!e)return e===0?e:0;if(e=yte(e),e===bte||e===-bte){var t=e<0?-1:1;return t*PBe}return e===e?e:0}var bte,PBe,Pm,pM=w(()=>{"use strict";xte();bte=1/0,PBe=17976931348623157e292;a(BBe,"toFinite");Pm=BBe});function $Be(e){var t=Pm(e),r=t%1;return t===t?r?t-r:t:0}var Tte,Cte=w(()=>{"use strict";pM();a($Be,"toInteger");Tte=$Be});function FBe(e){return e}var ua,ah=w(()=>{"use strict";a(FBe,"identity");ua=FBe});function WBe(e){if(!jn(e))return!1;var t=qs(e);return t==VBe||t==zBe||t==GBe||t==UBe}var GBe,VBe,zBe,UBe,$l,dx=w(()=>{"use strict";sh();po();GBe="[object AsyncFunction]",VBe="[object Function]",zBe="[object GeneratorFunction]",UBe="[object Proxy]";a(WBe,"isFunction");$l=WBe});var jBe,pS,kte=w(()=>{"use strict";fo();jBe=hi["__core-js_shared__"],pS=jBe});function qBe(e){return!!Ste&&Ste in e}var Ste,Ete,vte=w(()=>{"use strict";kte();Ste=(function(){var e=/[^.]+$/.exec(pS&&pS.keys&&pS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();a(qBe,"isMasked");Ete=qBe});function KBe(e){if(e!=null){try{return YBe.call(e)}catch{}try{return e+""}catch{}}return""}var HBe,YBe,Gc,mM=w(()=>{"use strict";HBe=Function.prototype,YBe=HBe.toString;a(KBe,"toSource");Gc=KBe});function n$e(e){if(!jn(e)||Ete(e))return!1;var t=$l(e)?r$e:QBe;return t.test(Gc(e))}var XBe,QBe,ZBe,JBe,e$e,t$e,r$e,wte,_te=w(()=>{"use strict";dx();vte();po();mM();XBe=/[\\^$.*+?()[\]{}|]/g,QBe=/^\[object .+?Constructor\]$/,ZBe=Function.prototype,JBe=Object.prototype,e$e=ZBe.toString,t$e=JBe.hasOwnProperty,r$e=RegExp("^"+e$e.call(t$e).replace(XBe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");a(n$e,"baseIsNative");wte=n$e});function i$e(e,t){return e?.[t]}var Ate,Rte=w(()=>{"use strict";a(i$e,"getValue");Ate=i$e});function s$e(e,t){var r=Ate(e,t);return wte(r)?r:void 0}var ha,oh=w(()=>{"use strict";_te();Rte();a(s$e,"getNative");ha=s$e});var a$e,mS,Lte=w(()=>{"use strict";oh();fo();a$e=ha(hi,"WeakMap"),mS=a$e});var Ite,o$e,Dte,Nte=w(()=>{"use strict";po();Ite=Object.create,o$e=(function(){function e(){}return a(e,"object"),function(t){if(!jn(t))return{};if(Ite)return Ite(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Dte=o$e});function l$e(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Mte,Ote=w(()=>{"use strict";a(l$e,"apply");Mte=l$e});function c$e(){}var Pte,Bte=w(()=>{"use strict";a(c$e,"noop");Pte=c$e});function u$e(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{"use strict";a(u$e,"copyArray");gS=u$e});function p$e(e){var t=0,r=0;return function(){var n=f$e(),i=d$e-(n-r);if(r=n,i>0){if(++t>=h$e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var h$e,d$e,f$e,$te,Fte=w(()=>{"use strict";h$e=800,d$e=16,f$e=Date.now;a(p$e,"shortOut");$te=p$e});function m$e(e){return function(){return e}}var da,yM=w(()=>{"use strict";a(m$e,"constant");da=m$e});var g$e,Bm,xM=w(()=>{"use strict";oh();g$e=(function(){try{var e=ha(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Bm=g$e});var y$e,Gte,Vte=w(()=>{"use strict";yM();xM();ah();y$e=Bm?function(e,t){return Bm(e,"toString",{configurable:!0,enumerable:!1,value:da(t),writable:!0})}:ua,Gte=y$e});var x$e,yS,bM=w(()=>{"use strict";Vte();Fte();x$e=$te(Gte),yS=x$e});function b$e(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";a(b$e,"arrayEach");xS=b$e});function T$e(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s{"use strict";a(T$e,"baseFindIndex");bS=T$e});function C$e(e){return e!==e}var zte,Ute=w(()=>{"use strict";a(C$e,"baseIsNaN");zte=C$e});function k$e(e,t,r){for(var n=r-1,i=e.length;++n{"use strict";a(k$e,"strictIndexOf");Wte=k$e});function S$e(e,t,r){return t===t?Wte(e,t,r):bS(e,zte,r)}var qte,Hte=w(()=>{"use strict";CM();Ute();jte();a(S$e,"baseIndexOf");qte=S$e});function E$e(e,t){var r=e==null?0:e.length;return!!r&&qte(e,t,0)>-1}var Yte,Kte=w(()=>{"use strict";Hte();a(E$e,"arrayIncludes");Yte=E$e});function _$e(e,t){var r=typeof e;return t=t??v$e,!!t&&(r=="number"||r!="symbol"&&w$e.test(e))&&e>-1&&e%1==0&&e{"use strict";v$e=9007199254740991,w$e=/^(?:0|[1-9]\d*)$/;a(_$e,"isIndex");lh=_$e});function A$e(e,t,r){t=="__proto__"&&Bm?Bm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var ch,px=w(()=>{"use strict";xM();a(A$e,"baseAssignValue");ch=A$e});function R$e(e,t){return e===t||e!==e&&t!==t}var mo,sf=w(()=>{"use strict";a(R$e,"eq");mo=R$e});function D$e(e,t,r){var n=e[t];(!(I$e.call(e,t)&&mo(n,r))||r===void 0&&!(t in e))&&ch(e,t,r)}var L$e,I$e,uh,mx=w(()=>{"use strict";px();sf();L$e=Object.prototype,I$e=L$e.hasOwnProperty;a(D$e,"assignValue");uh=D$e});function N$e(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s{"use strict";mx();px();a(N$e,"copyObject");Fl=N$e});function M$e(e,t,r){return t=Xte(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Xte(n.length-t,0),o=Array(s);++i{"use strict";Ote();Xte=Math.max;a(M$e,"overRest");TS=M$e});function O$e(e,t){return yS(TS(e,t,ua),e+"")}var hh,gx=w(()=>{"use strict";ah();kM();bM();a(O$e,"baseRest");hh=O$e});function B$e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=P$e}var P$e,Fm,CS=w(()=>{"use strict";P$e=9007199254740991;a(B$e,"isLength");Fm=B$e});function $$e(e){return e!=null&&Fm(e.length)&&!$l(e)}var ls,Gl=w(()=>{"use strict";dx();CS();a($$e,"isArrayLike");ls=$$e});function F$e(e,t,r){if(!jn(r))return!1;var n=typeof t;return(n=="number"?ls(r)&&lh(t,r.length):n=="string"&&t in r)?mo(r[t],e):!1}var Vc,yx=w(()=>{"use strict";sf();Gl();fx();po();a(F$e,"isIterateeCall");Vc=F$e});function G$e(e){return hh(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&Vc(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n{"use strict";gx();yx();a(G$e,"createAssigner");Qte=G$e});function z$e(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||V$e;return e===r}var V$e,dh,xx=w(()=>{"use strict";V$e=Object.prototype;a(z$e,"isPrototype");dh=z$e});function U$e(e,t){for(var r=-1,n=Array(e);++r{"use strict";a(U$e,"baseTimes");Jte=U$e});function j$e(e){return bi(e)&&qs(e)==W$e}var W$e,SM,tre=w(()=>{"use strict";sh();el();W$e="[object Arguments]";a(j$e,"baseIsArguments");SM=j$e});var rre,q$e,H$e,Y$e,tl,Gm=w(()=>{"use strict";tre();el();rre=Object.prototype,q$e=rre.hasOwnProperty,H$e=rre.propertyIsEnumerable,Y$e=SM((function(){return arguments})())?SM:function(e){return bi(e)&&q$e.call(e,"callee")&&!H$e.call(e,"callee")},tl=Y$e});function K$e(){return!1}var nre,ire=w(()=>{"use strict";a(K$e,"stubFalse");nre=K$e});var ore,sre,X$e,are,Q$e,Z$e,rl,Vm=w(()=>{"use strict";fo();ire();ore=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sre=ore&&typeof module=="object"&&module&&!module.nodeType&&module,X$e=sre&&sre.exports===ore,are=X$e?hi.Buffer:void 0,Q$e=are?are.isBuffer:void 0,Z$e=Q$e||nre,rl=Z$e});function S8e(e){return bi(e)&&Fm(e.length)&&!!$n[qs(e)]}var J$e,e8e,t8e,r8e,n8e,i8e,s8e,a8e,o8e,l8e,c8e,u8e,h8e,d8e,f8e,p8e,m8e,g8e,y8e,x8e,b8e,T8e,C8e,k8e,$n,lre,cre=w(()=>{"use strict";sh();CS();el();J$e="[object Arguments]",e8e="[object Array]",t8e="[object Boolean]",r8e="[object Date]",n8e="[object Error]",i8e="[object Function]",s8e="[object Map]",a8e="[object Number]",o8e="[object Object]",l8e="[object RegExp]",c8e="[object Set]",u8e="[object String]",h8e="[object WeakMap]",d8e="[object ArrayBuffer]",f8e="[object DataView]",p8e="[object Float32Array]",m8e="[object Float64Array]",g8e="[object Int8Array]",y8e="[object Int16Array]",x8e="[object Int32Array]",b8e="[object Uint8Array]",T8e="[object Uint8ClampedArray]",C8e="[object Uint16Array]",k8e="[object Uint32Array]",$n={};$n[p8e]=$n[m8e]=$n[g8e]=$n[y8e]=$n[x8e]=$n[b8e]=$n[T8e]=$n[C8e]=$n[k8e]=!0;$n[J$e]=$n[e8e]=$n[d8e]=$n[t8e]=$n[f8e]=$n[r8e]=$n[n8e]=$n[i8e]=$n[s8e]=$n[a8e]=$n[o8e]=$n[l8e]=$n[c8e]=$n[u8e]=$n[h8e]=!1;a(S8e,"baseIsTypedArray");lre=S8e});function E8e(e){return function(t){return e(t)}}var fh,bx=w(()=>{"use strict";a(E8e,"baseUnary");fh=E8e});var ure,Tx,v8e,EM,w8e,zc,kS=w(()=>{"use strict";fM();ure=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tx=ure&&typeof module=="object"&&module&&!module.nodeType&&module,v8e=Tx&&Tx.exports===ure,EM=v8e&&fS.process,w8e=(function(){try{var e=Tx&&Tx.require&&Tx.require("util").types;return e||EM&&EM.binding&&EM.binding("util")}catch{}})(),zc=w8e});var hre,_8e,ph,Cx=w(()=>{"use strict";cre();bx();kS();hre=zc&&zc.isTypedArray,_8e=hre?fh(hre):lre,ph=_8e});function L8e(e,t){var r=Mr(e),n=!r&&tl(e),i=!r&&!n&&rl(e),s=!r&&!n&&!i&&ph(e),o=r||n||i||s,l=o?Jte(e.length,String):[],u=l.length;for(var h in e)(t||R8e.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||lh(h,u)))&&l.push(h);return l}var A8e,R8e,SS,vM=w(()=>{"use strict";ere();Gm();Mi();Vm();fx();Cx();A8e=Object.prototype,R8e=A8e.hasOwnProperty;a(L8e,"arrayLikeKeys");SS=L8e});function I8e(e,t){return function(r){return e(t(r))}}var ES,wM=w(()=>{"use strict";a(I8e,"overArg");ES=I8e});var D8e,dre,fre=w(()=>{"use strict";wM();D8e=ES(Object.keys,Object),dre=D8e});function O8e(e){if(!dh(e))return dre(e);var t=[];for(var r in Object(e))M8e.call(e,r)&&r!="constructor"&&t.push(r);return t}var N8e,M8e,zm,vS=w(()=>{"use strict";xx();fre();N8e=Object.prototype,M8e=N8e.hasOwnProperty;a(O8e,"baseKeys");zm=O8e});function P8e(e){return ls(e)?SS(e):zm(e)}var di,Uc=w(()=>{"use strict";vM();vS();Gl();a(P8e,"keys");di=P8e});function B8e(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var pre,mre=w(()=>{"use strict";a(B8e,"nativeKeysIn");pre=B8e});function G8e(e){if(!jn(e))return pre(e);var t=dh(e),r=[];for(var n in e)n=="constructor"&&(t||!F8e.call(e,n))||r.push(n);return r}var $8e,F8e,gre,yre=w(()=>{"use strict";po();xx();mre();$8e=Object.prototype,F8e=$8e.hasOwnProperty;a(G8e,"baseKeysIn");gre=G8e});function V8e(e){return ls(e)?SS(e,!0):gre(e)}var fa,mh=w(()=>{"use strict";vM();yre();Gl();a(V8e,"keysIn");fa=V8e});function W8e(e,t){if(Mr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||za(e)?!0:U8e.test(e)||!z8e.test(e)||t!=null&&e in Object(t)}var z8e,U8e,Um,wS=w(()=>{"use strict";Mi();nf();z8e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U8e=/^\w*$/;a(W8e,"isKey");Um=W8e});var j8e,Wc,kx=w(()=>{"use strict";oh();j8e=ha(Object,"create"),Wc=j8e});function q8e(){this.__data__=Wc?Wc(null):{},this.size=0}var xre,bre=w(()=>{"use strict";kx();a(q8e,"hashClear");xre=q8e});function H8e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Tre,Cre=w(()=>{"use strict";a(H8e,"hashDelete");Tre=H8e});function Q8e(e){var t=this.__data__;if(Wc){var r=t[e];return r===Y8e?void 0:r}return X8e.call(t,e)?t[e]:void 0}var Y8e,K8e,X8e,kre,Sre=w(()=>{"use strict";kx();Y8e="__lodash_hash_undefined__",K8e=Object.prototype,X8e=K8e.hasOwnProperty;a(Q8e,"hashGet");kre=Q8e});function e7e(e){var t=this.__data__;return Wc?t[e]!==void 0:J8e.call(t,e)}var Z8e,J8e,Ere,vre=w(()=>{"use strict";kx();Z8e=Object.prototype,J8e=Z8e.hasOwnProperty;a(e7e,"hashHas");Ere=e7e});function r7e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wc&&t===void 0?t7e:t,this}var t7e,wre,_re=w(()=>{"use strict";kx();t7e="__lodash_hash_undefined__";a(r7e,"hashSet");wre=r7e});function Wm(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";bre();Cre();Sre();vre();_re();a(Wm,"Hash");Wm.prototype.clear=xre;Wm.prototype.delete=Tre;Wm.prototype.get=kre;Wm.prototype.has=Ere;Wm.prototype.set=wre;_M=Wm});function n7e(){this.__data__=[],this.size=0}var Rre,Lre=w(()=>{"use strict";a(n7e,"listCacheClear");Rre=n7e});function i7e(e,t){for(var r=e.length;r--;)if(mo(e[r][0],t))return r;return-1}var gh,Sx=w(()=>{"use strict";sf();a(i7e,"assocIndexOf");gh=i7e});function o7e(e){var t=this.__data__,r=gh(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():a7e.call(t,r,1),--this.size,!0}var s7e,a7e,Ire,Dre=w(()=>{"use strict";Sx();s7e=Array.prototype,a7e=s7e.splice;a(o7e,"listCacheDelete");Ire=o7e});function l7e(e){var t=this.__data__,r=gh(t,e);return r<0?void 0:t[r][1]}var Nre,Mre=w(()=>{"use strict";Sx();a(l7e,"listCacheGet");Nre=l7e});function c7e(e){return gh(this.__data__,e)>-1}var Ore,Pre=w(()=>{"use strict";Sx();a(c7e,"listCacheHas");Ore=c7e});function u7e(e,t){var r=this.__data__,n=gh(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Bre,$re=w(()=>{"use strict";Sx();a(u7e,"listCacheSet");Bre=u7e});function jm(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Lre();Dre();Mre();Pre();$re();a(jm,"ListCache");jm.prototype.clear=Rre;jm.prototype.delete=Ire;jm.prototype.get=Nre;jm.prototype.has=Ore;jm.prototype.set=Bre;yh=jm});var h7e,xh,_S=w(()=>{"use strict";oh();fo();h7e=ha(hi,"Map"),xh=h7e});function d7e(){this.size=0,this.__data__={hash:new _M,map:new(xh||yh),string:new _M}}var Fre,Gre=w(()=>{"use strict";Are();Ex();_S();a(d7e,"mapCacheClear");Fre=d7e});function f7e(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Vre,zre=w(()=>{"use strict";a(f7e,"isKeyable");Vre=f7e});function p7e(e,t){var r=e.__data__;return Vre(t)?r[typeof t=="string"?"string":"hash"]:r.map}var bh,vx=w(()=>{"use strict";zre();a(p7e,"getMapData");bh=p7e});function m7e(e){var t=bh(this,e).delete(e);return this.size-=t?1:0,t}var Ure,Wre=w(()=>{"use strict";vx();a(m7e,"mapCacheDelete");Ure=m7e});function g7e(e){return bh(this,e).get(e)}var jre,qre=w(()=>{"use strict";vx();a(g7e,"mapCacheGet");jre=g7e});function y7e(e){return bh(this,e).has(e)}var Hre,Yre=w(()=>{"use strict";vx();a(y7e,"mapCacheHas");Hre=y7e});function x7e(e,t){var r=bh(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Kre,Xre=w(()=>{"use strict";vx();a(x7e,"mapCacheSet");Kre=x7e});function qm(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Gre();Wre();qre();Yre();Xre();a(qm,"MapCache");qm.prototype.clear=Fre;qm.prototype.delete=Ure;qm.prototype.get=jre;qm.prototype.has=Hre;qm.prototype.set=Kre;af=qm});function AM(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(b7e);var r=a(function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o},"memoized");return r.cache=new(AM.Cache||af),r}var b7e,Qre,Zre=w(()=>{"use strict";AS();b7e="Expected a function";a(AM,"memoize");AM.Cache=af;Qre=AM});function C7e(e){var t=Qre(e,function(n){return r.size===T7e&&r.clear(),n}),r=t.cache;return t}var T7e,Jre,ene=w(()=>{"use strict";Zre();T7e=500;a(C7e,"memoizeCapped");Jre=C7e});var k7e,S7e,E7e,tne,rne=w(()=>{"use strict";ene();k7e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S7e=/\\(\\)?/g,E7e=Jre(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(k7e,function(r,n,i,s){t.push(i?s.replace(S7e,"$1"):n||r)}),t}),tne=E7e});function v7e(e){return e==null?"":ute(e)}var RS,RM=w(()=>{"use strict";hte();a(v7e,"toString");RS=v7e});function w7e(e,t){return Mr(e)?e:Um(e,t)?[e]:tne(RS(e))}var Th,wx=w(()=>{"use strict";Mi();wS();rne();RM();a(w7e,"castPath");Th=w7e});function A7e(e){if(typeof e=="string"||za(e))return e;var t=e+"";return t=="0"&&1/e==-_7e?"-0":t}var _7e,Vl,Hm=w(()=>{"use strict";nf();_7e=1/0;a(A7e,"toKey");Vl=A7e});function R7e(e,t){t=Th(t,e);for(var r=0,n=t.length;e!=null&&r{"use strict";wx();Hm();a(R7e,"baseGet");Ch=R7e});function L7e(e,t,r){var n=e==null?void 0:Ch(e,t);return n===void 0?r:n}var nne,ine=w(()=>{"use strict";_x();a(L7e,"get");nne=L7e});function I7e(e,t){for(var r=-1,n=t.length,i=e.length;++r{"use strict";a(I7e,"arrayPush");Ym=I7e});function D7e(e){return Mr(e)||tl(e)||!!(sne&&e&&e[sne])}var sne,ane,one=w(()=>{"use strict";rf();Gm();Mi();sne=os?os.isConcatSpreadable:void 0;a(D7e,"isFlattenable");ane=D7e});function lne(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=ane),i||(i=[]);++s0&&r(l)?t>1?lne(l,t-1,r,n,i):Ym(i,l):n||(i[i.length]=l)}return i}var Km,IS=w(()=>{"use strict";LS();one();a(lne,"baseFlatten");Km=lne});function N7e(e){var t=e==null?0:e.length;return t?Km(e,1):[]}var go,LM=w(()=>{"use strict";IS();a(N7e,"flatten");go=N7e});function M7e(e){return yS(TS(e,void 0,go),e+"")}var cne,une=w(()=>{"use strict";LM();kM();bM();a(M7e,"flatRest");cne=M7e});var O7e,Xm,DS=w(()=>{"use strict";wM();O7e=ES(Object.getPrototypeOf,Object),Xm=O7e});function V7e(e){if(!bi(e)||qs(e)!=P7e)return!1;var t=Xm(e);if(t===null)return!0;var r=F7e.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&hne.call(r)==G7e}var P7e,B7e,$7e,hne,F7e,G7e,dne,fne=w(()=>{"use strict";sh();DS();el();P7e="[object Object]",B7e=Function.prototype,$7e=Object.prototype,hne=B7e.toString,F7e=$7e.hasOwnProperty,G7e=hne.call(Object);a(V7e,"isPlainObject");dne=V7e});function X7e(e){return K7e.test(e)}var z7e,U7e,W7e,j7e,q7e,H7e,Y7e,K7e,pne,mne=w(()=>{"use strict";z7e="\\ud800-\\udfff",U7e="\\u0300-\\u036f",W7e="\\ufe20-\\ufe2f",j7e="\\u20d0-\\u20ff",q7e=U7e+W7e+j7e,H7e="\\ufe0e\\ufe0f",Y7e="\\u200d",K7e=RegExp("["+Y7e+z7e+q7e+H7e+"]");a(X7e,"hasUnicode");pne=X7e});function Q7e(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i{"use strict";a(Q7e,"arrayReduce");gne=Q7e});function Z7e(){this.__data__=new yh,this.size=0}var xne,bne=w(()=>{"use strict";Ex();a(Z7e,"stackClear");xne=Z7e});function J7e(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Tne,Cne=w(()=>{"use strict";a(J7e,"stackDelete");Tne=J7e});function eFe(e){return this.__data__.get(e)}var kne,Sne=w(()=>{"use strict";a(eFe,"stackGet");kne=eFe});function tFe(e){return this.__data__.has(e)}var Ene,vne=w(()=>{"use strict";a(tFe,"stackHas");Ene=tFe});function nFe(e,t){var r=this.__data__;if(r instanceof yh){var n=r.__data__;if(!xh||n.length{"use strict";Ex();_S();AS();rFe=200;a(nFe,"stackSet");wne=nFe});function Qm(e){var t=this.__data__=new yh(e);this.size=t.size}var zl,Ax=w(()=>{"use strict";Ex();bne();Cne();Sne();vne();_ne();a(Qm,"Stack");Qm.prototype.clear=xne;Qm.prototype.delete=Tne;Qm.prototype.get=kne;Qm.prototype.has=Ene;Qm.prototype.set=wne;zl=Qm});function iFe(e,t){return e&&Fl(t,di(t),e)}var Ane,Rne=w(()=>{"use strict";$m();Uc();a(iFe,"baseAssign");Ane=iFe});function sFe(e,t){return e&&Fl(t,fa(t),e)}var Lne,Ine=w(()=>{"use strict";$m();mh();a(sFe,"baseAssignIn");Lne=sFe});function oFe(e,t){if(t)return e.slice();var r=e.length,n=Mne?Mne(r):new e.constructor(r);return e.copy(n),n}var One,Dne,aFe,Nne,Mne,NS,IM=w(()=>{"use strict";fo();One=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dne=One&&typeof module=="object"&&module&&!module.nodeType&&module,aFe=Dne&&Dne.exports===One,Nne=aFe?hi.Buffer:void 0,Mne=Nne?Nne.allocUnsafe:void 0;a(oFe,"cloneBuffer");NS=oFe});function lFe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r{"use strict";a(lFe,"arrayFilter");MS=lFe});function cFe(){return[]}var OS,NM=w(()=>{"use strict";a(cFe,"stubArray");OS=cFe});var uFe,hFe,Pne,dFe,Zm,PS=w(()=>{"use strict";DM();NM();uFe=Object.prototype,hFe=uFe.propertyIsEnumerable,Pne=Object.getOwnPropertySymbols,dFe=Pne?function(e){return e==null?[]:(e=Object(e),MS(Pne(e),function(t){return hFe.call(e,t)}))}:OS,Zm=dFe});function fFe(e,t){return Fl(e,Zm(e),t)}var Bne,$ne=w(()=>{"use strict";$m();PS();a(fFe,"copySymbols");Bne=fFe});var pFe,mFe,BS,MM=w(()=>{"use strict";LS();DS();PS();NM();pFe=Object.getOwnPropertySymbols,mFe=pFe?function(e){for(var t=[];e;)Ym(t,Zm(e)),e=Xm(e);return t}:OS,BS=mFe});function gFe(e,t){return Fl(e,BS(e),t)}var Fne,Gne=w(()=>{"use strict";$m();MM();a(gFe,"copySymbolsIn");Fne=gFe});function yFe(e,t,r){var n=t(e);return Mr(e)?n:Ym(n,r(e))}var $S,OM=w(()=>{"use strict";LS();Mi();a(yFe,"baseGetAllKeys");$S=yFe});function xFe(e){return $S(e,di,Zm)}var Rx,PM=w(()=>{"use strict";OM();PS();Uc();a(xFe,"getAllKeys");Rx=xFe});function bFe(e){return $S(e,fa,BS)}var Vne,zne=w(()=>{"use strict";OM();MM();mh();a(bFe,"getAllKeysIn");Vne=bFe});var TFe,FS,Une=w(()=>{"use strict";oh();fo();TFe=ha(hi,"DataView"),FS=TFe});var CFe,GS,Wne=w(()=>{"use strict";oh();fo();CFe=ha(hi,"Promise"),GS=CFe});var kFe,kh,BM=w(()=>{"use strict";oh();fo();kFe=ha(hi,"Set"),kh=kFe});var jne,SFe,qne,Hne,Yne,Kne,EFe,vFe,wFe,_Fe,AFe,of,Ua,lf=w(()=>{"use strict";Une();_S();Wne();BM();Lte();sh();mM();jne="[object Map]",SFe="[object Object]",qne="[object Promise]",Hne="[object Set]",Yne="[object WeakMap]",Kne="[object DataView]",EFe=Gc(FS),vFe=Gc(xh),wFe=Gc(GS),_Fe=Gc(kh),AFe=Gc(mS),of=qs;(FS&&of(new FS(new ArrayBuffer(1)))!=Kne||xh&&of(new xh)!=jne||GS&&of(GS.resolve())!=qne||kh&&of(new kh)!=Hne||mS&&of(new mS)!=Yne)&&(of=a(function(e){var t=qs(e),r=t==SFe?e.constructor:void 0,n=r?Gc(r):"";if(n)switch(n){case EFe:return Kne;case vFe:return jne;case wFe:return qne;case _Fe:return Hne;case AFe:return Yne}return t},"getTag"));Ua=of});function IFe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&LFe.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var RFe,LFe,Xne,Qne=w(()=>{"use strict";RFe=Object.prototype,LFe=RFe.hasOwnProperty;a(IFe,"initCloneArray");Xne=IFe});var DFe,Jm,$M=w(()=>{"use strict";fo();DFe=hi.Uint8Array,Jm=DFe});function NFe(e){var t=new e.constructor(e.byteLength);return new Jm(t).set(new Jm(e)),t}var eg,VS=w(()=>{"use strict";$M();a(NFe,"cloneArrayBuffer");eg=NFe});function MFe(e,t){var r=t?eg(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Zne,Jne=w(()=>{"use strict";VS();a(MFe,"cloneDataView");Zne=MFe});function PFe(e){var t=new e.constructor(e.source,OFe.exec(e));return t.lastIndex=e.lastIndex,t}var OFe,eie,tie=w(()=>{"use strict";OFe=/\w*$/;a(PFe,"cloneRegExp");eie=PFe});function BFe(e){return nie?Object(nie.call(e)):{}}var rie,nie,iie,sie=w(()=>{"use strict";rf();rie=os?os.prototype:void 0,nie=rie?rie.valueOf:void 0;a(BFe,"cloneSymbol");iie=BFe});function $Fe(e,t){var r=t?eg(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var zS,FM=w(()=>{"use strict";VS();a($Fe,"cloneTypedArray");zS=$Fe});function i9e(e,t,r){var n=e.constructor;switch(t){case HFe:return eg(e);case FFe:case GFe:return new n(+e);case YFe:return Zne(e,r);case KFe:case XFe:case QFe:case ZFe:case JFe:case e9e:case t9e:case r9e:case n9e:return zS(e,r);case VFe:return new n;case zFe:case jFe:return new n(e);case UFe:return eie(e);case WFe:return new n;case qFe:return iie(e)}}var FFe,GFe,VFe,zFe,UFe,WFe,jFe,qFe,HFe,YFe,KFe,XFe,QFe,ZFe,JFe,e9e,t9e,r9e,n9e,aie,oie=w(()=>{"use strict";VS();Jne();tie();sie();FM();FFe="[object Boolean]",GFe="[object Date]",VFe="[object Map]",zFe="[object Number]",UFe="[object RegExp]",WFe="[object Set]",jFe="[object String]",qFe="[object Symbol]",HFe="[object ArrayBuffer]",YFe="[object DataView]",KFe="[object Float32Array]",XFe="[object Float64Array]",QFe="[object Int8Array]",ZFe="[object Int16Array]",JFe="[object Int32Array]",e9e="[object Uint8Array]",t9e="[object Uint8ClampedArray]",r9e="[object Uint16Array]",n9e="[object Uint32Array]";a(i9e,"initCloneByTag");aie=i9e});function s9e(e){return typeof e.constructor=="function"&&!dh(e)?Dte(Xm(e)):{}}var US,GM=w(()=>{"use strict";Nte();DS();xx();a(s9e,"initCloneObject");US=s9e});function o9e(e){return bi(e)&&Ua(e)==a9e}var a9e,lie,cie=w(()=>{"use strict";lf();el();a9e="[object Map]";a(o9e,"baseIsMap");lie=o9e});var uie,l9e,hie,die=w(()=>{"use strict";cie();bx();kS();uie=zc&&zc.isMap,l9e=uie?fh(uie):lie,hie=l9e});function u9e(e){return bi(e)&&Ua(e)==c9e}var c9e,fie,pie=w(()=>{"use strict";lf();el();c9e="[object Set]";a(u9e,"baseIsSet");fie=u9e});var mie,h9e,gie,yie=w(()=>{"use strict";pie();bx();kS();mie=zc&&zc.isSet,h9e=mie?fh(mie):fie,gie=h9e});function WS(e,t,r,n,i,s){var o,l=t&d9e,u=t&f9e,h=t&p9e;if(r&&(o=i?r(e,n,i,s):r(e)),o!==void 0)return o;if(!jn(e))return e;var d=Mr(e);if(d){if(o=Xne(e),!l)return gS(e,o)}else{var f=Ua(e),p=f==bie||f==b9e;if(rl(e))return NS(e,l);if(f==Tie||f==xie||p&&!i){if(o=u||p?{}:US(e),!l)return u?Fne(e,Lne(o,e)):Bne(e,Ane(o,e))}else{if(!Ln[f])return i?e:{};o=aie(e,f,l)}}s||(s=new zl);var m=s.get(e);if(m)return m;s.set(e,o),gie(e)?e.forEach(function(x){o.add(WS(x,t,r,x,e,s))}):hie(e)&&e.forEach(function(x,b){o.set(b,WS(x,t,r,b,e,s))});var g=h?u?Vne:Rx:u?fa:di,y=d?void 0:g(e);return xS(y||e,function(x,b){y&&(b=x,x=e[b]),uh(o,b,WS(x,t,r,b,e,s))}),o}var d9e,f9e,p9e,xie,m9e,g9e,y9e,x9e,bie,b9e,T9e,C9e,Tie,k9e,S9e,E9e,v9e,w9e,_9e,A9e,R9e,L9e,I9e,D9e,N9e,M9e,O9e,P9e,B9e,Ln,Cie,kie=w(()=>{"use strict";Ax();TM();mx();Rne();Ine();IM();gM();$ne();Gne();PM();zne();lf();Qne();oie();GM();Mi();Vm();die();po();yie();Uc();mh();d9e=1,f9e=2,p9e=4,xie="[object Arguments]",m9e="[object Array]",g9e="[object Boolean]",y9e="[object Date]",x9e="[object Error]",bie="[object Function]",b9e="[object GeneratorFunction]",T9e="[object Map]",C9e="[object Number]",Tie="[object Object]",k9e="[object RegExp]",S9e="[object Set]",E9e="[object String]",v9e="[object Symbol]",w9e="[object WeakMap]",_9e="[object ArrayBuffer]",A9e="[object DataView]",R9e="[object Float32Array]",L9e="[object Float64Array]",I9e="[object Int8Array]",D9e="[object Int16Array]",N9e="[object Int32Array]",M9e="[object Uint8Array]",O9e="[object Uint8ClampedArray]",P9e="[object Uint16Array]",B9e="[object Uint32Array]",Ln={};Ln[xie]=Ln[m9e]=Ln[_9e]=Ln[A9e]=Ln[g9e]=Ln[y9e]=Ln[R9e]=Ln[L9e]=Ln[I9e]=Ln[D9e]=Ln[N9e]=Ln[T9e]=Ln[C9e]=Ln[Tie]=Ln[k9e]=Ln[S9e]=Ln[E9e]=Ln[v9e]=Ln[M9e]=Ln[O9e]=Ln[P9e]=Ln[B9e]=!0;Ln[x9e]=Ln[bie]=Ln[w9e]=!1;a(WS,"baseClone");Cie=WS});function G9e(e){return Cie(e,$9e|F9e)}var $9e,F9e,VM,Sie=w(()=>{"use strict";kie();$9e=1,F9e=4;a(G9e,"cloneDeep");VM=G9e});function z9e(e){return this.__data__.set(e,V9e),this}var V9e,Eie,vie=w(()=>{"use strict";V9e="__lodash_hash_undefined__";a(z9e,"setCacheAdd");Eie=z9e});function U9e(e){return this.__data__.has(e)}var wie,_ie=w(()=>{"use strict";a(U9e,"setCacheHas");wie=U9e});function jS(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new af;++t{"use strict";AS();vie();_ie();a(jS,"SetCache");jS.prototype.add=jS.prototype.push=Eie;jS.prototype.has=wie;qS=jS});function W9e(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";a(W9e,"arraySome");Aie=W9e});function j9e(e,t){return e.has(t)}var HS,UM=w(()=>{"use strict";a(j9e,"cacheHas");HS=j9e});function Y9e(e,t,r,n,i,s){var o=r&q9e,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&H9e?new qS:void 0;for(s.set(e,t),s.set(t,e);++f{"use strict";zM();Rie();UM();q9e=1,H9e=2;a(Y9e,"equalArrays");YS=Y9e});function K9e(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Lie,Iie=w(()=>{"use strict";a(K9e,"mapToArray");Lie=K9e});function X9e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var tg,KS=w(()=>{"use strict";a(X9e,"setToArray");tg=X9e});function uGe(e,t,r,n,i,s,o){switch(r){case cGe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lGe:return!(e.byteLength!=t.byteLength||!s(new Jm(e),new Jm(t)));case J9e:case eGe:case nGe:return mo(+e,+t);case tGe:return e.name==t.name&&e.message==t.message;case iGe:case aGe:return e==t+"";case rGe:var l=Lie;case sGe:var u=n&Q9e;if(l||(l=tg),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;n|=Z9e,o.set(e,t);var d=YS(l(e),l(t),n,i,s,o);return o.delete(e),d;case oGe:if(jM)return jM.call(e)==jM.call(t)}return!1}var Q9e,Z9e,J9e,eGe,tGe,rGe,nGe,iGe,sGe,aGe,oGe,lGe,cGe,Die,jM,Nie,Mie=w(()=>{"use strict";rf();$M();sf();WM();Iie();KS();Q9e=1,Z9e=2,J9e="[object Boolean]",eGe="[object Date]",tGe="[object Error]",rGe="[object Map]",nGe="[object Number]",iGe="[object RegExp]",sGe="[object Set]",aGe="[object String]",oGe="[object Symbol]",lGe="[object ArrayBuffer]",cGe="[object DataView]",Die=os?os.prototype:void 0,jM=Die?Die.valueOf:void 0;a(uGe,"equalByTag");Nie=uGe});function pGe(e,t,r,n,i,s){var o=r&hGe,l=Rx(e),u=l.length,h=Rx(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:fGe.call(t,p)))return!1}var m=s.get(e),g=s.get(t);if(m&&g)return m==t&&g==e;var y=!0;s.set(e,t),s.set(t,e);for(var x=o;++f{"use strict";PM();hGe=1,dGe=Object.prototype,fGe=dGe.hasOwnProperty;a(pGe,"equalObjects");Oie=pGe});function yGe(e,t,r,n,i,s){var o=Mr(e),l=Mr(t),u=o?$ie:Ua(e),h=l?$ie:Ua(t);u=u==Bie?XS:u,h=h==Bie?XS:h;var d=u==XS,f=h==XS,p=u==h;if(p&&rl(e)){if(!rl(t))return!1;o=!0,d=!1}if(p&&!d)return s||(s=new zl),o||ph(e)?YS(e,t,r,n,i,s):Nie(e,t,u,r,n,i,s);if(!(r&mGe)){var m=d&&Fie.call(e,"__wrapped__"),g=f&&Fie.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,x=g?t.value():t;return s||(s=new zl),i(y,x,r,n,s)}}return p?(s||(s=new zl),Oie(e,t,r,n,i,s)):!1}var mGe,Bie,$ie,XS,gGe,Fie,Gie,Vie=w(()=>{"use strict";Ax();WM();Mie();Pie();lf();Mi();Vm();Cx();mGe=1,Bie="[object Arguments]",$ie="[object Array]",XS="[object Object]",gGe=Object.prototype,Fie=gGe.hasOwnProperty;a(yGe,"baseIsEqualDeep");Gie=yGe});function zie(e,t,r,n,i){return e===t?!0:e==null||t==null||!bi(e)&&!bi(t)?e!==e&&t!==t:Gie(e,t,r,n,zie,i)}var QS,qM=w(()=>{"use strict";Vie();el();a(zie,"baseIsEqual");QS=zie});function TGe(e,t,r,n){var i=r.length,s=i,o=!n;if(e==null)return!s;for(e=Object(e);i--;){var l=r[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i{"use strict";Ax();qM();xGe=1,bGe=2;a(TGe,"baseIsMatch");Uie=TGe});function CGe(e){return e===e&&!jn(e)}var ZS,HM=w(()=>{"use strict";po();a(CGe,"isStrictComparable");ZS=CGe});function kGe(e){for(var t=di(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ZS(i)]}return t}var jie,qie=w(()=>{"use strict";HM();Uc();a(kGe,"getMatchData");jie=kGe});function SGe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var JS,YM=w(()=>{"use strict";a(SGe,"matchesStrictComparable");JS=SGe});function EGe(e){var t=jie(e);return t.length==1&&t[0][2]?JS(t[0][0],t[0][1]):function(r){return r===e||Uie(r,e,t)}}var Hie,Yie=w(()=>{"use strict";Wie();qie();YM();a(EGe,"baseMatches");Hie=EGe});function vGe(e,t){return e!=null&&t in Object(e)}var Kie,Xie=w(()=>{"use strict";a(vGe,"baseHasIn");Kie=vGe});function wGe(e,t,r){t=Th(t,e);for(var n=-1,i=t.length,s=!1;++n{"use strict";wx();Gm();Mi();fx();CS();Hm();a(wGe,"hasPath");eE=wGe});function _Ge(e,t){return e!=null&&eE(e,t,Kie)}var tE,XM=w(()=>{"use strict";Xie();KM();a(_Ge,"hasIn");tE=_Ge});function LGe(e,t){return Um(e)&&ZS(t)?JS(Vl(e),t):function(r){var n=nne(r,e);return n===void 0&&n===t?tE(r,e):QS(t,n,AGe|RGe)}}var AGe,RGe,Qie,Zie=w(()=>{"use strict";qM();ine();XM();wS();HM();YM();Hm();AGe=1,RGe=2;a(LGe,"baseMatchesProperty");Qie=LGe});function IGe(e){return function(t){return t?.[e]}}var rE,QM=w(()=>{"use strict";a(IGe,"baseProperty");rE=IGe});function DGe(e){return function(t){return Ch(t,e)}}var Jie,ese=w(()=>{"use strict";_x();a(DGe,"basePropertyDeep");Jie=DGe});function NGe(e){return Um(e)?rE(Vl(e)):Jie(e)}var tse,rse=w(()=>{"use strict";QM();ese();wS();Hm();a(NGe,"property");tse=NGe});function MGe(e){return typeof e=="function"?e:e==null?ua:typeof e=="object"?Mr(e)?Qie(e[0],e[1]):Hie(e):tse(e)}var As,jc=w(()=>{"use strict";Yie();Zie();ah();Mi();rse();a(MGe,"baseIteratee");As=MGe});function OGe(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(s[u],u,s)===!1)break}return t}}var nse,ise=w(()=>{"use strict";a(OGe,"createBaseFor");nse=OGe});var PGe,rg,nE=w(()=>{"use strict";ise();PGe=nse(),rg=PGe});function BGe(e,t){return e&&rg(e,t,di)}var ng,iE=w(()=>{"use strict";nE();Uc();a(BGe,"baseForOwn");ng=BGe});function $Ge(e,t){return function(r,n){if(r==null)return r;if(!ls(r))return e(r,n);for(var i=r.length,s=t?i:-1,o=Object(r);(t?s--:++s{"use strict";Gl();a($Ge,"createBaseEach");sse=$Ge});var FGe,Sh,Lx=w(()=>{"use strict";iE();ase();FGe=sse(ng),Sh=FGe});var GGe,sE,ose=w(()=>{"use strict";fo();GGe=a(function(){return hi.Date.now()},"now"),sE=GGe});var lse,VGe,zGe,ZM,cse=w(()=>{"use strict";gx();sf();yx();mh();lse=Object.prototype,VGe=lse.hasOwnProperty,zGe=hh(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Vc(t[0],t[1],i)&&(n=1);++r{"use strict";px();sf();a(UGe,"assignMergeValue");Ix=UGe});function WGe(e){return bi(e)&&ls(e)}var aE,eO=w(()=>{"use strict";Gl();el();a(WGe,"isArrayLikeObject");aE=WGe});function jGe(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Dx,tO=w(()=>{"use strict";a(jGe,"safeGet");Dx=jGe});function qGe(e){return Fl(e,fa(e))}var use,hse=w(()=>{"use strict";$m();mh();a(qGe,"toPlainObject");use=qGe});function HGe(e,t,r,n,i,s,o){var l=Dx(e,r),u=Dx(t,r),h=o.get(u);if(h){Ix(e,r,h);return}var d=s?s(l,u,r+"",e,t,o):void 0,f=d===void 0;if(f){var p=Mr(u),m=!p&&rl(u),g=!p&&!m&&ph(u);d=u,p||m||g?Mr(l)?d=l:aE(l)?d=gS(l):m?(f=!1,d=NS(u,!0)):g?(f=!1,d=zS(u,!0)):d=[]:dne(u)||tl(u)?(d=l,tl(l)?d=use(l):(!jn(l)||$l(l))&&(d=US(u))):f=!1}f&&(o.set(u,d),i(d,u,n,s,o),o.delete(u)),Ix(e,r,d)}var dse,fse=w(()=>{"use strict";JM();IM();FM();gM();GM();Gm();Mi();eO();Vm();dx();po();fne();Cx();tO();hse();a(HGe,"baseMergeDeep");dse=HGe});function pse(e,t,r,n,i){e!==t&&rg(t,function(s,o){if(i||(i=new zl),jn(s))dse(e,t,o,r,pse,n,i);else{var l=n?n(Dx(e,o),s,o+"",e,t,i):void 0;l===void 0&&(l=s),Ix(e,o,l)}},fa)}var mse,gse=w(()=>{"use strict";Ax();JM();nE();fse();po();mh();tO();a(pse,"baseMerge");mse=pse});function YGe(e,t,r){for(var n=-1,i=e==null?0:e.length;++n{"use strict";a(YGe,"arrayIncludesWith");yse=YGe});function KGe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Eh,bse=w(()=>{"use strict";a(KGe,"last");Eh=KGe});function XGe(e){return typeof e=="function"?e:ua}var ig,oE=w(()=>{"use strict";ah();a(XGe,"castFunction");ig=XGe});function QGe(e,t){var r=Mr(e)?xS:Sh;return r(e,ig(t))}var rt,rO=w(()=>{"use strict";TM();Lx();oE();Mi();a(QGe,"forEach");rt=QGe});var Tse=w(()=>{"use strict";rO()});function ZGe(e,t){var r=[];return Sh(e,function(n,i,s){t(n,i,s)&&r.push(n)}),r}var Cse,kse=w(()=>{"use strict";Lx();a(ZGe,"baseFilter");Cse=ZGe});function JGe(e,t){var r=Mr(e)?MS:Cse;return r(e,As(t,3))}var Hs,Sse=w(()=>{"use strict";DM();kse();jc();Mi();a(JGe,"filter");Hs=JGe});function eVe(e){return function(t,r,n){var i=Object(t);if(!ls(t)){var s=As(r,3);t=di(t),r=a(function(l){return s(i[l],l,i)},"predicate")}var o=e(t,r,n);return o>-1?i[s?t[o]:o]:void 0}}var Ese,vse=w(()=>{"use strict";jc();Gl();Uc();a(eVe,"createFind");Ese=eVe});function rVe(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Tte(r);return i<0&&(i=tVe(n+i,0)),bS(e,As(t,3),i)}var tVe,wse,_se=w(()=>{"use strict";CM();jc();Cte();tVe=Math.max;a(rVe,"findIndex");wse=rVe});var nVe,sg,Ase=w(()=>{"use strict";vse();_se();nVe=Ese(wse),sg=nVe});function iVe(e,t){var r=-1,n=ls(e)?Array(e.length):[];return Sh(e,function(i,s,o){n[++r]=t(i,s,o)}),n}var lE,nO=w(()=>{"use strict";Lx();Gl();a(iVe,"baseMap");lE=iVe});function sVe(e,t){var r=Mr(e)?Bl:lE;return r(e,As(t,3))}var xn,Rse=w(()=>{"use strict";hx();jc();nO();Mi();a(sVe,"map");xn=sVe});function aVe(e,t){return e==null?e:rg(e,ig(t),fa)}var iO,Lse=w(()=>{"use strict";nE();oE();mh();a(aVe,"forIn");iO=aVe});function oVe(e,t){return e&&ng(e,ig(t))}var sO,Ise=w(()=>{"use strict";iE();oE();a(oVe,"forOwn");sO=oVe});function lVe(e,t){return e>t}var Dse,Nse=w(()=>{"use strict";a(lVe,"baseGt");Dse=lVe});function hVe(e,t){return e!=null&&uVe.call(e,t)}var cVe,uVe,Mse,Ose=w(()=>{"use strict";cVe=Object.prototype,uVe=cVe.hasOwnProperty;a(hVe,"baseHas");Mse=hVe});function dVe(e,t){return e!=null&&eE(e,t,Mse)}var Nx,Pse=w(()=>{"use strict";Ose();KM();a(dVe,"has");Nx=dVe});function pVe(e){return typeof e=="string"||!Mr(e)&&bi(e)&&qs(e)==fVe}var fVe,Bse,$se=w(()=>{"use strict";sh();Mi();el();fVe="[object String]";a(pVe,"isString");Bse=pVe});function mVe(e,t){return Bl(t,function(r){return e[r]})}var Fse,Gse=w(()=>{"use strict";hx();a(mVe,"baseValues");Fse=mVe});function gVe(e){return e==null?[]:Fse(e,di(e))}var Wa,Vse=w(()=>{"use strict";Gse();Uc();a(gVe,"values");Wa=gVe});function CVe(e){if(e==null)return!0;if(ls(e)&&(Mr(e)||typeof e=="string"||typeof e.splice=="function"||rl(e)||ph(e)||tl(e)))return!e.length;var t=Ua(e);if(t==yVe||t==xVe)return!e.size;if(dh(e))return!zm(e).length;for(var r in e)if(TVe.call(e,r))return!1;return!0}var yVe,xVe,bVe,TVe,cE,zse=w(()=>{"use strict";vS();lf();Gm();Mi();Gl();Vm();xx();Cx();yVe="[object Map]",xVe="[object Set]",bVe=Object.prototype,TVe=bVe.hasOwnProperty;a(CVe,"isEmpty");cE=CVe});function kVe(e){return e===void 0}var fi,Use=w(()=>{"use strict";a(kVe,"isUndefined");fi=kVe});function SVe(e,t){return e{"use strict";a(SVe,"baseLt");uE=SVe});function EVe(e,t){var r={};return t=As(t,3),ng(e,function(n,i,s){ch(r,i,t(n,i,s))}),r}var cf,Wse=w(()=>{"use strict";px();iE();jc();a(EVe,"mapValues");cf=EVe});function vVe(e,t,r){for(var n=-1,i=e.length;++n{"use strict";nf();a(vVe,"baseExtremum");ag=vVe});function wVe(e){return e&&e.length?ag(e,ua,Dse):void 0}var pa,jse=w(()=>{"use strict";hE();Nse();ah();a(wVe,"max");pa=wVe});var _Ve,og,qse=w(()=>{"use strict";gse();Zte();_Ve=Qte(function(e,t,r){mse(e,t,r)}),og=_Ve});function AVe(e){return e&&e.length?ag(e,ua,uE):void 0}var qc,Hse=w(()=>{"use strict";hE();aO();ah();a(AVe,"min");qc=AVe});function RVe(e,t){return e&&e.length?ag(e,As(t,2),uE):void 0}var uf,Yse=w(()=>{"use strict";hE();jc();aO();a(RVe,"minBy");uf=RVe});function LVe(e,t,r,n){if(!jn(e))return e;t=Th(t,e);for(var i=-1,s=t.length,o=s-1,l=e;l!=null&&++i{"use strict";mx();wx();fx();po();Hm();a(LVe,"baseSet");Kse=LVe});function IVe(e,t,r){for(var n=-1,i=t.length,s={};++n{"use strict";_x();Xse();wx();a(IVe,"basePickBy");Qse=IVe});function DVe(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Jse,eae=w(()=>{"use strict";a(DVe,"baseSortBy");Jse=DVe});function NVe(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,s=za(e),o=t!==void 0,l=t===null,u=t===t,h=za(t);if(!l&&!h&&!s&&e>t||s&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!s&&!h&&e{"use strict";nf();a(NVe,"compareAscending");tae=NVe});function MVe(e,t,r){for(var n=-1,i=e.criteria,s=t.criteria,o=i.length,l=r.length;++n=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return e.index-t.index}var nae,iae=w(()=>{"use strict";rae();a(MVe,"compareMultiple");nae=MVe});function OVe(e,t,r){t.length?t=Bl(t,function(s){return Mr(s)?function(o){return Ch(o,s.length===1?s[0]:s)}:s}):t=[ua];var n=-1;t=Bl(t,fh(As));var i=lE(e,function(s,o,l){var u=Bl(t,function(h){return h(s)});return{criteria:u,index:++n,value:s}});return Jse(i,function(s,o){return nae(s,o,r)})}var sae,aae=w(()=>{"use strict";hx();_x();jc();nO();eae();bx();iae();ah();Mi();a(OVe,"baseOrderBy");sae=OVe});var PVe,oae,lae=w(()=>{"use strict";QM();PVe=rE("length"),oae=PVe});function YVe(e){for(var t=cae.lastIndex=0;cae.test(e);)++t;return t}var uae,BVe,$Ve,FVe,GVe,VVe,zVe,oO,lO,UVe,hae,dae,fae,WVe,pae,mae,jVe,qVe,HVe,cae,gae,yae=w(()=>{"use strict";uae="\\ud800-\\udfff",BVe="\\u0300-\\u036f",$Ve="\\ufe20-\\ufe2f",FVe="\\u20d0-\\u20ff",GVe=BVe+$Ve+FVe,VVe="\\ufe0e\\ufe0f",zVe="["+uae+"]",oO="["+GVe+"]",lO="\\ud83c[\\udffb-\\udfff]",UVe="(?:"+oO+"|"+lO+")",hae="[^"+uae+"]",dae="(?:\\ud83c[\\udde6-\\uddff]){2}",fae="[\\ud800-\\udbff][\\udc00-\\udfff]",WVe="\\u200d",pae=UVe+"?",mae="["+VVe+"]?",jVe="(?:"+WVe+"(?:"+[hae,dae,fae].join("|")+")"+mae+pae+")*",qVe=mae+pae+jVe,HVe="(?:"+[hae+oO+"?",oO,dae,fae,zVe].join("|")+")",cae=RegExp(lO+"(?="+lO+")|"+HVe+qVe,"g");a(YVe,"unicodeSize");gae=YVe});function KVe(e){return pne(e)?gae(e):oae(e)}var xae,bae=w(()=>{"use strict";lae();mne();yae();a(KVe,"stringSize");xae=KVe});function XVe(e,t){return Qse(e,t,function(r,n){return tE(e,n)})}var Tae,Cae=w(()=>{"use strict";Zse();XM();a(XVe,"basePick");Tae=XVe});var QVe,hf,kae=w(()=>{"use strict";Cae();une();QVe=cne(function(e,t){return e==null?{}:Tae(e,t)}),hf=QVe});function eze(e,t,r,n){for(var i=-1,s=JVe(ZVe((t-e)/(r||1)),0),o=Array(s);s--;)o[n?s:++i]=e,e+=r;return o}var ZVe,JVe,Sae,Eae=w(()=>{"use strict";ZVe=Math.ceil,JVe=Math.max;a(eze,"baseRange");Sae=eze});function tze(e){return function(t,r,n){return n&&typeof n!="number"&&Vc(t,r,n)&&(r=n=void 0),t=Pm(t),r===void 0?(r=t,t=0):r=Pm(r),n=n===void 0?t{"use strict";Eae();yx();pM();a(tze,"createRange");vae=tze});var rze,yo,_ae=w(()=>{"use strict";wae();rze=vae(),yo=rze});function nze(e,t,r,n,i){return i(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}var Aae,Rae=w(()=>{"use strict";a(nze,"baseReduce");Aae=nze});function ize(e,t,r){var n=Mr(e)?gne:Aae,i=arguments.length<3;return n(e,As(t,4),r,i,Sh)}var Ul,Lae=w(()=>{"use strict";yne();Lx();jc();Rae();Mi();a(ize,"reduce");Ul=ize});function oze(e){if(e==null)return 0;if(ls(e))return Bse(e)?xae(e):e.length;var t=Ua(e);return t==sze||t==aze?e.size:zm(e).length}var sze,aze,cO,Iae=w(()=>{"use strict";vS();lf();Gl();$se();bae();sze="[object Map]",aze="[object Set]";a(oze,"size");cO=oze});var lze,Wl,Dae=w(()=>{"use strict";IS();aae();gx();yx();lze=hh(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Vc(e,t[0],t[1])?t=[]:r>2&&Vc(t[0],t[1],t[2])&&(t=[t[0]]),sae(e,Km(t,1),[])}),Wl=lze});var cze,uze,Nae,Mae=w(()=>{"use strict";BM();Bte();KS();cze=1/0,uze=kh&&1/tg(new kh([,-0]))[1]==cze?function(e){return new kh(e)}:Pte,Nae=uze});function dze(e,t,r){var n=-1,i=Yte,s=e.length,o=!0,l=[],u=l;if(r)o=!1,i=yse;else if(s>=hze){var h=t?null:Nae(e);if(h)return tg(h);o=!1,i=HS,u=new qS}else u=t?[]:l;e:for(;++n{"use strict";zM();Kte();xse();UM();Mae();KS();hze=200;a(dze,"baseUniq");Oae=dze});var fze,uO,Bae=w(()=>{"use strict";IS();gx();Pae();eO();fze=hh(function(e){return Oae(Km(e,1,aE,!0))}),uO=fze});function mze(e){var t=++pze;return RS(e)+t}var pze,df,$ae=w(()=>{"use strict";RM();pze=0;a(mze,"uniqueId");df=mze});function gze(e,t,r){for(var n=-1,i=e.length,s=t.length,o={};++n{"use strict";a(gze,"baseZipObject");Fae=gze});function yze(e,t){return Fae(e||[],t||[],uh)}var dE,Vae=w(()=>{"use strict";mx();Gae();a(yze,"zipObject");dE=yze});var bn=w(()=>{"use strict";Sie();yM();cse();Tse();Sse();Ase();LM();rO();Lse();Ise();Pse();Mi();zse();dx();Use();Uc();bse();Rse();Wse();jse();qse();Hse();Yse();ose();kae();_ae();Lae();Iae();Dae();Bae();$ae();Vse();Vae();});function Uae(e,t){e[t]?e[t]++:e[t]=1}function Wae(e,t){--e[t]||delete e[t]}function Mx(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var o=i;i=s,s=o}return i+zae+s+zae+(fi(n)?xze:n)}function bze(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var o=i;i=s,s=o}var l={v:i,w:s};return n&&(l.name=n),l}function hO(e,t){return Mx(e,t.v,t.w,t.name)}var xze,ff,zae,Tn,dO=w(()=>{"use strict";bn();xze="\0",ff="\0",zae="",Tn=class{static{a(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=da(void 0),this._defaultEdgeLabelFn=da(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ff]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return $l(t)||(t=da(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return di(this._nodes)}sources(){var t=this;return Hs(this.nodes(),function(r){return cE(t._in[r])})}sinks(){var t=this;return Hs(this.nodes(),function(r){return cE(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return rt(t,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=ff,this._children[t]={},this._children[ff][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=a(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],rt(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),rt(di(this._in[t]),r),delete this._in[t],delete this._preds[t],rt(di(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(fi(r))r=ff;else{r+="";for(var n=r;!fi(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==ff)return r}}children(t){if(fi(t)&&(t=ff),this._isCompound){var r=this._children[t];if(r)return di(r)}else{if(t===ff)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return di(r)}successors(t){var r=this._sucs[t];if(r)return di(r)}neighbors(t){var r=this.predecessors(t);if(r)return uO(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;rt(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),rt(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function s(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:s(l)}return a(s,"findParent"),this._isCompound&&rt(r.nodes(),function(o){r.setParent(o,s(o))}),r}setDefaultEdgeLabel(t){return $l(t)||(t=da(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Wa(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Ul(t,function(s,o){return i.length>1?n.setEdge(s,o,r):n.setEdge(s,o),o}),this}setEdge(){var t,r,n,i,s=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,fi(n)||(n=""+n);var l=Mx(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!fi(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=bze(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,Uae(this._preds[r],t),Uae(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?hO(this._isDirected,arguments[0]):Mx(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?hO(this._isDirected,arguments[0]):Mx(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?hO(this._isDirected,arguments[0]):Mx(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Wae(this._preds[r],t),Wae(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=Wa(n);return r?Hs(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=Wa(n);return r?Hs(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};Tn.prototype._nodeCount=0;Tn.prototype._edgeCount=0;a(Uae,"incrementOrInitEntry");a(Wae,"decrementOrRemoveEntry");a(Mx,"edgeArgsToId");a(bze,"edgeArgsToObj");a(hO,"edgeObjToId")});var xo=w(()=>{"use strict";dO()});function jae(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Tze(e,t){if(e!=="_next"&&e!=="_prev")return t}var pE,qae=w(()=>{"use strict";pE=class{static{a(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return jae(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&jae(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,n=r._prev;n!==r;)t.push(JSON.stringify(n,Tze)),n=n._prev;return"["+t.join(", ")+"]"}};a(jae,"unlink");a(Tze,"filterOutLinks")});function Hae(e,t){if(e.nodeCount()<=1)return[];var r=Sze(e,t||Cze),n=kze(r.graph,r.buckets,r.zeroIdx);return go(xn(n,function(i){return e.outEdges(i.v,i.w)}))}function kze(e,t,r){for(var n=[],i=t[t.length-1],s=t[0],o;e.nodeCount();){for(;o=s.dequeue();)fO(e,t,r,o);for(;o=i.dequeue();)fO(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){n=n.concat(fO(e,t,r,o,!0));break}}}return n}function fO(e,t,r,n,i){var s=i?[]:void 0;return rt(e.inEdges(n.v),function(o){var l=e.edge(o),u=e.node(o.v);i&&s.push({v:o.v,w:o.w}),u.out-=l,pO(t,r,u)}),rt(e.outEdges(n.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,pO(t,r,h)}),e.removeNode(n.v),s}function Sze(e,t){var r=new Tn,n=0,i=0;rt(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),rt(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),d=u+h;r.setEdge(l.v,l.w,d),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var s=yo(i+n+3).map(function(){return new pE}),o=n+1;return rt(r.nodes(),function(l){pO(s,o,r.node(l))}),{graph:r,buckets:s,zeroIdx:o}}function pO(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var Cze,Yae=w(()=>{"use strict";bn();xo();qae();Cze=da(1);a(Hae,"greedyFAS");a(kze,"doGreedyFAS");a(fO,"removeNode");a(Sze,"buildState");a(pO,"assignBucket")});function Kae(e){var t=e.graph().acyclicer==="greedy"?Hae(e,r(e)):Eze(e);rt(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,df("rev"))});function r(n){return function(i){return n.edge(i).weight}}a(r,"weightFn")}function Eze(e){var t=[],r={},n={};function i(s){Object.prototype.hasOwnProperty.call(n,s)||(n[s]=!0,r[s]=!0,rt(e.outEdges(s),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):i(o.w)}),delete r[s])}return a(i,"dfs"),rt(e.nodes(),i),t}function Xae(e){rt(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var mO=w(()=>{"use strict";bn();Yae();a(Kae,"run");a(Eze,"dfsFAS");a(Xae,"undo")});function jl(e,t,r,n){var i;do i=df(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function Zae(e){var t=new Tn().setGraph(e.graph());return rt(e.nodes(),function(r){t.setNode(r,e.node(r))}),rt(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function mE(e){var t=new Tn({multigraph:e.isMultigraph()}).setGraph(e.graph());return rt(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),rt(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function gO(e,t){var r=e.x,n=e.y,i=t.x-r,s=t.y-n,o=e.width/2,l=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(s)*o>Math.abs(i)*l?(s<0&&(l=-l),u=l*i/s,h=l):(i<0&&(o=-o),u=o,h=o*s/i),{x:r+u,y:n+h}}function vh(e){var t=xn(yo(xO(e)+1),function(){return[]});return rt(e.nodes(),function(r){var n=e.node(r),i=n.rank;fi(i)||(t[i][n.order]=r)}),t}function Jae(e){var t=qc(xn(e.nodes(),function(r){return e.node(r).rank}));rt(e.nodes(),function(r){var n=e.node(r);Nx(n,"rank")&&(n.rank-=t)})}function eoe(e){var t=qc(xn(e.nodes(),function(s){return e.node(s).rank})),r=[];rt(e.nodes(),function(s){var o=e.node(s).rank-t;r[o]||(r[o]=[]),r[o].push(s)});var n=0,i=e.graph().nodeRankFactor;rt(r,function(s,o){fi(s)&&o%i!==0?--n:n&&rt(s,function(l){e.node(l).rank+=n})})}function yO(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),jl(e,"border",i,t)}function xO(e){return pa(xn(e.nodes(),function(t){var r=e.node(t).rank;if(!fi(r))return r}))}function toe(e,t){var r={lhs:[],rhs:[]};return rt(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function roe(e,t){var r=sE();try{return t()}finally{console.log(e+" time: "+(sE()-r)+"ms")}}function noe(e,t){return t()}var ql=w(()=>{"use strict";bn();xo();a(jl,"addDummyNode");a(Zae,"simplify");a(mE,"asNonCompoundGraph");a(gO,"intersectRect");a(vh,"buildLayerMatrix");a(Jae,"normalizeRanks");a(eoe,"removeEmptyRanks");a(yO,"addBorderNode");a(xO,"maxRank");a(toe,"partition");a(roe,"time");a(noe,"notime")});function soe(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&rt(n,t),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,o=i.maxRank+1;s{"use strict";bn();ql();a(soe,"addBorderSegments");a(ioe,"addBorderNode")});function loe(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&uoe(e)}function coe(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&vze(e),(t==="lr"||t==="rl")&&(wze(e),uoe(e))}function uoe(e){rt(e.nodes(),function(t){ooe(e.node(t))}),rt(e.edges(),function(t){ooe(e.edge(t))})}function ooe(e){var t=e.width;e.width=e.height,e.height=t}function vze(e){rt(e.nodes(),function(t){bO(e.node(t))}),rt(e.edges(),function(t){var r=e.edge(t);rt(r.points,bO),Object.prototype.hasOwnProperty.call(r,"y")&&bO(r)})}function bO(e){e.y=-e.y}function wze(e){rt(e.nodes(),function(t){TO(e.node(t))}),rt(e.edges(),function(t){var r=e.edge(t);rt(r.points,TO),Object.prototype.hasOwnProperty.call(r,"x")&&TO(r)})}function TO(e){var t=e.x;e.x=e.y,e.y=t}var hoe=w(()=>{"use strict";bn();a(loe,"adjust");a(coe,"undo");a(uoe,"swapWidthHeight");a(ooe,"swapWidthHeightOne");a(vze,"reverseY");a(bO,"reverseYOne");a(wze,"swapXY");a(TO,"swapXYOne")});function doe(e){e.graph().dummyChains=[],rt(e.edges(),function(t){Aze(e,t)})}function Aze(e,t){var r=t.v,n=e.node(r).rank,i=t.w,s=e.node(i).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(s!==n+1){e.removeEdge(t);var h=void 0,d,f;for(f=0,++n;n{"use strict";bn();ql();a(doe,"run");a(Aze,"normalizeEdge");a(foe,"undo")});function Ox(e){var t={};function r(n){var i=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return i.rank;t[n]=!0;var s=qc(xn(e.outEdges(n),function(o){return r(o.w)-e.edge(o).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),i.rank=s}a(r,"dfs"),rt(e.sources(),r)}function pf(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var gE=w(()=>{"use strict";bn();a(Ox,"longestPath");a(pf,"slack")});function yE(e){var t=new Tn({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,s;Rze(t,e){"use strict";bn();xo();gE();a(yE,"feasibleTree");a(Rze,"tightTree");a(Lze,"findMinSlackEdge");a(Ize,"shiftRanks")});var moe=w(()=>{"use strict"});var SO=w(()=>{"use strict"});var For,EO=w(()=>{"use strict";bn();SO();For=da(1)});var goe=w(()=>{"use strict";EO()});var vO=w(()=>{"use strict"});var yoe=w(()=>{"use strict";vO()});var Xor,xoe=w(()=>{"use strict";bn();Xor=da(1)});function wO(e){var t={},r={},n=[];function i(s){if(Object.prototype.hasOwnProperty.call(r,s))throw new Px;Object.prototype.hasOwnProperty.call(t,s)||(r[s]=!0,t[s]=!0,rt(e.predecessors(s),i),delete r[s],n.push(s))}if(a(i,"visit"),rt(e.sinks(),i),cO(t)!==e.nodeCount())throw new Px;return n}function Px(){}var _O=w(()=>{"use strict";bn();wO.CycleException=Px;a(wO,"topsort");a(Px,"CycleException");Px.prototype=new Error});var boe=w(()=>{"use strict";_O()});function xE(e,t,r){Mr(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return rt(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);Toe(e,o,r==="post",s,n,i)}),i}function Toe(e,t,r,n,i,s){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||s.push(t),rt(i(t),function(o){Toe(e,o,r,n,i,s)}),r&&s.push(t))}var AO=w(()=>{"use strict";bn();a(xE,"dfs");a(Toe,"doDfs")});function RO(e,t){return xE(e,t,"post")}var Coe=w(()=>{"use strict";AO();a(RO,"postorder")});function LO(e,t){return xE(e,t,"pre")}var koe=w(()=>{"use strict";AO();a(LO,"preorder")});var Soe=w(()=>{"use strict";SO();dO()});var Eoe=w(()=>{"use strict";moe();EO();goe();yoe();xoe();boe();Coe();koe();Soe();vO();_O()});function _h(e){e=Zae(e),Ox(e);var t=yE(e);DO(t),IO(t,e);for(var r,n;r=Aoe(t);)n=Roe(t,e,r),Loe(t,e,r,n)}function IO(e,t){var r=RO(e,e.nodes());r=r.slice(0,r.length-1),rt(r,function(n){Pze(e,t,n)})}function Pze(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=woe(e,t,r)}function woe(e,t,r){var n=e.node(r),i=n.parent,s=!0,o=t.edge(r,i),l=0;return o||(s=!1,o=t.edge(i,r)),l=o.weight,rt(t.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==i){var f=h===s,p=t.edge(u).weight;if(l+=f?p:-p,$ze(e,r,d)){var m=e.edge(r,d).cutvalue;l+=f?-m:m}}}),l}function DO(e,t){arguments.length<2&&(t=e.nodes()[0]),_oe(e,{},1,t)}function _oe(e,t,r,n,i){var s=r,o=e.node(n);return t[n]=!0,rt(e.neighbors(n),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=_oe(e,t,r,l,n))}),o.low=s,o.lim=r++,i?o.parent=i:delete o.parent,r}function Aoe(e){return sg(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Roe(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var s=e.node(n),o=e.node(i),l=s,u=!1;s.lim>o.lim&&(l=o,u=!0);var h=Hs(t.edges(),function(d){return u===voe(e,e.node(d.v),l)&&u!==voe(e,e.node(d.w),l)});return uf(h,function(d){return pf(t,d)})}function Loe(e,t,r,n){var i=r.v,s=r.w;e.removeEdge(i,s),e.setEdge(n.v,n.w,{}),DO(e),IO(e,t),Bze(e,t)}function Bze(e,t){var r=sg(e.nodes(),function(i){return!t.node(i).parent}),n=LO(e,r);n=n.slice(1),rt(n,function(i){var s=e.node(i).parent,o=t.edge(i,s),l=!1;o||(o=t.edge(s,i),l=!0),t.node(i).rank=t.node(s).rank+(l?o.minlen:-o.minlen)})}function $ze(e,t,r){return e.hasEdge(t,r)}function voe(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var Ioe=w(()=>{"use strict";bn();Eoe();ql();kO();gE();_h.initLowLimValues=DO;_h.initCutValues=IO;_h.calcCutValue=woe;_h.leaveEdge=Aoe;_h.enterEdge=Roe;_h.exchangeEdges=Loe;a(_h,"networkSimplex");a(IO,"initCutValues");a(Pze,"assignCutValue");a(woe,"calcCutValue");a(DO,"initLowLimValues");a(_oe,"dfsAssignLowLim");a(Aoe,"leaveEdge");a(Roe,"enterEdge");a(Loe,"exchangeEdges");a(Bze,"updateRanks");a($ze,"isTreeEdge");a(voe,"isDescendant")});function NO(e){switch(e.graph().ranker){case"network-simplex":Doe(e);break;case"tight-tree":Gze(e);break;case"longest-path":Fze(e);break;default:Doe(e)}}function Gze(e){Ox(e),yE(e)}function Doe(e){_h(e)}var Fze,MO=w(()=>{"use strict";kO();Ioe();gE();a(NO,"rank");Fze=Ox;a(Gze,"tightTreeRanker");a(Doe,"networkSimplexRanker")});function Noe(e){var t=jl(e,"root",{},"_root"),r=Vze(e),n=pa(Wa(r))-1,i=2*n+1;e.graph().nestingRoot=t,rt(e.edges(),function(o){e.edge(o).minlen*=i});var s=zze(e)+1;rt(e.children(),function(o){Moe(e,t,i,s,n,r,o)}),e.graph().nodeRankFactor=i}function Moe(e,t,r,n,i,s,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=yO(e,"_bt"),h=yO(e,"_bb"),d=e.node(o);e.setParent(u,o),d.borderTop=u,e.setParent(h,o),d.borderBottom=h,rt(l,function(f){Moe(e,t,r,n,i,s,f);var p=e.node(f),m=p.borderTop?p.borderTop:f,g=p.borderBottom?p.borderBottom:f,y=p.borderTop?n:2*n,x=m!==g?1:i-s[o]+1;e.setEdge(u,m,{weight:y,minlen:x,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:x,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:i+s[o]})}function Vze(e){var t={};function r(n,i){var s=e.children(n);s&&s.length&&rt(s,function(o){r(o,i+1)}),t[n]=i}return a(r,"dfs"),rt(e.children(),function(n){r(n,1)}),t}function zze(e){return Ul(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function Ooe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,rt(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var Poe=w(()=>{"use strict";bn();ql();a(Noe,"run");a(Moe,"dfs");a(Vze,"treeDepths");a(zze,"sumWeights");a(Ooe,"cleanup")});function Boe(e,t,r){var n={},i;rt(r,function(s){for(var o=e.parent(s),l,u;o;){if(l=e.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var $oe=w(()=>{"use strict";bn();a(Boe,"addSubgraphConstraints")});function Foe(e,t,r){var n=Wze(e),i=new Tn({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(s){return e.node(s)});return rt(e.nodes(),function(s){var o=e.node(s),l=e.parent(s);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(s),i.setParent(s,l||n),rt(e[r](s),function(u){var h=u.v===s?u.w:u.v,d=i.edge(h,s),f=fi(d)?0:d.weight;i.setEdge(h,s,{weight:e.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(s,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function Wze(e){for(var t;e.hasNode(t=df("_root")););return t}var Goe=w(()=>{"use strict";bn();xo();a(Foe,"buildLayerGraph");a(Wze,"createRootNode")});function Voe(e,t){for(var r=0,n=1;n0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=h.weight;u+=h.weight*f})),u}var zoe=w(()=>{"use strict";bn();a(Voe,"crossCount");a(jze,"twoLayerCrossCount")});function Uoe(e){var t={},r=Hs(e.nodes(),function(l){return!e.children(l).length}),n=pa(xn(r,function(l){return e.node(l).rank})),i=xn(yo(n+1),function(){return[]});function s(l){if(!Nx(t,l)){t[l]=!0;var u=e.node(l);i[u.rank].push(l),rt(e.successors(l),s)}}a(s,"dfs");var o=Wl(r,function(l){return e.node(l).rank});return rt(o,s),i}var Woe=w(()=>{"use strict";bn();a(Uoe,"initOrder")});function joe(e,t){return xn(t,function(r){var n=e.inEdges(r);if(n.length){var i=Ul(n,function(s,o){var l=e.edge(o),u=e.node(o.v);return{sum:s.sum+l.weight*u.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var qoe=w(()=>{"use strict";bn();a(joe,"barycenter")});function Hoe(e,t){var r={};rt(e,function(i,s){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:s};fi(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),rt(t.edges(),function(i){var s=r[i.v],o=r[i.w];!fi(s)&&!fi(o)&&(o.indegree++,s.out.push(r[i.w]))});var n=Hs(r,function(i){return!i.indegree});return qze(n)}function qze(e){var t=[];function r(s){return function(o){o.merged||(fi(o.barycenter)||fi(s.barycenter)||o.barycenter>=s.barycenter)&&Hze(s,o)}}a(r,"handleIn");function n(s){return function(o){o.in.push(s),--o.indegree===0&&e.push(o)}}for(a(n,"handleOut");e.length;){var i=e.pop();t.push(i),rt(i.in.reverse(),r(i)),rt(i.out,n(i))}return xn(Hs(t,function(s){return!s.merged}),function(s){return hf(s,["vs","i","barycenter","weight"])})}function Hze(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var Yoe=w(()=>{"use strict";bn();a(Hoe,"resolveConflicts");a(qze,"doResolveConflicts");a(Hze,"mergeEntries")});function Xoe(e,t){var r=toe(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,i=Wl(r.rhs,function(d){return-d.i}),s=[],o=0,l=0,u=0;n.sort(Yze(!!t)),u=Koe(s,i,u),rt(n,function(d){u+=d.vs.length,s.push(d.vs),o+=d.barycenter*d.weight,l+=d.weight,u=Koe(s,i,u)});var h={vs:go(s)};return l&&(h.barycenter=o/l,h.weight=l),h}function Koe(e,t,r){for(var n;t.length&&(n=Eh(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Yze(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var Qoe=w(()=>{"use strict";bn();ql();a(Xoe,"sort");a(Koe,"consumeUnsortable");a(Yze,"compareWithBias")});function OO(e,t,r,n){var i=e.children(t),s=e.node(t),o=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,u={};o&&(i=Hs(i,function(g){return g!==o&&g!==l}));var h=joe(e,i);rt(h,function(g){if(e.children(g.v).length){var y=OO(e,g.v,r,n);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&Xze(g,y)}});var d=Hoe(h,r);Kze(d,u);var f=Xoe(d,n);if(o&&(f.vs=go([o,f.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function Kze(e,t){rt(e,function(r){r.vs=go(r.vs.map(function(n){return t[n]?t[n].vs:n}))})}function Xze(e,t){fi(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Zoe=w(()=>{"use strict";bn();qoe();Yoe();Qoe();a(OO,"sortSubgraph");a(Kze,"expandSubgraphs");a(Xze,"mergeBarycenters")});function tle(e){var t=xO(e),r=Joe(e,yo(1,t+1),"inEdges"),n=Joe(e,yo(t-1,-1,-1),"outEdges"),i=Uoe(e);ele(e,i);for(var s=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){Qze(l%2?r:n,l%4>=2),i=vh(e);var h=Voe(e,i);h{"use strict";bn();xo();ql();$oe();Goe();zoe();Woe();Zoe();a(tle,"order");a(Joe,"buildLayerGraphs");a(Qze,"sweepLayerGraphs");a(ele,"assignOrder")});function nle(e){var t=Jze(e);rt(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,s=Zze(e,t,i.v,i.w),o=s.path,l=s.lca,u=0,h=o[u],d=!0;r!==i.w;){if(n=e.node(r),d){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=n;(u=e.parent(u))!==h;)s.push(u);return{path:i.concat(s.reverse()),lca:h}}function Jze(e){var t={},r=0;function n(i){var s=r;rt(e.children(i),n),t[i]={low:s,lim:r++}}return a(n,"dfs"),rt(e.children(),n),t}var ile=w(()=>{"use strict";bn();a(nle,"parentDummyChains");a(Zze,"findPath");a(Jze,"postorder")});function eUe(e,t){var r={};function n(i,s){var o=0,l=0,u=i.length,h=Eh(s);return rt(s,function(d,f){var p=rUe(e,d),m=p?e.node(p).order:u;(p||d===h)&&(rt(s.slice(l,f+1),function(g){rt(e.predecessors(g),function(y){var x=e.node(y),b=x.order;(bh)&&sle(r,p,d)})})}a(n,"scan");function i(s,o){var l=-1,u,h=0;return rt(o,function(d,f){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(u=e.node(p[0]).order,n(o,h,f,l,u),h=f,l=u)}n(o,h,o.length,u,s.length)}),o}return a(i,"visitLayer"),Ul(t,i),r}function rUe(e,t){if(e.node(t).dummy)return sg(e.predecessors(t),function(r){return e.node(r).dummy})}function sle(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function nUe(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function iUe(e,t,r,n){var i={},s={},o={};return rt(t,function(l){rt(l,function(u,h){i[u]=u,s[u]=u,o[u]=h})}),rt(t,function(l){var u=-1;rt(l,function(h){var d=n(h);if(d.length){d=Wl(d,function(y){return o[y]});for(var f=(d.length-1)/2,p=Math.floor(f),m=Math.ceil(f);p<=m;++p){var g=d[p];s[h]===h&&u{"use strict";bn();xo();ql();a(eUe,"findType1Conflicts");a(tUe,"findType2Conflicts");a(rUe,"findOtherInnerSegmentNode");a(sle,"addConflict");a(nUe,"hasConflict");a(iUe,"verticalAlignment");a(sUe,"horizontalCompaction");a(aUe,"buildBlockGraph");a(oUe,"findSmallestWidthAlignment");a(lUe,"alignCoordinates");a(cUe,"balance");a(ale,"positionX");a(uUe,"sep");a(hUe,"width")});function lle(e){e=mE(e),dUe(e),sO(ale(e),function(t,r){e.node(r).x=t})}function dUe(e){var t=vh(e),r=e.graph().ranksep,n=0;rt(t,function(i){var s=pa(xn(i,function(o){return e.node(o).height}));rt(i,function(o){e.node(o).y=n+s/2}),n+=s+r})}var cle=w(()=>{"use strict";bn();ql();ole();a(lle,"position");a(dUe,"positionY")});function $O(e,t){var r=t&&t.debugTiming?roe:noe;r("layout",()=>{var n=r(" buildLayoutGraph",()=>SUe(e));r(" runLayout",()=>fUe(n,r)),r(" updateInputGraph",()=>pUe(e,n))})}function fUe(e,t){t(" makeSpaceForEdgeLabels",()=>EUe(e)),t(" removeSelfEdges",()=>NUe(e)),t(" acyclic",()=>Kae(e)),t(" nestingGraph.run",()=>Noe(e)),t(" rank",()=>NO(mE(e))),t(" injectEdgeLabelProxies",()=>vUe(e)),t(" removeEmptyRanks",()=>eoe(e)),t(" nestingGraph.cleanup",()=>Ooe(e)),t(" normalizeRanks",()=>Jae(e)),t(" assignRankMinMax",()=>wUe(e)),t(" removeEdgeLabelProxies",()=>_Ue(e)),t(" normalize.run",()=>doe(e)),t(" parentDummyChains",()=>nle(e)),t(" addBorderSegments",()=>soe(e)),t(" order",()=>tle(e)),t(" insertSelfEdges",()=>MUe(e)),t(" adjustCoordinateSystem",()=>loe(e)),t(" position",()=>lle(e)),t(" positionSelfEdges",()=>OUe(e)),t(" removeBorderNodes",()=>DUe(e)),t(" normalize.undo",()=>foe(e)),t(" fixupEdgeLabelCoords",()=>LUe(e)),t(" undoCoordinateSystem",()=>coe(e)),t(" translateGraph",()=>AUe(e)),t(" assignNodeIntersects",()=>RUe(e)),t(" reversePoints",()=>IUe(e)),t(" acyclic.undo",()=>Xae(e))}function pUe(e,t){rt(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),rt(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function SUe(e){var t=new Tn({multigraph:!0,compound:!0}),r=BO(e.graph());return t.setGraph(og({},gUe,PO(r,mUe),hf(r,yUe))),rt(e.nodes(),function(n){var i=BO(e.node(n));t.setNode(n,ZM(PO(i,xUe),bUe)),t.setParent(n,e.parent(n))}),rt(e.edges(),function(n){var i=BO(e.edge(n));t.setEdge(n,og({},CUe,PO(i,TUe),hf(i,kUe)))}),t}function EUe(e){var t=e.graph();t.ranksep/=2,rt(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function vUe(e){rt(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),s={rank:(i.rank-n.rank)/2+n.rank,e:t};jl(e,"edge-proxy",s,"_ep")}})}function wUe(e){var t=0;rt(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=pa(t,n.maxRank))}),e.graph().maxRank=t}function _Ue(e){rt(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function AUe(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,s=e.graph(),o=s.marginx||0,l=s.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,m=h.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,f-m/2),i=Math.max(i,f+m/2)}a(u,"getExtremes"),rt(e.nodes(),function(h){u(e.node(h))}),rt(e.edges(),function(h){var d=e.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),t-=o,n-=l,rt(e.nodes(),function(h){var d=e.node(h);d.x-=t,d.y-=n}),rt(e.edges(),function(h){var d=e.edge(h);rt(d.points,function(f){f.x-=t,f.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),s.width=r-t+o,s.height=i-n+l}function RUe(e){rt(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),s,o;r.points?(s=r.points[0],o=r.points[r.points.length-1]):(r.points=[],s=i,o=n),r.points.unshift(gO(n,s)),r.points.push(gO(i,o))})}function LUe(e){rt(e.edges(),function(t){var r=e.edge(t);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function IUe(e){rt(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function DUe(e){rt(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),s=e.node(Eh(r.borderLeft)),o=e.node(Eh(r.borderRight));r.width=Math.abs(o.x-s.x),r.height=Math.abs(i.y-n.y),r.x=s.x+r.width/2,r.y=n.y+r.height/2}}),rt(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function NUe(e){rt(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function MUe(e){var t=vh(e);rt(t,function(r){var n=0;rt(r,function(i,s){var o=e.node(i);o.order=s+n,rt(o.selfEdges,function(l){jl(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:s+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function OUe(e){rt(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,s=n.y,o=r.x-i,l=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*o/3,y:s-l},{x:i+5*o/6,y:s-l},{x:i+o,y:s},{x:i+5*o/6,y:s+l},{x:i+2*o/3,y:s+l}],r.label.x=r.x,r.label.y=r.y}})}function PO(e,t){return cf(hf(e,t),Number)}function BO(e){var t={};return rt(e,function(r,n){t[n.toLowerCase()]=r}),t}var mUe,gUe,yUe,xUe,bUe,TUe,CUe,kUe,ule=w(()=>{"use strict";bn();xo();aoe();hoe();mO();CO();MO();Poe();rle();ile();cle();ql();a($O,"layout");a(fUe,"runLayout");a(pUe,"updateInputGraph");mUe=["nodesep","edgesep","ranksep","marginx","marginy"],gUe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},yUe=["acyclicer","ranker","rankdir","align"],xUe=["width","height"],bUe={width:0,height:0},TUe=["minlen","weight","width","height","labeloffset"],CUe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},kUe=["labelpos"];a(SUe,"buildLayoutGraph");a(EUe,"makeSpaceForEdgeLabels");a(vUe,"injectEdgeLabelProxies");a(wUe,"assignRankMinMax");a(_Ue,"removeEdgeLabelProxies");a(AUe,"translateGraph");a(RUe,"assignNodeIntersects");a(LUe,"fixupEdgeLabelCoords");a(IUe,"reversePointsForReversedEdges");a(DUe,"removeBorderNodes");a(NUe,"removeSelfEdges");a(MUe,"insertSelfEdges");a(OUe,"positionSelfEdges");a(PO,"selectNumberAttrs");a(BO,"canonicalize")});var hle=w(()=>{"use strict";mO();ule();CO();MO()});var dle=w(()=>{"use strict"});var ple={};ir(ple,{captureNodeSizes:()=>GUe,shouldCaptureSizes:()=>BUe});function fle(){if(!(typeof globalThis>"u"))return globalThis}function BUe(){return!!fle()?.mermaidCaptureSizes}function $Ue(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}function FUe(e,t){let r=fle();if(!r)return;let n=t.node(),s=((n&&"ownerSVGElement"in n?n.ownerSVGElement:null)??n)?.id??"(unknown)";r.mermaidCapturedSizes??=[];let o={svgId:s,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}function GUe(e,t){let r=[];for(let n of t.nodes)n.isGroup||r.push({id:n.id,width:n.width??0,height:n.height??0});r.length!==0&&FUe({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:$Ue()},nodes:r},e)}var mle=w(()=>{"use strict";dle();a(fle,"getCaptureGlobal");a(BUe,"shouldCaptureSizes");a($Ue,"capturedFromLocation");a(FUe,"emitCapturedSizes");a(GUe,"captureNodeSizes")});function FO(e,{edgePathsClass:t="edges edgePaths"}={}){let r=e.insert("g").attr("class","root"),n=r.insert("g").attr("class","clusters"),i=r.insert("g").attr("class",t),s=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:n,edgePaths:i,edgeLabels:s,nodes:o,rootGroups:r}}async function VUe(e,t,r){if(t.label){let{shapeSvg:n,bbox:i}=await ct(e,r===void 0?t:{...t,width:r});t.labelBBox={width:i.width,height:i.height},n.remove()}else t.labelBBox={width:0,height:0}}async function GO(e,t,r){let n=await Fc(e,t,r),i=n.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,n}function zUe(e,t,r){let n=e,i=new Set;for(;n;){if(n.dir)return n.dir;if(!n.parentId||i.has(n.parentId))break;i.add(n.parentId),n=t.get(n.parentId)}return r}async function gle(e,t,r={}){let n=new Tn({multigraph:!0,compound:!0}),i=[...t.edges],s=_e(),o=FO(e),{edgeLabels:l,nodes:u}=o,h=new Map,d=new Map(t.nodes.map(m=>[m.id,m])),f=t.direction,p=e.node()!=null;await Promise.all(t.nodes.map(async m=>{if(m.isGroup){if(p){let g=r.unwrapGroupLabels&&m.labelType!=="markdown";await VUe(u,m,g?Number.POSITIVE_INFINITY:void 0)}n.setNode(m.id,{...m})}else{if(p){let g=await GO(u,m,{config:s,dir:zUe(m,d,f)});h.set(m.id,g)}n.setNode(m.id,{...m})}}));for(let m of i)p&&cS(m)&&await Jo(l,m),n.setEdge(m.start,m.end,{...m},m.id),t.edges.some(y=>y.id===m.id)||t.edges.push(m);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:m}=await Promise.resolve().then(()=>(mle(),ple));m(e,t)}return{graph:n,groups:o,nodeElements:h}}var VO=w(()=>{"use strict";xo();Gt();Mm();tf();It();a(FO,"createLayoutElementGroups");a(VUe,"measureGroupLabel");a(GO,"insertMeasuredNode");a(zUe,"resolveNodeDir");a(gle,"createGraphWithElements")});var Rr,mf,xle,ble,Bx,UUe,Tle,Cle,WUe,gf,yle,kle,Sle,Ele,bE,vle,jUe,zO=w(()=>{"use strict";bt();xo();Rr=new Map,mf=new Map,xle=new Map,ble=a(()=>{mf.clear(),xle.clear(),Rr.clear()},"clear"),Bx=a((e,t)=>{let r=mf.get(t)||[];return H.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),UUe=a((e,t)=>{let r=mf.get(t)||[];return H.info("Descendants of ",t," is ",r),H.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Bx(e.v,t)||Bx(e.w,t)||r.includes(e.w):(H.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Tle=a((e,t,r,n)=>{H.debug("Copying children of ",e,"root",n,"data",t.node(e),n);let i=t.children(e)||[];e!==n&&i.push(e),H.debug("Copying (nodes) clusterId",e,"nodes",i),i.forEach(s=>{if(t.children(s).length>0)Tle(s,t,r,n);else{let o=t.node(s);H.info("cp ",s," to ",n," with parent ",e),r.setNode(s,o),n!==t.parent(s)&&(H.debug("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==n&&s!==e?(H.debug("Setting parent",s,e),r.setParent(s,e)):(H.info("In copy ",e,"root",n,"data",t.node(e),n),H.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==n,"node!==clusterId",s!==e));let l=t.edges(s);H.debug("Copying Edges",l),l.forEach(u=>{H.info("Edge",u);let h=t.edge(u.v,u.w,u.name);H.info("Edge data",h,n);try{UUe(u,n)?(H.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),H.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):H.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",e)}catch(d){H.error(d)}})}H.debug("Removing node",s),t.removeNode(s)})},"copy"),Cle=a((e,t)=>{let r=t.children(e),n=[...r];for(let i of r)xle.set(i,e),n=[...n,...Cle(i,t)];return n},"extractDescendants"),WUe=a((e,t,r)=>{let n=e.edges().filter(u=>u.v===t||u.w===t),i=e.edges().filter(u=>u.v===r||u.w===r),s=n.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return s.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),gf=a((e,t,r)=>{let n=t.children(e);if(H.trace("Searching children of id ",e,n),n.length<1)return e;let i;for(let s of n){let o=gf(s,t,r),l=WUe(t,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),yle=a(e=>!Rr.has(e)||!Rr.get(e).externalConnections?e:Rr.has(e)?Rr.get(e).id:e,"getAnchorId"),kle=a((e,t)=>{if(!e||t>10){H.debug("Opting out, no graph ");return}else H.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(H.debug("Cluster identified",r," Replacement id in edges: ",gf(r,e,r)),mf.set(r,Cle(r,e)),Rr.set(r,{id:gf(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let n=e.children(r),i=e.edges();n.length>0?(H.debug("Cluster identified",r,mf),i.forEach(s=>{let o=Bx(s.v,r),l=Bx(s.w,r);o^l&&(H.debug("Edge: ",s," leaves cluster ",r),H.debug("Descendants of XXX ",r,": ",mf.get(r)),Rr.get(r).externalConnections=!0)})):H.debug("Not a cluster ",r,mf)});for(let r of Rr.keys()){let n=Rr.get(r).id,i=e.parent(n);i!==r&&Rr.has(i)&&!Rr.get(i).externalConnections&&(Rr.get(r).id=i);let s=e.edges().some(o=>o.v===r);if(n&&Rr.get(r)?.externalConnections&&s&&vle(e,n,r)){let o=jUe(e,r,e.parent(n));o&&(Rr.get(r).id=o)}}e.edges().forEach(function(r){let n=e.edge(r);H.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),H.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,s=r.w;if(H.debug("Fix XXX",Rr,"ids:",r.v,r.w,"Translating: ",Rr.get(r.v)," --- ",Rr.get(r.w)),Rr.get(r.v)||Rr.get(r.w)){if(H.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),i=yle(r.v),s=yle(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v){let o=e.parent(i);Rr.get(o).externalConnections=!0,n.fromCluster=r.v}if(s!==r.w){let o=e.parent(s);Rr.get(o).externalConnections=!0,n.toCluster=r.w}H.debug("Fix Replacing with XXX",i,s,r.name),e.setEdge(i,s,n,r.name)}}),Sle(e,0),H.trace(Rr)},"adjustClustersAndEdges"),Sle=a((e,t)=>{if(t>10){H.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i of r){let s=e.children(i);n=n||s.length>0}if(!n){H.debug("Done, no node has children",e.nodes());return}H.debug("Nodes = ",r,t);for(let i of r)if(H.debug("Extracting node",i,Rr,Rr.has(i)&&!Rr.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!Rr.has(i))H.debug("Not a cluster",i,t);else if(!Rr.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){H.debug("Cluster without external connections, without a parent and with children",i,t);let o=e.graph().rankdir==="TB"?"LR":"TB";Rr.get(i)?.clusterData?.dir&&(o=Rr.get(i).clusterData.dir,H.debug("Fixing dir",Rr.get(i).clusterData.dir,o));let l=new Tn({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Tle(i,e,l,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:Rr.get(i).clusterData,label:Rr.get(i).label,graph:l})}else H.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Rr.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),H.debug(Rr);r=e.nodes(),H.debug("New list of nodes",r);for(let i of r){let s=e.node(i);H.debug(" Now next level",i,s),s?.clusterNode&&Sle(s.graph,t+1)}},"extractor"),Ele=a((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(n=>{let i=e.children(n),s=Ele(e,i);r=[...r,...s]}),r},"sorter"),bE=a(e=>Ele(e,e.children()),"sortNodesByHierarchy"),vle=a((e,t,r)=>{let n=e.parent(t);for(;n&&n!==r;){let i=Rr.get(n);if(i&&!i.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),jUe=a((e,t,r)=>{let n=e.children(t)??[];for(let i of n){if(i===r||Bx(i,r))continue;let s=gf(i,e,t);if(s&&!vle(e,s,t))return s}return null},"findSafeAnchorNode")});function TE({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:n,afterPaint:i,paintOptions:s}){let o=t??HUe;return a(async function(u,h,d,f){let p=h.select("g");(d?.insertMarkers??Om)(p,u.markers,u.type,u.diagramId),qUe();let m={element:p,helpers:d,options:f};m.preparedLayout=await e?.(u,m);let g=await o(u,m),y=await r(u,m),x={...m,measure:g};n?await n(u,x,y):await YUe(u,x,s),await i?.(u,x,y)},"render")}function qUe(){Qee(),Kee(),Gee(),ble()}async function HUe(e,{element:t},r){return await gle(t,e,r)}async function YUe(e,t,r={}){let{measure:n}=t,{groups:i}=n;for(let o of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(o,t)||await KUe(i,o,t,r);let s=QUe(e.nodes);for(let o of e.edges)ZUe(o,r)||await JUe(i,o,s,e,r,t)}async function KUe(e,t,r,n){t.clusterNode?Pl(t):XUe(t,r,n)?await nh(e.clusters,t):Pl(t)}function XUe(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}function QUe(e){let t=new Map;for(let r of e)r?.id&&t.set(r.id,r);return t}function ZUe(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function JUe(e,t,r,n,i,s){let o=ih(e.edgePaths,{...t},i.clusterDb??new Map,n.type,wle(t.start,t,r,s,i),wle(t.end,t,r,s,i),n.diagramId,eWe(t,i),n.layoutAlgorithm);cS(t)&&(ef.has(t.id)||await Jo(e.edgeLabels,t),tWe(t,o))}function wle(e,t,r,n,i){return i.getEdgeNode?.(e,t,n)??(e?r.get(e)??{}:{})}function eWe(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}function tWe(e,t){let r=t?.updatedPath??t?.originalPath,n=Ct(),{subGraphTitleTotalMargin:i}=Zo({flowchart:n.flowchart??{}});if(e.label){let s=ef.get(e.id),{x:o,y:l}=hM(e,t);s.attr("transform",`translate(${o}, ${l+i/2})`)}for(let[s,o]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(o){let{x:l,y:u}=nWe(e,s,r);ji.get(e.id)[s].attr("transform",`translate(${l}, ${u})`)}}function nWe(e,t,r){let n=e.terminalLabelCenters?.[t];if(n)return{...n};if(!r)return{x:e.x,y:e.y};let i=t.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return Xt.calcTerminalLabelPosition(i?10:0,rWe[t],r)}var rWe,UO=w(()=>{"use strict";wm();Tr();jt();ox();VO();lx();Mm();uS();tf();zO();a(TE,"createCommonLayoutRenderer");a(qUe,"clearLayoutRenderState");a(HUe,"defaultMeasureLayout");a(YUe,"paintLayoutData");a(KUe,"paintLayoutNode");a(XUe,"shouldPaintAsCluster");a(QUe,"buildNodeLookup");a(ZUe,"shouldSkipPaintEdge");a(JUe,"paintLayoutEdge");a(wle,"getRenderedNode");a(eWe,"shouldSkipIntersect");a(tWe,"positionRenderedEdgeLabel");rWe={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};a(nWe,"terminalLabelTranslate")});var Ole={};ir(Ole,{applyDagreLayoutResult:()=>Dle,getEdgesToRender:()=>WO,measureDagreLayout:()=>Nle,prepareLayoutForDagre:()=>jO,render:()=>mWe,runDagreLayoutCore:()=>Mle});var _le,Ale,iWe,sWe,aWe,oWe,lWe,WO,Lle,Ile,cWe,Rle,uWe,Dle,hWe,dWe,jO,Nle,Mle,fWe,pWe,mWe,Ple=w(()=>{"use strict";hle();xo();VO();UO();wm();It();zO();tf();lx();Mm();bt();ox();Gt();_le=a((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),Ale=a((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),iWe=a(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),sWe=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],aWe=a((e,t,r,n,i)=>{let s=[],o=new Set;if(r.forEach(({start:d,end:f})=>{d!==n&&o.add(d),f!==n&&o.add(f)}),o.forEach(d=>{let f=e.node(d);typeof f?.x=="number"&&typeof f?.y=="number"&&s.push(f)}),s.length===0&&r.forEach(({edge:d})=>{(d.points??[]).forEach(f=>{typeof f?.x=="number"&&typeof f?.y=="number"&&s.push(f)})}),s.length===0)return Ale(i);let l=s.reduce((d,f)=>({x:d.x+f.x/s.length,y:d.y+f.y/s.length}),{x:0,y:0}),u=l.x-t.x,h=l.y-t.y;return Math.abs(u)>Math.abs(h)?u>0?"right":"left":Math.abs(h)>0?h>0?"bottom":"top":Ale(i)},"getSelfLoopSide"),oWe=a((e,t="top",r=0,n=0)=>{let i=e.x,s=e.y-r,o=e.width/2,l=e.height/2,u=Math.max(36,Math.min(100,e.width*.8)),h=_le(Math.max(n,e.width*.35),36,u),d=_le(Math.min(e.width,e.height)*.45,24,48);switch(t){case"bottom":{let f=s+l;return[{x:i-h/2,y:f},{x:i-h/2,y:f+d},{x:i+h/2,y:f+d},{x:i+h/2,y:f}]}case"right":{let f=i+o;return[{x:f,y:s-h/2},{x:f+d,y:s-h/2},{x:f+d,y:s+h/2},{x:f,y:s+h/2}]}case"left":{let f=i-o;return[{x:f,y:s-h/2},{x:f-d,y:s-h/2},{x:f-d,y:s+h/2},{x:f,y:s+h/2}]}case"top":default:{let f=s-l;return[{x:i-h/2,y:f},{x:i-h/2,y:f-d},{x:i+h/2,y:f-d},{x:i+h/2,y:f}]}}},"getSelfLoopPoints"),lWe=a((e,t,r="top",n=0,i={})=>{let o=e.x,l=e.y-n,u=i.width??0,h=i.height??0;switch(r){case"bottom":return{x:o,y:Math.max(...t.map(d=>d.y))+h/2+4};case"right":return{x:Math.max(...t.map(d=>d.x))+u/2+4,y:l};case"left":return{x:Math.min(...t.map(d=>d.x))-u/2-4,y:l};case"top":default:return{x:o,y:Math.min(...t.map(d=>d.y))-h/2-4}}},"getSelfLoopLabelPosition"),WO=a((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,i=[],s=e.graph()?.rankdir;return e.edges().forEach(o=>{let l=e.edge(o);if(r&&l.selfLoop){let u=l.selfLoop.id;n.has(u)||n.set(u,[]),n.get(u).push({edge:l,start:o.v,end:o.w})}else i.push({edge:l,start:o.v,end:o.w})}),n.forEach(o=>{if(o.length!==3){o.forEach(b=>i.push(b));return}o.sort((b,T)=>b.edge.selfLoop.order-T.edge.selfLoop.order);let[l,u,h]=o,d=l.edge.originalEdge??u.edge.originalEdge??h.edge.originalEdge??u.edge,f=e.node(d.start);if(!f){o.forEach(b=>i.push(b));return}let p={width:u.edge.width,height:u.edge.height},m=aWe(e,f,o,d.start,s),g=oWe(f,m,t,p.width??0),y=lWe(f,g,m,t,p),x={...u.edge,...d,id:d.id,points:g,start:d.start,end:d.end,x:y.x,y:y.y,width:p.width,height:p.height,labelStyle:u.edge.labelStyle,fromCluster:l.edge.fromCluster??u.edge.fromCluster??h.edge.fromCluster,toCluster:l.edge.toCluster??u.edge.toCluster??h.edge.toCluster};delete x.selfLoop,delete x.originalEdge,i.push({edge:x,start:x.start,end:x.end})}),i},"getEdgesToRender"),Lle=a(async({element:e,graph:t,diagramType:r,id:n,parentCluster:i,siteConfig:s})=>{let o=t.graph().rankdir;H.trace("Dir in recursive render - dir:",o);let{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f}=FO(e,{edgePathsClass:"edgePaths"});t.nodes()?H.info("Recursive render XXX",t.nodes()):H.info("No nodes found for",t),t.edges().length>0&&H.info("Recursive edges",t.edge(t.edges()[0]));let p=iWe(r);await Promise.all(t.nodes().map(async function(y){let x=t.node(y);if(i!==void 0){let b=JSON.parse(JSON.stringify(i.clusterData));H.trace(`Setting data for parent cluster XXX + Node.id = `,y,` + data=`,b.height,` +Parent cluster`,i.height),t.setNode(i.id,b),t.parent(y)||(H.trace("Setting parent",y,i.id),t.setParent(y,i.id,b))}if(H.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),x?.clusterNode){H.info("Cluster identified XBX",y,x.width,t.node(y));let{ranksep:b,nodesep:T}=t.graph();x.graph.setGraph({...x.graph.graph(),ranksep:b+25,nodesep:T});let C=await dWe({element:d,graph:x.graph,diagramType:r,id:n,parentCluster:t.node(y),siteConfig:s}),v=C.elem;tt(x,v),x.diff=C.diff||0,H.info("New compound node after recursive render XAX",y,"width",x.width,"height",x.height),Xee(v,x)}else t.children(y).length>0?(H.trace("Cluster - the non recursive path XBX",y,x.id,x,x.width,"Graph:",t),H.trace(gf(x.id,t)),Rr.set(x.id,{id:gf(x.id,t),node:x})):(H.trace("Node - the non recursive path XAX",y,d,t.node(y),o),await GO(d,t.node(y),{config:s,dir:o}))})),await a(async()=>{let y=t.edges().map(async function(x){let b=t.edge(x.v,x.w,x.name);if(H.info("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(x)),H.info("Edge "+x.v+" -> "+x.w+": ",x," ",JSON.stringify(t.edge(x))),H.info("Fix",Rr,"ids:",x.v,x.w,"Translating: ",Rr.get(x.v),Rr.get(x.w)),p&&b.selfLoop){if(b.selfLoop.order!==1)return;let T={...b.originalEdge,...b,id:b.selfLoop.id,startLabelLeft:b.originalEdge?.startLabelLeft??b.startLabelLeft,startLabelRight:b.originalEdge?.startLabelRight??b.startLabelRight,endLabelLeft:b.originalEdge?.endLabelLeft??b.endLabelLeft,endLabelRight:b.originalEdge?.endLabelRight??b.endLabelRight};await Jo(h,T),b.width=T.width,b.height=T.height,b.labelStyle=T.labelStyle;return}await Jo(h,b)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:g}=Zo(s);return{elem:f,graph:t,groups:{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f},diagramType:r,id:n,mergeSelfLoops:p,subGraphTitleTotalMargin:g}},"measureDagreGraph"),Ile=a(e=>{H.info("############################################# XXX"),H.info("### Layout ### XXX"),H.info("############################################# XXX"),$O(e)},"runDagreGraphLayout"),cWe=a((e,t,r)=>{let n=e.node(t);if(!n)return;let i={...n};return n?.clusterNode?i.y=(n.y??0)+r:e.children(t).length>0?i.height=(n.height??0)+r:i.y=(n.y??0)+r/2,i},"normalizeDagreNode"),Rle=a((e,t)=>{sWe.forEach(r=>{t[r]!==void 0&&(e[r]=t[r])})},"applyDagreNodeLayout"),uWe=a((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(i=>({...i,y:typeof i.y=="number"?i.y+n:i.y}))}),"normalizeDagreEdge"),Dle=a((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:i=0}=t,s=new Map(e.nodes.map(l=>[l.id,l]));bE(r).forEach(l=>{let u=cWe(r,l,i);if(!u)return;Rle(r.node(l),u);let h=s.get(l);h&&Rle(h,u)});let o=i/2;return e.edges=WO(r,o,{mergeSelfLoops:n}).map(({edge:l,start:u,end:h})=>uWe(l,u,h,o)),e},"applyDagreLayoutResult"),hWe=a(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:i,id:s,mergeSelfLoops:o,subGraphTitleTotalMargin:l})=>{let u=0;await Promise.all(bE(t).map(async function(f){let p=t.node(f);if(H.info("Position XBX => "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p?.clusterNode)p.y+=l,H.info("A tainted cluster node XBX1",f,p.id,p.width,p.height,p.x,p.y,t.parent(f)),Rr.get(p.id).node=p,Pl(p);else if(t.children(f).length>0){H.info("A pure cluster node XBX1",f,p.id,p.x,p.y,p.width,p.height,t.parent(f)),p.height+=l,t.node(p.parentId);let m=p?.padding/2||0,g=p?.labelBBox?.height||0,y=g-m||0;H.debug("OffsetY",y,"labelHeight",g,"halfPadding",m),await nh(r,p),Rr.get(p.id).node=p}else{let m=t.node(p.parentId);p.y+=l/2,H.info("A regular node XBX1 - using the padding",p.id,"parent",p.parentId,p.width,p.height,p.x,p.y,"offsetY",p.offsetY,"parent",m,m?.offsetY,p),Pl(p)}}));let h=l/2;return WO(t,h,{mergeSelfLoops:o}).forEach(function({edge:f,start:p,end:m}){H.info("Edge "+p+" -> "+m+": "+JSON.stringify(f),f),f.points.forEach(b=>b.y+=h);let g=t.node(p),y=t.node(m),x=ih(n,f,Rr,i,g,y,s);Nm(f,x)}),t.nodes().forEach(function(f){let p=t.node(f);H.info(f,p.type,p.diff),p.isGroup&&(u=p.diff)}),H.warn("Returning from recursive render XAX",e,u),{elem:e,diff:u}},"paintDagreLayoutCore"),dWe=a(async e=>{let t=await Lle(e);return Ile(t.graph),await hWe(t)},"renderDagreSubgraph"),jO=a(e=>{let t=new Tn({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{t.setNode(r.id,{...r}),r.parentId&&t.setParent(r.id,r.parentId)}),H.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){let n=r.start,i=n+"---"+n+"---1",s=n+"---"+n+"---2",o=t.node(n);t.setNode(i,{domId:i,id:i,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(i,o.parentId),t.setNode(s,{domId:s,id:s,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(s,o.parentId);let l=structuredClone(r),u=structuredClone(r),h=structuredClone(r),d=structuredClone(r);u.originalEdge=l,u.selfLoop={id:l.id,order:0},h.originalEdge=l,h.selfLoop={id:l.id,order:1},d.originalEdge=l,d.selfLoop={id:l.id,order:2},u.label="",u.arrowTypeEnd="none",u.endLabelLeft="",u.endLabelRight="",u.startLabelLeft="",u.id=n+"-cyclic-special-1",h.startLabelRight="",h.startLabelLeft="",h.endLabelLeft="",h.endLabelRight="",h.arrowTypeStart="none",h.arrowTypeEnd="none",h.id=n+"-cyclic-special-mid",d.label="",d.startLabelRight="",d.startLabelLeft="",d.arrowTypeStart="none",o.isGroup&&(u.fromCluster=n,d.toCluster=n),d.id=n+"-cyclic-special-2",d.arrowTypeStart="none",t.setEdge(n,i,u,n+"-cyclic-special-0"),t.setEdge(i,s,h,n+"-cyclic-special-1"),t.setEdge(s,n,d,n+"-cyclic-special-2")}else t.setEdge(r.start,r.end,{...r},r.id)}),kle(t),{graph:t}},"prepareLayoutForDagre"),Nle=a(async(e,{element:t,preparedLayout:r})=>{let n=r??jO(e),i=_e(),s=await Lle({element:t,graph:n.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return n.measuredLayout=s,s},"measureDagreLayout"),Mle=a((e,t)=>{let r=t.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return Ile(r.graph),Dle(e,r),r},"runDagreLayoutCore"),fWe=a((e,{measure:t})=>bE(t.graph).map(r=>t.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),pWe=a((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),mWe=TE({prepareLayout:jO,measureLayout:Nle,runLayoutCore:Mle,paintOptions:{clusterDb:Rr,getNodes:fWe,getEdgeNode:pWe,skipNode:a((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:a((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})});function qO(e){let t=[];for(let r=0;r=1-kE||p<=kE||p>=1-kE?null:{point:{x:e.x+f*i,y:e.y+f*s},tA:f,tB:p}}function Ble(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function $le(e,t,r){if(e.curve!=="rounded")return!1;let n=e.points,i=n[t],s=n[t+1];if(!i||!s)return!1;let o=Math.hypot(s.x-i.x,s.y-i.y),l=r*o,u=t>0?EE(n[t-1],i,s,SE):null;if(u&&l=Math.abs(r)?t>=0?1:0:r>=0?1:0}function CWe(e,t){if(e.length<2)return e.map(s=>({...s}));let r=e.map(s=>({...s})),n=t.arrowTypeStart&&Ni[t.arrowTypeStart];if(n){let s=e[0],o=e[1],l=Math.atan2(o.y-s.y,o.x-s.x);r[0].x=s.x+n*Math.cos(l),r[0].y=s.y+n*Math.sin(l)}let i=t.arrowTypeEnd&&Ni[t.arrowTypeEnd];if(i){let s=e.length,o=e[s-2],l=e[s-1],u=Math.atan2(l.y-o.y,l.x-o.x);r[s-1].x=l.x-i*Math.cos(u),r[s-1].y=l.y-i*Math.sin(u)}return r}function kWe(e,t,r,n,i){let s=e.point.x,o=e.point.y,l={x:s-t*e.r,y:o-r*e.r},u={x:s+t*e.r,y:o+r*e.r},h=[`L${$x(l)}`];return i==="arc"?h.push(`A${Hl(e.r)},${Hl(e.r)} 0 0 ${n} ${$x(u)}`):h.push(`M${$x(u)}`),h}function EE(e,t,r,n){let i=t.x-e.x,s=t.y-e.y,o=r.x-t.x,l=r.y-t.y,u=Math.hypot(i,s),h=Math.hypot(o,l);if(u0){let v=EE(i[h-1],i[h],i[h+1]??i[h],SE);v&&(y=v.cutLen)}let x=f,b=null;s&&hv.t-E.t).filter(v=>{let E=Math.min(v.d-y,x-v.d)-gWe;return v.r=Math.min(v.r,E),v.r>=T});for(let v=0;vE){let S=E/2;C[v].r=Math.min(C[v].r,S),C[v+1].r=Math.min(C[v+1].r,S)}}for(let v of C)v.r=2?n:null}catch{return null}}function Fle(e,t,r){if(!r.enabled)return;let n=e.node();if(!n)return;let i=new Map;for(let h of t)i.set(h.id,h);let s=new Map;for(let h of n.querySelectorAll("path[data-id]")){let d=h.getAttribute("data-id");d!==null&&!s.has(d)&&s.set(d,h)}let o=[];for(let h of t){let d=s.get(h.id);if(!d)continue;let p=wWe(d.getAttribute("data-points"))??h.points;o.push({...h,points:p})}let l=bWe(o);if(l.length===0)return;let u=new Map;for(let h of l){let d=u.get(h.jumpEdgeId)??[];d.push(h),u.set(h.jumpEdgeId,d)}for(let h of o){let d=u.get(h.id);if(!d||d.length===0)continue;let p=i.get(h.id)?.curve;if(p!==void 0&&!vWe(p))continue;let m=s.get(h.id);if(!m)continue;if(p===void 0){let C=m.getAttribute("d")??"";if(!EWe(C))continue}let g=m.getAttribute("style")??"",y=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(g),x=y?Number.parseFloat(y[1]):null,b=y?Number.parseFloat(y[2]):null,T=SWe(h,d,r);if(m.setAttribute("d",T),x!==null&&b!==null&&typeof m.getTotalLength=="function"){let C=m.getTotalLength(),v=Math.max(0,C-x-b),E=`0 ${x} ${v} ${b}`,S=g.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");m.setAttribute("style",S)}}}var SE,CE,gWe,yWe,kE,Gle=w(()=>{"use strict";uM();SE=5,CE=1e-5,gWe=2,yWe=.6,kE=1e-6;a(qO,"buildSegmentList");a(xWe,"segmentIntersection");a(Ble,"isHorizontalSeg");a($le,"crossingSitsInRoundedCorner");a(bWe,"findEdgeIntersections");a(Hl,"fmt");a($x,"pointToString");a(TWe,"getArcSweepFlag");a(CWe,"applyMarkerOffsets");a(kWe,"emitJump");a(EE,"computeRoundedCorner");a(SWe,"rewriteEdgePath");a(EWe,"isStraightPath");a(vWe,"curveSupportsLineHops");a(wWe,"decodeDataPoints");a(Fle,"applyLineJumpsToSvg")});function Vle(e,{measure:t}){let r=e.config?.swimlane?.lineHops;if(r===!1)return;let n=r==="gap"?"gap":"arc",i=e.edges.filter(s=>Array.isArray(s.points)&&s.points.length>=2).map(s=>({id:s.id,points:s.points,curve:s.curve,arrowTypeStart:s.arrowTypeStart,arrowTypeEnd:s.arrowTypeEnd}));Fle(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}var zle=w(()=>{"use strict";Gle();a(Vle,"applySwimlaneLineJumps")});function Ule(e){return Math.max(e.padding??20,20)}function _We(e){let{x:t,y:r,width:n,height:i}=e,s=e.swimlaneContentTop;if(typeof t!="number"||typeof r!="number"||typeof n!="number"||typeof i!="number"||typeof s!="number"||!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(i)||!Number.isFinite(s)||n<=0||i<=0){delete e.groupTitleRect;return}let o=r-i/2,l=Math.min(s,r+i/2),u=Math.min(21,Math.max(0,l-o)),h=o+u;if(h<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-n/2,right:t+n/2,top:o,bottom:h}}function Wle(e){let t=e.direction,r=e.nodes??=[];for(let s of e.nodes??[])s.isGroup&&!s.parentId&&(s.shape="swimlane",t&&(s.direction=t));let n=r.filter(s=>!s.isGroup&&!s.parentId);if(n.length===0)return;let i=r.find(s=>s.id===HO);i?i.isGroup&&(i.shape="swimlane",t&&(i.direction=t)):(i={id:HO,label:"",isGroup:!0,shape:"swimlane",padding:20,look:e.config?.look,colorIndex:r.reduce((s,o)=>Math.max(s,o.colorIndex??-1),-1)+1,...t?{direction:t}:{}},r.push(i));for(let s of n)s.parentId=HO}function jle(e){let t=new Map;for(let u of e.nodes??[])t.set(u.id,u);let r=[];for(let u of e.edges??[]){let h=typeof u.start=="string"?u.start:void 0,d=typeof u.end=="string"?u.end:void 0;!h||!d||u.labelNodeId||r.push({id:u.id,src:h,dst:d,ref:u})}let n=e.nodes??[],i=n.filter(u=>u.isGroup),s=n.filter(u=>!u.isGroup);return{nodes:[...[...i].reverse(),...s].map(u=>u.id),edges:r,layout:e,nodeById:t}}function qle(e,t,r,n){let{layout:i}=e,s=e.nodeById,o=n?.layerGap??100,l=n?.nodeGap??40,u=0;for(let p of t.layers){let m=0;for(let g of p){let y=s.get(g);if(!y){m++;continue}y.layer=u,y.order=m;let x=r.x[g]??m*l,b=r.y[g]??u*o;y.x=x,y.y=b,m++}u++}let h=i.nodes??[],d=new Map,f=[];for(let p of h){if(!p?.isGroup)continue;p.parentId||f.push(p);let m=h.filter(T=>T.parentId===p.id),g=1/0,y=-1/0,x=1/0,b=-1/0;for(let T of m){let C=T.x??r.x[T.id],v=T.y??r.y[T.id],E=T.width??0,S=T.height??0;C!=null&&v!=null&&(g=Math.min(g,C-E/2),y=Math.max(y,C+E/2),x=Math.min(x,v-S/2),b=Math.max(b,v+S/2))}if(g===1/0||x===1/0)p.x=p.x??0,p.y=p.y??0,p.width=p.width??0,p.height=p.height??0;else{let T=p.padding??20,C=p.parentId?T:2*Ule(p),v=T,E=Math.max(0,y-g)+C,S=Math.max(0,b-x)+v,_=(g+y)/2,A=(x+b)/2;p.x=_,p.y=A,p.width=E,p.height=S,d.set(p.id,{minX:g,maxX:y,minY:x,maxY:b})}}if(f.length>0&&d.size>0){let p=1/0,m=-1/0,g=0;for(let y of f){let x=y.padding??20;x>g&&(g=x);let b=d.get(y.id);b&&(p=Math.min(p,b.minY),m=Math.max(m,b.maxY))}if(p!==1/0&&m!==-1/0){let y=Math.max(0,m-p),b=Math.max(g,36),T=y+2*b,C=(p+m)/2;for(let B of f)B.y=C,B.height=T,B.swimlaneContentTop=p;let v=[...f].sort((B,$)=>{let O=B.x??0,G=$.x??0;return O-G}),E=[],S=[],_=[];for(let B of v){let $=d.get(B.id);if(!$)continue;let O=Math.max(0,$.maxX-$.minX)+2*Ule(B),G=($.minX+$.maxX)/2;E.push(B.id),S.push(G),_.push(O)}let A=E.length;if(A>0){let B=new Map;if(A===1)B.set(E[0],_[0]);else{let $=[];for(let N=0;N{"use strict";HO="__swimlane_default__";a(Ule,"topLaneHorizontalPadding");a(_We,"assignTopLaneTitleRect");a(Wle,"prepareLayoutForSwimlanes");a(jle,"toGraphView");a(qle,"writeBackToLayoutData")});function Hle(e){let t=[],r=[],n=new Map;for(let o of e.nodes)n.set(o.id,o);for(let o of e.edges){if(!o.label||o.label.length===0||o.isLayoutOnly||o.labelNodeId)continue;let l=o.start?n.get(o.start):void 0,u=o.end?n.get(o.end):void 0;if(!l||!u){H.warn(AWe,`Edge ${o.id} has missing source or target node`);continue}let h=`edge-label-${o.start}-${o.end}-${o.id}`,f=l.parentId!==u.parentId?u.parentId:l.parentId,p={id:h,label:o.label,edgeStart:o.start??"",edgeEnd:o.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:f,isGroup:!1,labelStyle:Array.isArray(o.labelStyle)?o.labelStyle[0]:o.labelStyle??"",...l.dir?{dir:l.dir}:{}};t.push(p),o.labelNodeId=h,o.label=void 0,o.text=void 0;let m={id:`${o.id}-to-label`,start:o.start,end:h,type:"normal",isLayoutOnly:!0},g={id:`${o.id}-from-label`,start:h,end:o.end,type:"normal",isLayoutOnly:!0};r.push(m,g)}let i=[...e.nodes,...t],s=[...e.edges,...r];return{...e,nodes:i,edges:s}}var AWe,Yle=w(()=>{"use strict";bt();AWe="[EdgeLabelNodes]";a(Hle,"createEdgeLabelNodes")});function Xle(e){let t=e.x??0,r=e.y??0,n=e.width??0,i=e.height??0;return n>0&&i>0?{cx:t,cy:r,rect:lg(t,r,n,i)}:void 0}function Qle(e){if(e.isGroup)return;let t=Xle(e);return t?{id:String(e.id??""),cx:t.cx,cy:t.cy,rect:t.rect}:void 0}function ma(e,t,r=.001){return Math.abs(e.x-t.x)r}function ei(e,t,r=.001){return $r(e,t,r)&&Math.abs(e.y-t.y)>r}function Rs(e,t,r,n){return Math.max(0,Math.min(Math.max(e,t),Math.max(r,n))-Math.max(Math.min(e,t),Math.min(r,n)))}function nl(e,t,r=.001){return e.horizontal&&t.horizontal&&Vr(e.a,t.a,r)?Rs(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&$r(e.a,t.a,r)?Rs(e.a.y,e.b.y,t.a.y,t.b.y):0}function Ah(e,t=.001){let r=[];for(let n=0;n0?r[r.length-1]:void 0;(!i||!ma(i,n,t))&&r.push({x:n.x,y:n.y})}return r}function vE(e,t=.001){if(!e||e.length!==4)return;let[r,n,i,s]=e;return Jn(r,n,t)&&ei(n,i,t)&&Jn(i,s,t)?{kind:"HVH",p0:r,p1:n,p2:i,p3:s}:ei(r,n,t)&&Jn(n,i,t)&&ei(i,s,t)?{kind:"VHV",p0:r,p1:n,p2:i,p3:s}:void 0}function Fx(e,t,r,n=0){let i=Math.min(e.x,t.x),s=Math.max(e.x,t.x),o=Math.min(e.y,t.y),l=Math.max(e.y,t.y);return s>r.left-n&&ir.top-n&&ot.left+r&&e.xt.top+r&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function _E(e,t){return e.leftt.left&&e.topt.top}function KO(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function lg(e,t,r,n){return{left:e-r/2,right:e+r/2,top:t-n/2,bottom:t+n/2}}function cs(e){return Xle(e)?.rect}function Rh(e,t){switch(t){case"top":return{x:e.cx,y:e.rect.top};case"bottom":return{x:e.cx,y:e.rect.bottom};case"left":return{x:e.rect.left,y:e.cy};case"right":return{x:e.rect.right,y:e.cy}}}function AE(e,t,r,n,i,s=.001){let o=t==="left"||t==="right",l=n==="left"||n==="right";if(o&&l){if(t==="right"&&n==="left"&&e.xr.x){if(Vr(e,r,s))return[e,r];let f=(e.x+r.x)/2;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}if(t===n){if(Vr(e,r,s))return;let f=t==="left"?Math.min(e.x,r.x)-i:Math.max(e.x,r.x)+i;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}return}if(!o&&!l){if(t===n){if($r(e,r,s))return;let p=t==="top"?Math.min(e.y,r.y)-i:Math.max(e.y,r.y)+i;return[e,{x:e.x,y:p},{x:r.x,y:p},r]}if(!(t==="bottom"&&n==="top"&&e.yr.y))return;if($r(e,r,s))return[e,r];let f=(e.y+r.y)/2;return[e,{x:e.x,y:f},{x:r.x,y:f},r]}if(o&&!l){let d=t==="right"&&r.x>e.x||t==="left"&&r.xr.y;return d&&f?[e,{x:r.x,y:e.y},r]:void 0}let u=t==="bottom"&&r.y>e.y||t==="top"&&r.yr.x;return u&&h?[e,{x:e.x,y:r.y},r]:void 0}function RE(e,t,r,n){return t==="left"||t==="right"?[e,{x:n,y:e.y},{x:n,y:r.y},r]:[e,{x:e.x,y:n},{x:r.x,y:n},r]}function cg(e){let t=new Map,r=[];for(let n of e){if(n.isEdgeLabel)continue;let i=Qle(n);i&&(t.set(i.id,i),r.push({id:i.id,rect:i.rect}))}return{nodeInfoById:t,realNodeRects:r}}function Yl(e){let t=[],r=[];for(let n of e){let i=Qle(n);if(!i)continue;let s={id:i.id,rect:i.rect};n.isEdgeLabel?r.push(s):t.push(s)}return{realNodeRects:t,labelNodeRects:r}}function Jle(e,{includeEdgeLabels:t=!0}={}){let r=[];for(let n of e){if(n.isGroup||!t&&n.isEdgeLabel)continue;let i=n.x??0,s=n.y??0,o=n.width??0,l=n.height??0;r.push({nodeId:n.id,...lg(i,s,o,l)})}return r}function LE(e,t,r=.001){let n=e.start,i=e.end;if(!n||!i)return;let s=t.get(n),o=t.get(i);if(!(!s||!o))return{srcId:n,dstId:i,srcInfo:s,dstInfo:o,collinearX:Math.abs(s.cx-o.cx)g||pb)return!1;let T=Math.abs(y-d.a.x)i:s&&l&&Vr(e,r,i)?Rs(e.x,t.x,r.x,n.x)>i:!1}function Gx(e,t,r,n,{epsilon:i=.001,skipDegenerateOther:s=!1}={}){for(let o of r){if(o===n||o.isLayoutOnly)continue;let l=o.points;if(!(!l||l.length<2))for(let u=0;up+i&&gy+i&&fn+.001&&e=2?t[t.length-2]:void 0,u=(o?$r(o,i):!1)?{x:i.x,y:s.y}:{x:s.x,y:i.y};t.push(u)}t.push(s)}let r=[];for(let n of t){let i=r[r.length-1];(!i||!ma(i,n))&&r.push(n)}return r}function bo(e){if(e.length<3)return e;let t=[...e];for(let r=0;r<32;r++){let n=IWe(t);if(t=n.points,!n.changed)break}return t}var sl=w(()=>{"use strict";a(Xle,"measuredNodeRect");a(Qle,"nodeBoundsInfoFor");a(ma,"samePoint");a($r,"sameX");a(Vr,"sameY");a(Jn,"isHorizontalSegment");a(ei,"isVerticalSegment");a(Rs,"overlapLength");a(nl,"sameAxisSegmentOverlapLength");a(Ah,"orthogonalSegmentsForPoints");a(ga,"countOrthogonalBends");a(Fr,"dedupeConsecutivePoints");a(vE,"classifyThreeSegmentRoute");a(Fx,"segmentBoundsOverlapRect");a(wE,"pointInsideRect");a(Zle,"rectContainsRect");a(_E,"rectsOverlap");a(KO,"inflateRect");a(lg,"rectFromCenterSize");a(cs,"rectOfNodeBounds");a(Rh,"portForRectSide");a(AE,"buildOrthogonalPortPath");a(RE,"buildSameSideTrackPath");a(cg,"collectRealNodeBounds");a(Yl,"collectNodeRectEntries");a(Jle,"collectLayoutNodeRects");a(LE,"getNodePairGeometry");a(In,"segmentHitsAnyRect");a(XO,"orthogonalSegmentsCross");a(RWe,"sameAxisSegmentsOverlap");a(Gx,"segmentConflictsWithAnyEdge");a(il,"orthogonalSegmentsStrictlyCross");a(Kle,"strictlyBetween");a(LWe,"isCollinearIntermediate");a(IWe,"simplifyPolylineOnce");a(Vx,"orthogonalizePolyline");a(bo,"simplifyPolyline")});function uce(e,t,r){let n=e;if(n.isLayoutOnly||!n.points||n.points.length=0&&i=e.length)return e;let s=i-n;if(s<0||s>=e.length)return e;let o=NWe(e[i],e[s],t);return r?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}function hce(e,t){for(let r of e){let n=uce(r,t,2);if(!n)continue;let i=[...n.points];n.srcRect&&(i=tce(i,n.srcRect,!0)),n.dstRect&&(i=tce(i,n.dstRect,!1)),i=bo(Vx(i)),i=dce(i,n.srcRect,n.dstRect),n.edge.points=bo(Vx(i))}}function rce(e,t,r,n=!1){if(Vr(e,t,kr)){if(t.yr.bottom+kr)return t;if(n){if(e.xr.right+kr)return{x:r.right,y:e.y}}return{x:Math.abs(t.x-r.left)<=Math.abs(t.x-r.right)?r.left:r.right,y:e.y}}if($r(e,t,kr)){if(t.xr.right+kr)return t;if(n){if(e.yr.bottom+kr)return{x:e.x,y:r.bottom}}let i=Math.abs(t.y-r.top)<=Math.abs(t.y-r.bottom);return{x:e.x,y:i?r.top:r.bottom}}return t}function QO(e,t,r){let n=e[t];for(let i=t+r;i>=0&&in.lo)),r=Math.min(...e.map(n=>n.hi));if(!(t>r))return{lo:t,hi:r}}function ice(e,t){return t==="left"||t==="right"?ZO(e.top,e.bottom):ZO(e.left,e.right)}function JO(e,t,r){let n=e.y>=r.top-kr&&e.y<=r.bottom+kr,i=e.x>=r.left-kr&&e.x<=r.right+kr;if(Vr(e,t,kr)&&n){if(Math.abs(e.x-r.left)0?MWe(s):void 0}function sce(e,t,r,n,i){let s=OWe(e,t,r,n,i);if(!s)return;let o=i?e.y:e.x,l=Math.min(s.hi,Math.max(s.lo,o));if(!(Math.abs(l-o)({...l}));for(let l=t;l>=0&&l=r.left-kr&&Math.max(e.x,t.x)<=r.right+kr,i=Math.min(e.y,t.y)>=r.top-kr&&Math.max(e.y,t.y)<=r.bottom+kr;if(Math.abs(e.y-r.top)n.bottom+kr;case"left":return Vr(t,r,kr)&&r.xn.right+kr}}function cce(e,t,r){if(e.length<3)return e;if(r){let s=oce(e[0],e[1],t);return s&&lce(s,e[1],e[2],t)?e.slice(1):e}let n=e.length-1,i=oce(e[n-1],e[n],t);return i&&lce(i,e[n-1],e[n-2],t)?e.slice(0,n):e}function $We(e,t,r){let n=e;if(t){let s=QO(n,0,1);if(s){let o=rce(s,n[0],t);o!==n[0]&&(n=[o,...n.slice(1)])}n=cce(n,t,!0)}if(r){let s=n.length-1,o=QO(n,s,-1);if(o){let l=rce(o,n[s],r,!0);l!==n[s]&&(n=[...n.slice(0,s),l])}n=cce(n,r,!1)}let i=dce(n,t,r);return i!==n||n.length===2?i:(t&&(n=ace(n,t,!0)),r&&(n=ace(n,r,!1)),n)}function e5(e,t){for(let r of e){let n=uce(r,t,2);if(!n)continue;let i=Fr(n.points,kr),s=$We(i,n.srcRect,n.dstRect);if(s.length<3){n.edge.points=s;continue}let o=[s[0],{...s[0]},...s.slice(1,-1),s[s.length-1],{...s[s.length-1]}];n.edge.points=o}}var kr,DWe,ece,fce=w(()=>{"use strict";sl();kr=.001,DWe=.5,ece=4;a(uce,"endpointContextFor");a(NWe,"segmentEnterPoint");a(tce,"clipEndpoint");a(hce,"clipEdgeEndpointsToNodeBoundaries");a(rce,"snapEndpointToBoundary");a(QO,"firstDistinctAdjacent");a(ZO,"cornerClearanceRange");a(nce,"clampToCornerClearance");a(MWe,"intersectRanges");a(ice,"clearanceRangeForSide");a(JO,"terminalSideForSegment");a(IE,"isHorizontalSide");a(OWe,"straightClearanceRange");a(sce,"clearStraightEndpointCornerAxis");a(dce,"clearStraightEndpointCornerConnections");a(PWe,"cornerClearedEndpoint");a(BWe,"moveCollinearEndpointRun");a(ace,"clearEndpointCornerConnection");a(oce,"borderSideForSegment");a(lce,"leavesOutward");a(cce,"collapseOwnBorderStub");a($We,"snapAndCollapseEndpoints");a(e5,"prepareEdgeEndpointsForRenderer")});function mce(e){return new Map(e.map(t=>[t.id,t]))}function FWe(e,t){let r=e.parentId,n=null;for(;r;){let i=t.get(r);if(!i?.isGroup)break;n=i.id,r=i.parentId}return n}function pce(e,t){let r=0,n=e.parentId;for(;n;){let i=t.get(n);if(!i?.isGroup)break;r++,n=i.parentId}return r}function gce(e){let t=1/0,r=-1/0,n=1/0,i=-1/0;for(let s of e){let o=s.x,l=s.y;if(typeof o!="number"||typeof l!="number")continue;let u=s.width??0,h=s.height??0;t=Math.min(t,o-u/2),r=Math.max(r,o+u/2),n=Math.min(n,l-h/2),i=Math.max(i,l+h/2)}return t===1/0||n===1/0?null:{minX:t,maxX:r,minY:n,maxY:i}}function GWe(e,t){let r=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+r,e.height=Math.max(0,t.maxY-t.minY)+r}function VWe(e){let t=mce(e),r=e.filter(n=>n.isGroup&&n.parentId).sort((n,i)=>pce(i,t)-pce(n,t));for(let n of r){let i=e.filter(o=>o.parentId===n.id),s=gce(i);s&&GWe(n,s)}}function t5(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(u=>!u.isGroup),s=1/0,o=-1/0;for(let u of i){let h=u[t];typeof h=="number"&&(s=Math.min(s,h),o=Math.max(o,h))}if(!Number.isFinite(s)||!Number.isFinite(o))return!1;let l=a(u=>s+o-u,"mirror");for(let u of r){let h=u[t];typeof h=="number"&&(u[t]=l(h));let d=u.groupTitleRect;d&&(u.groupTitleRect=t==="x"?{...d,left:l(d.right),right:l(d.left)}:{...d,top:l(d.bottom),bottom:l(d.top)})}for(let u of n)for(let h of u.points??[])h[t]=l(h[t]);return!0}function yce(e){return(e.nodes??[]).some(r=>!r.isGroup)?t5(e,"y"):!0}function xce(e,t="LR"){let r=e.nodes??[],n=e.edges??[],i=r.filter(I=>!I.isGroup),s=1/0,o=1/0;for(let I of i){let F=I.x??0,N=I.y??0;F0?Math.max(1,d/f):1;for(let I of i){let F=I.x??0,D=((I.y??0)-o)*p+l,M=F-s;I.x=D,I.y=M}for(let I of n)if(I.points)for(let F of I.points){let N=F.x,M=(F.y-o)*p+l,R=N-s;F.x=M,F.y=R}VWe(r);let m=r.filter(I=>I.isGroup&&!I.parentId);if(m.length===0)return t==="RL"&&t5(e,"x"),!0;let g=mce(r),y=new Map;for(let I of r){if(I.isGroup)continue;let F=FWe(I,g);if(!F)continue;let N=y.get(F)??[];N.push(I),y.set(F,N)}let x=0;for(let I of m){let F=I.padding??0;F>x&&(x=F)}let b=[],T=1/0,C=-1/0;for(let I of m){let F=y.get(I.id)??[],N=gce(F);N&&(T=Math.min(T,N.minX),C=Math.max(C,N.maxX),b.push({lane:I,contentTop:N.minY,contentBottom:N.maxY,centerY:(N.minY+N.maxY)/2}))}if(T===1/0||C===-1/0)return!0;let v=Math.max(0,C-T),E=Math.max(x,10),S=v+2*E,_=l+S,$=(T+C)/2-S/2-l,O=$+_/2,G=Math.max(x,l);b.sort((I,F)=>I.centerY-F.centerY);for(let I=0;I{"use strict";a(mce,"buildNodeMap");a(FWe,"resolveTopLevelGroupId");a(pce,"groupDepth");a(gce,"boundsForChildren");a(GWe,"applyGroupBounds");a(VWe,"recomputeNestedGroupBounds");a(t5,"mirrorAxis");a(yce,"applyBtDirectionTransform");a(xce,"applyLrDirectionTransform")});function Tce(e,t){let{nodeInfoById:r,realNodeRects:n}=cg(t);for(let i of e){if(i.isLayoutOnly)continue;let s=i.points;if(!s||s.length<4)continue;let o=vE(Fr(s,al),al);if(!o)continue;let{p3:l}=o,u=o.kind==="HVH",h=LE(i,r,al);if(!h)continue;let{srcId:d,dstId:f,srcInfo:p,dstInfo:m,collinearX:g,collinearY:y}=h;if(g||y)continue;let x,b=p.rect;for(let T of UWe){let C,v,E;if(u){let O=m.cy>p.cy?b.bottom:b.top,G=p.cx+T;if(G<=b.left+al||G>=b.right-al)continue;C={x:G,y:O},v={x:G,y:l.y},E={x:l.x,y:l.y}}else{let O=m.cx>p.cx?b.right:b.left,G=p.cy+T;if(G<=b.top+al||G>=b.bottom-al)continue;C={x:O,y:G},v={x:l.x,y:G},E={x:l.x,y:l.y}}let S=ma(C,v,al),_=ma(v,E,al);if(S&&_||!S&&In(C,v,n,[d],1)||!_&&In(v,E,n,[f],1))continue;let A=!S&&Gx(C,v,e,i,{epsilon:al,skipDegenerateOther:!0}),B=!_&&Gx(v,E,e,i,{epsilon:al,skipDegenerateOther:!0});if(!(A||B)){S?x=[v,E]:_?x=[C,v]:x=[C,v,E];break}}x&&(i.points=x)}}var al,zWe,DE,UWe,Cce=w(()=>{"use strict";sl();al=1e-6,zWe=8,DE=zWe,UWe=[0,DE,-DE,2*DE,-2*DE];a(Tce,"portSwapToLShape")});function kce(e,t){let{realNodeRects:s,labelNodeRects:o}=Yl(t.values());for(let l of e){if(l.isLayoutOnly)continue;let u=l.points;if(!u||u.length<4)continue;let h=Fr(u,.001);if(h.length<4)continue;let d=h.length-1,f=h[d],p=h[d-1],m=h[d-2],g=f.x-p.x,y=f.y-p.y,x=Math.hypot(g,y);if(x>=10||x<.001)continue;let b=p.x-m.x,T=p.y-m.y;if(Math.hypot(b,T)<.001)continue;let v=Jn(p,f,.001),E=ei(p,f,.001),S=Jn(m,p,.001),_=ei(m,p,.001);if(!(v&&_||E&&S))continue;let A=l.end,B=l.start,$=A?t.get(A):void 0;if(!$)continue;let O=$.x??0,G=$.y??0,I=cs($);if(!I)continue;let F,N;if(_){let z=T<0;F={x:O,y:m.y},N={x:O,y:z?I.bottom:I.top}}else{let z=b>0;F={x:m.x,y:G},N={x:z?I.right:I.left,y:G}}if(In(F,N,s,A?[A]:[],-2)||In(F,N,o,[],-2))continue;if(B){let z=t.get(B),j=z?cs(z):void 0;if(j&&wE(F,j,2))continue}let D=a((z,j)=>`${z.x.toFixed(3)},${z.y.toFixed(3)}|${j.x.toFixed(3)},${j.y.toFixed(3)}`,"ownSegmentKey"),M=new Set;for(let z=0;z{for(let K of e){if(K===l||K.isLayoutOnly)continue;let Z=K.points;if(!(!Z||Z.length<2))for(let ce=0;ce=0){let z=h[d-3],j=[B,A].filter(K=>!!K);if(In(z,F,s,j,-2)||R(z,F))continue}let V=[...h.slice(0,d-2),F,N];l.points=V;let U=l.labelNodeId;if(U){let z=t.get(U);if(z){let j=z.width??0,K=z.height??0;if(j>0&&K>0){let Z,ce,te=-1;for(let me=0;me=j+2||Fe&&ye>=K+2)&&ye>te&&(te=ye,Z=(he.x+we.x)/2,ce=(he.y+we.y)/2)}Z!==void 0&&ce!==void 0&&(z.x=Z,z.y=ce)}}}}}var Sce=w(()=>{"use strict";sl();a(kce,"collapseShortTerminalStub")});function n5(e,t){let i=a((m,g)=>{let y=m.x??0,x=m.y??0,b=g.x-y,T=g.y-x,C=(m.width??0)/2,v=(m.height??0)/2;return Math.abs(T)*C>Math.abs(b)*v?(T<0&&(v=-v),{x:y+(T===0?0:v*b/T),y:x+v}):(b<0&&(C=-C),{x:y+C,y:x+(b===0?0:C*T/b)})},"rectIntersect"),s=a((m,g)=>{let y=Fr(m.points??[]);if(y.length<2)return;let x=g?m.start:m.end,b=x?t.get(x):void 0,T=b?cs(b):void 0;if(!b||!x||!T)return;let C=g?y[0]:y[y.length-1],v=g?y[1]:y[y.length-2],E=i(b,C),S=C;if(r5(v,E)&&(S=v),$r(E,S,Qt))return{edge:m,edgeId:String(m.id??""),nodeId:x,atStart:g,orientation:"V",coord:E.x,min:Math.min(E.y,S.y),max:Math.max(E.y,S.y),boundary:E,railEnd:S,rect:T};if(Vr(E,S,Qt))return{edge:m,edgeId:String(m.id??""),nodeId:x,atStart:g,orientation:"H",coord:E.y,min:Math.min(E.x,S.x),max:Math.max(E.x,S.x),boundary:E,railEnd:S,rect:T}},"terminalLaneFor"),o=a((m,g)=>Math.max(0,Math.min(m.max,g.max)-Math.max(m.min,g.min)),"projectedOverlapLength"),l=a((m,g)=>m.nodeId!==g.nodeId||m.orientation!==g.orientation?!1:m.orientation==="H"?(Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1)&&$r(m.boundary,g.boundary,1):(Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1)&&Vr(m.boundary,g.boundary,1),"sameTerminalFace"),u=a((m,g)=>m.nodeId!==g.nodeId||m.orientation!==g.orientation?!1:o(m,g)>=us&&Math.abs(m.coord-g.coord)<.5,"exactTerminalLaneConflict"),h=a((m,g)=>{if(m.nodeId!==g.nodeId||m.orientation!==g.orientation||m.orientation!=="H"||m.atStart===g.atStart)return!1;let y=o(m,g);if(y2*x?!1:l(m,g)&&Math.abs(m.coord-g.coord)<16},"nearTerminalLaneConflict"),d=a((m,g)=>{let y=Fr(m.edge.points??[]);if(y.length<2)return;let x=m.orientation==="V"?{x:m.boundary.x+g,y:m.boundary.y}:{x:m.boundary.x,y:m.boundary.y+g},b=m.orientation==="V"?{x:m.railEnd.x+g,y:m.railEnd.y}:{x:m.railEnd.x,y:m.railEnd.y+g};if(!a(()=>Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1?Vr(x,m.boundary,Qt)&&x.x>=m.rect.left+1&&x.x<=m.rect.right-1:Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1?$r(x,m.boundary,Qt)&&x.y>=m.rect.top+1&&x.y<=m.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(m.atStart){let S=y.length>1&&ma(y[1],m.railEnd,Qt),_=y.slice(S?2:1),A=_[0];return A&&!r5(A,b)?void 0:[x,b,..._]}let C=y.length>1&&ma(y[y.length-2],m.railEnd,Qt),v=y.slice(0,C?-2:-1),E=v[v.length-1];if(!(E&&!r5(E,b)))return[...v,b,x]},"shiftedCandidate"),f=a(m=>{let g=m.edge,y=Fr(g.points??[]);if(y.length!==2)return!1;let x=g.start,b=g.end,T=x?t.get(x):void 0,C=b?t.get(b):void 0;if(!T||!C)return!1;let v=T.x??0,E=T.y??0,S=C.x??0,_=C.y??0,[A,B]=y;return Vr(A,B,Qt)&&Math.abs(E-_)<1&&Math.abs(v-S)>1||$r(A,B,Qt)&&Math.abs(v-S)<1&&Math.abs(E-_)>1},"laneIsStraightCollinearConnector"),p=[-7,7,-14,14,-21,21];for(let m=0;m<8;m++){let g=e.filter(x=>!x.isLayoutOnly).flatMap(x=>[s(x,!0),s(x,!1)]).filter(x=>!!x),y=!1;for(let x=0;x{let A=f(S),B=f(_);return A!==B?Number(A)-Number(B):+!_.atStart-+!S.atStart});for(let S of E){for(let _ of p){let A=d(S,_);if(!A)continue;let B=s({...S.edge,points:A},S.atStart);if(!(!B||g.some($=>$.edge!==S.edge&&(u(B,$)||v&&h(B,$))))){S.edge.points=A,y=!0;break}}if(y)break}}if(!y)return}}function vce(e,t){let{realNodeRects:i,labelNodeRects:s}=Yl(t.values()),o=a((u,h)=>{let d=u.start,f=u.end,p=Or(h);if(p.length!==h.length-1)return!1;let m=[d,f].filter(g=>!!g);for(let g of p)if(In(g.a,g.b,i,m,-2)||In(g.a,g.b,s,[],-2))return!1;for(let g of e){if(g===u||g.isLayoutOnly)continue;let y=g.points;if(!(!y||y.length<2)){for(let x of p)for(let b of Or(Fr(y)))if(nl(x,b,.5)>=us||il(x.a,x.b,b.a,b.b,Qt))return!1}}return!0},"candidateIsSafe"),l=a((u,h)=>{if(h+4>=u.length)return;let d=u[h],f=u[h+1],p=u[h+2],m=u[h+3],g=u[h+4],y=Jn(d,f)&&ei(f,p)&&Jn(p,m)&&ei(m,g)&&$r(d,m,Qt)&&$r(d,g,Qt)&&$r(f,p,Qt)&&(f.x-d.x)*(m.x-p.x)<0,x=ei(d,f)&&Jn(f,p)&&ei(p,m)&&Jn(m,g)&&Vr(d,m,Qt)&&Vr(d,g,Qt)&&Vr(f,p,Qt)&&(f.y-d.y)*(m.y-p.y)<0;if(y||x)return Fr([...u.slice(0,h+1),g,...u.slice(h+5)]);if(h+5>=u.length)return;let b=u[h+5],T=ei(d,f)&&Jn(f,p)&&ei(p,m)&&Jn(m,g)&&ei(g,b)&&$r(d,g,Qt)&&$r(d,b,Qt)&&$r(p,m,Qt)&&(p.x-f.x)*(g.x-m.x)<0,C=Jn(d,f)&&ei(f,p)&&Jn(p,m)&&ei(m,g)&&Jn(g,b)&&Vr(d,g,Qt)&&Vr(d,b,Qt)&&Vr(p,m,Qt)&&(p.y-f.y)*(g.y-m.y)<0;if(!(!T&&!C))return Fr([...u.slice(0,h+1),b,...u.slice(h+6)])},"withoutDogleg");for(let u=0;u<8;u++){let h=!1;for(let d of e){if(d.isLayoutOnly)continue;let f=Fr(d.points??[]);for(let p=0;p<=f.length-5;p++){let m=l(f,p);if(!(!m||!o(d,m))){d.points=m,h=!0;break}}if(h)break}if(!h)return}}function i5(e,t){let{realNodeRects:s,labelNodeRects:o}=Yl(t.values()),l=e.filter(g=>!g.isLayoutOnly),u=a((g,y,x)=>Fr(g===y?x??[]:g.points??[]),"pointsFor"),h=a((g,y)=>{let x=0;for(let b=0;b{let y=Or(g);if(y.length!==3)return;let x=y[1];if(!(y[0].horizontal===x.horizontal||y[2].horizontal===x.horizontal))return{index:x.index,horizontal:x.horizontal,vertical:x.vertical,segment:x}},"middleRail"),f=a((g,y)=>{let x=[g.start,g.end].filter(b=>!!b);return s.filter(b=>{if(x.includes(b.id))return!1;let T=b.rect;return y.horizontal?Rs(y.a.x,y.b.x,T.left,T.right)>=us&&y.a.y>=T.top-2&&y.a.y<=T.bottom+2:Rs(y.a.y,y.b.y,T.top,T.bottom)>=us&&y.a.x>=T.left-2&&y.a.x<=T.right+2})},"blockingRectsFor"),p=a((g,y,x)=>{let b=g.map(C=>({...C}));if(y.horizontal)b[y.index].y=x,b[y.index+1].y=x;else if(y.vertical)b[y.index].x=x,b[y.index+1].x=x;else return;let T=bo(Fr(b));return Or(T).length===T.length-1?T:void 0},"candidateByMovingRail"),m=a((g,y,x)=>{let b=[g.start,g.end].filter(C=>!!C),T=Or(y);if(T.length!==y.length-1)return!1;for(let C of T)if(In(C.a,C.b,s,b,-2)||In(C.a,C.b,o,[],-2))return!1;for(let C of l)if(C!==g){for(let v of T)for(let E of Or(u(C)))if(nl(v,E,.5)>=us)return!1}return h(g,y)<=x},"candidateIsSafe");for(let g=0;g<8;g++){let y=h(),x=!1;for(let b of l){let T=u(b),C=d(T);if(!C)continue;let v=f(b,C.segment);if(v.length===0)continue;let E=C.horizontal?[Math.min(...v.map(S=>S.rect.top))-20,Math.max(...v.map(S=>S.rect.bottom))+20]:[Math.min(...v.map(S=>S.rect.left))-20,Math.max(...v.map(S=>S.rect.right))+20];for(let S of E){let _=p(T,C.segment,S);if(!(!_||!m(b,_,y))){b.points=_,x=!0;break}}if(x)break}if(!x)return}}function s5(e,t,r){let i=a(h=>{let d=h.groupTitleRect;if(!(!d||typeof d.left!="number"||typeof d.right!="number"||typeof d.top!="number"||typeof d.bottom!="number"||!Number.isFinite(d.left)||!Number.isFinite(d.right)||!Number.isFinite(d.top)||!Number.isFinite(d.bottom)||d.right<=d.left||d.bottom<=d.top))return{left:d.left,right:d.right,top:d.top,bottom:d.bottom}},"validTitleRect"),s=a(h=>{if(!h.isGroup||h.parentId)return;let d=Ece(h.direction??r);if(d==="LR"||d==="RL"||d==="BT")return;let f=i(h),p=h.y,m=h.height;if(!f||typeof p!="number"||typeof m!="number"||!Number.isFinite(p)||!Number.isFinite(m)||m<=0)return;let g=f.right-f.left,y=f.bottom-f.top;if(!(y<=0||g{if(!h.horizontal)return!1;let f=h.a.y;return fd.bottom+Qt?!1:Rs(h.a.x,h.b.x,d.left,d.right)>=us},"horizontalSegmentIntersectsTitle"),l=[...t.values()].map(s).filter(h=>!!h);if(l.length===0)return;let u=0;for(let h of e){if(h.isLayoutOnly)continue;let d=Fr(h.points??[]);for(let f of Or(d))for(let p of l)o(f,p.rect)&&(u=Math.max(u,p.rect.bottom-f.a.y+4))}if(!(u<=Qt))for(let h of l){let d=h.node.y,f=h.node.height;typeof d!="number"||typeof f!="number"||!Number.isFinite(d)||!Number.isFinite(f)||f<=0||(h.node.y=d-u/2,h.node.height=f+u,h.node.groupTitleRect={...h.rect,top:h.rect.top-u,bottom:h.rect.bottom-u})}}function a5(e,t,r){let i=a(d=>{let f=d.groupTitleRect;if(!(!f||typeof f.left!="number"||typeof f.right!="number"||typeof f.top!="number"||typeof f.bottom!="number"||!Number.isFinite(f.left)||!Number.isFinite(f.right)||!Number.isFinite(f.top)||!Number.isFinite(f.bottom)||f.right<=f.left||f.bottom<=f.top))return{left:f.left,right:f.right,top:f.top,bottom:f.bottom}},"validTitleRect"),s=a(d=>{if(!d.isGroup||d.parentId||Ece(d.direction??r)!=="LR")return;let p=i(d),m=d.x,g=d.width;if(!p||typeof m!="number"||typeof g!="number"||!Number.isFinite(m)||!Number.isFinite(g)||g<=0)return;let y=p.right-p.left,x=p.bottom-p.top;if(!(y<=0||x{if(!d.vertical)return!1;let p=d.a.x;return pf.right+Qt?!1:Rs(d.a.y,d.b.y,f.top,f.bottom)>=us},"verticalSegmentIntersectsTitle"),l=a((d,f)=>{if(!d.horizontal)return!1;let p=d.a.y;return pf.bottom+Qt?!1:Rs(d.a.x,d.b.x,f.left,f.right)>=us},"horizontalSegmentIntersectsTitle"),u=[...t.values()].map(s).filter(d=>!!d);if(u.length===0)return;let h=0;for(let d of e){if(d.isLayoutOnly)continue;let f=Fr(d.points??[]);for(let p of Or(f))for(let m of u)if(o(p,m.rect))h=Math.max(h,m.rect.right-p.a.x+4);else if(l(p,m.rect)){let g=Math.min(p.a.x,p.b.x);h=Math.max(h,m.rect.right-g+4)}}if(!(h<=Qt))for(let d of u){let f=d.node.x,p=d.node.width;typeof f!="number"||typeof p!="number"||!Number.isFinite(f)||!Number.isFinite(p)||p<=0||(d.node.x=f-h/2,d.node.width=p+h,d.node.groupTitleRect={...d.rect,left:d.rect.left-h,right:d.rect.right-h})}}function wce(e,t){let{realNodeRects:i}=Yl(t.values()),s=e.filter(y=>!y.isLayoutOnly),o=a((y,x=new Map)=>Fr(x.get(y)??y.points??[]),"replacementPointsFor"),l=a((y=new Map)=>{let x=0;for(let b=0;bs.reduce((x,b)=>x+ga(o(b,y)),0),"totalBends"),h=a(y=>{let x=o(y);if(x.length<4)return;let b=x[x.length-2],T=x[x.length-1];if(!(!Jn(b,T,Qt)&&!ei(b,T,Qt)))return{tailStart:b,terminal:T}},"terminalTailFor"),d=a((y,x)=>{let b=o(y);if(b.length<3)return;let T=b[0],C=b[1],v;if(Jn(T,C,Qt))v={x:C.x,y:x.tailStart.y};else if(ei(T,C,Qt))v={x:x.tailStart.x,y:C.y};else return;let E=bo(Fr([T,C,v,x.tailStart,x.terminal]));return Or(E).length===E.length-1?E:void 0},"candidateWithDestinationTail"),f=a((y,x)=>{let b=[y.start,y.end].filter(T=>!!T);for(let T of Or(x))if(In(T.a,T.b,i,b,-2))return!0;return!1},"pathHasNodeHit"),p=a((y,x,b)=>{for(let T of s)if(T!==y){for(let C of Or(x))for(let v of Or(o(T,b)))if(nl(C,v,.5)>=us)return!0}return!1},"pathHasSharedTrack"),m=a((y,x,b)=>!f(y,x)&&!p(y,x,b),"candidateIsSafe"),g=a(()=>{let y=new Map;for(let x of s){let b=x.end;if(!b||!t.has(b)||o(x).length<4)continue;let C=y.get(b)??[];C.push(x),y.set(b,C)}return y},"edgesByDestination");for(let y=0;y<4;y++){let x=l();if(x===0)return;let b=u(),T,C=x,v=b;for(let E of g().values())for(let S=0;S=x||N>C||N===C&&D>=v||(T=F,C=N,v=D)}if(!T)return;for(let[E,S]of T)E.points=S}}function _ce(e,t){let{realNodeRects:o,labelNodeRects:l}=Yl(t.values()),u=e.filter(E=>!E.isLayoutOnly),h=a((E,S=new Map)=>Fr(S.get(E)??E.points??[]),"replacementPointsFor"),d=a((E=new Map)=>{let S=0;for(let _=0;_u.reduce((S,_)=>S+ga(h(_,E)),0),"totalBends"),p=a(E=>{let S=E.start,_=E.end,A=S?t.get(S):void 0,B=_?t.get(_):void 0,$=A?cs(A):void 0,O=B?cs(B):void 0;return $&&O?{src:$,dst:O}:void 0},"endpointRectsFor"),m=a((E,S,_)=>{if(_.index<=0||_.index+1>=S.length-1)return;let A=p(E);if(A){if(_.vertical){let B=_.a.x,$=Math.min(A.src.left,A.dst.left),O=Math.max(A.src.right,A.dst.right),G=B<$-Qt?"left":B>O+Qt?"right":void 0;return G?{edge:E,points:S,segmentIndex:_.index,axis:"vertical",side:G,coord:B,min:Math.min(_.a.y,_.b.y),max:Math.max(_.a.y,_.b.y)}:void 0}if(_.horizontal){let B=_.a.y,$=Math.min(A.src.top,A.dst.top),O=Math.max(A.src.bottom,A.dst.bottom),G=B<$-Qt?"top":B>O+Qt?"bottom":void 0;return G?{edge:E,points:S,segmentIndex:_.index,axis:"horizontal",side:G,coord:B,min:Math.min(_.a.x,_.b.x),max:Math.max(_.a.x,_.b.x)}:void 0}}},"externalRailForSegment"),g=a(()=>{let E=[];for(let S of u){let _=h(S);for(let A of Or(_)){let B=m(S,_,A);B&&E.push(B)}}return E},"collectExternalRails"),y=a((E,S)=>E.edge!==S.edge&&E.axis===S.axis&&E.side===S.side&&Rs(E.min,E.max,S.min,S.max)>=us,"railsInteract"),x=a(E=>{let S=[],_=new Set;for(let A of E){if(_.has(A))continue;let B=[A],$=[];for(_.add(A);B.length>0;){let O=B.pop();$.push(O);for(let G of E)!_.has(G)&&y(O,G)&&(_.add(G),B.push(G))}$.length>1&&S.push($)}return S},"connectedComponents"),b=a(E=>{let S=[];for(let _ of E)S.some(A=>Math.abs(A-_.coord){let S=E.map(B=>B.coord),_=b(E),A=[];if(E.length<=6){let B=new Array(_.length).fill(!1),$=[],O=a(()=>{if($.length===E.length){$.some((G,I)=>Math.abs(G-S[I])>=Qt)&&A.push([...$]);return}for(let[G,I]of _.entries())B[G]||(B[G]=!0,$.push(I),O(),$.pop(),B[G]=!1)},"visit");return O(),A}for(let B=0;B{let _=new Map;for(let[B,$]of E.entries()){let O=S[B],G=_.get($.edge)??$.points.map(I=>({x:I.x,y:I.y}));$.axis==="vertical"?(G[$.segmentIndex].x=O,G[$.segmentIndex+1].x=O):(G[$.segmentIndex].y=O,G[$.segmentIndex+1].y=O),_.set($.edge,G)}let A=new Map;for(let[B,$]of _){let O=bo(Fr($));if(Or(O).length!==O.length-1)return;A.set(B,O)}return A},"replacementsForAssignment"),v=a(E=>{for(let[S,_]of E){let A=[S.start,S.end].filter(B=>!!B);for(let B of Or(_))if(In(B.a,B.b,o,A,-2)||In(B.a,B.b,l,[],-2))return!1}for(let S=0;S=us)return!1}}return!0},"candidateIsSafe");for(let E=0;E<4;E++){let S=d();if(S===0)return;let _,A=S,B=f(),$=Number.POSITIVE_INFINITY;for(let O of x(g()))for(let G of T(O)){let I=C(O,G);if(!I||!v(I))continue;let F=d(I);if(F>=S)continue;let N=f(I),D=O.reduce((M,R,P)=>M+Math.abs(G[P]-R.coord),0);F>A||F===A&&(N>B||N===B&&D>=$)||(_=I,A=F,B=N,$=D)}if(!_)return;for(let[O,G]of _)O.points=G}}function Ace(e,t){let{realNodeRects:i,labelNodeRects:s}=Yl(t.values()),o=e.filter(g=>!g.isLayoutOnly),l=a((g,y,x)=>Fr(g===y?x??[]:g.points??[]),"pointsFor"),u=a(g=>Or(g).reduce((y,x)=>{let b=x.a.x-x.b.x,T=x.a.y-x.b.y;return y+Math.hypot(b,T)},0),"pathLength"),h=a((g,y)=>{let x=0;for(let b=0;b{if(g.horizontal){let x=g.a.y;return(Math.abs(x-y.top)<1||Math.abs(x-y.bottom)<1)&&Rs(g.a.x,g.b.x,y.left,y.right)>=us}if(g.vertical){let x=g.a.x;return(Math.abs(x-y.left)<1||Math.abs(x-y.right)<1)&&Rs(g.a.y,g.b.y,y.top,y.bottom)>=us}return!1},"segmentRunsAlongRectBorder"),f=a(g=>{let y=[g.start,g.end].filter(b=>!!b),x=[];for(let b of y){let T=t.get(b),C=T?cs(T):void 0;C&&x.push(C)}return x},"endpointRectsFor"),p=a((g,y)=>{if(y+3>=g.length)return[];let x=g[y],b=g[y+1],T=g[y+2],C=g[y+3],v=Jn(x,b,Qt)&&ei(b,T,Qt)&&Jn(T,C,Qt),E=ei(x,b,Qt)&&Jn(b,T,Qt)&&ei(T,C,Qt);if(!v&&!E)return[];if(!(v?Math.sign(b.x-x.x)!==Math.sign(C.x-T.x):Math.sign(b.y-x.y)!==Math.sign(C.y-T.y)))return[];let _=$r(x,C,Qt)||Vr(x,C,Qt)?[]:[{x:x.x,y:C.y},{x:C.x,y:x.y}],A=_.length===0?[[...g.slice(0,y+1),...g.slice(y+3)]]:_.map($=>[...g.slice(0,y+1),$,...g.slice(y+3)]),B=new Set;return A.map($=>bo(Fr($))).filter($=>{if(Or($).length!==$.length-1||!$.some(G=>ma(G,C,Qt)))return!1;let O=$.map(G=>`${G.x.toFixed(3)},${G.y.toFixed(3)}`).join("|");return B.has(O)?!1:(B.add(O),!0)})},"shortcutCandidatesAt"),m=a((g,y,x)=>{let b=[g.start,g.end].filter(C=>!!C),T=f(g);for(let C of Or(y))if(In(C.a,C.b,i,b,-2)||In(C.a,C.b,s,[],-2)||T.some(v=>d(C,v)))return!1;for(let C of o)if(C!==g){for(let v of Or(y))for(let E of Or(l(C)))if(nl(v,E,.5)>=us)return!1}return h(g,y)<=x},"candidateIsSafe");for(let g=0;g<8;g++){let y=h(),x,b,T=y,C=Number.POSITIVE_INFINITY,v=Number.POSITIVE_INFINITY;for(let E of o){let S=l(E),_=ga(S,Qt),A=u(S);for(let B=0;B<=S.length-4;B++)for(let $ of p(S,B)){let O=ga($,Qt),G=u($);if(!(O<_||O===_&&GT||F===T&&(O>C||O===C&&G>=v)||(x=E,b=$,T=F,C=O,v=G)}}if(!x||!b)return;x.points=b}}function Rce(e,t){let o=[];for(let ge of t.values()){if(ge.isGroup||ge.isEdgeLabel)continue;let De=ge.x??0,Le=ge.y??0,Ie=cs(ge);Ie&&o.push({id:String(ge.id??""),cx:De,cy:Le,rect:Ie})}if(o.length===0)return;let l=new Map(o.map(ge=>[ge.id,ge])),u=o.map(ge=>({id:ge.id,rect:ge.rect})),h=["top","bottom","left","right"],d={top:Math.min(...o.map(ge=>ge.rect.top))-20,bottom:Math.max(...o.map(ge=>ge.rect.bottom))+20,left:Math.min(...o.map(ge=>ge.rect.left))-20,right:Math.max(...o.map(ge=>ge.rect.right))+20},f=e.filter(ge=>!ge.isLayoutOnly),p=new Map(f.map((ge,De)=>[ge,De])),m=a(ge=>{let De=ge==="left"||ge==="top"?-1:1,Le=[];for(let Ie=0;Ie<=2;Ie++)Le.push(d[ge]+De*20*Ie);return Le},"outwardTracksForSide"),g=a((ge,De=new Map)=>Fr(De.get(ge)??ge.points??[]),"replacementPointsFor"),y=a((ge,De)=>{let Le=0;for(let Ie of ge)for(let Q of De)il(Ie.a,Ie.b,Q.a,Q.b,Qt)&&Le++;return Le},"crossingCountBetweenSegments"),x=a((ge,De)=>y(Or(ge),Or(De)),"crossingCountBetweenPaths"),b=a((ge=new Map)=>{let De=0,Le=[],Ie=new Set,Q=[],ne=a(re=>{Ie.has(re)||(Ie.add(re),Q.push(re))},"addEdge");for(let re=0;re0&&(De+=W,Le.push({first:se,second:L,count:W}),ne(se),ne(L))}}return Q.sort((re,se)=>(p.get(re)??0)-(p.get(se)??0)),{count:De,pairs:Le,edgeSet:Ie,edges:Q}},"crossingSnapshot"),T=a((ge,De)=>{let Le=new Set(De.keys());if(Le.size===0)return ge.count;let Ie=0;for(let ne of ge.pairs)(Le.has(ne.first)||Le.has(ne.second))&&(Ie+=ne.count);let Q=0;for(let ne=0;ne{let De=new Map;for(let Q of ge.pairs){let ne=De.get(Q.first)??new Set;ne.add(Q.second),De.set(Q.first,ne);let re=De.get(Q.second)??new Set;re.add(Q.first),De.set(Q.second,re)}let Le=[],Ie=new Set;for(let Q of ge.edges){if(Ie.has(Q))continue;let ne=[Q],re=[];for(Ie.add(Q);ne.length>0;){let se=ne.pop();re.push(se);for(let fe of De.get(se)??[])Ie.has(fe)||(Ie.add(fe),ne.push(fe))}re.sort((se,fe)=>(p.get(se)??0)-(p.get(fe)??0)),re.length>1&&Le.push(re)}return Le},"crossingComponents"),v=a(ge=>[ge.start,ge.end].filter(De=>!!De),"endpointIdsFor"),E=a(ge=>{let De=[];for(let Le of C(ge)){let Ie=new Set(Le),Q=new Set(Le.flatMap(re=>v(re))),ne=[...Le];for(let re of f)Ie.has(re)||v(re).some(se=>Q.has(se))&&ne.push(re);ne.sort((re,se)=>(p.get(re)??0)-(p.get(se)??0)),De.push(ne)}return De},"pairSearchGroups"),S=a((ge,De,Le)=>T(ge,new Map([[De,Le]])),"crossingCountWithSingleReplacement"),_=a(ge=>{let De=new Map;for(let Le of ge.pairs)De.set(Le.first,(De.get(Le.first)??0)+Le.count),De.set(Le.second,(De.get(Le.second)??0)+Le.count);return De},"currentCrossingsByEdge"),A=a(ge=>ge.slice(1).reduce((De,Le,Ie)=>{let Q=ge[Ie];return De+Math.abs(Le.x-Q.x)+Math.abs(Le.y-Q.y)},0),"pathLength"),B=a((ge=new Map)=>f.reduce((De,Le)=>De+ga(g(Le,ge)),0),"totalBends"),$=a((ge=new Map)=>f.reduce((De,Le)=>De+A(g(Le,ge)),0),"totalLength"),O=a((ge,De,Le=new Map)=>{let Ie=Or(De);for(let Q of f)if(Q!==ge){for(let ne of Ie)for(let re of Or(g(Q,Le)))if(nl(ne,re,.5)>=us)return!0}return!1},"pathHasSegmentConflict"),G=a((ge,De)=>{let Le=[ge.start,ge.end].filter(Ie=>!!Ie);for(let Ie of Or(De))if(In(Ie.a,Ie.b,u,Le,-2))return!0;return!1},"pathHitsNode"),I=a((ge,De)=>{let Le=bo(Fr(De));Or(Le).length===Le.length-1&&ge.push(Le)},"pushOrthogonalCandidate"),F=a(ge=>ge==="left"||ge==="right","sideIsHorizontal"),N=a((ge,De,Le)=>{switch(De){case"left":return Math.min(ge.x,Le.x)-20;case"right":return Math.max(ge.x,Le.x)+20;case"top":return Math.min(ge.y,Le.y)-20;case"bottom":return Math.max(ge.y,Le.y)+20}},"localTrackForSameSide"),D=a((ge,De,Le,Ie)=>{let Q=Le==="left"||Le==="top"?-1:1,ne=[N(De,Le,Ie),d[Le]];for(let re of ne)for(let se=0;se<=2;se++)I(ge,RE(De,Le,Ie,re+Q*20*se))},"addSameSideCandidates"),M=a((ge,De,Le,Ie,Q)=>{for(let ne of m(Le))for(let re of m(Q))I(ge,[De,{x:ne,y:De.y},{x:ne,y:re},{x:Ie.x,y:re},Ie])},"addHorizontalToVerticalCandidates"),R=a((ge,De,Le,Ie,Q)=>{for(let ne of m(Le))for(let re of m(Q))I(ge,[De,{x:De.x,y:ne},{x:re,y:ne},{x:re,y:Ie.y},Ie])},"addVerticalToHorizontalCandidates"),P=a((ge,De,Le,Ie,Q)=>{let ne=[...m("top"),...m("bottom")];for(let re of m(Le))for(let se of m(Q))for(let fe of ne)I(ge,[De,{x:re,y:De.y},{x:re,y:fe},{x:se,y:fe},{x:se,y:Ie.y},Ie])},"addHorizontalPairCandidates"),V=a((ge,De,Le,Ie,Q)=>{let ne=[...m("left"),...m("right")];for(let re of m(Le))for(let se of m(Q))for(let fe of ne)I(ge,[De,{x:De.x,y:re},{x:fe,y:re},{x:fe,y:se},{x:Ie.x,y:se},Ie])},"addVerticalPairCandidates"),U=a(ge=>{let De=new Set;return ge.map(Le=>Fr(Le)).filter(Le=>{let Ie=Le.map(Q=>`${Q.x.toFixed(3)},${Q.y.toFixed(3)}`).join("|");return De.has(Ie)||Le.length<2?!1:(De.add(Ie),!0)})},"dedupeCandidatePaths"),z=a((ge,De,Le,Ie)=>{let Q=[],ne=AE(ge,De,Le,Ie,20,Qt);ne&&I(Q,ne),De===Ie&&D(Q,ge,De,Le);let re=F(De),se=F(Ie);return re&&!se?M(Q,ge,De,Le,Ie):!re&&se?R(Q,ge,De,Le,Ie):re?P(Q,ge,De,Le,Ie):V(Q,ge,De,Le,Ie),U(Q)},"buildCandidatesForSides"),j=a((ge,De,Le,Ie)=>{let Q=[...m("left"),...m("right")],ne=[...m("top"),...m("bottom")];for(let re of h){let se=Rh(Ie,re),fe=re==="top"||re==="bottom"?m(re):ne;for(let J of Q){I(ge,[De,Le,{x:J,y:Le.y},{x:J,y:se.y},se]);for(let L of fe)I(ge,[De,Le,{x:J,y:Le.y},{x:J,y:L},{x:se.x,y:L},se])}}},"addVerticalDepartureOuterTrackCandidates"),K=a((ge,De,Le,Ie)=>{let Q=[...m("left"),...m("right")],ne=[...m("top"),...m("bottom")];for(let re of h){let se=Rh(Ie,re),fe=re==="left"||re==="right"?m(re):Q;for(let J of ne){I(ge,[De,Le,{x:Le.x,y:J},{x:se.x,y:J},se]);for(let L of fe)I(ge,[De,Le,{x:Le.x,y:J},{x:L,y:J},{x:L,y:se.y},se])}}},"addHorizontalDepartureOuterTrackCandidates"),Z=a(ge=>{let De=ge.start,Le=ge.end,Ie=Le?l.get(Le):void 0;if(!De||!Ie)return[];let Q=Fr(ge.points??[]);if(Q.length<4)return[];let ne=Q[0],re=Q[1],se=[];return ei(ne,re,Qt)?j(se,ne,re,Ie):Jn(ne,re,Qt)&&K(se,ne,re,Ie),se},"terminalPreservingOuterTrackCandidates"),ce=a(ge=>{let De=ge.start,Le=ge.end,Ie=De?l.get(De):void 0,Q=Le?l.get(Le):void 0;if(!Ie||!Q)return[];let ne=[];for(let re of h){let se=Rh(Ie,re);for(let fe of h)ne.push(...z(se,re,Rh(Q,fe),fe))}return ne.push(...Z(ge)),ne},"candidatePathsFor"),te=a(()=>new Map(f.map(ge=>[ge,Or(g(ge))])),"currentSegmentsByEdge"),me=a((ge,De,Le)=>{let Ie=new Set;for(let Q of f){if(Q===ge)continue;let ne=Le.get(Q)??Or(g(Q));De.some(re=>ne.some(se=>nl(re,se,.5)>=us))&&Ie.add(Q)}return Ie},"sharedTrackConflictsFor"),he=a((ge,De,Le,Ie)=>{let Q=new Set;return ce(ge).map(re=>bo(Fr(re))).filter(re=>{if(G(ge,re))return!1;let se=re.map(fe=>`${fe.x.toFixed(3)},${fe.y.toFixed(3)}`).join("|");return Q.has(se)||re.length<2?!1:(Q.add(se),!0)}).map(re=>{let se=Or(re),fe=0;for(let J of f)J!==ge&&(fe+=y(se,Le.get(J)??Or(g(J))));return{candidate:re,candidateSegments:se,crossings:De.count-(Ie.get(ge)??0)+fe,bends:ga(re,Qt),totalBends:ga(re),length:A(re)}}).filter(({crossings:re})=>re<=De.count).sort((re,se)=>re.crossings-se.crossings||re.bends-se.bends||re.length-se.length).slice(0,48).map(re=>({path:re.candidate,segments:re.candidateSegments,sharedTrackConflicts:me(ge,re.candidateSegments,Le),totalBends:re.totalBends,length:re.length}))},"pairCandidatesFor"),we=a((ge,De,Le,Ie,Q,ne)=>{let re=0;for(let fe of ge.pairs)(fe.first===De||fe.second===De||fe.first===Ie||fe.second===Ie)&&(re+=fe.count);let se=y(Le.segments,Q.segments);for(let fe of f){if(fe===De||fe===Ie)continue;let J=ne.get(fe)??Or(g(fe));se+=y(Le.segments,J)+y(Q.segments,J)}return ge.count-re+se},"pairCrossingCount"),ye=a((ge,De)=>{for(let Le of ge.sharedTrackConflicts)if(Le!==De)return!1;return!0},"conflictsOnlyWith"),ke=a((ge,De)=>ge.segments.some(Le=>De.segments.some(Ie=>nl(Le,Ie,.5)>=us)),"candidatesShareTrack"),Fe=a((ge,De,Le,Ie)=>ye(De,Le.edge)&&ye(Ie,ge.edge)&&!ke(De,Ie),"pairCandidatesAreCompatible"),Ge=a((ge,De,Le,Ie,Q)=>{let ne=we(ge.current,De.edge,Le,Ie.edge,Q,ge.baseSegments);if(!(ne>=ge.current.count))return{replacements:new Map([[De.edge,Le.path],[Ie.edge,Q.path]]),crossings:ne,bends:ge.currentBends-(ge.baseBendsByEdge.get(De.edge)??0)-(ge.baseBendsByEdge.get(Ie.edge)??0)+Le.totalBends+Q.totalBends,length:ge.currentLength-(ge.baseLengthByEdge.get(De.edge)??0)-(ge.baseLengthByEdge.get(Ie.edge)??0)+Le.length+Q.length}},"scorePairReplacement"),Me=a((ge,De)=>ge.crossings{let Q=Ie;for(let ne of De.candidates)for(let re of Le.candidates){if(!Fe(De,ne,Le,re))continue;let se=Ge(ge,De,ne,Le,re);se&&Me(se,Q)&&(Q=se)}return Q},"bestScoreForOptionPair"),ht=a(ge=>{let De=B(),Le=$(),Ie=te(),Q=_(ge),ne=new Map(f.map(W=>[W,ga(g(W))])),re=new Map(f.map(W=>[W,A(g(W))])),se=new Map,fe=E(ge);for(let W of fe)for(let ae of W){if(se.has(ae))continue;let X=he(ae,ge,Ie,Q);X.length>0&&se.set(ae,{edge:ae,candidates:X})}let J={replacements:new Map,crossings:ge.count,bends:De,length:Le},L={current:ge,currentBends:De,currentLength:Le,baseBendsByEdge:ne,baseLengthByEdge:re,baseSegments:Ie};for(let W of fe){let ae=new Set(W.filter(xe=>ge.edgeSet.has(xe))),X=W.map(xe=>se.get(xe)).filter(xe=>!!xe);for(let xe=0;xe0?J.replacements:void 0},"bestPairedReplacement");for(let ge=0;ge<4;ge++){let De=b(),Le=De.count;if(Le===0)return;let Ie,Q,ne=Le,re=Number.POSITIVE_INFINITY;for(let fe of De.edges){let J=ga(g(fe),Qt);for(let L of ce(fe)){let W=G(fe,L),ae=!W&&O(fe,L),X=S(De,fe,L),xe=ga(L,Qt);W||ae||!(Xne||X===ne&&xe>=re||(Ie=fe,Q=L,ne=X,re=xe)}}if(Ie&&Q){Ie.points=Q;continue}let se=ht(De);if(!se)return;for(let[fe,J]of se)fe.points=J}}var Qt,us,Ece,Or,r5,Lce=w(()=>{"use strict";sl();Qt=.001,us=8,Ece=a(e=>typeof e=="string"?e.toUpperCase():"","upperCaseDirection"),Or=Ah,r5=a((e,t)=>$r(e,t,Qt)||Vr(e,t,Qt),"orthogonallyAligned");a(n5,"separateSharedRenderedTerminalLanes");a(vce,"collapseRedundantRectangularDoglegs");a(i5,"liftObstacleHuggingSameSideRails");a(s5,"liftTopLaneTitleBandsAboveRails");a(a5,"shiftLeftLaneTitleBandsLeftOfRails");a(wce,"swapDestinationTerminalTailsToReduceCrossings");a(_ce,"reassignCrossingExternalRailChannels");a(Ace,"shortcutRedundantOrthogonalJogs");a(Rce,"resolveRenderedOrthogonalCrossings")});function Ice(e,t){let{nodeInfoById:r,realNodeRects:n}=cg(t),i=["top","bottom","left","right"],s=20,o={top:Math.min(...n.map(y=>y.rect.top))-s,bottom:Math.max(...n.map(y=>y.rect.bottom))+s,left:Math.min(...n.map(y=>y.rect.left))-s,right:Math.max(...n.map(y=>y.rect.right))+s},l=a((y,x,b,T)=>{let C=[],v=AE(y,x,b,T,s,Lh);return v&&C.push(v),x===T&&C.push(RE(y,x,b,o[x])),C},"buildOrthogonalPathCandidates"),u=a((y,x)=>{for(let b=0;b{let T=0,C=Ah(y,Lh),v=x.start,E=x.end;for(let S of e){if(S===x||S.isLayoutOnly)continue;let _=S.start,A=S.end;if(!b&&v&&E&&(_===v||_===E||A===v||A===E))continue;let B=S.points;if(!(!B||B.length<2))for(let $ of C)for(let O of Ah(B,Lh)){if(XO($.a,$.b,O.a,O.b,Lh,Lh)){T++;continue}nl($,O,Lh)>=WWe&&T++}}return T},"pathConflictCount"),d=4,f=a((y,x)=>{let b=Math.abs(y.y-x.rect.top),T=Math.abs(y.y-x.rect.bottom),C=Math.abs(y.x-x.rect.left),v=Math.abs(y.x-x.rect.right),E="top",S=b;return T{let T=p.get(y)??[];T.push({side:x,edgeId:b}),p.set(y,T)},"addFaceClaim");for(let y of e){if(y.isLayoutOnly)continue;let x=y.points??[];if(x.length<1)continue;let b=y.id??"",T=y.start,C=y.end;if(T){let v=r.get(T);v&&m(T,f(x[0],v),b)}if(C){let v=r.get(C);v&&m(C,f(x[x.length-1],v),b)}}let g=a((y,x,b)=>p.get(y)?.some(T=>T.edgeId!==b&&T.side===x)??!1,"faceIsClaimed");for(let y of e){if(y.isLayoutOnly)continue;let x=y.points;if(!x||x.length<2)continue;let b=ga(x,Lh);if(b0){let R=h(D,y,!0);if(R>$||R===$&&M>=O)continue;$=R,O=M,B=D;continue}h(D,y)>A||MF.edgeId!==S));let I=p.get(C);I&&p.set(C,I.filter(F=>F.edgeId!==S)),m(T,f(B[0],v),S),m(C,f(B[B.length-1],E),S)}}}var Lh,WWe,Dce=w(()=>{"use strict";sl();Lh=.001,WWe=8;a(Ice,"simplifyDetouredEdges")});function Mce(e,t){let r=t?0:e.length-1,n=t?1:-1,i=e[r],s=e[r+n];if(!i||!s)return;let o=s.x-i.x,l=s.y-i.y;if(!(Math.abs(o)+Math.abs(l)s&&_E(e,jWe(s)))}function ME(e,t){let r=[];for(let g of e){if(g.isLayoutOnly)continue;let y=g.points;if(!(!y||y.length<2))for(let x=0;x{let x=KO(y,s);for(let{nodeId:b,rect:T}of n)if(b!==g&&_E(x,T))return!0;return!1},"labelOverlapsForeignNode"),h=a((g,y)=>{let x=KO(y,s);for(let b of r)if(b.edgeId!==g&&Fx(b.p1,b.p2,x))return!0;return!1},"labelOverlapsForeignEdge"),d=a((g,y,x)=>u(g,x)||h(y,x),"labelOverlapsAnything"),f=[],p=a(g=>{for(let{id:y,rect:x}of i)if(Zle(x,g))return y},"findContainingLane"),m=a((g,y)=>f.some(x=>x.labelId!==g&&_E(y,x.rect)),"overlapsPlacedLabel");for(let g of e){if(g.isLayoutOnly)continue;let y=g.labelNodeId;if(!y)continue;let x=t.get(y);if(!x)continue;let b=g.points;if(!b||b.length<2)continue;let T=x.width??0,C=x.height??0;if(T<=0||C<=0)continue;let v=[];for(let U=0;U=ya&&Z>=ya||v.push({idx:U,length:K+Z,orientation:K>=ya?"horizontal":"vertical",midX:(z.x+j.x)/2,midY:(z.y+j.y)/2})}if(v.length===0)continue;let E=v.length>=3?v.filter(U=>U.idx>0&&U.idx0?E:v,_=T>=C?"horizontal":"vertical",A=a(U=>[...U].sort((z,j)=>{let K=z.orientation===_,Z=j.orientation===_;if(K!==Z)return K?-1:1;let ce=z.length>=(z.orientation==="horizontal"?T:C)+2,te=j.length>=(j.orientation==="horizontal"?T:C)+2;return ce!==te?ce?-1:1:j.length-z.length}),"rankSegments"),B=v[0],$=v[v.length-1],O=[.5,.25,.75,.05,.95,.15,.85,.1,.9],G=a((U,z)=>{let j=b[U.idx],K=b[U.idx+1];return{midX:j.x+(K.x-j.x)*z,midY:j.y+(K.y-j.y)*z}},"anchorAtT"),I=a((U,z,j)=>Math.min(j,Math.max(z,U)),"clamp"),F=a((U,z)=>U.midX>=z.left-ya&&U.midX<=z.right+ya&&U.midY>=z.top-ya&&U.midY<=z.bottom+ya,"pointInsideRectInclusive"),N=a(U=>{let z=lg(U.midX,U.midY,T,C),j=p(z);if(j)return{laneId:j,anchor:U,rect:z};let K=i.find(({rect:ye})=>F(U,ye));if(!K)return;let Z=K.rect.left+T/2+o,ce=K.rect.right-T/2-o,te=K.rect.top+C/2+o,me=K.rect.bottom-C/2-o;if(Z>ce||te>me)return;let he={midX:I(U.midX,Z,ce),midY:I(U.midY,te,me)},we=lg(he.midX,he.midY,T,C);return F(U,we)?{laneId:K.id,anchor:he,rect:we}:void 0},"placementForAnchor"),D=a((U,z,j)=>U.orientation==="horizontal"?Math.abs(z.midX-j.x):Math.abs(z.midY-j.y),"distanceAlongSegment"),M=a((U,z)=>{let K=(U.orientation==="horizontal"?T/2:C/2)+l;if(U===B){let Z=b[U.idx];if(D(U,z,Z)+ya{let z=A(U);for(let j of z)for(let K of O){let Z=G(j,K);if(!M(j,Z))continue;let ce=N(Z);if(ce&&!Oce(ce.rect,b)&&!m(y,ce.rect)&&!d(y,g.id,ce.rect))return{laneId:ce.laneId,anchor:ce.anchor}}},"tryPool"),P=a((U,z,j=!1)=>{let K=A(U);for(let Z of K){let ce={midX:Z.midX,midY:Z.midY};if(z&&!M(Z,ce))continue;let te=N(ce);if(te&&!Oce(te.rect,b)&&!m(y,te.rect)&&!u(y,te.rect)&&(j||!h(g.id,te.rect)))return{laneId:te.laneId,anchor:te.anchor}}},"findLaneContainingFallback"),V=R(S)??(S.lengthj.labelId===y);z>=0?f[z]={labelId:y,rect:U}:f.push({labelId:y,rect:U})}}}var ya,Nce,NE,Pce=w(()=>{"use strict";sl();ya=.001,Nce=10,NE=7;a(Mce,"markerClearanceRectFor");a(jWe,"normalizeRect");a(Oce,"labelOverlapsOwnMarker");a(ME,"anchorLabelsToPolyline")});function $ce(e,t){return e{let d=$ce(l,u),f=0,p=a(m=>{if(!m)return;let g=i.get(m);if(!g)return;let y=h==="x"?g.w/2:g.h/2;y>f&&(f=y)},"consider");p(o.labelNodeId);for(let m of e){if(m===o||m.isLayoutOnly)continue;let g=m.start,y=m.end;!g||!y||$ce(g,y)===d&&p(m.labelNodeId)}return f>0?f+HWe:0},"labelClearanceFor");for(let o of e){if(o.isLayoutOnly)continue;let l=o.points;if(!vE(l,o5))continue;let u=LE(o,r,o5);if(!u)continue;let{srcId:h,dstId:d,srcInfo:f,dstInfo:p,collinearX:m,collinearY:g}=u;if(m===g)continue;let y,x;if(m){let E=p.cy>f.cy;y={x:f.cx,y:E?f.rect.bottom:f.rect.top},x={x:p.cx,y:E?p.rect.top:p.rect.bottom}}else{let E=p.cx>f.cx;y={x:E?f.rect.right:f.rect.left,y:f.cy},x={x:E?p.rect.left:p.rect.right,y:p.cy}}if(In(y,x,n,[h,d],1))continue;let T=s(o,h,d,m?"x":"y"),C=T>Bce?T:Bce,v=[0,C,-C];for(let E of v){let S={...y},_={...x};if(m){if(S.x+=E,_.x+=E,S.x<=f.rect.left||S.x>=f.rect.right||_.x<=p.rect.left||_.x>=p.rect.right)continue}else if(S.y+=E,_.y+=E,S.y<=f.rect.top||S.y>=f.rect.bottom||_.y<=p.rect.top||_.y>=p.rect.bottom)continue;if(!In(S,_,n,[h,d],1)&&!Gx(S,_,e,o,{epsilon:o5})){o.points=[S,_];break}}}}var o5,qWe,Bce,HWe,Gce=w(()=>{"use strict";sl();o5=1e-6,qWe=8,Bce=qWe/2,HWe=3;a($ce,"pairKey");a(Fce,"straightenCollinearSiblingDetours")});function l5(e,t){let{realNodeRects:h,labelNodeRects:d}=Yl(t.values()),f=a((S,_)=>Ah(_,.001).map(A=>({...A,edge:S,interior:A.index>=1&&A.index<=_.length-3})),"segmentsFor"),p=a(()=>{let S=[];for(let _ of e){if(_.isLayoutOnly)continue;let A=_.points;!A||A.length<2||S.push(...f(_,Fr(A)))}return S},"allSegments"),m=a((S,_)=>S.horizontal&&_.horizontal?Rs(S.a.x,S.b.x,_.a.x,_.b.x)>=8&&Math.abs(S.a.y-_.a.y)<7:S.vertical&&_.vertical?Rs(S.a.y,S.b.y,_.a.y,_.b.y)>=8&&Math.abs(S.a.x-_.a.x)<7:!1,"hasCrowdedParallelTrack"),g=a((S,_)=>{let A=S.start,B=S.end,$=f(S,_);if($.length!==_.length-1)return!1;let O=[A,B].filter(I=>!!I),G=S.labelNodeId?[S.labelNodeId]:[];for(let I of $)if(In(I.a,I.b,h,O,-2)||In(I.a,I.b,d,G,-2))return!1;for(let I of e){if(I===S||I.isLayoutOnly)continue;let F=I.points;if(!(!F||F.length<2)){for(let N of $)for(let D of f(I,Fr(F)))if(m(N,D)||il(N.a,N.b,D.a,D.b,.001))return!1}}return!0},"candidateIsSafe"),y=a((S,_)=>{let A=Fr(S.edge.points??[]);if(A.length<4||S.index>=A.length-1)return;let B=A.map($=>({...$}));if(S.horizontal)B[S.index].y+=_,B[S.index+1].y+=_;else if(S.vertical)B[S.index].x+=_,B[S.index+1].x+=_;else return;return f(S.edge,B).length===B.length-1?B:void 0},"shiftedCandidate"),x=a((S,_)=>({x:S.x??(_.left+_.right)/2,y:S.y??(_.top+_.bottom)/2}),"nodeCenter"),b=a(S=>{let _=S.edge,A=Fr(_.points??[]);if(A.length!==4||S.index!==1)return;let B=_.start?t.get(_.start):void 0,$=_.end?t.get(_.end):void 0,O=B?cs(B):void 0,G=$?cs($):void 0,I=A.slice(S.index+2);if(!(!B||!$||!O||!G||I.length===0))return{sourceCenter:x(B,O),targetCenter:x($,G),sourceRect:O,tail:I}},"sourceDetourContextFor"),T=a((S,_,A,B,$,O)=>{let G=B.y>=A.y,I=G?$.bottom:$.top,F=I+(G?20:-20);if(G&&S.b.y<=F+.001||!G&&S.b.y>=F-.001)return;let N=S.a.x+_;return Fr([{x:A.x,y:I},{x:A.x,y:F},{x:N,y:F},{x:N,y:S.b.y},...O],.001)},"verticalSourceDetour"),C=a((S,_,A,B,$,O)=>{let G=B.x>=A.x,I=G?$.right:$.left,F=I+(G?20:-20);if(G&&S.b.x<=F+.001||!G&&S.b.x>=F-.001)return;let N=S.a.y+_;return Fr([{x:I,y:A.y},{x:F,y:A.y},{x:F,y:N},{x:S.b.x,y:N},...O],.001)},"horizontalSourceDetour"),v=a((S,_)=>{let A=b(S);if(A){if(S.vertical)return T(S,_,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail);if(S.horizontal)return C(S,_,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail)}},"sourceDetourCandidate"),E=[-7,7,-14,14,-21,21];for(let S=0;S<12;S++){let _=p(),A=!1;for(let B=0;B<_.length&&!A;B++)for(let $=B+1;$<_.length&&!A;$++){let O=_[B],G=_[$];if(O.edge===G.edge||!m(O,G))continue;let I=[O,G].filter(F=>F.interior);for(let F of I){for(let N of E){let D=y(F,N);if(D&&g(F.edge,D)){F.edge.points=D,A=!0;break}let M=v(F,N);if(M&&g(F.edge,M)){F.edge.points=M,A=!0;break}}if(A)break}}if(!A)return}}var Vce=w(()=>{"use strict";sl();a(l5,"nudgeSharedInteriorSubpaths")});function YWe(e,t,r,n){let i=t.x-e.x,s=t.y-e.y,o=n.x-r.x,l=n.y-r.y,u=i*l-s*o;if(Math.abs(u)<1e-10)return!1;let h=r.x-e.x,d=r.y-e.y,f=(h*l-d*o)/u,p=(h*s-d*i)/u,m=.01;return f>m&&f<1-m&&p>m&&p<1-m}function c5(e){let t=e.nodes??[],r=e.edges??[],n=[];if(!r.length||!t.length)return n;let i=Jle(t),s=1,o=[];for(let u of r){if(u.isLayoutOnly)continue;let h=u.points;if(!h||h.length<2)continue;let d=u.start,f=u.end,p=u.labelNodeId,m=u.id??`${d}->${f}`;for(let g of i)if(!(g.nodeId===d||g.nodeId===f)&&!(p&&g.nodeId===p)){for(let y=0;y0){let u=n.filter(d=>d.type==="edge-node-overlap").length,h=n.filter(d=>d.type==="edge-edge-crossing").length;H.warn(`[SWIMLANE_VALIDATE] ${n.length} issue(s) detected: ${u} edge-node overlap(s), ${h} edge crossing(s)`);for(let d of n)H.warn(`[SWIMLANE_VALIDATE] ${d.type}: ${d.detail}`)}return n}var zce=w(()=>{"use strict";bt();sl();a(YWe,"segmentsIntersect");a(c5,"validateSwimlanesLayout")});function Uce(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(l=>!l.isGroup);if((t==="LR"||t==="RL")&&i.length>0&&!xce(e,t)||t==="BT"&&i.length>0&&!yce(e))return;for(let l of n){if(l.isLayoutOnly)continue;let u=l.points;!u||u.length<2||(l.points=bo(Vx(u)))}Ice(n,r),Fce(n,r),Tce(n,r);let s=new Map;for(let l of r)s.set(String(l.id),l);ME(n,s),hce(n,s),kce(n,s),l5(n,s),n5(n,s),vce(n,s),i5(n,s),wce(n,s);let o=a(()=>{Rce(n,s),n5(n,s),_ce(n,s),Ace(n,s),ME(n,s),e5(n,s),i5(n,s),ME(n,s),e5(n,s)},"finalizeRenderedEdges");o(),l5(n,s),o(),s5(n,s,t),a5(n,s,t),s5(n,s,t),a5(n,s,t)}var Wce=w(()=>{"use strict";fce();sl();bce();Cce();Sce();Lce();Dce();Pce();Gce();Vce();zce();a(Uce,"postProcessSwimlaneLayout")});function xa(e){let t=new Map(e.nodeById),r=new Set,n=[];for(let s of e.edges){if(!t.has(s.src)||!t.has(s.dst))continue;let o=`${s.id}:${s.src}->${s.dst}`;r.has(o)||(r.add(o),n.push(s))}return{nodes:[...t.keys()],edges:n,layout:e.layout,nodeById:t}}function OE(e,t){return e.edges.filter(r=>r.dst===t)}function KWe(e){let t=new Map;for(let r of e.nodes)t.set(r,[]);for(let r of e.edges)t.get(r.src).push(r.dst);return t}function u5(e){let t=KWe(e);for(let r of t.values())r.sort((n,i)=>n.localeCompare(i));return t}function zx(e){let t=new Map;for(let r of e.nodes)t.set(r,0);for(let r of e.edges)t.set(r.dst,(t.get(r.dst)??0)+1);return t}function h5(e,t){let r=[...t.entries()].filter(([,l])=>l===0).map(([l])=>l).sort((l,u)=>l.localeCompare(u)),n=new Set(e.edges.flatMap(l=>[l.src,l.dst])),i=a(l=>!n.has(l)&&!e.nodeById.get(l)?.isGroup,"isUnconnected"),s=[...t.keys()].filter(l=>t.get(l)===0&&i(l)),o=0;return r.map(l=>i(l)?s[o++]:l)}function ug(e,t=()=>!0){let r=new Map,n=new Map;for(let i of e.nodes)r.set(i,[]),n.set(i,[]);for(let i of e.edges)t(i)&&(n.get(i.src).push(i.dst),r.get(i.dst).push(i.src));return{preds:r,succs:n}}function PE(e,t,r,n){let i=0;for(let o of e.nodes)n?.skipGroups&&e.nodeById.get(o)?.isGroup||(i=Math.max(i,r[o]??0));let s=Array.from({length:i+1},()=>[]);for(let o of t)n?.skipGroups&&e.nodeById.get(o)?.isGroup||s[Math.max(0,r[o]??0)].push(o);return s}function Ih(e){let t=zx(e),r=h5(e,t),n=[],i=u5(e);for(;r.length;){let s=r.shift();n.push(s);for(let o of i.get(s)??[])if(t.set(o,(t.get(o)??0)-1),(t.get(o)??0)===0){let l=0;for(;l{if(i-n<=1)return 0;let s=n+i>>1,o=r(n,s)+r(s,i),l=n,u=s,h=n;for(;l=i||l{"use strict";a(xa,"normalizeGraph");a(OE,"incoming");a(KWe,"buildSuccessorMap");a(u5,"buildSortedSuccessorMap");a(zx,"buildInDegreeMap");a(h5,"sortedZeroInDegreeNodes");a(ug,"buildPredecessorSuccessorMaps");a(PE,"buildLayersFromRanks");a(Ih,"topoSortIfAcyclic");a(yf,"buildLayerIndex");a(BE,"countInversions")});function jce(e){let t=xa(e),r=new Map;for(let f of t.nodes)r.set(f,[]);for(let f of t.edges)r.get(f.src).push(f);for(let f of r.values())f.sort((p,m)=>p.dst===m.dst?p.id.localeCompare(m.id):p.dst.localeCompare(m.dst));let n=Object.create(null);for(let f of t.nodes)n[f]=0;let i=[],s=a(f=>{n[f]=1;for(let p of r.get(f)??[]){let m=p.dst;n[m]===0?s(m):n[m]===1&&i.push(p)}n[f]=2},"dfs"),o=zx(t),l=[...t.nodes.filter(f=>(o.get(f)??0)===0),...t.nodes.filter(f=>(o.get(f)??0)!==0)];for(let f of l)n[f]===0&&s(f);let u=new Set(i.map(f=>`${f.id}:${f.src}->${f.dst}`)),h=t.edges.map(f=>u.has(`${f.id}:${f.src}->${f.dst}`)?{id:f.id,src:f.dst,dst:f.src,weight:f.weight,ref:f.ref}:f);return{acyclic:{nodes:[...t.nodes],edges:h,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:i}}var qce=w(()=>{"use strict";Kl();a(jce,"removeCycles_DFS")});function XWe(e){let t=new Map,r=a(n=>{if(t.has(n))return t.get(n);let i=e.nodeById.get(n);if(!i)return t.set(n,null),null;let s=i.parentId;if(!s)return t.set(n,null),null;let l=r(s)??s;return t.set(n,l),l},"resolve");for(let n of e.nodes)r(n);return t}function Ls(e){let t=XWe(e);return r=>t.get(r)??null}function $E(e){let t=[];for(let r of e.layout.nodes??[])r.isGroup&&!r.parentId&&t.push(r.id);return[...new Set(t)].reverse()}function FE(e,t){let r=$E(e);if(!t||t.length===0)return r;let n=new Set(r),i=new Set,s=[];for(let o of t)!n.has(o)||i.has(o)||(i.add(o),s.push(o));for(let o of r)i.has(o)||s.push(o);return s}var Hc=w(()=>{"use strict";a(XWe,"buildTopLaneMap");a(Ls,"createTopLaneResolver");a($E,"buildTopLaneOrder");a(FE,"resolveTopLaneOrder")});var Hce,xf,d5,hg=w(()=>{"use strict";Hce={EPSILON:1e-6},xf={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},d5={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40}});function Yce(e,t){let r=xa(e),n=t?.laneOf??(()=>null),i=t?.rankHint,{preds:s}=ug(r);for(let E of s.values())E.sort((S,_)=>S.localeCompare(_));let o=Ih(r)??[...r.nodes].sort((E,S)=>E.localeCompare(S)),l=new Map;for(let[E,S]of o.entries())l.set(S,E);let u=new Map,h=new Map;for(let E of r.nodes)h.set(E,[]);for(let E of o){let S=(s.get(E)??[]).filter(_=>u.has(_));if(S.length>0){let _=QWe(E,S,{laneOf:n,rankHint:i,topoIndex:l});u.set(E,_),h.get(_).push(E)}else u.has(E)||u.set(E,null)}for(let E of r.nodes)u.has(E)||u.set(E,null);let d=new Set;for(let E of r.nodes)(u.get(E)??null)===null&&d.add(E);let f=[...d].sort((E,S)=>{let _=l.get(E)??0,A=l.get(S)??0;return _===A?E.localeCompare(S):_-A}),p=ZWe(r),m=new Map;for(let[E,S]of p.entries())m.set(E,[...S].sort((_,A)=>_.localeCompare(A)));let g=JWe(m),y=eje(m),x=new Map;for(let E of r.nodes)x.set(E,[]);for(let E of y)for(let S of E.nodes){let _=x.get(S);_?_.push(E.id):x.set(S,[E.id])}let b=[],T=[],C=new Set,v=a(E=>{if(!C.has(E)){C.add(E),b.push(E);for(let S of h.get(E)??[])v(S);T.push(E)}},"walk");for(let E of f)v(E);for(let E of o)v(E);return{parent:u,children:h,roots:f,componentOf:g,blocks:y,nodeBlocks:x,adjacency:m,preorder:b,postorder:T,topologicalOrder:o}}function QWe(e,t,r){let n=r.laneOf(e);return[...t].sort((s,o)=>{let l=r.laneOf(s),u=r.laneOf(o),h=l!=null&&l===n,d=u!=null&&u===n;if(h!==d)return h?-1:1;let f=r.rankHint?.[s],p=r.rankHint?.[o];if(f!=null&&p!=null&&f!==p)return p-f;let m=r.topoIndex.get(s)??0,g=r.topoIndex.get(o)??0;return m!==g?m-g:s.localeCompare(o)})[0]}function ZWe(e){let t=new Map;for(let r of e.nodes)t.set(r,new Set);for(let r of e.edges)t.get(r.src).add(r.dst),t.get(r.dst).add(r.src);return t}function JWe(e){let t=new Map,r=0;for(let n of e.keys()){if(t.has(n))continue;let i=[n];for(;i.length>0;){let s=i.pop();if(!t.has(s)){t.set(s,r);for(let o of e.get(s)??[])t.has(o)||i.push(o)}}r++}return t}function eje(e){let t=new Map,r=new Map,n=[],i=[],s=0,o=a((l,u)=>{t.set(l,++s),r.set(l,s);for(let h of e.get(l)??[])h!==u&&(t.has(h)?(t.get(h)??0)<(t.get(l)??0)&&(n.push([l,h]),r.set(l,Math.min(r.get(l)??s,t.get(h)??s))):(n.push([l,h]),o(h,l),r.set(l,Math.min(r.get(l)??s,r.get(h)??s)),(r.get(h)??0)>=(t.get(l)??0)&&i.push(tje(l,h,n,i.length))))},"visit");for(let l of e.keys())t.has(l)||o(l,null);return i}function tje(e,t,r,n){let i=[],s=new Set;for(;r.length>0;){let o=r.pop();if(i.push(o),s.add(o[0]),s.add(o[1]),o[0]===e&&o[1]===t||o[0]===t&&o[1]===e)break}return{id:n,edges:i,nodes:[...s]}}var Kce=w(()=>{"use strict";Kl();a(Yce,"buildDrivingTree");a(QWe,"chooseParent");a(ZWe,"buildAdjacency");a(JWe,"assignComponents");a(eje,"computeBlocks");a(tje,"popBlock")});function Xce(e,t,r){let n=[...e.nodes],i=new Map;for(let[T,C]of n.entries())i.set(C,T);let s=n.length,o=new Array(s).fill(-1),l=new Array(s).fill(0),u=[],h=new Set;for(let T of n){let C=r.parent.get(T)??null,v=i.get(T);v!=null&&C==null&&(o[v]=-1,l[v]=0,h.has(T)||(h.add(T),u.push(T)))}for(;u.length>0;){let T=u.shift(),C=i.get(T);if(C==null)continue;let v=r.children.get(T)??[];for(let E of v){if(h.has(E))continue;let S=i.get(E);S!=null&&(o[S]=C,l[S]=l[C]+1,h.add(E),u.push(E))}}for(let T of n){if(h.has(T))continue;let C=i.get(T);C!=null&&(o[C]=-1,l[C]=0,h.add(T))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,s)))+1),f=Array.from({length:d},()=>new Array(s).fill(-1));for(let T=0;T{if(T===-1||C===-1)return-1;l[T]>E&1&&(T=f[E][T],T===-1))return-1;if(T===C)return T;for(let E=d-1;E>=0;E--){let S=f[E][T],_=f[E][C];S===-1||_===-1||S!==_&&(T=S,C=_)}return f[0][T]},"lcaIndex"),m=Array.from({length:s},()=>new Map);for(let T of e.edges){let C=T.src,v=T.dst,E=t[C],S=t[v];if(E==null||S==null||(E>S&&([C,v]=[v,C],[E,S]=[S,E]),E==null||S==null||E===S))continue;let _=i.get(C),A=i.get(v);if(_==null||A==null)continue;let B=p(_,A);if(B===-1)continue;let $=m[B];for(let O=E;O{if(C.size!==0)for(let[v,E]of C)T.set(v,(T.get(v)??0)+E)},"mergeInto"),x=new Set,b=a(T=>{let C=i.get(T);x.add(T);let v=C==null?void 0:m[C],E=v?new Map(v):new Map,S=r.children.get(T)??[];for(let _ of S){let A=b(_),B=t[T];if(B!=null){let $=g.get(T);$||($=new Map,g.set(T,$));let O=A.get(B)??0,G=t[_];G!=null&&G>B&&(O+=1),$.set(_,O)}y(E,A)}return E},"dfs");for(let T of r.roots)x.has(T)||b(T);for(let T of n)x.has(T)||b(T);return g}var Qce=w(()=>{"use strict";a(Xce,"computeSubtreeCrossCounts")});function Zce(e,t,r){let n=new Map,i=a(s=>{let o=r[s]??0,l=[...t.get(s)??[]];l.sort(f5(r));for(let u of l){i(u);let h=n.get(u);h!=null&&(o=Math.min(o,h))}n.set(s,o)},"annotate");for(let s of e)i(s);return n}function f5(e){return(t,r)=>{let n=e[t]??0,i=e[r]??0;return n===i?t.localeCompare(r):n-i}}function Jce(e,t,r,n){let i=0;for(let u of t){let h=r[u]??0;h>i&&(i=h)}let s=Array.from({length:i+1},()=>[]),o=new Set,l=a(u=>{if(o.has(u))return;o.add(u);let h=r[u]??0;s[h]||(s[h]=[]),s[h].push(u);for(let d of n(u))l(d)},"emit");for(let u of e)l(u);for(let u of t)if(!o.has(u)){let h=r[u]??0;s[h]||(s[h]=[]),s[h].push(u),o.add(u)}return s}function eue(e){let t=[];for(let r of e){let n=new Set,i=[];for(let s of r)n.has(s)||(n.add(s),i.push(s));t.push(i)}return t}var tue=w(()=>{"use strict";a(Zce,"annotateMinimumLayers");a(f5,"compareByRankThenId");a(Jce,"emitNodesInTreeOrder");a(eue,"deduplicateLayers")});function rje(e,t,r,n){return i=>{let s=e.get(i)??[];if(s.length===0)return[];let o=t[i]??0,l=[],u=[],h=r.get(i);for(let d of s){let f=n.get(d)??o;f>o?l.push({child:d,min:f}):u.push(d)}return l.sort((d,f)=>d.min===f.min?d.child.localeCompare(f.child):d.min-f.min),u.sort((d,f)=>{let p=h?.get(d)??0,m=h?.get(f)??0;if(p!==m)return p-m;let g=n.get(d)??o,y=n.get(f)??o;return g!==y?g-y:d.localeCompare(f)}),[...l.map(d=>d.child),...u]}}function Ux(e,t,r){let n=Yce(e,{rankHint:t,laneOf:r}),{children:i,roots:s}=n;for(let f of e.nodes)i.has(f)||i.set(f,[]);let o=Xce(e,t,n),l=[...s].sort(f5(t)),u=Zce(l,i,t),h=rje(i,t,o,u),d=Jce(l,e.nodes,t,h);return d=eue(d),d}var p5=w(()=>{"use strict";Kce();Qce();tue();a(rje,"createChildOrderer");a(Ux,"buildMultitreeLayerOrder")});function nje(e,t,r){let n=new Set(e),i=new Set(t),s=yf(t),o=[];for(let l of r)n.has(l.src)&&i.has(l.dst)&&o.push(s.get(l.dst));return BE(o)}function rue(e,t,r){let n=[];for(let s of t){let o=r[s.src],l=r[s.dst];if(o==null||l==null||o===l)continue;let u=s.src,h=s.dst,d=o,f=l;o>l&&(u=s.dst,h=s.src,d=l,f=o);for(let p=d;p(r[p]??0)-(r[f]??0));for(let f of d){let p=r[f]??0;if(p===0)continue;let m=0;for(let b of n.get(f)??[])m=Math.max(m,(r[b]??0)+1);if(m>=p)continue;let g=p;r[f]=m;let y=Ux(e,r,i),x=rue(y,e.edges,r);x{"use strict";Kl();hg();Hc();p5();a(nje,"countCrossingsBetweenAdjacent");a(rue,"totalCrossings");a(nue,"optimizeRanksByCrossings")});function sue(e,t){let r=Ls(e),n=[...e.nodes].sort((i,s)=>(t[i]??0)-(t[s]??0)||i.localeCompare(s));for(let i of n){let s=r(i);if(!s)continue;let o=e.edges.filter(y=>y.src===i);if(o.length===0)continue;let l=!1,u=0;for(let y of o){let x=r(y.dst);x==null||x===s?l=!0:u++}if(u===0||l)continue;let h=0,d=!1;for(let y of e.edges){if(y.dst!==i)continue;let x=r(y.src);x&&(x===s?d=!0:h++)}if(h>0||!d)continue;let f=t[i]??0,p=f+u,m=0;for(let y of e.edges)y.dst===i&&(m=Math.max(m,(t[y.src]??0)+1));let g=Math.max(f,m,p);g!==f&&(t[i]=g)}}var aue=w(()=>{"use strict";Hc();a(sue,"adjustCrossLaneSources")});function oue(e,t){let r=xa(e),n=Ih(r)??[...r.nodes].sort(),i=t?.compactSingleInput??!1,s=Ls(r),o=Object.create(null);for(let u of n){let h=OE(r,u),d=t?.ignoreCrossLaneEdges?h.filter(f=>{let p=s(f.src),m=s(u);return!p||!m?!0:p===m}):h;if(d.length===0)o[u]=0;else if(i&&d.length===1){let f=d[0].src,p=s(f),m=s(u);p!==m?o[u]=o[f]??0:o[u]=(o[f]??0)+1}else{let f=-1/0;for(let p of d)f=Math.max(f,(o[p.src]??0)+1);o[u]=f===-1/0?0:f}}return(t?.optimizeRanksByCrossings??!1)&&(o=nue(r,o)),t?.ignoreCrossLaneEdges&&sue(r,o),{layers:Ux(r,o,s),rankOf:o,dummy:new Set}}var lue=w(()=>{"use strict";Kl();Hc();iue();aue();p5();a(oue,"assignLayers_LongestPath")});function cue(e,t){let r=xa(e),i={...oue(r,{compactSingleInput:t?.compactSingleInput,ignoreCrossLaneEdges:t?.ignoreCrossLaneEdges,optimizeRanksByCrossings:t?.optimizeRanksByCrossings}).rankOf},s=Ls(r),{preds:o,succs:l}=ug(r,g=>{if(t?.ignoreCrossLaneEdges){let y=s(g.src),x=s(g.dst);if(y&&x&&y!==x)return!1}return!0}),u=Ih(r)??[...r.nodes],h=[...u].reverse(),d=a((g,y)=>{let x=0;for(let C of o.get(g)??[])x=Math.max(x,(i[C]??0)+1);let b=Number.POSITIVE_INFINITY,T=l.get(g)??[];return T.length>0&&(b=Math.min(...T.map(C=>(i[C]??0)-1))),Number.isFinite(b)||(b=Math.max(x,y)),Math.min(Math.max(y,x),b)},"clampFeasible"),f=xf.GRAVITY_ITERATIONS,p=a(g=>{let y=!1;for(let x of g){let b=o.get(x)??[],T=l.get(x)??[];if(b.length===0&&T.length===0)continue;let C=b.length>0?b.reduce((_,A)=>_+(i[A]??0)+1,0)/b.length:i[x]??0,v=T.length>0?T.reduce((_,A)=>_+(i[A]??0)-1,0)/T.length:i[x]??0,E=Math.round((C+v)/2),S=d(x,E);S!==i[x]&&(i[x]=S,y=!0)}return y},"relaxOrder");for(let g=0;g0){let x=Math.min(...y.map(b=>(i[b]??0)-1));(i[g]??0)>x&&(i[g]=x)}}return{layers:PE(r,u,i),rankOf:i,dummy:new Set}}var uue=w(()=>{"use strict";Kl();Hc();hg();lue();a(cue,"assignLayers_Gravity")});function ije(e){let t=zx(e),r=u5(e),n=h5(e,t),i=[];for(;n.length>0;){let s=[];for(let o of n){i.push(o);for(let l of r.get(o)??[])t.set(l,(t.get(l)??0)-1),(t.get(l)??0)===0&&s.push(l)}n=s.sort((o,l)=>o.localeCompare(l))}return i.length===e.nodes.length?i:null}function hue(e,t){let r=xa(e),n=t?.direction==="LR"?ije(r)??[...r.nodes].sort():Ih(r)??[...r.nodes].sort(),i=Ls(r),s=a(d=>i(d)??d,"laneOf"),o=Object.create(null),l=new Map,u=a((d,f)=>t?.ignoreCrossLaneEdges??!0?s(d)===s(f)?1:0:1,"edgeWeight");for(let d of n){if(r.nodeById.get(d)?.isGroup)continue;let p=OE(r,d),m=0;if(p.length>0)for(let b of p){let T=b.src,C=o[T]??0;m=Math.max(m,C+u(T,d))}let g=s(d),y=l.get(g)??0,x=Math.max(m,y);o[d]=x,l.set(g,x+1)}return{layers:PE(r,n,o,{skipGroups:!0}),rankOf:o,dummy:new Set}}var due=w(()=>{"use strict";Kl();Hc();a(ije,"topoSortByGenerationIfAcyclic");a(hue,"assignLayers_LaneAwareCompact")});function fue(e,t){let r=xa(t),{rankOf:n}=e,i=e.layers.map(m=>[...m]),s=new Set(e.dummy?[...e.dummy]:[]),o=0,l=new Map(r.nodeById),u=a(m=>{let g=`placeholder-${o++}`,y={id:g,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(g,y),s.add(g);i.length<=m;)i.push([]);return i[m].push(g),n[g]=m,g},"addDummyAt"),h=[...r.edges].sort((m,g)=>m.id===g.id?m.src===g.src?m.dst.localeCompare(g.dst):m.src.localeCompare(g.src):m.id.localeCompare(g.id)),d=[];for(let m of h){let g=n[m.src]??0,y=n[m.dst]??0;if(y-g<=1){d.push(m);continue}let x=m.src;for(let T=g+1,C=0;T!r.nodes.includes(m))],edges:d,layout:r.layout,nodeById:l};return{layering:{layers:i,rankOf:n,dummy:s},graphWithDummies:p}}var pue=w(()=>{"use strict";Kl();a(fue,"makeProperLayering")});function mue(e){let t=e.length;if(t===0)return Number.POSITIVE_INFINITY;let r=[...e].sort((n,i)=>n-i);return t%2===1?r[(t-1)/2]:.5*(r[t/2-1]+r[t/2])}function gue(e){return e.length===0?Number.POSITIVE_INFINITY:e.reduce((r,n)=>r+n,0)/e.length}function sje(e,t,r,n){let i=new Map;for(let s of e)i.set(s,[]);for(let s of r)n==="down"?t.has(s.src)&&i.has(s.dst)&&i.get(s.dst).push(t.get(s.src)):t.has(s.dst)&&i.has(s.src)&&i.get(s.src).push(t.get(s.dst));return i}function aje(e,t,r){let n=r.get(e)??0,i=r.get(t)??0;return n!==i?n-i:e.localeCompare(t)}function yue(e,t,r){let n=new Set(e),i=new Set(t),s=yf(e),o=yf(t),l=[];for(let h of r)n.has(h.src)&&i.has(h.dst)&&l.push({u:s.get(h.src),v:o.get(h.dst)});l.sort((h,d)=>h.u===d.u?h.v-d.v:h.u-d.u);let u=l.map(h=>h.v);return BE(u)}function m5(e,t,r){return[...e].sort((n,i)=>{let s=mue(t.get(n)??[]),o=mue(t.get(i)??[]);return s===o?aje(n,i,r):isFinite(s)?isFinite(o)?s-o:-1:1})}function xue(e,t,r,n,i,s){let o=yf(e),l=yf(t),u=sje(t,o,r,n);if(!i||!s||s.length===0)return m5(t,u,l);let h=new Map;for(let p of t){let m=i(p),g=h.get(m)??[];g.push(p),h.set(m,g)}let d=[];for(let p of s){let m=h.get(p);if(!m||m.length===0)continue;let g=m5(m,u,l);d.push(...g)}let f=h.get(null);if(f&&f.length>0){let p=m5(f,u,l);for(let m of p){let g=gue(u.get(m)??[]),y=d.length;if(isFinite(g))for(let[x,b]of d.entries()){let T=gue(u.get(b)??[]);if(go.has(y.src)&&l.has(y.dst)),d=u?r.filter(y=>l.has(y.src)&&u.has(y.dst)):void 0,f=a(y=>{let x=yue(e,y,h);return d&&n&&(x+=yue(y,n,d)),x},"crossingScore"),p=i?new Map:null;if(i&&p)for(let y of t)p.set(y,i(y));let m=!0,g=f(s);for(;m;){m=!1;for(let y=0;y+1[...l]),i=t.edges,s=Ls(t),o=FE(t,r?.laneOrder);for(let l=0;l<3;l++){for(let u=1;u=0;u--)n[u]=xue(n[u+1],n[u],i,"up",s,o),n[u]=bue(n[u+1],n[u],i,n[u-1],s)}return{layers:n}}var Cue=w(()=>{"use strict";Kl();Hc();a(mue,"median");a(gue,"barycenter");a(sje,"neighborPositionsFor");a(aje,"currentOrderTieBreak");a(yue,"countCrossingsBetweenAdjacent");a(m5,"sortByHeuristic");a(xue,"reorderLayer");a(bue,"transposeImprove");a(Tue,"orderLayers")});function kue(e,t,r){let n=r?.layerGap??d5.DEFAULT_LAYER_GAP,i=r?.nodeGap??d5.DEFAULT_NODE_GAP,s=r?.laneGap??i*2,o=r?.direction??"TB",l=o==="LR"||o==="RL",u=e.layers,h=Object.create(null),d=Object.create(null),f=a($=>t.nodeById.get($),"getNode"),p=a($=>f($)?.width??0,"getWidth"),m=a($=>f($)?.height??0,"getHeight"),g=Ls(t),y=FE(t,r?.laneOrder),x=u.map($=>$.reduce((O,G)=>Math.max(O,m(G)),0)),b=[];if(l)for(let $=0;$+1Math.max(R,p(P)),0),G=u[$+1].reduce((R,P)=>Math.max(R,p(P)),0),I=x[$],F=x[$+1],N=I/2+F/2,D=(O+G)/2,M=Math.max(0,D-N-n);b.push(M)}let T=new Set;for(let $ of u)for(let O of $)T.add(g(O));let C=T.has(null),v=y.filter($=>T.has($)),E=[...C?[null]:[],...v],S=Object.create(null);for(let $ of v)S[$]=0;C&&(S.null=0);for(let $ of u){let O=Object.create(null),G=[];for(let I of $){let F=g(I);F===null?G.push(I):(O[F]||=[]).push(I)}for(let[I,F]of Object.entries(O)){let N=F.reduce((D,M)=>D+p(M),0)+i*Math.max(0,F.length-1);S[I]=Math.max(S[I]??0,N)}if(C&&G.length){let I=G.reduce((F,N)=>F+p(N),0)+i*Math.max(0,G.length-1);S.null=Math.max(S.null??0,I)}}let _=new Map;{let $=E.map(I=>(I===null?S.null:S[I])??0),G=-($.reduce((I,F)=>I+F,0)+s*Math.max(0,E.length-1))/2;for(let I=0;Ip(U)),P=R.reduce((U,z)=>U+z,0)+i*(D.length-1),V=M-P/2;for(let[U,z]of D.entries()){let j=R[U];h[z]=V+j/2,d[z]=A+G/2,V+=j+i}}}let F=b[$]??0;A+=G+n+F}let B=new Map;for(let $ of t.edges){let O=$.ref.id;B.has(O)||B.set(O,[]),B.get(O).push($)}for(let[,$]of B){if($.length===0)continue;let O=$[0].ref,G=O.start,I=O.end;if(G==null||I==null)continue;let F=Math.round(((h[G]??0)+(h[I]??0))/2),N=new Set;for(let D of $)N.add(D.src),N.add(D.dst);for(let D of N){if(D===G||D===I)continue;t.nodeById.get(D)?.isDummy&&(h[D]=F)}}return{x:h,y:d}}var Sue=w(()=>{"use strict";hg();Hc();a(kue,"assignCoordinates")});function oje(e){let t=2166136261;for(let r=0;r>>0}function lje(e){let t=e>>>0;return()=>{t+=1831565813;let r=t;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}}function cje(e,t){let r=[...e],n=lje(t);for(let i=r.length-1;i>0;i--){let s=Math.floor(n()*(i+1));[r[i],r[s]]=[r[s],r[i]]}return r}function uje(e,t){let r=0;for(let[n,i]of e.entries())r+=Math.abs(n-(t.get(i)??n));return r}function Eue(e,t){let r=new Map;for(let[i,s]of e.entries())r.set(s,i);let n=0;for(let{a:i,b:s,weight:o}of t){let l=r.get(i),u=r.get(s);l==null||u==null||(n+=o*Math.abs(l-u))}return n}function hje(e){let t=$E(e);if(t.length<2)return[];let r=new Map(t.map((s,o)=>[s,o])),n=Ls(e),i=new Map;for(let s of e.layout.edges??[]){if(s.isLayoutOnly)continue;let o=typeof s.start=="string"?s.start:void 0,l=typeof s.end=="string"?s.end:void 0;if(!o||!l||!e.nodeById.has(o)||!e.nodeById.has(l))continue;let u=n(o),h=n(l);if(!u||!h||u===h)continue;let d=r.get(u),f=r.get(h);if(d==null||f==null)continue;let[p,m]=d<=f?[u,h]:[h,u],g=`${p}\0${m}`,y=i.get(g);y?y.weight++:i.set(g,{a:p,b:m,weight:1})}return[...i.values()]}function vue(e,t,r){let n=[...e],i=Eue(n,t),s=!0,o=0,l=Math.max(1,n.length);for(;s&&oi.a===s.a?i.b.localeCompare(s.b):i.a.localeCompare(s.a)).map(({a:i,b:s,weight:o})=>`${i}:${s}:${o}`).join("|");return oje(`${e.join("|")}#${n}#${r}`)}function wue(e,t={}){let r=$E(e);if(r.length<2)return r;let n=hje(e);if(n.length===0)return r;let i=new Map(r.map((l,u)=>[l,u])),s=vue(r,n,i),o=Math.max(0,t.restarts??g5);for(let l=0;l{"use strict";Hc();g5=8;a(oje,"hashString");a(lje,"mulberry32");a(cje,"deterministicShuffle");a(uje,"sourceDistance");a(Eue,"laneArrangementCost");a(hje,"buildWeightedLaneEdges");a(vue,"greedySwitch");a(dje,"isBetterCandidate");a(fje,"seedForRestart");a(wue,"optimizeTopLaneOrder")});function Aue(e,t){let r=t?.ignoreCrossLaneEdges??!0,n=t?.optimizeRanksByCrossings??!0,i=xa(e),s=t?.automaticLaneOrdering?wue(i,{restarts:g5}):void 0,o=jce(i),l=o.acyclic,u=r?hue(l,{compactSingleInput:t?.compactSingleInput??xf.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:t?.direction}):cue(l,{compactSingleInput:t?.compactSingleInput??xf.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:n}),{layering:h,graphWithDummies:d}=fue(u,l),f=Tue(h,d,{laneOrder:s}),p=kue(f,d,{layerGap:t?.layerGap,nodeGap:t?.nodeGap,direction:t?.direction,laneOrder:s});return{acyclic:l,reversed:o.reversed,layering:h,ordered:f,coordinates:p}}var Rue=w(()=>{"use strict";Kl();qce();uue();due();pue();Cue();Sue();hg();_ue();a(Aue,"sugiyamaLayout")});function Lue(e,t,r){let n=e.x??0,i=e.y??0,s=t.x-n,o=t.y-i,l=Math.abs(s),u=Math.abs(o);return lBr&&u*3>=l?o>0?"bottom":"top":l>Br?s>0?"right":"left":r}function Iue(e,t){return Math.abs(e.to-t.from)Q.isGroup&&!Q.parentId);for(let Q of h){let ne={id:Q.id},re=a(se=>{o.set(se.id,ne),r.filter(fe=>fe.parentId===se.id).forEach(re)},"assignLane");re(Q)}let d=r.filter(Q=>!Q.isGroup&&!Q.isEdgeLabel).map(Q=>{let ne=Q.width??10,re=Q.height??10,se=Q.x??0,fe=Q.y??0,J=pje;return{nodeId:Q.id,minX:se-ne/2-J,maxX:se+ne/2+J,minY:fe-re/2-J,maxY:fe+re/2+J,visualXHalfExtent:u?re/2+J:ne/2+J}}),f=a((Q,ne,re,se)=>{let fe=l.find(J=>J.orientation===Q&&Math.abs(J.coord-ne)<1);return fe||(fe={id:`pipe-${Q}-${ne.toFixed(0)}`,orientation:Q,coord:ne,spanMin:re,spanMax:se,tracks:[]},l.push(fe)),fe.spanMin=Math.min(fe.spanMin,re),fe.spanMax=Math.max(fe.spanMax,se),fe},"getOrAddPipe"),p=a((Q,ne)=>{let re=Q.width??10,se=Q.height??10,fe=Q.x??0,J=Q.y??0;switch(ne){case"top":return{x:fe,y:J-se/2};case"bottom":return{x:fe,y:J+se/2};case"left":return{x:fe-re/2,y:J};case"right":return{x:fe+re/2,y:J}}},"portForSide"),m=a((Q,ne,re)=>p(Q,Lue(Q,ne,re?"bottom":"top")),"getOrthogonalPort"),g=[],y=[],x=new Set,b=1e3,T=a((Q,ne,re)=>{if(g.length===0)return 0;let se=Math.abs(ne.y-re.y)ae||X.from-Br<=L&&X.to+Br>=L&&(J+=b)}else if(fe){let L=ne.x,W=Math.min(ne.y,re.y)-Br,ae=Math.max(ne.y,re.y)+Br;if(ae<=W)return 0;for(let X of g)X.edgeIndex===Q||X.orientation!=="horizontal"||X.pipe.coordae||X.from-Br<=L&&X.to+Br>=L&&(J+=b)}return J},"crossingPenalty"),C=i.map((Q,ne)=>{if(!Q.start||!Q.end)return{idx:ne,crossLane:0,dx:0,dy:0};let re=s.get(Q.start),se=s.get(Q.end),fe=o.get(Q.start),J=o.get(Q.end),L=fe&&J&&fe.id!==J.id?1:0,W=re&&se?Math.abs((se.x??0)-(re.x??0)):0,ae=re&&se?Math.abs((se.y??0)-(re.y??0)):0;return{idx:ne,crossLane:L,dx:W,dy:ae}}).sort((Q,ne)=>{if(Q.crossLane!==ne.crossLane)return ne.crossLane-Q.crossLane;let re=Q.dx+Q.dy,se=ne.dx+ne.dy;return Math.abs(re-se)>1?re-se:Q.idx-ne.idx}).map(Q=>Q.idx),v=a((Q,ne,re,se)=>{let fe=Math.min(Q.x,ne.x),J=Math.max(Q.x,ne.x),L=Math.min(Q.y,ne.y),W=Math.max(Q.y,ne.y);return!!d.find(X=>re&&X.nodeId===re||se&&X.nodeId===se?!1:Math.abs(Q.x-ne.x)>Br?X.minYQ.y&&X.maxX>fe&&X.minXQ.x&&X.maxY>L&&X.minYLue(Q,ne,"bottom"),"determineSide"),A=new Map;for(let[Q,ne]of i.entries()){if(!ne.start||!ne.end||ne.start===ne.end||ne.points&&ne.points.length>0)continue;let re=s.get(ne.start),se=s.get(ne.end);if(!re||!se)continue;let fe=(se.x??0)-(re.x??0),J=(se.y??0)-(re.y??0);A.set(Q,{edgeIdx:Q,srcId:ne.start,dstId:ne.end,srcSide:_(re,{x:se.x??0,y:se.y??0}),dstSide:_(se,{x:re.x??0,y:re.y??0}),absDx:Math.abs(fe),absDy:Math.abs(J),dxSign:Math.sign(fe),dySign:Math.sign(J)})}let B=a(Q=>Q.srcSide==="top"||Q.srcSide==="bottom"?Q.absDx===0?1/0:Q.absDy/Q.absDx:Q.absDy===0?1/0:Q.absDx/Q.absDy,"preferenceStrength"),$=a(Q=>Q.srcSide==="top"||Q.srcSide==="bottom"?Q.dxSign>=0?"right":"left":Q.dySign>=0?"bottom":"top","secondarySide"),O=new Map;for(let Q of A.values()){let ne=`${Q.srcId}:${Q.srcSide}`;O.has(ne)||O.set(ne,[]),O.get(ne).push(Q)}let G=new Map,I=a((Q,ne)=>`${Q}:${ne}`,"loadKey");for(let Q of A.values())G.set(I(Q.srcId,Q.srcSide),(G.get(I(Q.srcId,Q.srcSide))??0)+1),G.set(I(Q.dstId,Q.dstSide),(G.get(I(Q.dstId,Q.dstSide))??0)+1);for(let Q of O.values())if(!(Q.length<2)){Q.sort((ne,re)=>{let se=B(ne),fe=B(re);return Math.abs(se-fe)>1e-9?fe-se:ne.edgeIdx-re.edgeIdx});for(let ne=1;ne=fe||(G.set(I(re.srcId,re.srcSide),fe-1),G.set(I(re.srcId,se),J+1),re.srcSide=se)}}let F=a(Q=>{let ne=Q?.shape;return ne==="question"||ne==="diamond"},"isDiamondNode"),N=new Map;for(let Q of A.values())N.has(Q.dstId)||N.set(Q.dstId,new Set),N.get(Q.dstId).add(Q.dstSide);for(let Q of A.values()){if(!F(s.get(Q.srcId)))continue;let ne=N.get(Q.srcId);if(!ne?.has(Q.srcSide))continue;let re=$(Q);if(ne.has(re)||(G.get(I(Q.srcId,re))??0)>0)continue;let se=G.get(I(Q.srcId,Q.srcSide))??0;G.set(I(Q.srcId,Q.srcSide),Math.max(0,se-1)),G.set(I(Q.srcId,re),1),Q.srcSide=re}for(let Q of A.values()){let{edgeIdx:ne,srcId:re,dstId:se,srcSide:fe,dstSide:J}=Q,L=s.get(re),W=s.get(se),ae=`${re}:${fe}:src`,X=fe==="top"||fe==="bottom"?W.x??0:W.y??0;E.has(ae)||E.set(ae,[]),E.get(ae).push({edgeIdx:ne,oppositeCoord:X});let xe=`${se}:${J}:dst`,ee=J==="top"||J==="bottom"?L.x??0:L.y??0;E.has(xe)||E.set(xe,[]),E.get(xe).push({edgeIdx:ne,oppositeCoord:ee})}let D=new Map,M=8;for(let[Q,ne]of E){if(ne.length<2)continue;ne.sort((Ae,Ee)=>Ae.oppositeCoord-Ee.oppositeCoord);let re=Q.split(":"),se=re.slice(0,-2).join(":"),fe=re[re.length-2],J=re[re.length-1],L=s.get(se);if(!L)continue;let ae=fe==="left"||fe==="right"?L.height??10:L.width??10,X=L.shape,ee=X==="question"||X==="diamond"?ae*.3:ae,q=Math.min(20,Math.max(M,ee/(ne.length+1))),Se=-(q*(ne.length-1))/2;for(let[Ae,Ee]of ne.entries()){let Qe=Se+Ae*q,qe=`${Ee.edgeIdx}:${J}`;D.set(qe,Qe)}}let R=a(Q=>!!i[Q]?.labelNodeId,"edgeHasLabelNode"),P=a((Q,ne)=>Q?(E.get(`${Q}:${ne}:src`)??[]).some(({edgeIdx:re})=>R(re))||(E.get(`${Q}:${ne}:dst`)??[]).some(({edgeIdx:re})=>R(re)):!1,"faceHasLabelNode"),V=a((Q,ne,re)=>ne==="top"||ne==="bottom"?{x:Q.x+re,y:Q.y}:{x:Q.x,y:Q.y+re},"applyPortOffset"),U=a((Q,ne,re)=>{let se=A.get(Q),fe={x:re.x??0,y:re.y??0},J={x:ne.x??0,y:ne.y??0},L=se?.srcSide??_(ne,fe),W=se?.dstSide??_(re,J),ae=se?p(ne,se.srcSide):m(ne,fe,!0),X=se?p(re,se.dstSide):m(re,J,!1),xe=D.get(`${Q}:src`),ee=D.get(`${Q}:dst`);return xe!==void 0&&(ae=V(ae,L,xe)),ee!==void 0&&(X=V(X,W,ee)),{pSrcPort:ae,pDstPort:X,srcSide:L,dstSide:W}},"portsForEdge");for(let Q of C){let ne=i[Q];if(y[Q]=[],!ne.start||!ne.end||ne.points&&ne.points.length>0||ne.start===ne.end)continue;let re=s.get(ne.start),se=s.get(ne.end);if(!re||!se)continue;let{pSrcPort:fe,pDstPort:J,srcSide:L,dstSide:W}=U(Q,re,se),ae={...fe},X={...J},xe=L==="top"||L==="bottom",ee=W==="top"||W==="bottom";if(xe){let $e=fe.y>(re.y??0);ae.y=$e?fe.y+To:fe.y-To}else{let $e=fe.x>(re.x??0);ae.x=$e?fe.x+To:fe.x-To}if(ee){let $e=J.y>(se.y??0);X.y=$e?J.y+To:J.y-To}else{let $e=J.x>(se.x??0);X.x=$e?J.x+To:J.x-To}let Y=a(($e,it)=>{for(let mt of d)if(!it.includes(mt.nodeId)&&$e.x>mt.minX&&$e.xmt.minY&&$e.y{if(Dt){let ar=$e.y>(it.y??0);return{x:(mt.x??0)>=$e.x?wt.maxX+bf:wt.minX-bf,y:ar?wt.maxY+dg:wt.minY-dg,leavesPositiveSide:ar}}let Jt=$e.x>(it.x??0),mr=(mt.y??0)>=$e.y;return{x:Jt?wt.maxX+bf:wt.minX-bf,y:mr?wt.maxY+dg:wt.minY-dg,leavesPositiveSide:Jt}},"obstacleDetour"),ve=[],Se=[ne.start,ne.end],Ae=Y(ae,Se);if(Ae.inside&&Ae.obstacle){let $e=Ae.obstacle;if(xe){let it=q(fe,re,se,$e,!0);ae.x=it.x,ae.y=it.y;let mt=it.leavesPositiveSide?Math.min($e.minY-2,fe.y+To):Math.max($e.maxY+2,fe.y-To);ve=[{x:fe.x,y:mt},{x:it.x,y:mt},{x:it.x,y:it.y}]}else{let it=q(fe,re,se,$e,!1),mt=it.leavesPositiveSide?Math.min($e.minX-2,fe.x+To):Math.max($e.maxX+2,fe.x-To);ae.x=it.x,ae.y=it.y,ve=[{x:mt,y:fe.y},{x:mt,y:it.y},{x:it.x,y:it.y}]}}let Ee=[],Qe=Y(X,Se);if(Qe.inside&&Qe.obstacle){let $e=Qe.obstacle;if(ee){let it=q(J,se,re,$e,!0);X.x=it.x,X.y=it.y,Ee=[{x:it.x,y:it.y},{x:J.x,y:it.y}]}else{let it=q(J,se,re,$e,!1);X.x=it.x,X.y=it.y,Ee=[{x:it.x,y:it.y},{x:it.x,y:J.y}]}}if(ve.length===0&&Ee.length===0){let $e=bf,it=Math.abs(ae.x-X.x)<$e,mt=Math.abs(ae.y-X.y)<$e,wt=D.get(`${Q}:src`)!==void 0||D.get(`${Q}:dst`)!==void 0,Dt=(E.get(`${ne.start??""}:${L}:src`)?.length??0)+(E.get(`${ne.start??""}:${L}:dst`)?.length??0),Jt=(E.get(`${ne.end??""}:${W}:src`)?.length??0)+(E.get(`${ne.end??""}:${W}:dst`)?.length??0),mr=Dt>1||Jt>1,ar=S.get(ne.start??"")??0,Yt=S.get(ne.end??"")??0,St=Dt>1&&P(ne.start,L)||Jt>1&&P(ne.end,W),Lt=Dt<=1||ar<=2,Pt=Jt<=1||Yt<=2;if((it||mt)&&!wt&&(!mr||mr&&!St&&Lt&&Pt)&&!v(fe,J,ne.start,ne.end)){ne.points=[{...fe},{...ae},{...X},{...J}],x.add(Q);let pe=mt?"horizontal":"vertical",Wr=mt?fe.y:fe.x,Te=mt?Math.min(fe.x,J.x):Math.min(fe.y,J.y),nr=mt?Math.max(fe.x,J.x):Math.max(fe.y,J.y),Mt={id:`fast-path-${pe}-${Wr.toFixed(0)}-${Q}`,orientation:pe,coord:Wr,spanMin:Te,spanMax:nr,tracks:[]};g.push({edgeIndex:Q,segmentIndex:0,orientation:pe,pipe:Mt,trackIndex:0,from:Te,to:nr});continue}}let qe=f("vertical",ae.x,ae.y,ae.y);ae.x=qe.coord;let lt=f("vertical",X.x,X.y,X.y);X.x=lt.coord;let Ve=Math.min(ae.x,X.x)-50,Ye=Math.max(ae.x,X.x)+50,Je=Math.min(ae.y,X.y)-50,Oe=Math.max(ae.y,X.y)+50;for(let $e of d){let it=Math.min(ae.x,X.x),mt=Math.max(ae.x,X.x),wt=Math.min(ae.y,X.y),Dt=Math.max(ae.y,X.y);$e.minXit&&$e.minYwt&&(Ve=Math.min(Ve,$e.minX-GE),Ye=Math.max(Ye,$e.maxX+GE),Je=Math.min(Je,$e.minY-GE),Oe=Math.max(Oe,$e.maxY+GE))}for(let $e of d){if($e.maxXYe||$e.maxYOe)continue;let it=bf;f("horizontal",$e.minY-it,Ve,Ye),f("horizontal",$e.maxY+it,Ve,Ye);let mt=dg;f("vertical",$e.minX-mt,Je,Oe),f("vertical",$e.maxX+mt,Je,Oe)}f("horizontal",ae.y,Ve,Ye),f("horizontal",X.y,Ve,Ye);let Vt=l.filter($e=>$e.orientation==="horizontal"&&$e.coord>=Je&&$e.coord<=Oe),Ce=l.filter($e=>$e.orientation==="vertical"&&$e.coord>=Ve&&$e.coord<=Ye),Ut=a(($e,it)=>`${$e.toFixed(1)},${it.toFixed(1)}`,"getKey"),Re=Ut(ae.x,ae.y),vt=Ut(X.x,X.y),Zt=new Map,_t=new Map,qt=new Map,At=new Set,zt=[];Zt.set(Re,0),qt.set(Re,"n"),zt.push({key:Re,f:Math.hypot(X.x-ae.x,X.y-ae.y),pt:ae}),At.add(Re);let ot=[],Rt=a(($e,it)=>v($e,it,ne.start,ne.end),"checkSegmentBlocked"),Ar={x:X.x,y:ae.y},ie=Rt(ae,Ar),xt=Rt(Ar,X),kt=ie||xt,de={x:ae.x,y:X.y},Ne=Rt(ae,de),nt=Rt(de,X);if(kt?Ne||nt||(Math.abs(ae.x-X.x)0;){zt.sort((Yt,St)=>Yt.f-St.f);let $e=zt.shift();if(At.delete($e.key),$e.key===vt){let Yt=vt,St=X;for(ot=[St];_t.has(Yt);){let Lt=_t.get(Yt);ot.unshift(Lt),St=Lt,Yt=Ut(Lt.x,Lt.y)}break}let it=$e.pt.x,mt=$e.pt.y,wt=Ce.sort((Yt,St)=>Yt.coord-St.coord),Dt=wt.findIndex(Yt=>Math.abs(Yt.coord-it)<1),Jt=Vt.sort((Yt,St)=>Yt.coord-St.coord),mr=Jt.findIndex(Yt=>Math.abs(Yt.coord-mt)<1),ar=[];Dt>0&&ar.push({x:wt[Dt-1].coord,y:mt}),Dt>=0&&Dt0&&ar.push({x:it,y:Jt[mr-1].coord}),mr>=0&&mrbe.nodeId===ne.start||be.nodeId===ne.end?!1:St!==Lt?be.minYmt&&be.maxX>St&&be.minXit&&be.maxY>Pt&&be.minY10&&ze<-5||er<-10&&ze>5)&&(nr=Math.abs(ze)*100),(Mt>10&&ur<-5||Mt<-10&&ur>5)&&(nr+=Math.abs(ur)*50);let Jr=0,le=qt.get($e.key)??"n",Er=Math.abs(ur)>Br?"h":"v";le!=="n"&&le!==Er&&(Jr=50);let ue=Wr+Te+nr+Jr,Gr=(Zt.get($e.key)??1/0)+ue,Et=Math.abs(X.x-Yt.x)+Math.abs(X.y-Yt.y);if(Gr<(Zt.get(pe)??1/0))if(_t.set(pe,$e.pt),Zt.set(pe,Gr),qt.set(pe,Er),!At.has(pe))zt.push({key:pe,f:Gr+Et,pt:Yt}),At.add(pe);else{let be=zt.findIndex(Ke=>Ke.key===pe);be!==-1&&(zt[be].f=Gr+Et)}}}if(ot.length===0&&(ot=[ae,{x:ae.x,y:X.y},X]),ot.length>4){let $e=ot[0],it=ot[ot.length-1],mt=Math.min($e.x,it.x),wt=Math.max($e.x,it.x),Dt=Math.min($e.y,it.y),Jt=Math.max($e.y,it.y);for(let Pt of ot)mt=Math.min(mt,Pt.x),wt=Math.max(wt,Pt.x),Dt=Math.min(Dt,Pt.y),Jt=Math.max(Jt,Pt.y);let mr=wt>Math.max($e.x,it.x),ar=mtTe.minXyt&&Te.minYKt);if(Wr.length>0){let Te=Math.max($e.x,it.x);for(let nr of Wr){let Mt=(nr.minX+nr.maxX)/2;if(nr.visualXHalfExtent===void 0||isNaN(nr.visualXHalfExtent))continue;let er=Mt+nr.visualXHalfExtent+Pt;Te=Math.max(Te,er)}isNaN(Te)||(wt=Te)}}if(ar){let yt=d.filter(Kt=>Kt.minXMath.min($e.y,it.y));if(yt.length>0){let Kt=Math.min($e.x,it.x);for(let pe of yt){let Te=(pe.minX+pe.maxX)/2-pe.visualXHalfExtent-Pt;Kt=Math.min(Kt,Te)}mt=Kt}}}let Yt=a(Pt=>{let yt=it.y>$e.y,Kt=d.filter(Te=>{let nr=Math.min($e.x,it.x)Te.minX,Mt=Math.min($e.y,it.y)Te.minY;return nr&&Mt}),pe=Kt;if(u&&Kt.length>0){let Te=Kt.filter(nr=>nr.minXPt);Te.length>0&&(pe=Te)}if(pe.length===0)return it.y;let Wr=bf;if(yt){let nr=Math.max(...pe.map(Mt=>Mt.maxY))+Wr;if(nrMt.minY))-Wr;if(nr>it.y+Br)return nr}return it.y},"findBestReturnY"),St=a(Pt=>{let yt=Yt(Pt),Kt={x:Pt,y:$e.y},pe={x:Pt,y:yt},Wr={x:it.x,y:yt},Te=Rt($e,Kt),nr=Rt(Kt,pe),Mt=Rt(pe,Wr),er=yt!==it.y?Rt(Wr,it):!1;return!Te&&!nr&&!Mt&&!er?Math.abs(yt-it.y)=3){let $e=dt[dt.length-1],it=dt[dt.length-2],mt=dt[dt.length-3],wt=Math.abs(mt.y-it.y)Math.abs($e.x-mt.x)&&dt.splice(-2,1)}else if(Dt){let Jt=Math.sign(it.y-mt.y),mr=Math.sign($e.y-mt.y);Jt!==0&&Jt===mr&&Math.abs(it.y-mt.y)>Math.abs($e.y-mt.y)&&dt.splice(-2,1)}}let cr=[dt[0]];for(let $e=1;$eit.x,Jt=wt.x>mt.x;if(Dt!==Jt){cr.push(mt);continue}continue}if(Math.abs(it.x-mt.x)it.y,Jt=wt.y>mt.y;if(Dt!==Jt){cr.push(mt);continue}continue}cr.push(mt)}cr.push(dt[dt.length-1]);for(let $e=0;$eQ.from{let fe=!se.segments.some(L=>(L.edgeIndex!==ne.edgeIndex||L.segmentIndex!==ne.segmentIndex)&&z(L,Q)),J=!re.segments.some(L=>(L.edgeIndex!==Q.edgeIndex||L.segmentIndex!==Q.segmentIndex)&&z(L,ne));return fe&&J?(Q.trackIndex=se.index,ne.trackIndex=re.index,re.segments=[...re.segments.filter(L=>L.edgeIndex!==Q.edgeIndex||L.segmentIndex!==Q.segmentIndex),{edgeIndex:ne.edgeIndex,segmentIndex:ne.segmentIndex,from:ne.from,to:ne.to}],se.segments=[...se.segments.filter(L=>L.edgeIndex!==ne.edgeIndex||L.segmentIndex!==ne.segmentIndex),{edgeIndex:Q.edgeIndex,segmentIndex:Q.segmentIndex,from:Q.from,to:Q.to}],!0):!1},"trySwapSegmentsAcrossTracks"),K=a(Q=>{let ne=Q.tracks.length;return Q.tracks[ne]={index:ne,coord:Q.coord,segments:[]},ne},"createNewTrack"),Z=a((Q,ne)=>{let re=Q.pipe.tracks[Q.trackIndex];re.segments=re.segments.filter(fe=>fe.edgeIndex!==Q.edgeIndex||fe.segmentIndex!==Q.segmentIndex),Q.trackIndex=ne,Q.pipe.tracks[ne].segments.push({edgeIndex:Q.edgeIndex,segmentIndex:Q.segmentIndex,from:Q.from,to:Q.to})},"moveSegmentToTrack"),ce=a((Q,ne)=>{let re=y[Q.edgeIndex];for(let se of re){let fe=g[se];fe.pipe===Q.pipe&&Z(fe,ne)}},"moveSegmentChainToTrack"),te=a(Q=>{let ne=y[Q.edgeIndex],re=ne.indexOf(g.indexOf(Q)),se=[];return re>0&&se.push(g[ne[re-1]]),re{if(Q.orientation===ne.orientation)return!1;let re=Q.orientation==="horizontal"?Q:ne,se=Q.orientation==="horizontal"?ne:Q;return se.pipe.coord>re.from&&se.pipe.coordse.from&&re.pipe.coord{for(let re of Q.tracks)if(!re.segments.some(fe=>(fe.edgeIndex!==ne.edgeIndex||fe.segmentIndex!==ne.segmentIndex)&&z(fe,ne)))return re.index;return-1},"findAvailableTrack"),we=a((Q,ne)=>{if(Q.trackIndex===ne.trackIndex)return z(Q,ne);let re=te(Q),se=te(ne);return re.some(fe=>se.some(J=>me(fe,J)))},"segmentsConflict"),ye=a((Q,ne,re)=>{if(j(Q,ne,Q.pipe.tracks[Q.trackIndex],ne.pipe.tracks[ne.trackIndex]))return;let se=he(Q.pipe,ne);re(ne,se!==-1?se:K(Q.pipe))},"resolveTrackConflict"),ke=a(Q=>{let ne=0;for(let re=0;re{if(Fe.has(Q))return Fe.get(Q);let ne=y[Q];if(ne.length===0){let W={dest:0,deviation:0,base:0,delta:0};return Fe.set(Q,W),W}let se=g[ne[0]].pipe.coord,fe=se;for(let W=1;WMath.abs(xe-se)?X:xe;break}}let J=Math.abs(fe-se),L={dest:fe,deviation:J,base:se,delta:fe-se};return Fe.set(Q,L),L},"getDestInfo"),Me=a(()=>{let Q=0,ne=new Map;for(let[se,fe]of i.entries())y[se].length!==0&&fe.start&&(ne.has(fe.start)||ne.set(fe.start,[]),ne.get(fe.start).push(se));let re=a(se=>{let fe=i[se];if(!fe.start||!fe.end)return 0;let J=s.get(fe.start),L=s.get(fe.end);if(!J||!L)return 0;let W=(L.x??0)-(J.x??0),ae=(L.y??0)-(J.y??0);return Math.abs(W)+Math.abs(ae)},"getEdgeDistance");for(let se of ne.values()){se.sort((J,L)=>{let W=Ge(J),ae=Ge(L);if(Math.abs(W.deviation-ae.deviation)>1)return W.deviation-ae.deviation;if(Math.abs(W.dest-ae.dest)>1)return W.dest-ae.dest;let X=re(J),xe=re(L);if(Math.abs(X-xe)>1)return xe-X;let ee=y[J].length,Y=y[L].length;if(ee!==Y)return ee-Y;if(ee===1){let q=y[J][0],ve=y[L][0];if(g[q]&&g[ve]){let Se=g[q],Ae=g[ve],Ee=Math.abs(Se.to-Se.from),Qe=Math.abs(Ae.to-Ae.from);if(Math.abs(Ee-Qe)>1)return Ee-Qe}}return 0});let fe=se.map(J=>g[y[J][0]]);Q+=ke(fe)}return Q},"fixSourceHandleCrossings"),at=a(()=>{let Q=0,ne=new Map;for(let[re,se]of i.entries())y[re].length!==0&&se.end&&(ne.has(se.end)||ne.set(se.end,[]),ne.get(se.end).push(re));for(let re of ne.values()){re.sort((fe,J)=>{let L=a(X=>{let xe=y[X];if(xe.length<2)return 0;let ee=g[xe[xe.length-2]];return Math.abs(ee.to-ee.from)},"getDist"),W=L(fe),ae=L(J);return Math.abs(W-ae)>.1?W-ae:fe-J});let se=re.map(fe=>g[y[fe][y[fe].length-1]]);Q+=ke(se)}return Q},"fixTargetHandleCrossings"),ht=a(()=>{let Q=0;for(let ne of l){let re=[];for(let se of ne.tracks)for(let fe of se.segments){let J=y[fe.edgeIndex].find(L=>g[L].segmentIndex===fe.segmentIndex);J!==void 0&&re.push(g[J])}re.sort((se,fe)=>se.edgeIndex-fe.edgeIndex||se.segmentIndex-fe.segmentIndex);for(let se=0;se{se.segments.forEach(fe=>{ne.push({edgeIndex:fe.edgeIndex,segmentIndex:fe.segmentIndex,trackIndex:se.index,from:fe.from,to:fe.to})})}),ne.sort((se,fe)=>se.from-fe.from);let re=[];if(ne.length>0){let se=[ne[0]],fe=ne[0].to;for(let J=1;Jfe.add(q.trackIndex));let J=new Map;se.forEach(q=>{let ve=Ge(q.edgeIndex);J.set(q.trackIndex,(J.get(q.trackIndex)??0)+ve.delta)});let L=[...fe].filter(q=>(J.get(q)??0)<-1),W=[...fe].filter(q=>(J.get(q)??0)>1),ae=[...fe].filter(q=>Math.abs(J.get(q)??0)<=1);L.sort((q,ve)=>(J.get(ve)??0)-(J.get(q)??0)),W.sort((q,ve)=>(J.get(q)??0)-(J.get(ve)??0));let X=a((q,ve)=>{se.filter(Se=>Se.trackIndex===q).forEach(Se=>{let Ae=x.has(Se.edgeIndex)?Q.coord:ve;Le.set(`${Se.edgeIndex}-${Se.segmentIndex}`,Ae)})},"assignCoord"),xe=0;for(let q of L)xe++,X(q,Q.coord-xe*y5);if(ae.length===0&&fe.size>0){let q=[...fe].sort((Ae,Ee)=>Math.abs(J.get(Ae)??0)-Math.abs(J.get(Ee)??0))[0],ve=L.indexOf(q);ve!==-1&&L.splice(ve,1);let Se=W.indexOf(q);Se!==-1&&W.splice(Se,1),ae.push(q)}let ee=0;for(let q of ae){if(ee===0)X(q,Q.coord);else{let ve=ee%2===1?1:-1,Se=Math.ceil(ee/2);X(q,Q.coord+ve*Se*y5*.5)}ee++}let Y=0;for(let q of W)Y++,X(q,Q.coord+Y*y5)}}for(let[Q,ne]of i.entries()){let re=y[Q]??[];if(re.length===0)continue;let se=[],fe=s.get(ne.start),J=s.get(ne.end),{pSrcPort:L,pDstPort:W}=U(Q,fe,J),ae=re.map(ee=>{let Y=g[ee],q=Le.get(`${Y.edgeIndex}-${Y.segmentIndex}`)??Y.pipe.coord;return{orient:Y.orientation,coord:q,from:Y.from,to:Y.to}});se.push(L);for(let ee=0;eeBr&&se.push(fg(Y,ve)),Ee&&Ae.orient===Y.orient)if(Math.abs(Y.coord-Ae.coord)>Br){let Qe=Y.orient==="vertical"?(ve+Ae.from)/2:Iue(Y,Ae);se.push(fg(Y,Qe),fg(Ae,Qe))}else(ee===0||ee===ae.length-2)&&se.push(fg(Y,Iue(Y,Ae)));else if(Ee)se.push(fg(Y,Ae.coord));else{let Qe=Math.abs(Y.from-ve)Br||Math.abs(X.y-W.y)>Br)&&se.push(W);let xe=[];se.length>0&&xe.push(se[0]);for(let ee=1;eeBr||Math.abs(Y.y-q.y)>Br)&&xe.push(Y)}ne.points=xe}for(let Q of i){let ne=Q.__originalEdge;ne&&Q.points&&(ne.points=Q.points)}e.edges=(e.edges??[]).filter(Q=>!Q.isLayoutOnly);let Ie=a((Q,ne)=>{let re=ne.x??0,se=ne.y??0,fe=ne.width??0,J=ne.height??0;if(fe<=0||J<=0)return Q;let L=re-fe/2,W=re+fe/2,ae=se-J/2,X=se+J/2;if(Q.xW||Q.yX)return Q;let xe=Q.x-L,ee=W-Q.x,Y=Q.y-ae,q=X-Q.y,ve=Math.min(xe,ee,Y,q);return ve===xe?{x:L,y:Q.y}:ve===ee?{x:W,y:Q.y}:ve===Y?{x:Q.x,y:ae}:{x:Q.x,y:X}},"nodeBoundaryClamp");for(let Q of e.edges){let ne=Q.points;if(!ne||ne.length<2)continue;let re=Q.start,se=Q.end,fe=re?s.get(re):void 0,J=se?s.get(se):void 0;fe&&(ne[0]=Ie(ne[0],fe)),J&&(ne[ne.length-1]=Ie(ne[ne.length-1],J))}return e}var Br,pje,bf,dg,GE,To,y5,Nue=w(()=>{"use strict";hg();Br=Hce.EPSILON,pje=8,bf=15,dg=15,GE=25,To=20,y5=10;a(Lue,"chooseOrthogonalSide");a(Iue,"sharedLineEndpointCoord");a(fg,"pointOnLine");a(Due,"routeEdgesOrthogonal")});function mje(e){return e.direction??"TB"}function Mue(e){let t=jle(e),r=e.config.flowchart?.nodeSpacing??40,n=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,s=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,l=mje(e),{ordered:u,coordinates:h}=Aue(t,{nodeGap:r,layerGap:n,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:s,automaticLaneOrdering:o,direction:l});qle(t,u,h,{nodeGap:r,layerGap:n});for(let d of e.edges??[])delete d.points;Due(e,l);for(let d of e.edges??[])(!d.curve||d.curve==="basis")&&(d.curve="rounded");return Uce(e,l),c5(e),l}var Oue=w(()=>{"use strict";Wce();YO();Rue();Nue();a(mje,"getSwimlaneDirection");a(Mue,"runSwimlaneLayoutCore")});var Pue={};ir(Pue,{render:()=>yje});function gje(e){Wle(e);let t=Hle(e);e.nodes=t.nodes,e.edges=t.edges}var yje,Bue=w(()=>{"use strict";UO();zle();YO();Yle();Oue();a(gje,"prepareSwimlaneLayout");yje=TE({prepareLayout:gje,runLayoutCore:Mue,afterPaint:Vle})});var Wx,b5,xje,ba,x5,Ta,Yc=w(()=>{"use strict";Jee();bt();dM();ete();Wx=Object.create(null),b5=a(e=>{for(let t of e)Wx[t.name]=t},"registerLayoutLoaders"),xje=a(()=>{b5([{name:"dagre",loader:a(async()=>await Promise.resolve().then(()=>(Ple(),Ole)),"loader")},{name:"swimlane",loader:a(async()=>await Promise.resolve().then(()=>(Bue(),Pue)),"loader")}])},"registerDefaultLayoutLoaders");xje();ba=a(async(e,t)=>{if(!Object.hasOwn(Wx,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let i of e.nodes){let s=i.domId||i.id;i.domId=`${e.diagramId}-${s}`}let r=Wx[e.layoutAlgorithm],n=await r.loader();return dS(t,e.config),n.render(e,t,Zee,{algorithm:r.algorithm})},"render"),x5="dagre",Ta=a((e="",{fallback:t=x5}={})=>{if(Object.hasOwn(Wx,e))return e;for(let r of[t,x5])if(Object.hasOwn(Wx,r))return H.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${x5} is registered.`)},"getRegisteredLayoutAlgorithm")});var Is,bje,Tje,Kc=w(()=>{"use strict";Rn();bt();Is=a((e,t,r,n)=>{e.attr("class",r);let{width:i,height:s,x:o,y:l}=bje(e,t);Dr(e,s,i,n);let u=Tje(o,l,i,s,t);e.attr("viewBox",u),H.debug(`viewBox configured: ${u} with padding: ${t}`)},"setupViewPortForSVG"),bje=a((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),Tje=a((e,t,r,n,i)=>`${e-i} ${t-i} ${r} ${n}`,"createViewBox")});var Cje,kje,$ue,Fue=w(()=>{"use strict";Gt();bt();rh();Yc();Kc();jt();Cje=a(function(e,t){return t.db.getClasses()},"getClasses"),kje=a(async function(e,t,r,n){H.info("REF0:"),H.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:s,layout:o}=_e();n.db.setDiagramId(t),H.debug("Before getData: ");let l=n.db.getData();H.debug("Data: ",l);let u=ca(t,i),h=n.db.getDirection();l.type=n.type,l.layoutAlgorithm=Ta(o),l.direction=h,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=["point","circle","cross"],l.diagramId=t,H.debug("REF1:",l),await ba(l,u);let d=l.config.flowchart?.diagramPadding??8;Xt.insertTitle(u,"flowchartTitleText",s?.titleTopMargin||0,n.db.getDiagramTitle()),Is(u,d,"flowchart",s?.useMaxWidth||!1)},"draw"),$ue={getClasses:Cje,draw:kje}});var T5,C5,Gue=w(()=>{"use strict";T5=(function(){var e=a(function(Yt,St,Lt,Pt){for(Lt=Lt||{},Pt=Yt.length;Pt--;Lt[Yt[Pt]]=St);return Lt},"o"),t=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],s=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],g=[1,50],y=[1,49],x=[1,29],b=[1,30],T=[1,31],C=[1,32],v=[1,33],E=[1,45],S=[1,47],_=[1,43],A=[1,48],B=[1,44],$=[1,51],O=[1,46],G=[1,52],I=[1,53],F=[1,34],N=[1,35],D=[1,36],M=[1,37],R=[1,38],P=[1,58],V=[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],U=[1,62],z=[1,61],j=[1,63],K=[8,9,11,75,77,78],Z=[1,79],ce=[1,92],te=[1,97],me=[1,96],he=[1,93],we=[1,89],ye=[1,95],ke=[1,91],Fe=[1,98],Ge=[1,94],Me=[1,99],at=[1,90],ht=[8,9,10,11,40,75,77,78],ge=[8,9,10,11,40,46,75,77,78],De=[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],Le=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ie=[44,60,89,102,105,106,109,111,114,115,116],Q=[1,122],ne=[1,123],re=[1,125],se=[1,124],fe=[44,60,62,74,89,102,105,106,109,111,114,115,116],J=[1,134],L=[1,148],W=[1,149],ae=[1,150],X=[1,151],xe=[1,136],ee=[1,138],Y=[1,142],q=[1,143],ve=[1,144],Se=[1,145],Ae=[1,146],Ee=[1,147],Qe=[1,152],qe=[1,153],lt=[1,132],Ve=[1,133],Ye=[1,140],Je=[1,135],Oe=[1,139],Vt=[1,137],Ce=[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],Ut=[1,155],Re=[1,157],vt=[8,9,11],Zt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],_t=[1,177],qt=[1,173],At=[1,174],zt=[1,178],ot=[1,175],Rt=[1,176],Ar=[77,116,119],ie=[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],xt=[10,106],kt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],de=[1,248],Ne=[1,246],nt=[1,250],ft=[1,244],dt=[1,245],cr=[1,247],$e=[1,249],it=[1,251],mt=[1,269],wt=[8,9,11,106],Dt=[8,9,10,11,60,84,105,106,109,110,111,112],Jt={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,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:a(function(St,Lt,Pt,yt,Kt,pe,Wr){var Te=pe.length-1;switch(Kt){case 2:this.$=[];break;case 3:(!Array.isArray(pe[Te])||pe[Te].length>0)&&pe[Te-1].push(pe[Te]),this.$=pe[Te-1];break;case 4:case 183:this.$=pe[Te];break;case 11:yt.setDirection("TB"),this.$="TB";break;case 12:yt.setDirection(pe[Te-1]),this.$=pe[Te-1];break;case 27:this.$=pe[Te-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=yt.addSubGraph(pe[Te-6],pe[Te-1],pe[Te-4]);break;case 34:this.$=yt.addSubGraph(pe[Te-3],pe[Te-1],pe[Te-3]);break;case 35:this.$=yt.addSubGraph(void 0,pe[Te-1],void 0);break;case 37:this.$=pe[Te].trim(),yt.setAccTitle(this.$);break;case 38:case 39:this.$=pe[Te].trim(),yt.setAccDescription(this.$);break;case 43:this.$=pe[Te-1]+pe[Te];break;case 44:this.$=pe[Te];break;case 45:yt.addVertex(pe[Te-1][pe[Te-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,pe[Te]),yt.addLink(pe[Te-3].stmt,pe[Te-1],pe[Te-2]),this.$={stmt:pe[Te-1],nodes:pe[Te-1].concat(pe[Te-3].nodes)};break;case 46:yt.addLink(pe[Te-2].stmt,pe[Te],pe[Te-1]),this.$={stmt:pe[Te],nodes:pe[Te].concat(pe[Te-2].nodes)};break;case 47:yt.addLink(pe[Te-3].stmt,pe[Te-1],pe[Te-2]),this.$={stmt:pe[Te-1],nodes:pe[Te-1].concat(pe[Te-3].nodes)};break;case 48:this.$={stmt:pe[Te-1],nodes:pe[Te-1]};break;case 49:yt.addVertex(pe[Te-1][pe[Te-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,pe[Te]),this.$={stmt:pe[Te-1],nodes:pe[Te-1],shapeData:pe[Te]};break;case 50:this.$={stmt:pe[Te],nodes:pe[Te]};break;case 51:this.$=[pe[Te]];break;case 52:yt.addVertex(pe[Te-5][pe[Te-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,pe[Te-4]),this.$=pe[Te-5].concat(pe[Te]);break;case 53:this.$=pe[Te-4].concat(pe[Te]);break;case 54:this.$=pe[Te];break;case 55:this.$=pe[Te-2],yt.setClass(pe[Te-2],pe[Te]);break;case 56:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"square");break;case 57:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"doublecircle");break;case 58:this.$=pe[Te-5],yt.addVertex(pe[Te-5],pe[Te-2],"circle");break;case 59:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"ellipse");break;case 60:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"stadium");break;case 61:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"subroutine");break;case 62:this.$=pe[Te-7],yt.addVertex(pe[Te-7],pe[Te-1],"rect",void 0,void 0,void 0,Object.fromEntries([[pe[Te-5],pe[Te-3]]]));break;case 63:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"cylinder");break;case 64:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"round");break;case 65:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"diamond");break;case 66:this.$=pe[Te-5],yt.addVertex(pe[Te-5],pe[Te-2],"hexagon");break;case 67:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"odd");break;case 68:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"trapezoid");break;case 69:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"inv_trapezoid");break;case 70:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"lean_right");break;case 71:this.$=pe[Te-3],yt.addVertex(pe[Te-3],pe[Te-1],"lean_left");break;case 72:this.$=pe[Te],yt.addVertex(pe[Te]);break;case 73:pe[Te-1].text=pe[Te],this.$=pe[Te-1];break;case 74:case 75:pe[Te-2].text=pe[Te-1],this.$=pe[Te-2];break;case 76:this.$=pe[Te];break;case 77:var nr=yt.destructLink(pe[Te],pe[Te-2]);this.$={type:nr.type,stroke:nr.stroke,length:nr.length,text:pe[Te-1]};break;case 78:var nr=yt.destructLink(pe[Te],pe[Te-2]);this.$={type:nr.type,stroke:nr.stroke,length:nr.length,text:pe[Te-1],id:pe[Te-3]};break;case 79:this.$={text:pe[Te],type:"text"};break;case 80:this.$={text:pe[Te-1].text+""+pe[Te],type:pe[Te-1].type};break;case 81:this.$={text:pe[Te],type:"string"};break;case 82:this.$={text:pe[Te],type:"markdown"};break;case 83:var nr=yt.destructLink(pe[Te]);this.$={type:nr.type,stroke:nr.stroke,length:nr.length};break;case 84:var nr=yt.destructLink(pe[Te]);this.$={type:nr.type,stroke:nr.stroke,length:nr.length,id:pe[Te-1]};break;case 85:this.$=pe[Te-1];break;case 86:this.$={text:pe[Te],type:"text"};break;case 87:this.$={text:pe[Te-1].text+""+pe[Te],type:pe[Te-1].type};break;case 88:this.$={text:pe[Te],type:"string"};break;case 89:case 104:this.$={text:pe[Te],type:"markdown"};break;case 101:this.$={text:pe[Te],type:"text"};break;case 102:this.$={text:pe[Te-1].text+""+pe[Te],type:pe[Te-1].type};break;case 103:this.$={text:pe[Te],type:"text"};break;case 105:this.$=pe[Te-4],yt.addClass(pe[Te-2],pe[Te]);break;case 106:this.$=pe[Te-4],yt.setClass(pe[Te-2],pe[Te]);break;case 107:case 115:this.$=pe[Te-1],yt.setClickEvent(pe[Te-1],pe[Te]);break;case 108:case 116:this.$=pe[Te-3],yt.setClickEvent(pe[Te-3],pe[Te-2]),yt.setTooltip(pe[Te-3],pe[Te]);break;case 109:this.$=pe[Te-2],yt.setClickEvent(pe[Te-2],pe[Te-1],pe[Te]);break;case 110:this.$=pe[Te-4],yt.setClickEvent(pe[Te-4],pe[Te-3],pe[Te-2]),yt.setTooltip(pe[Te-4],pe[Te]);break;case 111:this.$=pe[Te-2],yt.setLink(pe[Te-2],pe[Te]);break;case 112:this.$=pe[Te-4],yt.setLink(pe[Te-4],pe[Te-2]),yt.setTooltip(pe[Te-4],pe[Te]);break;case 113:this.$=pe[Te-4],yt.setLink(pe[Te-4],pe[Te-2],pe[Te]);break;case 114:this.$=pe[Te-6],yt.setLink(pe[Te-6],pe[Te-4],pe[Te]),yt.setTooltip(pe[Te-6],pe[Te-2]);break;case 117:this.$=pe[Te-1],yt.setLink(pe[Te-1],pe[Te]);break;case 118:this.$=pe[Te-3],yt.setLink(pe[Te-3],pe[Te-2]),yt.setTooltip(pe[Te-3],pe[Te]);break;case 119:this.$=pe[Te-3],yt.setLink(pe[Te-3],pe[Te-2],pe[Te]);break;case 120:this.$=pe[Te-5],yt.setLink(pe[Te-5],pe[Te-4],pe[Te]),yt.setTooltip(pe[Te-5],pe[Te-2]);break;case 121:this.$=pe[Te-4],yt.addVertex(pe[Te-2],void 0,void 0,pe[Te]);break;case 122:this.$=pe[Te-4],yt.updateLink([pe[Te-2]],pe[Te]);break;case 123:this.$=pe[Te-4],yt.updateLink(pe[Te-2],pe[Te]);break;case 124:this.$=pe[Te-8],yt.updateLinkInterpolate([pe[Te-6]],pe[Te-2]),yt.updateLink([pe[Te-6]],pe[Te]);break;case 125:this.$=pe[Te-8],yt.updateLinkInterpolate(pe[Te-6],pe[Te-2]),yt.updateLink(pe[Te-6],pe[Te]);break;case 126:this.$=pe[Te-6],yt.updateLinkInterpolate([pe[Te-4]],pe[Te]);break;case 127:this.$=pe[Te-6],yt.updateLinkInterpolate(pe[Te-4],pe[Te]);break;case 128:case 130:this.$=[pe[Te]];break;case 129:case 131:pe[Te-2].push(pe[Te]),this.$=pe[Te-2];break;case 133:this.$=pe[Te-1]+pe[Te];break;case 181:this.$=pe[Te];break;case 182:this.$=pe[Te-1]+""+pe[Te];break;case 184:this.$=pe[Te-1]+""+pe[Te];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:t,10:r,12:n},{1:[3]},e(i,s,{5:6}),{4:7,9:t,10:r,12:n},{4:8,9:t,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:b,86:T,87:C,88:v,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I,121:F,122:N,123:D,124:M,125:R},e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{8:[1,55],9:[1,56],10:P,15:54,18:57},e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),{8:U,9:z,11:j,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:U,9:z,11:j,21:68},{8:U,9:z,11:j,21:69},{8:U,9:z,11:j,21:70},{8:U,9:z,11:j,21:71},{8:U,9:z,11:j,21:72},{8:U,9:z,10:[1,73],11:j,21:74},e(V,[2,36]),{35:[1,75]},{37:[1,76]},e(V,[2,39]),e(K,[2,50],{18:77,39:78,10:P,40:Z}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:ce,44:te,60:me,80:[1,87],89:he,95:[1,84],97:[1,85],101:86,105:we,106:ye,109:ke,111:Fe,114:Ge,115:Me,116:at,120:88},e(V,[2,185]),e(V,[2,186]),e(V,[2,187]),e(V,[2,188]),e(V,[2,189]),e(ht,[2,51]),e(ht,[2,54],{46:[1,100]}),e(ge,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:E,102:S,105:_,106:A,109:B,111:$,114:O,115:G,116:I}),e(De,[2,181]),e(De,[2,142]),e(De,[2,143]),e(De,[2,144]),e(De,[2,145]),e(De,[2,146]),e(De,[2,147]),e(De,[2,148]),e(De,[2,149]),e(De,[2,150]),e(De,[2,151]),e(De,[2,152]),e(i,[2,12]),e(i,[2,18]),e(i,[2,19]),{9:[1,114]},e(Le,[2,26],{18:115,10:P}),e(V,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},e(V,[2,40]),e(V,[2,41]),e(V,[2,42]),e(Ie,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Q,81:ne,116:re,119:se},{75:[1,126],77:[1,127]},e(fe,[2,83]),e(V,[2,28]),e(V,[2,29]),e(V,[2,30]),e(V,[2,31]),e(V,[2,32]),{10:J,12:L,14:W,27:ae,28:128,32:X,44:xe,60:ee,75:Y,80:[1,130],81:[1,131],83:141,84:q,85:ve,86:Se,87:Ae,88:Ee,89:Qe,90:qe,91:129,105:lt,109:Ve,111:Ye,114:Je,115:Oe,116:Vt},e(Ce,s,{5:154}),e(V,[2,37]),e(V,[2,38]),e(K,[2,48],{44:Ut}),e(K,[2,49],{18:156,10:P,40:Re}),e(ht,[2,44]),{44:g,47:158,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},{44:g,47:163,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},e(vt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(vt,[2,115],{120:168,10:[1,167],14:ce,44:te,60:me,89:he,105:we,106:ye,109:ke,111:Fe,114:Ge,115:Me,116:at}),e(vt,[2,117],{10:[1,169]}),e(Zt,[2,183]),e(Zt,[2,170]),e(Zt,[2,171]),e(Zt,[2,172]),e(Zt,[2,173]),e(Zt,[2,174]),e(Zt,[2,175]),e(Zt,[2,176]),e(Zt,[2,177]),e(Zt,[2,178]),e(Zt,[2,179]),e(Zt,[2,180]),{44:g,47:170,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},{30:171,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:179,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:181,50:[1,180],67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:182,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:183,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:184,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{109:[1,185]},{30:186,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:187,65:[1,188],67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:189,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:190,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{30:191,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},e(De,[2,182]),e(i,[2,20]),e(Le,[2,25]),e(K,[2,46],{39:192,18:193,10:P,40:Z}),e(Ie,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{77:[1,197],79:198,116:re,119:se},e(Ar,[2,79]),e(Ar,[2,81]),e(Ar,[2,82]),e(Ar,[2,168]),e(Ar,[2,169]),{76:199,79:121,80:Q,81:ne,116:re,119:se},e(fe,[2,84]),{8:U,9:z,10:J,11:j,12:L,14:W,21:201,27:ae,29:[1,200],32:X,44:xe,60:ee,75:Y,83:141,84:q,85:ve,86:Se,87:Ae,88:Ee,89:Qe,90:qe,91:202,105:lt,109:Ve,111:Ye,114:Je,115:Oe,116:Vt},e(ie,[2,101]),e(ie,[2,103]),e(ie,[2,104]),e(ie,[2,157]),e(ie,[2,158]),e(ie,[2,159]),e(ie,[2,160]),e(ie,[2,161]),e(ie,[2,162]),e(ie,[2,163]),e(ie,[2,164]),e(ie,[2,165]),e(ie,[2,166]),e(ie,[2,167]),e(ie,[2,90]),e(ie,[2,91]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:b,86:T,87:C,88:v,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I,121:F,122:N,123:D,124:M,125:R},{10:P,18:204},{44:[1,205]},e(ht,[2,43]),{10:[1,206],44:g,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:113,114:O,115:G,116:I},{10:[1,207]},{10:[1,208],106:[1,209]},e(xt,[2,128]),{10:[1,210],44:g,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:113,114:O,115:G,116:I},{10:[1,211],44:g,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:113,114:O,115:G,116:I},{80:[1,212]},e(vt,[2,109],{10:[1,213]}),e(vt,[2,111],{10:[1,214]}),{80:[1,215]},e(Zt,[2,184]),{80:[1,216],98:[1,217]},e(ht,[2,55],{113:113,44:g,60:y,89:E,102:S,105:_,106:A,109:B,111:$,114:O,115:G,116:I}),{31:[1,218],67:_t,82:219,116:zt,117:ot,118:Rt},e(kt,[2,86]),e(kt,[2,88]),e(kt,[2,89]),e(kt,[2,153]),e(kt,[2,154]),e(kt,[2,155]),e(kt,[2,156]),{49:[1,220],67:_t,82:219,116:zt,117:ot,118:Rt},{30:221,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{51:[1,222],67:_t,82:219,116:zt,117:ot,118:Rt},{53:[1,223],67:_t,82:219,116:zt,117:ot,118:Rt},{55:[1,224],67:_t,82:219,116:zt,117:ot,118:Rt},{57:[1,225],67:_t,82:219,116:zt,117:ot,118:Rt},{60:[1,226]},{64:[1,227],67:_t,82:219,116:zt,117:ot,118:Rt},{66:[1,228],67:_t,82:219,116:zt,117:ot,118:Rt},{30:229,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},{31:[1,230],67:_t,82:219,116:zt,117:ot,118:Rt},{67:_t,69:[1,231],71:[1,232],82:219,116:zt,117:ot,118:Rt},{67:_t,69:[1,234],71:[1,233],82:219,116:zt,117:ot,118:Rt},e(K,[2,45],{18:156,10:P,40:Re}),e(K,[2,47],{44:Ut}),e(Ie,[2,75]),e(Ie,[2,74]),{62:[1,235],67:_t,82:219,116:zt,117:ot,118:Rt},e(Ie,[2,77]),e(Ar,[2,80]),{77:[1,236],79:198,116:re,119:se},{30:237,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},e(Ce,s,{5:238}),e(ie,[2,102]),e(V,[2,35]),{43:239,44:g,45:40,47:41,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},{10:P,18:240},{10:de,60:Ne,84:nt,92:241,105:ft,107:242,108:243,109:dt,110:cr,111:$e,112:it},{10:de,60:Ne,84:nt,92:252,104:[1,253],105:ft,107:242,108:243,109:dt,110:cr,111:$e,112:it},{10:de,60:Ne,84:nt,92:254,104:[1,255],105:ft,107:242,108:243,109:dt,110:cr,111:$e,112:it},{105:[1,256]},{10:de,60:Ne,84:nt,92:257,105:ft,107:242,108:243,109:dt,110:cr,111:$e,112:it},{44:g,47:258,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},e(vt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(vt,[2,116]),e(vt,[2,118],{10:[1,262]}),e(vt,[2,119]),e(ge,[2,56]),e(kt,[2,87]),e(ge,[2,57]),{51:[1,263],67:_t,82:219,116:zt,117:ot,118:Rt},e(ge,[2,64]),e(ge,[2,59]),e(ge,[2,60]),e(ge,[2,61]),{109:[1,264]},e(ge,[2,63]),e(ge,[2,65]),{66:[1,265],67:_t,82:219,116:zt,117:ot,118:Rt},e(ge,[2,67]),e(ge,[2,68]),e(ge,[2,70]),e(ge,[2,69]),e(ge,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Ie,[2,78]),{31:[1,266],67:_t,82:219,116:zt,117:ot,118:Rt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:b,86:T,87:C,88:v,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I,121:F,122:N,123:D,124:M,125:R},e(ht,[2,53]),{43:268,44:g,45:40,47:41,60:y,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I},e(vt,[2,121],{106:mt}),e(wt,[2,130],{108:270,10:de,60:Ne,84:nt,105:ft,109:dt,110:cr,111:$e,112:it}),e(Dt,[2,132]),e(Dt,[2,134]),e(Dt,[2,135]),e(Dt,[2,136]),e(Dt,[2,137]),e(Dt,[2,138]),e(Dt,[2,139]),e(Dt,[2,140]),e(Dt,[2,141]),e(vt,[2,122],{106:mt}),{10:[1,271]},e(vt,[2,123],{106:mt}),{10:[1,272]},e(xt,[2,129]),e(vt,[2,105],{106:mt}),e(vt,[2,106],{113:113,44:g,60:y,89:E,102:S,105:_,106:A,109:B,111:$,114:O,115:G,116:I}),e(vt,[2,110]),e(vt,[2,112],{10:[1,273]}),e(vt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:U,9:z,11:j,21:278},e(V,[2,34]),e(ht,[2,52]),{10:de,60:Ne,84:nt,105:ft,107:279,108:243,109:dt,110:cr,111:$e,112:it},e(Dt,[2,133]),{14:ce,44:te,60:me,89:he,101:280,105:we,106:ye,109:ke,111:Fe,114:Ge,115:Me,116:at,120:88},{14:ce,44:te,60:me,89:he,101:281,105:we,106:ye,109:ke,111:Fe,114:Ge,115:Me,116:at,120:88},{98:[1,282]},e(vt,[2,120]),e(ge,[2,58]),{30:283,67:_t,80:qt,81:At,82:172,116:zt,117:ot,118:Rt},e(ge,[2,66]),e(Ce,s,{5:284}),e(wt,[2,131],{108:270,10:de,60:Ne,84:nt,105:ft,109:dt,110:cr,111:$e,112:it}),e(vt,[2,126],{120:168,10:[1,285],14:ce,44:te,60:me,89:he,105:we,106:ye,109:ke,111:Fe,114:Ge,115:Me,116:at}),e(vt,[2,127],{120:168,10:[1,286],14:ce,44:te,60:me,89:he,105:we,106:ye,109:ke,111:Fe,114:Ge,115:Me,116:at}),e(vt,[2,114]),{31:[1,287],67:_t,82:219,116:zt,117:ot,118:Rt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:x,85:b,86:T,87:C,88:v,89:E,102:S,105:_,106:A,109:B,111:$,113:42,114:O,115:G,116:I,121:F,122:N,123:D,124:M,125:R},{10:de,60:Ne,84:nt,92:289,105:ft,107:242,108:243,109:dt,110:cr,111:$e,112:it},{10:de,60:Ne,84:nt,92:290,105:ft,107:242,108:243,109:dt,110:cr,111:$e,112:it},e(ge,[2,62]),e(V,[2,33]),e(vt,[2,124],{106:mt}),e(vt,[2,125],{106:mt})],defaultActions:{},parseError:a(function(St,Lt){if(Lt.recoverable)this.trace(St);else{var Pt=new Error(St);throw Pt.hash=Lt,Pt}},"parseError"),parse:a(function(St){var Lt=this,Pt=[0],yt=[],Kt=[null],pe=[],Wr=this.table,Te="",nr=0,Mt=0,er=0,ur=2,ze=1,Jr=pe.slice.call(arguments,1),le=Object.create(this.lexer),Er={yy:{}};for(var ue in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ue)&&(Er.yy[ue]=this.yy[ue]);le.setInput(St,Er.yy),Er.yy.lexer=le,Er.yy.parser=this,typeof le.yylloc>"u"&&(le.yylloc={});var Gr=le.yylloc;pe.push(Gr);var Et=le.options&&le.options.ranges;typeof Er.yy.parseError=="function"?this.parseError=Er.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(An){Pt.length=Pt.length-2*An,Kt.length=Kt.length-An,pe.length=pe.length-An}a(be,"popStack");function Ke(){var An;return An=yt.pop()||le.lex()||ze,typeof An!="number"&&(An instanceof Array&&(yt=An,An=yt.pop()),An=Lt.symbols_[An]||An),An}a(Ke,"lex");for(var pt,Wt,Bt,Ht,En,zn,wi={},_i,Xn,Kr,_u;;){if(Bt=Pt[Pt.length-1],this.defaultActions[Bt]?Ht=this.defaultActions[Bt]:((pt===null||typeof pt>"u")&&(pt=Ke()),Ht=Wr[Bt]&&Wr[Bt][pt]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Lo="";_u=[];for(_i in Wr[Bt])this.terminals_[_i]&&_i>ur&&_u.push("'"+this.terminals_[_i]+"'");le.showPosition?Lo="Parse error on line "+(nr+1)+`: +`+le.showPosition()+` +Expecting `+_u.join(", ")+", got '"+(this.terminals_[pt]||pt)+"'":Lo="Parse error on line "+(nr+1)+": Unexpected "+(pt==ze?"end of input":"'"+(this.terminals_[pt]||pt)+"'"),this.parseError(Lo,{text:le.match,token:this.terminals_[pt]||pt,line:le.yylineno,loc:Gr,expected:_u})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Bt+", token: "+pt);switch(Ht[0]){case 1:Pt.push(pt),Kt.push(le.yytext),pe.push(le.yylloc),Pt.push(Ht[1]),pt=null,Wt?(pt=Wt,Wt=null):(Mt=le.yyleng,Te=le.yytext,nr=le.yylineno,Gr=le.yylloc,er>0&&er--);break;case 2:if(Xn=this.productions_[Ht[1]][1],wi.$=Kt[Kt.length-Xn],wi._$={first_line:pe[pe.length-(Xn||1)].first_line,last_line:pe[pe.length-1].last_line,first_column:pe[pe.length-(Xn||1)].first_column,last_column:pe[pe.length-1].last_column},Et&&(wi._$.range=[pe[pe.length-(Xn||1)].range[0],pe[pe.length-1].range[1]]),zn=this.performAction.apply(wi,[Te,Mt,nr,Er.yy,Ht[1],Kt,pe].concat(Jr)),typeof zn<"u")return zn;Xn&&(Pt=Pt.slice(0,-1*Xn*2),Kt=Kt.slice(0,-1*Xn),pe=pe.slice(0,-1*Xn)),Pt.push(this.productions_[Ht[1]][0]),Kt.push(wi.$),pe.push(wi._$),Kr=Wr[Pt[Pt.length-2]][Pt[Pt.length-1]],Pt.push(Kr);break;case 3:return!0}}return!0},"parse")},mr=(function(){var Yt={EOF:1,parseError:a(function(Lt,Pt){if(this.yy.parser)this.yy.parser.parseError(Lt,Pt);else throw new Error(Lt)},"parseError"),setInput:a(function(St,Lt){return this.yy=Lt||this.yy||{},this._input=St,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var St=this._input[0];this.yytext+=St,this.yyleng++,this.offset++,this.match+=St,this.matched+=St;var Lt=St.match(/(?:\r\n?|\n).*/g);return Lt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),St},"input"),unput:a(function(St){var Lt=St.length,Pt=St.split(/(?:\r\n?|\n)/g);this._input=St+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Lt),this.offset-=Lt;var yt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Pt.length-1&&(this.yylineno-=Pt.length-1);var Kt=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:Pt?(Pt.length===yt.length?this.yylloc.first_column:0)+yt[yt.length-Pt.length].length-Pt[0].length:this.yylloc.first_column-Lt},this.options.ranges&&(this.yylloc.range=[Kt[0],Kt[0]+this.yyleng-Lt]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(St){this.unput(this.match.slice(St))},"less"),pastInput:a(function(){var St=this.matched.substr(0,this.matched.length-this.match.length);return(St.length>20?"...":"")+St.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var St=this.match;return St.length<20&&(St+=this._input.substr(0,20-St.length)),(St.substr(0,20)+(St.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var St=this.pastInput(),Lt=new Array(St.length+1).join("-");return St+this.upcomingInput()+` +`+Lt+"^"},"showPosition"),test_match:a(function(St,Lt){var Pt,yt,Kt;if(this.options.backtrack_lexer&&(Kt={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&&(Kt.yylloc.range=this.yylloc.range.slice(0))),yt=St[0].match(/(?:\r\n?|\n).*/g),yt&&(this.yylineno+=yt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:yt?yt[yt.length-1].length-yt[yt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+St[0].length},this.yytext+=St[0],this.match+=St[0],this.matches=St,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(St[0].length),this.matched+=St[0],Pt=this.performAction.call(this,this.yy,this,Lt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Pt)return Pt;if(this._backtrack){for(var pe in Kt)this[pe]=Kt[pe];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var St,Lt,Pt,yt;this._more||(this.yytext="",this.match="");for(var Kt=this._currentRules(),pe=0;peLt[0].length)){if(Lt=Pt,yt=pe,this.options.backtrack_lexer){if(St=this.test_match(Pt,Kt[pe]),St!==!1)return St;if(this._backtrack){Lt=!1;continue}else return!1}else if(!this.options.flex)break}return Lt?(St=this.test_match(Lt,Kt[yt]),St!==!1?St:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var Lt=this.next();return Lt||this.lex()},"lex"),begin:a(function(Lt){this.conditionStack.push(Lt)},"begin"),popState:a(function(){var Lt=this.conditionStack.length-1;return Lt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(Lt){return Lt=this.conditionStack.length-1-Math.abs(Lt||0),Lt>=0?this.conditionStack[Lt]:"INITIAL"},"topState"),pushState:a(function(Lt){this.begin(Lt)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(Lt,Pt,yt,Kt){var pe=Kt;switch(yt){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"),Pt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Wr=/\n\s*/g;return Pt.yytext=Pt.yytext.replace(Wr,"
    "),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 Lt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Lt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Lt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return Lt.lex.firstGraph()&&this.begin("dir"),12;break;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;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 this.popState(),14;break;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;break;case 71:return this.pushState("edgeText"),75;break;case 72:return 119;case 73:return this.popState(),77;break;case 74:return this.pushState("thickEdgeText"),75;break;case 75:return 119;case 76:return this.popState(),77;break;case 77:return this.pushState("dottedEdgeText"),75;break;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;break;case 83:return this.popState(),55;break;case 84:return this.pushState("text"),54;break;case 85:return this.popState(),57;break;case 86:return this.pushState("text"),56;break;case 87:return 58;case 88:return this.pushState("text"),67;break;case 89:return this.popState(),64;break;case 90:return this.pushState("text"),63;break;case 91:return this.popState(),49;break;case 92:return this.pushState("text"),48;break;case 93:return this.popState(),69;break;case 94:return this.popState(),71;break;case 95:return 117;case 96:return this.pushState("trapText"),68;break;case 97:return this.pushState("trapText"),70;break;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;break;case 110:return this.pushState("text"),62;break;case 111:return this.popState(),51;break;case 112:return this.pushState("text"),50;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),66;break;case 116:return this.pushState("text"),65;break;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121: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)/,/^(?:swimlane-beta\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\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],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,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return Yt})();Jt.lexer=mr;function ar(){this.yy={}}return a(ar,"Parser"),ar.prototype=Jt,Jt.Parser=ar,new ar})();T5.parser=T5;C5=T5});var Vue,zue,Uue=w(()=>{"use strict";Gue();Vue=Object.assign({},C5);Vue.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return C5.parse(t)};zue=Vue});var Co,Tf=w(()=>{"use strict";Co=a(()=>` + /* 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")});var Sje,Eje,vje,VE,k5=w(()=>{"use strict";Ai();Tf();Wi();Sje=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Di(e.look),s=zi(r),o="";for(let l=0;l`${d}.node ${m}, ${d}.rough-node ${m}`,"collapsedRule"),p=a(m=>`${d}.swimlane.cluster .swimlane-title${m}, ${d}.swimlane.cluster .swimlane-body${m}`,"laneRule");o+=` + + ${d}.cluster:not(.swimlane) rect { + stroke: ${u}; + ${h} + } + + ${d}.cluster:not(.swimlane) path { + stroke: ${u}; + ${h} + } + + /* Lane, classic and neo. */ + ${d}.swimlane.cluster rect.swimlane-title, + ${d}.swimlane.cluster rect.swimlane-body { + stroke: ${u}; + ${h} + } + + /* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */ + ${p(" path:nth-of-type(2)")} { + stroke: ${u}; + } +${s?` + /* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */ + ${p(" path:first-of-type")} { + stroke: ${r[l%r.length]}; + } +`:""} + ${f(".collapsed-group")}, + ${f(".collapsed-group path")} { + stroke: ${u}; + ${h} + } + + /* The ellipsis dots and the separator take clusterBorder further down, so without + these the container is palette-coloured while its own markers are not. */ + ${f(".collapsed-indicator")} { + fill: ${u}; + } + + ${f(".collapsed-separator")} { + stroke: ${u}; + } + `}return o},"genColor"),Eje=a((e,t)=>{let r=kc,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Qn(n,i,s,t)},"fade"),vje=a(e=>`${Sje(e)} + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePaths .path { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${Eje(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + /* Collapsed subgraph node (@{ view: collapsed }) */ + .node .collapsed-indicator { + fill: ${e.clusterBorder}; + stroke: none; + opacity: 0.6; + } + + .node .collapsed-separator { + stroke: ${e.clusterBorder}; + stroke-width: 0.75px; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + ${Co()} +`,"getStyles"),VE=vje});var Wue={};ir(Wue,{createFlowDiagram:()=>zE,diagram:()=>wje});var zE,wje,S5=w(()=>{"use strict";Gt();Oee();Fue();Uue();k5();zE=a(({styles:e=VE}={})=>({parser:zue,get db(){return new sS},renderer:$ue,styles:e,init:a(t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,xd({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),wje=zE()});var pg,Lje,Ffr,Hue=w(()=>{"use strict";pg={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},Lje=new Set([pg.SHAPE_UNSUPPORTED,pg.SHAPE_REMOVED,pg.CONTAINMENT_VIOLATION]),Ffr=new Set(Object.values(pg).filter(e=>!Lje.has(e)))});function qx(e){return e&&(Ije.get(e)??e)}function Yue(e,t){for(let r of e)if(!r.isGroup){if((!r.shape||r.shape==="squareRect"||r.shape==="rect")&&(r.shape=jx),Dje.has(r.shape)){let n=`shape "${r.shape}" was removed in v0.8.1, using "${jx}"`;t?.emitError?t.emitError("SHAPE_REMOVED",n,{nodeId:r.id}):H.warn(`agentflow: ${n}`),r.shape=jx;continue}if(!Nje.has(r.shape)){let n=`shape "${r.shape}" is not supported, using "${jx}"`;t?.emitWarning?t.emitWarning("SHAPE_UNSUPPORTED",n,{nodeId:r.id}):H.warn(`agentflow: ${n}`),r.shape=jx}}}var Ije,Dje,Nje,jx,Kue=w(()=>{"use strict";bt();Ije=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),Dje=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),Nje=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),jx="roundedRect";a(qx,"resolveShapeAlias");a(Yue,"normaliseNodeShapes")});function Zue(e,t,r){let n=_e().themeVariables?.borderColorArray,i=Array.isArray(n)?n.length:0,s=r.size;for(let o of e??[]){if(o.isGroup||o.shape==="collapsedGroup"){let u=r.get(String(o.id))??s++;o.colorIndex=w5(u,i);continue}let l=t(String(o.id));l&&Hx.has(l)&&(o.cssClasses=`${o.cssClasses??""} ${E5(l)}`.replace(/\s+/g," ").trim())}}var Hx,Xue,E5,Que,v5,w5,_5=w(()=>{"use strict";Gt();Hx=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),Xue=Hx.size,E5=a(e=>`af-kind-${e}`,"kindClass"),Que=[...Hx.keys()],v5=a(e=>Math.max(1,e-Xue),"containerSlotCount"),w5=a((e,t)=>{let r=Xue+e%v5(t);return t>0?r%t:r},"containerSlot");a(Zue,"assignColorSlots")});function R5(e){if(Array.isArray(e))return e.map(r=>R5(r));if(e===null||typeof e!="object")return e;let t={};for(let r of Object.keys(e))r==="__proto__"||r==="constructor"||r==="prototype"||(t[r]=R5(e[r]));return t}function Pje(e){let t=!1,r=!1,n=0,i,s=[];for(let o of e.split(` +`)){if(i!==void 0){let d=o.length-o.trimStart().length;if(o.trim()===""||d>i){s.push(o);continue}i=void 0}let l=-1;for(let d=0;d0){s.push(o);continue}let u=l>=0?o.slice(0,l):o,h=l>=0?o.slice(l):"";if(/:\s*[>|][\d+-]*\s*$/.test(u)){i=o.length-o.trimStart().length,s.push(o);continue}s.push(u.replace(/,([\t ]*)$/,"$1")+h)}return s.join(` +`)}var Jue,A5,Mje,Oje,UE,ehe=w(()=>{"use strict";Lr();Im();Gt();bt();tx();jt();Ir();fn();Mc();Hue();Kue();_5();md();Jue="agentflow-",A5=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Mje=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),Oje={flow:"flowGroup"};a(R5,"stripPrototypeKeys");a(Pje,"stripLineTrailingCommas");UE=class{constructor(){this.vertexCounter=0;this.config=_e();this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.globalNodes=new Set;this.connectors=new Map;this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.diagramId="";this.preserveCommentsWhenParsing=!0;this.frontmatterLineOffset=0;this.elementMappings=[];this.bareVertexMappings=new WeakSet;this.diagnostics=[];this.postParseValidationRun=!1;this.funs=[];this.setAccTitle=hr;this.setAccDescription=fr;this.setDiagramTitle=Cr;this.getAccTitle=gr;this.getAccDescription=yr;this.getDiagramTitle=xr;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.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.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.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{a(this,"AgentFlowDB")}sanitizeText(t){return gt.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,n,i,s,o,l={},u,h){if(!t||t.trim().length===0)return;let d;if(u!==void 0){let b;u.includes(` +`)?b=u+` +`:b=`{ +`+u+` +}`;try{d=Qo(b,{schema:Xo})??{}}catch(T){let C=u.includes(` +`)?Pje(u):u;if(C!==u)try{d=Qo(C+` +`,{schema:Xo})??{}}catch{this.rethrowMetadataYamlError(T,u,h)}else this.rethrowMetadataYamlError(T,u,h)}d=R5(d)}let f;if(d&&typeof d.shape=="string"){let b=d;f=b.shape;let T=qx(f);T&&T!==f&&(b.shape=T)}let p=this.subGraphLookup.get(t);if(p&&d){p.metadata={...p.metadata,...d};return}let m=this.connectors.get(t);if(m&&d){m.metadata={...m.metadata,...d};return}if(t==="connectors")return;let g=this.edges.find(b=>b.id===t);if(g){let b=d;b?.animate!==void 0&&(g.animate=b.animate),b?.animation!==void 0&&(g.animation=b.animation),b?.curve!==void 0&&(g.interpolate=b.curve),d&&(g.metadata={...g.metadata,...d});return}let y,x=this.vertices.get(t);if(x===void 0&&(x={id:t,labelType:"text",domId:Jue+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,x)),this.vertexCounter++,r!==void 0?(this.config=_e(),y=this.sanitizeText(r.text.trim()),x.labelType=r.type,y.startsWith('"')&&y.endsWith('"')&&(y=y.substring(1,y.length-1)),x.text=y):x.text===void 0&&(x.text=t),n!==void 0&&(x.type=n),i?.forEach(b=>{x.styles.push(b)}),s?.forEach(b=>{x.classes.push(b)}),o!==void 0&&(x.dir=o),x.props===void 0?x.props=l:l!==void 0&&Object.assign(x.props,l),d){if(x.metadata={...x.metadata,...d},d.shape){let b=f??d.shape;if(typeof b!="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(b)}.`,h);if(b!==b.toLowerCase()||b.includes("_"))throw this.positionedShapeError(`No such shape: ${b}. Shape names should be lowercase.`,h);if(!tS(d.shape))throw this.positionedShapeError(`No such shape: ${d.shape}.`,h);x.type=d?.shape}d?.label&&(x.text=this.sanitizeText(d.label),x.labelType=this.sanitizeNodeLabelType(d?.labelType))}}positionedShapeError(t,r){let n=new Error(t);if(!r)return n;let i=r.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:"",token:null,line:i-1,loc:{first_line:i,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),n}rethrowMetadataYamlError(t,r,n){let i=t;if(!i||i.name!=="YAMLException"||!i.mark||!n)throw t;let s;try{let o=!r.includes(` +`),l=o?`{ +`+r+` +}`:r+` +`,u=n.first_line+this.frontmatterLineOffset,h=n.first_column+2,d=a((b,T)=>o?{line:u,column:h+(b===1?T:0)}:{line:u+b,column:b===0?h+T:T},"toSource"),f=d(i.mark.line,i.mark.column),p=i.reason??(i.message??"").split(` +`)[0].replace(/\s*\(\d+:\d+\)\s*$/,""),m=l.split(` +`),g=[];if(o)g.push(1);else for(let b=i.mark.line-1;b<=i.mark.line+1;b++)b<0||b>=m.length||b===m.length-1&&m[b]===""&&b!==i.mark.line||g.push(b);let y=Math.max(...g.map(b=>String(d(b,0).line).length)),x=[];for(let b of g){let T=d(b,0).line,C=` ${String(T).padStart(y)} | `;x.push(C+m[b].replace(/\t/g,"\u2192")),b===i.mark.line&&x.push("-".repeat(C.length+i.mark.column)+"^")}s={message:`${p} (${f.line}:${f.column+1}) + +${x.join(` +`)}`,markLine:f.line-1,markColumn:f.column,hash:{text:"",token:null,line:f.line-1,loc:{first_line:f.line,last_line:f.line,first_column:f.column,last_column:f.column+1},expected:[]}}}catch{}throw s&&(i.message=s.message,i.mark.line=s.markLine,i.mark.column=s.markColumn,i.hash=s.hash),i}addSingleLink(t,r,n,i){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};H.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(u.type)),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length,n.edgeSemantic&&(l.edgeSemantic=n.edgeSemantic)),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(d=>d.start===l.start&&d.end===l.end);h.length===0?l.id=oo(l.start,l.end,{counter:0,prefix:"L"}):l.id=oo(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))H.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;H.info("addLink",t,r,i);for(let s of t)for(let o of r){let l=s===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(s,o,n,i):this.addSingleLink(s,o,n,void 0)}}updateLinkInterpolate(t,r){t.forEach(n=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(t,r){t.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(t,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(i=>{let s=this.classes.get(i);s===void 0&&(s={id:i,styles:[],textStyles:[]},this.classes.set(i,s)),n?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");s.textStyles.push(l)}s.styles.push(o)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,r){for(let n of t.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let s=this.edges.find(l=>l.id===n);s&&s.classes.push(r);let o=this.subGraphLookup.get(n);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(t,r,n){if(_e().securityLevel!=="loose"||r===void 0)return;let i=[];if(typeof n=="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=this.lookUpDomId(t),l=document.querySelector(`[id="${o}"]`);l!==null&&l.addEventListener("click",()=>{Xt.runFunc(r,...i)},!1)}))}setLink(t,r,n){t.split(",").forEach(i=>{let s=this.vertices.get(i);s!==void 0&&(s.link=Xt.formatUrl(r,this.config),s.linkTarget=n)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(t){return Mje.has(t.type)}getTools(){let t=[];for(let r of this.vertices.values())this.isToolDefinition(r)&&t.push(r);return t}getClasses(){return this.classes}setupToolTips(t){let r=Yu();st(t).select("svg").selectAll("g.node").on("mouseover",s=>{let o=st(s.currentTarget),l=o.attr("title");if(l===null)return;let u=s.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Es.sanitize(l)),o.classed("hover",!0)}).on("mouseout",s=>{r.transition().duration(500).style("opacity",0),st(s.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=_e(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,or()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,r,n,i){let s=t?.text?.trim(),o=n?.text;t===n&&n?.text&&/\s/.exec(n.text)&&(s=void 0);let u=a(g=>{let y={boolean:{},number:{},string:{}},x=[],b;return{nodeList:g.filter(function(C){let v=typeof C;return C.stmt&&C.stmt==="dir"?(b=C.value,!1):C.trim()===""?!1:v in y?y[v].hasOwnProperty(C)?!1:y[v][C]=!0:x.includes(C)?!1:x.push(C)}),dir:b}},"uniq")(r.flat()),h=u.nodeList,d=u.dir,f=_e().flowchart??{};if(d=d??(f.inheritDir?this.getDirection()??_e().direction??void 0:void 0),this.version==="gen-1")for(let g=0;gg!==s&&!this.globalNodes.has(g)),title:o.trim(),classes:[],dir:d,labelType:this.sanitizeNodeLabelType(n?.type),type:i??"flow"};H.info("Adding",p.id,p.nodes,p.dir),p.nodes=this.makeUniq(p,this.subGraphs).nodes;let m=this.getPosForId(s);if(m!==-1){let g=this.subGraphs[m];for(let y of p.nodes)g.nodes.includes(y)||g.nodes.push(y);p.title&&(g.title=p.title),p.dir&&(g.dir=p.dir),p.type&&(g.type=p.type),this.subGraphLookup.set(s,g)}else this.subGraphs.push(p),this.subGraphLookup.set(s,p);return s}addGlobal(t){for(let r of t.flat()){if(typeof r!="string")continue;let n=r.trim();n!==""&&this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter(n=>!this.globalNodes.has(n))}getPosForId(t){for(let[r,n]of this.subGraphs.entries())if(n.id===t)return r;return-1}indexNodes2(t,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let i=0,s=1;for(;i=0){let l=this.indexNodes2(t,o);if(l.result)return{result:!0,count:s+l.count};s=s+l.count}i=i+1}return{result:!1,count:s}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}addConnector(t,r){let n=t?.text?.trim();if(!n)return"";let i=r?.text?.trim()??"",s=i.length>0?this.sanitizeText(i):n,o=this.connectors.get(n);return o?i.length>0&&(o.text=s):(o={id:n,labelType:"text",domId:Jue+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:s},this.connectors.set(n,o),this.vertices.set(n,o),this.vertexCounter++),n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}computeEdgeSemantic(t,r){if(t==="arrow_point"&&r==="normal")return"sequence";if(t==="arrow_cross"&&r==="normal")return"failure";if(t==="arrow_open"&&r==="dotted")return"reference"}destructStartLink(t){let r=t.trim(),n="arrow_open",i="normal";return r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(t,r){let n=r.length,i=0;for(let s=0;s":i="arrow_point";break;case"-":case".":i="arrow_open",n=r;break}let s="normal",o=n.length-1,l=this.countChar(".",n);return l>0&&(s="dotted",o=l),{type:i,stroke:s,length:o}}destructLink(t,r){let n=this.destructEndLink(t),i;return r?(i=this.destructStartLink(r),i.stroke!==n.stroke?{type:"INVALID",stroke:"INVALID"}:(i.type=n.type,i.length=n.length,{...i,edgeSemantic:this.computeEdgeSemantic(i.type,i.stroke)})):{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(t,r){for(let n of t)if(n.nodes.includes(r))return!0;return!1}makeUniq(t,r){let n=[];return t.nodes.forEach((i,s)=>{this.exists(r,i)||n.push(t.nodes[s])}),{nodes:n}}getTypeFromVertex(t){let r=typeof t.type=="string"?qx(t.type):t.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(t,r){return t.find(n=>n.id===r)}destructEdgeType(t){let r="none",n="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(t,r,n,i,s,o){let l=n.get(t.id),u=i.get(t.id)??!1,h=this.findNode(r,t.id);if(h)h.cssStyles=t.styles,h.cssCompiledStyles=this.getCompiledStyles(t.classes),h.cssClasses=t.classes.join(" ");else{let d={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:s.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:o,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),metadata:t.metadata};u?r.push({...d,isGroup:!0,shape:"rect"}):r.push({...d,isGroup:!1,shape:this.getTypeFromVertex(t),wrappingWidth:s.agentflow?.wrappingWidth,minWidth:s.agentflow?.minNodeWidth})}}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(s=>s.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(s=>s.trim()))}return r}runPostParseValidators(){this.postParseValidationRun||(this.postParseValidationRun=!0)}getData(){this.runPostParseValidators();let t=_e(),r=[],n=[],i=this.getSubGraphs(),s=new Map,o=new Map,l=new Set,u=new Map,h=a((T,C,v=new Set)=>{if(v.has(T))return;v.add(T);let E=this.subGraphLookup.get(T);if(E)for(let S of E.nodes)S===C||v.has(S)||(l.add(S),u.set(S,C),h(S,C,v))},"collectDescendants");for(let T of i)T.metadata?.view==="collapsed"&&!l.has(T.id)&&h(T.id,T.id);let d=a((T,C)=>{let v=new Set,E=C;for(;E!==void 0&&!v.has(E);){if(E===T)return!0;v.add(E),E=s.get(E)}return!1},"wouldCloseContainmentCycle");for(let T=i.length-1;T>=0;T--){let C=i[T];if(!l.has(C.id)){C.nodes.length>0&&o.set(C.id,!0);for(let v of C.nodes){if(d(v,C.id)){this.emitWarning(pg.CONTAINMENT_VIOLATION,`Container "${C.id}" cannot contain "${v}" because "${v}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:v});continue}s.set(v,C.id)}}}for(let T=i.length-1;T>=0;T--){let C=i[T];if(l.has(C.id))continue;if(C.metadata?.view==="collapsed"){let E={...C.metadata,containerType:C.type};r.push({id:C.id,label:C.title,labelStyle:"",labelType:C.labelType,parentId:s.get(C.id),padding:8,cssCompiledStyles:this.getCompiledStyles(C.classes),cssClasses:C.classes.join(" "),shape:"collapsedGroup",dir:C.dir,isGroup:!1,look:t.look,metadata:E})}else r.push({id:C.id,label:C.title,labelStyle:"",labelType:C.labelType,parentId:s.get(C.id),padding:8,cssCompiledStyles:this.getCompiledStyles(C.classes),cssClasses:C.classes.join(" "),shape:Oje[C.type??"flow"],dir:C.dir,isGroup:!0,look:t.look,metadata:C.metadata})}this.getVertices().forEach(T=>{l.has(T.id)||this.addNodeFromVertex(T,r,s,o,t,t.look||"classic")});let p=this.getEdges();p.forEach((T,C)=>{let v=u.get(T.start)??T.start,E=u.get(T.end)??T.end;if(v===E&&T.start!==T.end)return;let{arrowTypeStart:S,arrowTypeEnd:_}=this.destructEdgeType(T.type),A=[...p.defaultStyle??[]];T.style&&A.push(...T.style);let B={id:oo(v,E,{counter:C,prefix:"L"},T.id),isUserDefinedId:T.isUserDefinedId,start:v,end:E,type:T.type??"normal",label:T.text,labelType:T.labelType,labelpos:"c",thickness:T.stroke,minlen:T.length,classes:T?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:T?.stroke==="invisible"||T?.type==="arrow_open"?"none":S,arrowTypeEnd:T?.stroke==="invisible"||T?.type==="arrow_open"?"none":_,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(T.classes),labelStyle:A,style:A,pattern:T.stroke,look:t.look,animate:T.animate,animation:T.animation,curve:T.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve,metadata:T.metadata};n.push(B)}),Yue(r,this);let m=new Map,g=new Map;for(let T of i){let C=s.get(T.id);C!==void 0&&g.set(C,[...g.get(C)??[],T.id])}let y=0,x=a(T=>{if(!m.has(T)){m.set(T,y++);for(let C of g.get(T)??[])x(C)}},"walkContainers");for(let T of i)s.get(T.id)===void 0&&x(T.id);let b=new Set(this.getConnectors().map(T=>T.id));return Zue(r,T=>{if(b.has(T))return"connector";let C=this.vertices.get(T);return C?this.deriveVertexKind(C,qx(C.type)):void 0},m),{nodes:r,edges:n,other:{},config:t,connectors:this.getConnectors()}}defaultConfig(){return Xp.flowchart}deriveVertexKind(t,r){return this.isToolDefinition(t)?"tool":r==="hexagon"||r==="hex"?"action":r==="lean-right"||r==="lean_right"?"input":r==="lin-doc"||r==="lined-document"?"refdoc":r==="diamond"?"decision":"task"}getSemanticModel(){this.runPostParseValidators();let t=new Set(this.subGraphs.map(l=>l.id)),r=[],n=[];for(let[l,u]of this.vertices){if(t.has(l))continue;if(u.isConnector){let f={id:l};if(u.text!==void 0&&u.text!==l&&(f.title=u.text),u.metadata&&Object.keys(u.metadata).length>0){let p={};for(let[m,g]of Object.entries(u.metadata))A5.has(m)||(p[m]=g);Object.keys(p).length>0&&(f.metadata=p)}n.push(f);continue}let h={id:l};u.text!==void 0&&(h.label=u.text);let d=typeof u.type=="string"?qx(u.type):u.type;if(d!==void 0&&(h.shape=d),h.vertexKind=this.deriveVertexKind(u,d),u.metadata&&Object.keys(u.metadata).length>0){let f={};for(let[p,m]of Object.entries(u.metadata))A5.has(p)||(f[p]=m);Object.keys(f).length>0&&(h.metadata=f)}r.push(h)}let i=this.edges.map(l=>{let u={start:l.start,end:l.end};return l.id!==void 0&&(u.id=l.id),typeof l.text=="string"&&l.text.length>0&&(u.label=l.text),l.type!==void 0&&(u.type=l.type),l.stroke!==void 0&&(u.stroke=l.stroke),l.edgeSemantic!==void 0&&(u.edgeSemantic=l.edgeSemantic),l.length!==void 0&&(u.length=l.length),l.metadata&&Object.keys(l.metadata).length>0&&(u.metadata={...l.metadata}),u}),s=this.subGraphs.map(l=>{let u={id:l.id,nodes:[...l.nodes]};if(l.type!==void 0&&(u.type=l.type),l.title!==void 0&&(u.title=l.title),l.dir!==void 0&&(u.direction=l.dir),l.metadata&&Object.keys(l.metadata).length>0){let h={};for(let[d,f]of Object.entries(l.metadata))A5.has(d)||(h[d]=f);Object.keys(h).length>0&&(u.metadata=h)}return u}),o={vertices:r,edges:i,subGraphs:s,connectors:n,diagnostics:this.diagnostics};return this.direction!==void 0&&(o.direction=this.direction),o}setFrontmatterLineOffset(t){this.frontmatterLineOffset=t??0}toElementPosition(t){let r=t?.first_line??0,n=t?.first_column??0,i=t?.last_line??r,s=t?.last_column??n,[o,l]=t?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:i+this.frontmatterLineOffset,endColumn:s,startIndex:o,endIndex:l}}pushMapping(t,r,n){if(!t)return;let i={id:t,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(i),i}addVertexMapping(t,r,n,i){let s=this.pushMapping(t,"vertex",i);s&&n==null&&this.bareVertexMappings.add(s)}extendVertexMapping(t,r){if(!t||!r)return;let n=this.toElementPosition(r);for(let i=this.elementMappings.length-1;i>=0;i--){let s=this.elementMappings[i];if(s.type==="vertex"&&s.id===t){this.bareVertexMappings.has(s)&&(s.type="attachment",this.bareVertexMappings.delete(s)),(n.endLine>s.position.endLine||n.endLine===s.position.endLine&&n.endColumn>s.position.endColumn)&&(s.position.endLine=n.endLine,s.position.endColumn=n.endColumn,s.position.endIndex=n.endIndex);return}}this.pushMapping(t,"attachment",r)}addEdgeMapping(t,r,n,i){let s=Array.isArray(r)?r.map(l=>typeof l=="string"?l:l?.id??"").filter(Boolean):[],o=s.length>0?s.join(">"):"edge";this.pushMapping(o,"edge",i)}addSubgraphMapping(t,r,n,i){let s=(typeof t=="string"?t:t?.text)??"",o=this.toElementPosition(n),l=i?this.toElementPosition(i):o;s&&this.elementMappings.push({id:s,type:"subgraph",position:{startLine:o.startLine,startColumn:o.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:o.startIndex,endIndex:l.endIndex}})}addConnectorMapping(t,r,n,i){let s=t?.text?.trim()??"";if(!s)return;let o=this.toElementPosition(n),l=i?this.toElementPosition(i):o;this.elementMappings.push({id:s,type:"connector",position:{startLine:o.startLine,startColumn:o.startColumn,endLine:l.endLine,endColumn:l.endColumn,startIndex:o.startIndex,endIndex:l.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(t){return this.elementMappings.find(r=>r.id===t)}getElementsOnLine(t){return this.elementMappings.filter(r=>t>=r.position.startLine&&t<=r.position.endLine)}getElementAtPosition(t,r){let n=this.elementMappings.filter(s=>{let{startLine:o,startColumn:l,endLine:u,endColumn:h}=s.position;return!(tu||t===o&&rh)});if(n.length===0)return;let i=a(({position:s})=>[s.endLine-s.startLine,s.endColumn-s.startColumn],"span");return n.reduce((s,o)=>{let[l,u]=i(s),[h,d]=i(o);return h!==l?hd.id===l.id&&d.severity===l.severity&&d.message===l.message&&d.nodeId===l.nodeId&&d.edgeId===l.edgeId))return;this.diagnostics.push(l);let h=`agentflow[${t}]: ${n}`;r==="error"?H.error(h):H.warn(h)}emitWarning(t,r,n){this.emitDiagnostic(t,"warning",r,n)}emitError(t,r,n){this.emitDiagnostic(t,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}}});var Bje,$je,the,rhe=w(()=>{"use strict";Gt();bt();rh();Yc();Kc();jt();Bje=a(function(e,t){return t.db.getClasses()},"getClasses"),$je=a(async function(e,t,r,n){H.debug("Drawing agentflow diagram",t);let{securityLevel:i,agentflow:s,layout:o}=_e();n.db.setDiagramId(t),H.debug("Before getData: ");let l=n.db.getData();H.debug("Data: ",l);let u=ca(t,i),h=n.db.getDirection();l.type=n.type,l.layoutAlgorithm=Ta(o),l.layoutAlgorithm==="dagre"&&o==="elk"&&H.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."),l.direction=h,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=["point","circle","cross","hierarchy"],l.diagramId=t,H.debug("REF1:",l),await ba(l,u);let d=s?.diagramPadding??8;Xt.insertTitle(u,"agentflowTitleText",s?.titleTopMargin??0,n.db.getDiagramTitle()),Is(u,d,"agentflow",s?.useMaxWidth??!0)},"draw"),the={getClasses:Bje,draw:$je}});var L5,I5,nhe=w(()=>{"use strict";L5=(function(){var e=a(function(nr,Mt,er,ur){for(er=er||{},ur=nr.length;ur--;er[nr[ur]]=Mt);return er},"o"),t=[1,5],r=[1,4],n=[1,3],i=[1,6],s=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],l=[1,15],u=[1,16],h=[1,17],d=[1,18],f=[1,19],p=[1,26],m=[1,27],g=[1,28],y=[1,30],x=[1,31],b=[1,32],T=[1,55],C=[1,54],v=[1,34],E=[1,35],S=[1,36],_=[1,37],A=[1,38],B=[1,50],$=[1,52],O=[1,48],G=[1,53],I=[1,49],F=[1,56],N=[1,51],D=[1,57],M=[1,58],R=[1,39],P=[1,40],V=[1,41],U=[1,42],z=[1,43],j=[1,64],K=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Z=[1,70],ce=[1,68],te=[1,67],me=[1,69],he=[8,9,10,12,78,80,81],we=[1,88],ye=[1,101],ke=[1,106],Fe=[1,105],Ge=[1,102],Me=[1,98],at=[1,104],ht=[1,100],ge=[1,107],De=[1,103],Le=[1,108],Ie=[1,99],Q=[8,9,10,11,12,43,78,80,81],ne=[8,9,10,11,12,43,49,78,80,81],re=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],se=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],fe=[47,63,92,105,108,109,112,114,117,118,119],J=[1,131],L=[1,132],W=[1,134],ae=[1,133],X=[47,63,65,77,92,105,108,109,112,114,117,118,119],xe=[1,143],ee=[1,157],Y=[1,158],q=[1,159],ve=[1,162],Se=[1,161],Ae=[1,160],Ee=[1,145],Qe=[1,147],qe=[1,151],lt=[1,139],Ve=[1,140],Ye=[1,152],Je=[1,153],Oe=[1,154],Vt=[1,155],Ce=[1,156],Ut=[1,163],Re=[1,164],vt=[1,141],Zt=[1,142],_t=[1,149],qt=[1,144],At=[1,148],zt=[1,146],ot=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Rt=[1,168],Ar=[1,170],ie=[8,9,10,12],xt=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],kt=[1,190],de=[1,186],Ne=[1,187],nt=[1,191],ft=[1,188],dt=[1,189],cr=[80,119,122],$e=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],it=[11,109],mt=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],wt=[1,269],Dt=[1,267],Jt=[1,271],mr=[1,265],ar=[1,266],Yt=[1,268],St=[1,270],Lt=[1,272],Pt=[1,292],yt=[8,9,10,12,109],Kt=[8,9,10,11,12,63,87,108,109,112,113,114,115],pe={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:a(function(Mt,er,ur,ze,Jr,le,Er){var ue=le.length-1;switch(Jr){case 2:this.$=[];break;case 3:(!Array.isArray(le[ue])||le[ue].length>0)&&le[ue-1].push(le[ue]),this.$=le[ue-1];break;case 4:case 198:this.$=le[ue];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:ze.setDirection("TB"),this.$="TB";break;case 14:ze.setDirection(le[ue-1]),this.$=le[ue-1];break;case 32:this.$=le[ue-1].nodes;break;case 38:this.$=ze.addSubGraph(le[ue-6],le[ue-1],le[ue-4],"flow"),ze.addSubgraphMapping&&ze.addSubgraphMapping(le[ue-6],le[ue-4],Er[ue-8],Er[ue]);break;case 39:this.$=ze.addSubGraph(le[ue-7],le[ue-1],le[ue-5],"flow"),ze.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,le[ue-3],Er[ue-3]),ze.addSubgraphMapping&&ze.addSubgraphMapping(le[ue-7],le[ue-5],Er[ue-9],Er[ue]);break;case 40:this.$=ze.addSubGraph(le[ue-3],le[ue-1],{text:"",type:"text"},"flow"),ze.addSubgraphMapping&&ze.addSubgraphMapping(le[ue-3],{text:"",type:"text"},Er[ue-5],Er[ue]);break;case 41:this.$=ze.addSubGraph(le[ue-4],le[ue-1],{text:"",type:"text"},"flow"),ze.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,le[ue-3],Er[ue-3]),ze.addSubgraphMapping&&ze.addSubgraphMapping(le[ue-4],{text:"",type:"text"},Er[ue-6],Er[ue]);break;case 42:this.$=ze.addSubGraph(void 0,le[ue-1],void 0,"flow"),ze.addSubgraphMapping&&ze.addSubgraphMapping(void 0,void 0,Er[ue-3],Er[ue]);break;case 43:ze.addGlobal(le[ue-1]),this.$=[];break;case 44:this.$=ze.addConnector(le[ue-4],le[ue-2]),ze.addConnectorMapping&&ze.addConnectorMapping(le[ue-4],le[ue-2],Er[ue-6],Er[ue]);break;case 45:this.$=ze.addConnector(le[ue-5],le[ue-3]),ze.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,le[ue-1],Er[ue-1]),ze.addConnectorMapping&&ze.addConnectorMapping(le[ue-5],le[ue-3],Er[ue-7],Er[ue]);break;case 46:this.$=ze.addConnector(le[ue-1],{text:"",type:"text"}),ze.addConnectorMapping&&ze.addConnectorMapping(le[ue-1],{text:"",type:"text"},Er[ue-3],Er[ue]);break;case 47:this.$=ze.addConnector(le[ue-2],{text:"",type:"text"}),ze.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,le[ue-1],Er[ue-1]),ze.addConnectorMapping&&ze.addConnectorMapping(le[ue-2],{text:"",type:"text"},Er[ue-4],Er[ue]);break;case 49:this.$=le[ue].trim(),ze.setAccTitle(this.$);break;case 50:case 51:this.$=le[ue].trim(),ze.setAccDescription(this.$);break;case 56:this.$=le[ue-1]+le[ue];break;case 57:this.$=le[ue];break;case 58:ze.addVertex(le[ue-1][le[ue-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,le[ue],Er[ue]),ze.extendVertexMapping&&ze.extendVertexMapping(le[ue-1][le[ue-1].length-1],Er[ue]),ze.addLink(le[ue-3].stmt,le[ue-1],le[ue-2]),ze.addEdgeMapping&&ze.addEdgeMapping(le[ue-3].stmt,le[ue-1],le[ue-2],this._$),this.$={stmt:le[ue-1],nodes:le[ue-1].concat(le[ue-3].nodes)};break;case 59:ze.addLink(le[ue-2].stmt,le[ue],le[ue-1]),ze.addEdgeMapping&&ze.addEdgeMapping(le[ue-2].stmt,le[ue],le[ue-1],this._$),this.$={stmt:le[ue],nodes:le[ue].concat(le[ue-2].nodes)};break;case 60:ze.addLink(le[ue-3].stmt,le[ue-1],le[ue-2]),ze.addEdgeMapping&&ze.addEdgeMapping(le[ue-3].stmt,le[ue-1],le[ue-2],this._$),this.$={stmt:le[ue-1],nodes:le[ue-1].concat(le[ue-3].nodes)};break;case 61:this.$={stmt:le[ue-1],nodes:le[ue-1]};break;case 62:ze.addVertex(le[ue-1][le[ue-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,le[ue],Er[ue]),ze.extendVertexMapping&&ze.extendVertexMapping(le[ue-1][le[ue-1].length-1],Er[ue]),this.$={stmt:le[ue-1],nodes:le[ue-1],shapeData:le[ue]};break;case 63:this.$={stmt:le[ue],nodes:le[ue]};break;case 64:this.$=[le[ue]];break;case 65:ze.addVertex(le[ue-5][le[ue-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,le[ue-4],Er[ue-4]),ze.extendVertexMapping&&ze.extendVertexMapping(le[ue-5][le[ue-5].length-1],Er[ue-4]),this.$=le[ue-5].concat(le[ue]);break;case 66:this.$=le[ue-4].concat(le[ue]);break;case 67:this.$=le[ue];break;case 68:this.$=le[ue-2],ze.setClass(le[ue-2],le[ue]);break;case 69:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"square"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"square",this._$);break;case 70:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"doublecircle"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"doublecircle",this._$);break;case 71:this.$=le[ue-5],ze.addVertex(le[ue-5],le[ue-2],"circle"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-5],le[ue-2],"circle",this._$);break;case 72:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"ellipse"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"ellipse",this._$);break;case 73:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"stadium"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"stadium",this._$);break;case 74:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"subroutine"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"subroutine",this._$);break;case 75:this.$=le[ue-7],ze.addVertex(le[ue-7],le[ue-1],"rect",void 0,void 0,void 0,Object.fromEntries([[le[ue-5],le[ue-3]]])),ze.addVertexMapping&&ze.addVertexMapping(le[ue-7],le[ue-1],"rect",this._$);break;case 76:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"cylinder"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"cylinder",this._$);break;case 77:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"round"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"round",this._$);break;case 78:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"diamond"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"diamond",this._$);break;case 79:this.$=le[ue-5],ze.addVertex(le[ue-5],le[ue-2],"hexagon"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-5],le[ue-2],"hexagon",this._$);break;case 80:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"odd"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"odd",this._$);break;case 81:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"trapezoid"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"trapezoid",this._$);break;case 82:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"inv_trapezoid"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"inv_trapezoid",this._$);break;case 83:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"lean_right"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"lean_right",this._$);break;case 84:this.$=le[ue-3],ze.addVertex(le[ue-3],le[ue-1],"lean_left"),ze.addVertexMapping&&ze.addVertexMapping(le[ue-3],le[ue-1],"lean_left",this._$);break;case 85:this.$=le[ue],ze.addVertex(le[ue]),ze.addVertexMapping&&ze.addVertexMapping(le[ue],void 0,void 0,this._$);break;case 86:le[ue-1].text=le[ue],this.$=le[ue-1];break;case 87:case 88:le[ue-2].text=le[ue-1],this.$=le[ue-2];break;case 89:this.$=le[ue];break;case 90:var Gr=ze.destructLink(le[ue],le[ue-2]);this.$={type:Gr.type,stroke:Gr.stroke,length:Gr.length,edgeSemantic:Gr.edgeSemantic,text:le[ue-1]};break;case 91:var Gr=ze.destructLink(le[ue],le[ue-2]);this.$={type:Gr.type,stroke:Gr.stroke,length:Gr.length,edgeSemantic:Gr.edgeSemantic,text:le[ue-1],id:le[ue-3]};break;case 92:this.$={text:le[ue],type:"text"};break;case 93:this.$={text:le[ue-1].text+""+le[ue],type:le[ue-1].type};break;case 94:this.$={text:le[ue],type:"string"};break;case 95:this.$={text:le[ue],type:"markdown"};break;case 96:var Gr=ze.destructLink(le[ue]);this.$={type:Gr.type,stroke:Gr.stroke,length:Gr.length,edgeSemantic:Gr.edgeSemantic};break;case 97:var Gr=ze.destructLink(le[ue]);this.$={type:Gr.type,stroke:Gr.stroke,length:Gr.length,edgeSemantic:Gr.edgeSemantic,id:le[ue-1]};break;case 98:this.$=le[ue-1];break;case 99:this.$={text:le[ue],type:"text"};break;case 100:this.$={text:le[ue-1].text+""+le[ue],type:le[ue-1].type};break;case 101:this.$={text:le[ue],type:"string"};break;case 102:case 119:this.$={text:le[ue],type:"markdown"};break;case 116:this.$={text:le[ue],type:"text"};break;case 117:this.$={text:le[ue-1].text+""+le[ue],type:le[ue-1].type};break;case 118:this.$={text:le[ue],type:"text"};break;case 120:this.$=le[ue-4],ze.addClass(le[ue-2],le[ue]);break;case 121:this.$=le[ue-4],ze.setClass(le[ue-2],le[ue]);break;case 122:case 130:this.$=le[ue-1],ze.setClickEvent(le[ue-1],le[ue]);break;case 123:case 131:this.$=le[ue-3],ze.setClickEvent(le[ue-3],le[ue-2]),ze.setTooltip(le[ue-3],le[ue]);break;case 124:this.$=le[ue-2],ze.setClickEvent(le[ue-2],le[ue-1],le[ue]);break;case 125:this.$=le[ue-4],ze.setClickEvent(le[ue-4],le[ue-3],le[ue-2]),ze.setTooltip(le[ue-4],le[ue]);break;case 126:this.$=le[ue-2],ze.setLink(le[ue-2],le[ue]);break;case 127:this.$=le[ue-4],ze.setLink(le[ue-4],le[ue-2]),ze.setTooltip(le[ue-4],le[ue]);break;case 128:this.$=le[ue-4],ze.setLink(le[ue-4],le[ue-2],le[ue]);break;case 129:this.$=le[ue-6],ze.setLink(le[ue-6],le[ue-4],le[ue]),ze.setTooltip(le[ue-6],le[ue-2]);break;case 132:this.$=le[ue-1],ze.setLink(le[ue-1],le[ue]);break;case 133:this.$=le[ue-3],ze.setLink(le[ue-3],le[ue-2]),ze.setTooltip(le[ue-3],le[ue]);break;case 134:this.$=le[ue-3],ze.setLink(le[ue-3],le[ue-2],le[ue]);break;case 135:this.$=le[ue-5],ze.setLink(le[ue-5],le[ue-4],le[ue]),ze.setTooltip(le[ue-5],le[ue-2]);break;case 136:this.$=le[ue-4],ze.addVertex(le[ue-2],void 0,void 0,le[ue]);break;case 137:this.$=le[ue-4],ze.updateLink([le[ue-2]],le[ue]);break;case 138:this.$=le[ue-4],ze.updateLink(le[ue-2],le[ue]);break;case 139:this.$=le[ue-8],ze.updateLinkInterpolate([le[ue-6]],le[ue-2]),ze.updateLink([le[ue-6]],le[ue]);break;case 140:this.$=le[ue-8],ze.updateLinkInterpolate(le[ue-6],le[ue-2]),ze.updateLink(le[ue-6],le[ue]);break;case 141:this.$=le[ue-6],ze.updateLinkInterpolate([le[ue-4]],le[ue]);break;case 142:this.$=le[ue-6],ze.updateLinkInterpolate(le[ue-4],le[ue]);break;case 143:case 145:this.$=[le[ue]];break;case 144:case 146:le[ue-2].push(le[ue]),this.$=le[ue-2];break;case 148:this.$=le[ue-1]+le[ue];break;case 196:this.$=le[ue];break;case 197:this.$=le[ue-1]+""+le[ue];break;case 199:this.$=le[ue-1]+""+le[ue];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:t,10:r,11:n,13:i},{1:[3]},e(s,o,{5:7}),{4:8,8:t,10:r,11:n,13:i},{4:9,8:t,10:r,11:n,13:i},{4:10,8:t,10:r,11:n,13:i},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},e(s,[2,10]),e(s,[2,11]),e(s,[2,12]),e(s,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:j,16:59,19:62},e(K,[2,3]),e(K,[2,4]),e(K,[2,5]),e(K,[2,6]),e(K,[2,7]),e(K,[2,8]),e(K,[2,9]),{8:Z,9:ce,10:te,12:me,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:Z,9:ce,10:te,12:me,22:75},{8:Z,9:ce,10:te,12:me,22:76},{8:Z,9:ce,10:te,12:me,22:77},{8:Z,9:ce,10:te,12:me,22:78},{8:Z,9:ce,10:te,12:me,22:79},{8:Z,9:ce,10:te,11:[1,80],12:me,22:81},{8:Z,9:ce,10:te,12:me,22:82},{11:[1,83]},e(K,[2,48]),{39:[1,84]},{41:[1,85]},e(K,[2,51]),e(he,[2,63],{19:86,34:87,11:j,43:we}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:ye,47:ke,63:Fe,83:[1,96],92:Ge,98:[1,93],100:[1,94],104:95,108:Me,109:at,112:ht,114:ge,117:De,118:Le,119:Ie,123:97},e(K,[2,200]),e(K,[2,201]),e(K,[2,202]),e(K,[2,203]),e(K,[2,204]),e(Q,[2,64]),e(Q,[2,67],{49:[1,109]}),e(ne,[2,85],{116:122,30:[1,110],47:T,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:C,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:B,105:$,108:O,109:G,112:I,114:F,117:N,118:D,119:M}),e(re,[2,196]),e(re,[2,157]),e(re,[2,158]),e(re,[2,159]),e(re,[2,160]),e(re,[2,161]),e(re,[2,162]),e(re,[2,163]),e(re,[2,164]),e(re,[2,165]),e(re,[2,166]),e(re,[2,167]),e(s,[2,14]),e(s,[2,20]),e(s,[2,21]),{10:[1,123]},e(s,[2,23]),e(se,[2,31],{19:124,11:j}),e(K,[2,32]),{45:125,46:44,47:T,48:45,50:46,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},e(K,[2,52]),e(K,[2,53]),e(K,[2,54]),e(K,[2,55]),e(fe,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:J,84:L,119:W,122:ae},{78:[1,135],80:[1,136]},e(X,[2,96]),e(K,[2,33]),e(K,[2,34]),e(K,[2,35]),e(K,[2,36]),e(K,[2,37]),{11:xe,13:ee,15:Y,28:q,29:137,33:ve,35:Se,36:Ae,47:Ee,63:Qe,78:qe,83:lt,84:Ve,86:150,87:Ye,88:Je,89:Oe,90:Vt,91:Ce,92:Ut,93:Re,94:138,108:vt,112:Zt,114:_t,117:qt,118:At,119:zt},e(ot,o,{5:165}),e(ot,o,{5:166}),{11:xe,13:ee,15:Y,28:q,29:167,33:ve,35:Se,36:Ae,47:Ee,63:Qe,78:qe,83:lt,84:Ve,86:150,87:Ye,88:Je,89:Oe,90:Vt,91:Ce,92:Ut,93:Re,94:138,108:vt,112:Zt,114:_t,117:qt,118:At,119:zt},e(K,[2,49]),e(K,[2,50]),e(he,[2,61],{47:Rt}),e(he,[2,62],{19:169,11:j,43:Ar}),e(Q,[2,57]),{47:T,50:171,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},{105:[1,172],106:173,108:[1,174]},{47:T,50:175,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},{47:T,50:176,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},e(ie,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(ie,[2,130],{123:181,11:[1,180],15:ye,47:ke,63:Fe,92:Ge,108:Me,109:at,112:ht,114:ge,117:De,118:Le,119:Ie}),e(ie,[2,132],{11:[1,182]}),e(xt,[2,198]),e(xt,[2,185]),e(xt,[2,186]),e(xt,[2,187]),e(xt,[2,188]),e(xt,[2,189]),e(xt,[2,190]),e(xt,[2,191]),e(xt,[2,192]),e(xt,[2,193]),e(xt,[2,194]),e(xt,[2,195]),{47:T,50:183,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},{31:184,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:192,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:194,53:[1,193],70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:195,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:196,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:197,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{112:[1,198]},{31:199,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:200,68:[1,201],70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:202,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:203,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{31:204,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},e(re,[2,197]),e(s,[2,22]),e(se,[2,30]),e(he,[2,59],{34:205,19:206,11:j,43:we}),e(fe,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{80:[1,210],82:211,119:W,122:ae},e(cr,[2,92]),e(cr,[2,94]),e(cr,[2,95]),e(cr,[2,183]),e(cr,[2,184]),{79:212,82:130,83:J,84:L,119:W,122:ae},e(X,[2,97]),{8:Z,9:ce,10:te,11:xe,12:me,13:ee,15:Y,22:214,28:q,30:[1,213],33:ve,34:215,35:Se,36:Ae,43:we,47:Ee,63:Qe,78:qe,86:150,87:Ye,88:Je,89:Oe,90:Vt,91:Ce,92:Ut,93:Re,94:216,108:vt,112:Zt,114:_t,117:qt,118:At,119:zt},e($e,[2,116]),e($e,[2,118]),e($e,[2,119]),e($e,[2,172]),e($e,[2,173]),e($e,[2,174]),e($e,[2,175]),e($e,[2,176]),e($e,[2,177]),e($e,[2,178]),e($e,[2,179]),e($e,[2,180]),e($e,[2,181]),e($e,[2,182]),e($e,[2,103]),e($e,[2,104]),e($e,[2,105]),e($e,[2,106]),e($e,[2,107]),e($e,[2,108]),e($e,[2,109]),e($e,[2,110]),e($e,[2,111]),e($e,[2,112]),e($e,[2,113]),e($e,[2,114]),e($e,[2,115]),{6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,217],35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},{6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,218],35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},{8:Z,9:ce,10:te,11:xe,12:me,13:ee,15:Y,22:220,28:q,30:[1,219],33:ve,34:221,35:Se,36:Ae,43:we,47:Ee,63:Qe,78:qe,86:150,87:Ye,88:Je,89:Oe,90:Vt,91:Ce,92:Ut,93:Re,94:216,108:vt,112:Zt,114:_t,117:qt,118:At,119:zt},{11:j,19:222},{47:[1,223]},e(Q,[2,56]),{11:[1,224],47:T,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:122,117:N,118:D,119:M},{11:[1,225]},{11:[1,226],109:[1,227]},e(it,[2,143]),{11:[1,228],47:T,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:122,117:N,118:D,119:M},{11:[1,229],47:T,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:122,117:N,118:D,119:M},{83:[1,230]},e(ie,[2,124],{11:[1,231]}),e(ie,[2,126],{11:[1,232]}),{83:[1,233]},e(xt,[2,199]),{83:[1,234],101:[1,235]},e(Q,[2,68],{116:122,47:T,63:C,92:B,105:$,108:O,109:G,112:I,114:F,117:N,118:D,119:M}),{32:[1,236],70:kt,85:237,119:nt,120:ft,121:dt},e(mt,[2,99]),e(mt,[2,101]),e(mt,[2,102]),e(mt,[2,168]),e(mt,[2,169]),e(mt,[2,170]),e(mt,[2,171]),{52:[1,238],70:kt,85:237,119:nt,120:ft,121:dt},{31:239,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{54:[1,240],70:kt,85:237,119:nt,120:ft,121:dt},{56:[1,241],70:kt,85:237,119:nt,120:ft,121:dt},{58:[1,242],70:kt,85:237,119:nt,120:ft,121:dt},{60:[1,243],70:kt,85:237,119:nt,120:ft,121:dt},{63:[1,244]},{67:[1,245],70:kt,85:237,119:nt,120:ft,121:dt},{69:[1,246],70:kt,85:237,119:nt,120:ft,121:dt},{31:247,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},{32:[1,248],70:kt,85:237,119:nt,120:ft,121:dt},{70:kt,72:[1,249],74:[1,250],85:237,119:nt,120:ft,121:dt},{70:kt,72:[1,252],74:[1,251],85:237,119:nt,120:ft,121:dt},e(he,[2,58],{19:169,11:j,43:Ar}),e(he,[2,60],{47:Rt}),e(fe,[2,88]),e(fe,[2,87]),{65:[1,253],70:kt,85:237,119:nt,120:ft,121:dt},e(fe,[2,90]),e(cr,[2,93]),{80:[1,254],82:211,119:W,122:ae},{31:255,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},e(ot,o,{5:256}),{8:Z,9:ce,10:te,12:me,22:257,43:Ar},e($e,[2,117]),e(K,[2,42]),e(K,[2,43]),{31:258,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},e(K,[2,46]),{8:Z,9:ce,10:te,12:me,22:259,43:Ar},{46:260,47:T,48:45,50:46,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},{11:j,19:261},{11:wt,63:Dt,87:Jt,95:262,108:mr,110:263,111:264,112:ar,113:Yt,114:St,115:Lt},{11:wt,63:Dt,87:Jt,95:273,107:[1,274],108:mr,110:263,111:264,112:ar,113:Yt,114:St,115:Lt},{11:wt,63:Dt,87:Jt,95:275,107:[1,276],108:mr,110:263,111:264,112:ar,113:Yt,114:St,115:Lt},{108:[1,277]},{11:wt,63:Dt,87:Jt,95:278,108:mr,110:263,111:264,112:ar,113:Yt,114:St,115:Lt},{47:T,50:279,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},e(ie,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(ie,[2,131]),e(ie,[2,133],{11:[1,283]}),e(ie,[2,134]),e(ne,[2,69]),e(mt,[2,100]),e(ne,[2,70]),{54:[1,284],70:kt,85:237,119:nt,120:ft,121:dt},e(ne,[2,77]),e(ne,[2,72]),e(ne,[2,73]),e(ne,[2,74]),{112:[1,285]},e(ne,[2,76]),e(ne,[2,78]),{69:[1,286],70:kt,85:237,119:nt,120:ft,121:dt},e(ne,[2,80]),e(ne,[2,81]),e(ne,[2,83]),e(ne,[2,82]),e(ne,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(fe,[2,91]),{32:[1,287],70:kt,85:237,119:nt,120:ft,121:dt},{6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,288],35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},e(ot,o,{5:289}),{32:[1,290],70:kt,85:237,119:nt,120:ft,121:dt},e(K,[2,47]),e(Q,[2,66]),{46:291,47:T,48:45,50:46,63:C,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M},e(ie,[2,136],{109:Pt}),e(yt,[2,145],{111:293,11:wt,63:Dt,87:Jt,108:mr,112:ar,113:Yt,114:St,115:Lt}),e(Kt,[2,147]),e(Kt,[2,149]),e(Kt,[2,150]),e(Kt,[2,151]),e(Kt,[2,152]),e(Kt,[2,153]),e(Kt,[2,154]),e(Kt,[2,155]),e(Kt,[2,156]),e(ie,[2,137],{109:Pt}),{11:[1,294]},e(ie,[2,138],{109:Pt}),{11:[1,295]},e(it,[2,144]),e(ie,[2,120],{109:Pt}),e(ie,[2,121],{116:122,47:T,63:C,92:B,105:$,108:O,109:G,112:I,114:F,117:N,118:D,119:M}),e(ie,[2,125]),e(ie,[2,127],{11:[1,296]}),e(ie,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:Z,9:ce,10:te,12:me,22:301,34:302,43:we},e(K,[2,40]),{6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,303],35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},{8:Z,9:ce,10:te,12:me,22:304,34:305,43:we},e(Q,[2,65]),{11:wt,63:Dt,87:Jt,108:mr,110:306,111:264,112:ar,113:Yt,114:St,115:Lt},e(Kt,[2,148]),{15:ye,47:ke,63:Fe,92:Ge,104:307,108:Me,109:at,112:ht,114:ge,117:De,118:Le,119:Ie,123:97},{15:ye,47:ke,63:Fe,92:Ge,104:308,108:Me,109:at,112:ht,114:ge,117:De,118:Le,119:Ie,123:97},{101:[1,309]},e(ie,[2,135]),e(ne,[2,71]),{31:310,70:kt,83:de,84:Ne,85:185,119:nt,120:ft,121:dt},e(ne,[2,79]),e(ot,o,{5:311}),{8:Z,9:ce,10:te,12:me,22:312,43:Ar},e(K,[2,41]),e(K,[2,44]),{8:Z,9:ce,10:te,12:me,22:313,43:Ar},e(yt,[2,146],{111:293,11:wt,63:Dt,87:Jt,108:mr,112:ar,113:Yt,114:St,115:Lt}),e(ie,[2,141],{123:181,11:[1,314],15:ye,47:ke,63:Fe,92:Ge,108:Me,109:at,112:ht,114:ge,117:De,118:Le,119:Ie}),e(ie,[2,142],{123:181,11:[1,315],15:ye,47:ke,63:Fe,92:Ge,108:Me,109:at,112:ht,114:ge,117:De,118:Le,119:Ie}),e(ie,[2,129]),{32:[1,316],70:kt,85:237,119:nt,120:ft,121:dt},{6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,317],35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},e(ot,o,{5:318}),e(K,[2,45]),{11:wt,63:Dt,87:Jt,95:319,108:mr,110:263,111:264,112:ar,113:Yt,114:St,115:Lt},{11:wt,63:Dt,87:Jt,95:320,108:mr,110:263,111:264,112:ar,113:Yt,114:St,115:Lt},e(ne,[2,75]),e(K,[2,38]),{6:13,7:14,8:l,9:u,10:h,11:d,12:f,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,321],35:m,36:g,37:29,38:y,40:x,42:b,45:33,46:44,47:T,48:45,50:46,63:C,87:v,88:E,89:S,90:_,91:A,92:B,105:$,108:O,109:G,112:I,114:F,116:47,117:N,118:D,119:M,124:R,125:P,126:V,127:U,128:z},e(ie,[2,139],{109:Pt}),e(ie,[2,140],{109:Pt}),e(K,[2,39])],defaultActions:{},parseError:a(function(Mt,er){if(er.recoverable)this.trace(Mt);else{var ur=new Error(Mt);throw ur.hash=er,ur}},"parseError"),parse:a(function(Mt){var er=this,ur=[0],ze=[],Jr=[null],le=[],Er=this.table,ue="",Gr=0,Et=0,be=0,Ke=2,pt=1,Wt=le.slice.call(arguments,1),Bt=Object.create(this.lexer),Ht={yy:{}};for(var En in this.yy)Object.prototype.hasOwnProperty.call(this.yy,En)&&(Ht.yy[En]=this.yy[En]);Bt.setInput(Mt,Ht.yy),Ht.yy.lexer=Bt,Ht.yy.parser=this,typeof Bt.yylloc>"u"&&(Bt.yylloc={});var zn=Bt.yylloc;le.push(zn);var wi=Bt.options&&Bt.options.ranges;typeof Ht.yy.parseError=="function"?this.parseError=Ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _i(Ma){ur.length=ur.length-2*Ma,Jr.length=Jr.length-Ma,le.length=le.length-Ma}a(_i,"popStack");function Xn(){var Ma;return Ma=ze.pop()||Bt.lex()||pt,typeof Ma!="number"&&(Ma instanceof Array&&(ze=Ma,Ma=ze.pop()),Ma=er.symbols_[Ma]||Ma),Ma}a(Xn,"lex");for(var Kr,_u,Lo,An,Opt,qR,$p={},pC,xc,iV,mC;;){if(Lo=ur[ur.length-1],this.defaultActions[Lo]?An=this.defaultActions[Lo]:((Kr===null||typeof Kr>"u")&&(Kr=Xn()),An=Er[Lo]&&Er[Lo][Kr]),typeof An>"u"||!An.length||!An[0]){var HR="";mC=[];for(pC in Er[Lo])this.terminals_[pC]&&pC>Ke&&mC.push("'"+this.terminals_[pC]+"'");Bt.showPosition?HR="Parse error on line "+(Gr+1)+`: +`+Bt.showPosition()+` +Expecting `+mC.join(", ")+", got '"+(this.terminals_[Kr]||Kr)+"'":HR="Parse error on line "+(Gr+1)+": Unexpected "+(Kr==pt?"end of input":"'"+(this.terminals_[Kr]||Kr)+"'"),this.parseError(HR,{text:Bt.match,token:this.terminals_[Kr]||Kr,line:Bt.yylineno,loc:zn,expected:mC})}if(An[0]instanceof Array&&An.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lo+", token: "+Kr);switch(An[0]){case 1:ur.push(Kr),Jr.push(Bt.yytext),le.push(Bt.yylloc),ur.push(An[1]),Kr=null,_u?(Kr=_u,_u=null):(Et=Bt.yyleng,ue=Bt.yytext,Gr=Bt.yylineno,zn=Bt.yylloc,be>0&&be--);break;case 2:if(xc=this.productions_[An[1]][1],$p.$=Jr[Jr.length-xc],$p._$={first_line:le[le.length-(xc||1)].first_line,last_line:le[le.length-1].last_line,first_column:le[le.length-(xc||1)].first_column,last_column:le[le.length-1].last_column},wi&&($p._$.range=[le[le.length-(xc||1)].range[0],le[le.length-1].range[1]]),qR=this.performAction.apply($p,[ue,Et,Gr,Ht.yy,An[1],Jr,le].concat(Wt)),typeof qR<"u")return qR;xc&&(ur=ur.slice(0,-1*xc*2),Jr=Jr.slice(0,-1*xc),le=le.slice(0,-1*xc)),ur.push(this.productions_[An[1]][0]),Jr.push($p.$),le.push($p._$),iV=Er[ur[ur.length-2]][ur[ur.length-1]],ur.push(iV);break;case 3:return!0}}return!0},"parse")},Wr=(function(){var nr={EOF:1,parseError:a(function(er,ur){if(this.yy.parser)this.yy.parser.parseError(er,ur);else throw new Error(er)},"parseError"),setInput:a(function(Mt,er){return this.yy=er||this.yy||{},this._input=Mt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var Mt=this._input[0];this.yytext+=Mt,this.yyleng++,this.offset++,this.match+=Mt,this.matched+=Mt;var er=Mt.match(/(?:\r\n?|\n).*/g);return er?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Mt},"input"),unput:a(function(Mt){var er=Mt.length,ur=Mt.split(/(?:\r\n?|\n)/g);this._input=Mt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-er),this.offset-=er;var ze=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),ur.length-1&&(this.yylineno-=ur.length-1);var Jr=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:ur?(ur.length===ze.length?this.yylloc.first_column:0)+ze[ze.length-ur.length].length-ur[0].length:this.yylloc.first_column-er},this.options.ranges&&(this.yylloc.range=[Jr[0],Jr[0]+this.yyleng-er]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(Mt){this.unput(this.match.slice(Mt))},"less"),pastInput:a(function(){var Mt=this.matched.substr(0,this.matched.length-this.match.length);return(Mt.length>20?"...":"")+Mt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var Mt=this.match;return Mt.length<20&&(Mt+=this._input.substr(0,20-Mt.length)),(Mt.substr(0,20)+(Mt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var Mt=this.pastInput(),er=new Array(Mt.length+1).join("-");return Mt+this.upcomingInput()+` +`+er+"^"},"showPosition"),test_match:a(function(Mt,er){var ur,ze,Jr;if(this.options.backtrack_lexer&&(Jr={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&&(Jr.yylloc.range=this.yylloc.range.slice(0))),ze=Mt[0].match(/(?:\r\n?|\n).*/g),ze&&(this.yylineno+=ze.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ze?ze[ze.length-1].length-ze[ze.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Mt[0].length},this.yytext+=Mt[0],this.match+=Mt[0],this.matches=Mt,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(Mt[0].length),this.matched+=Mt[0],ur=this.performAction.call(this,this.yy,this,er,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ur)return ur;if(this._backtrack){for(var le in Jr)this[le]=Jr[le];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Mt,er,ur,ze;this._more||(this.yytext="",this.match="");for(var Jr=this._currentRules(),le=0;leer[0].length)){if(er=ur,ze=le,this.options.backtrack_lexer){if(Mt=this.test_match(ur,Jr[le]),Mt!==!1)return Mt;if(this._backtrack){er=!1;continue}else return!1}else if(!this.options.flex)break}return er?(Mt=this.test_match(er,Jr[ze]),Mt!==!1?Mt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var er=this.next();return er||this.lex()},"lex"),begin:a(function(er){this.conditionStack.push(er)},"begin"),popState:a(function(){var er=this.conditionStack.length-1;return er>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(er){return er=this.conditionStack.length-1-Math.abs(er||0),er>=0?this.conditionStack[er]:"INITIAL"},"topState"),pushState:a(function(er){this.begin(er)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(er,ur,ze,Jr){var le=Jr;switch(ze){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;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"),ur.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let Er=/\n\s*/g;return ur.yytext=ur.yytext.replace(Er,"
    "),43;break;case 11:return 43;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 98;case 17:this.popState();break;case 18:return 99;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 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:return er.lex.firstGraph()&&this.begin("dir"),13;break;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;break;case 45:return this.popState(),15;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;break;case 70:return this.pushState("edgeText"),78;break;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;break;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;break;case 77:return this.popState(),58;break;case 78:return this.pushState("text"),57;break;case 79:return this.popState(),60;break;case 80:return this.pushState("text"),59;break;case 81:return 61;case 82:return this.pushState("text"),70;break;case 83:return this.popState(),67;break;case 84:return this.pushState("text"),66;break;case 85:return this.popState(),52;break;case 86:return this.pushState("text"),51;break;case 87:break;case 88:return this.popState(),72;break;case 89:return this.popState(),74;break;case 90:return 120;case 91:return this.pushState("trapText"),71;break;case 92:return this.pushState("trapText"),73;break;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;break;case 106:return this.pushState("text"),65;break;case 107:return this.popState(),54;break;case 108:return this.pushState("text"),53;break;case 109:return this.popState(),32;break;case 110:return this.pushState("text"),30;break;case 111:return this.popState(),69;break;case 112:return this.pushState("text"),68;break;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"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]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_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*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],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,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return nr})();pe.lexer=Wr;function Te(){this.yy={}}return a(Te,"Parser"),Te.prototype=pe,pe.Parser=Te,new Te})();L5.parser=L5;I5=L5});var ihe,she,ahe=w(()=>{"use strict";nhe();ihe=Object.assign({},I5);ihe.parse=e=>{let t=e.replace(/}[^\S\n]*\n/g,`} +`);return I5.parse(t)};she=ihe});var Fje,Gje,Vje,ohe,lhe=w(()=>{"use strict";Ai();Tf();Wi();_5();Fje=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Di(e.look),s=zi(r),o=uo(e.THEME_COLOR_LIMIT,n),l=a(d=>n[d%n.length],"border"),u=a(d=>s?`fill: ${r[d%r.length]};`:"","fill"),h="";for(let d of Que){let f=Hx.get(d),p=`[data-look="${i}"].node.${E5(d)}`;h+=` + + ${p} rect, + ${p} path, + ${p} polygon { + stroke: ${l(f)}; + ${u(f)} + } +`}for(let d=0;d`${p} ${y}, ${m} ${y}`,"rule");h+=` + + ${g("rect")}, + ${g("path")} { + stroke: ${l(f)}; + ${u(f)} + } +`}return h},"genColor"),Gje=a((e,t)=>{let r=kc,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Qn(n,i,s,t)},"fade"),Vje=a(e=>`${Fje(e)} + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + .node .katex path { + fill: ${e.nodeTextColor||e.textColor}; + stroke: ${e.nodeTextColor||e.textColor}; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePaths .path { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${Gje(e.edgeLabelBackground,.5)}; + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .flow-cluster rect { + fill: none; + stroke: ${e.clusterBorder}; + stroke-width: 0.75px; + } + + .node .collapsed-indicator { + fill: ${e.nodeBorder}; + stroke: none; + stroke-width: 0; + opacity: 0.5; + } + + .node .collapsed-separator { + stroke-width: 0.75px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .agentflowTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + ${Co()} +`,"getStyles"),ohe=Vje});var che={};ir(che,{diagram:()=>zje});var zje,uhe=w(()=>{"use strict";Gt();ehe();rhe();ahe();lhe();zje={parser:she,get db(){return new UE},renderer:the,styles:ohe,init:a(e=>{e.agentflow??={},e.layout&&xd({layout:e.layout}),e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,xd({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}});var qje,fhe,phe=w(()=>{"use strict";k5();qje=a(e=>`${VE(e)} + .swimlane.cluster:not([data-color-id]) rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),fhe=qje});var mhe={};ir(mhe,{diagram:()=>Hje});var Hje,ghe=w(()=>{"use strict";S5();phe();Hje=zE({styles:fhe})});var D5,bhe,The=w(()=>{"use strict";D5=(function(){var e=a(function(Ie,Q,ne,re){for(ne=ne||{},re=Ie.length;re--;ne[Ie[re]]=Q);return ne},"o"),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],n=[1,7],i=[1,9],s=[1,10],o=[1,11],l=[1,12],u=[1,30],h=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],g=[1,19],y=[1,28],x=[1,29],b=[1,20],T=[1,18],C=[1,21],v=[1,22],E=[2,6],S=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],_=[1,36],A=[1,37],B=[1,38],$=[1,39],O=[1,40],G=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],I=[1,46],F=[1,47],N=[1,57],D=[43,51,53,54,55,74,75],M=[1,70],R=[1,68],P=[1,65],V=[1,69],U=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],j=[1,78],K=[1,77],Z=[1,76],ce=[69,70,71,72,73],te=[1,91],me=[6,9,45,50],he=[6,9,12,44,45,50,51,52],we=[1,101],ye=[1,100],ke=[1,99],Fe=[18,61],Ge=[1,110],Me=[1,109],at=[20,43,51,53,54,55],ht=[18,61,64,66],ge={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:a(function(Q,ne,re,se,fe,J,L){var W=J.length-1;switch(fe){case 1:break;case 2:this.$=[];break;case 3:this.$=J[W-1].concat(J[W]);break;case 4:this.$=J[W];break;case 5:case 6:this.$=[];break;case 7:se.addEntity(J[W-4]),se.addEntity(J[W-2]),se.addRelationship(J[W-4],J[W],J[W-2],J[W-3]),this.$=[J[W-4],J[W-2]];break;case 8:se.addEntity(J[W-8]),se.addEntity(J[W-4]),se.addRelationship(J[W-8],J[W],J[W-4],J[W-5]),se.setClass([J[W-8]],J[W-6]),se.setClass([J[W-4]],J[W-2]),this.$=[J[W-8],J[W-4]];break;case 9:se.addEntity(J[W-6]),se.addEntity(J[W-2]),se.addRelationship(J[W-6],J[W],J[W-2],J[W-3]),se.setClass([J[W-6]],J[W-4]),this.$=[J[W-6],J[W-2]];break;case 10:se.addEntity(J[W-6]),se.addEntity(J[W-4]),se.addRelationship(J[W-6],J[W],J[W-4],J[W-5]),se.setClass([J[W-4]],J[W-2]),this.$=[J[W-6],J[W-4]];break;case 11:se.addEntity(J[W-3]),se.addAttributes(J[W-3],J[W-1]),this.$=[J[W-3]];break;case 12:se.addEntity(J[W-5]),se.addAttributes(J[W-5],J[W-1]),se.setClass([J[W-5]],J[W-3]),this.$=[J[W-5]];break;case 13:se.addEntity(J[W-2]),this.$=[J[W-2]];break;case 14:se.addEntity(J[W-4]),se.setClass([J[W-4]],J[W-2]),this.$=[J[W-4]];break;case 15:se.addEntity(J[W]),this.$=[J[W]];break;case 16:se.addEntity(J[W-2]),se.setClass([J[W-2]],J[W]),this.$=[J[W-2]];break;case 17:se.addEntity(J[W-6],J[W-4]),se.addAttributes(J[W-6],J[W-1]),this.$=[J[W-6]];break;case 18:se.addEntity(J[W-8],J[W-6]),se.addAttributes(J[W-8],J[W-1]),se.setClass([J[W-8]],J[W-3]),this.$=[J[W-8]];break;case 19:se.addEntity(J[W-5],J[W-3]),this.$=[J[W-5]];break;case 20:se.addEntity(J[W-7],J[W-5]),se.setClass([J[W-7]],J[W-2]),this.$=[J[W-7]];break;case 21:se.addEntity(J[W-3],J[W-1]);break;case 22:se.addEntity(J[W-5],J[W-3]),se.setClass([J[W-5]],J[W]);break;case 23:case 24:this.$=J[W].trim(),se.setAccTitle(this.$);break;case 25:case 26:this.$=J[W].trim(),se.setAccDescription(this.$);break;case 27:se.subgraphDepth?this.$=J[W]:(se.setDirection(J[W].value),this.$=[]);break;case 31:se.subgraphDepth=(se.subgraphDepth||1)-1,this.$=se.addSubGraph({text:J[W-2].id},J[W-1],{text:J[W-2].text});break;case 32:se.subgraphDepth=(se.subgraphDepth||0)+1,this.$={id:J[W-1],text:J[W-1]};break;case 33:se.subgraphDepth=(se.subgraphDepth||0)+1,this.$={id:J[W-4],text:J[W-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=J[W];break;case 35:this.$=J[W-1]+" "+J[W];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=J[W-3],se.addClass(J[W-2],J[W-1]);break;case 41:case 42:case 63:case 72:this.$=[J[W]];break;case 43:case 44:this.$=J[W-2].concat([J[W]]);break;case 45:this.$=J[W-2],se.setClass(J[W-1],J[W]);break;case 46:this.$=J[W-3],se.addCssStyles(J[W-2],J[W-1]);break;case 47:this.$=[J[W]];break;case 48:J[W-2].push(J[W]),this.$=J[W-2];break;case 50:this.$=J[W-1]+J[W];break;case 58:case 84:case 85:this.$=J[W].replace(/"/g,"");break;case 64:J[W].push(J[W-1]),this.$=J[W];break;case 65:this.$={type:J[W-1],name:J[W]};break;case 66:this.$={type:J[W-2],name:J[W-1],keys:J[W]};break;case 67:this.$={type:J[W-2],name:J[W-1],comment:J[W]};break;case 68:this.$={type:J[W-3],name:J[W-2],keys:J[W-1],comment:J[W]};break;case 69:case 71:case 74:this.$=J[W];break;case 70:this.$=J[W-1]+J[W];break;case 73:J[W-2].push(J[W]),this.$=J[W-2];break;case 75:this.$=J[W].replace(/"/g,"");break;case 76:this.$={cardA:J[W],relType:J[W-1],cardB:J[W-2]};break;case 77:this.$=se.Cardinality.ZERO_OR_ONE;break;case 78:this.$=se.Cardinality.ZERO_OR_MORE;break;case 79:this.$=se.Cardinality.ONE_OR_MORE;break;case 80:this.$=se.Cardinality.ONLY_ONE;break;case 81:this.$=se.Cardinality.MD_PARENT;break;case 82:this.$=se.Identification.NON_IDENTIFYING;break;case 83:this.$=se.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,r,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:i,23:s,25:o,27:l,28:13,29:14,30:15,31:16,32:17,34:u,37:h,38:d,39:f,40:p,41:m,43:g,46:y,47:x,51:b,53:T,54:C,55:v},e(t,E,{1:[2,1]}),e(S,[2,3]),e(S,[2,4]),e(S,[2,5]),e(S,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:_,70:A,71:B,72:$,73:O}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(S,[2,26]),e(S,[2,27]),e(S,[2,28]),e(S,[2,29]),e(S,[2,30]),e(S,r,{5:44}),e(G,[2,58]),e(G,[2,59]),e(G,[2,60]),e(G,[2,61]),e(G,[2,62]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{15:45,43:I,44:F},{15:48,43:I,44:F},{15:49,43:I,44:F},{10:50,43:g,51:b,53:T,54:C,55:v},{10:51,43:g,51:b,53:T,54:C,55:v},{15:52,43:I,44:F},{17:53,18:[1,54],56:55,57:56,61:N},{10:58,43:g,51:b,53:T,54:C,55:v},{68:59,74:[1,60],75:[1,61]},e(D,[2,77]),e(D,[2,78]),e(D,[2,79]),e(D,[2,80]),e(D,[2,81]),e(S,[2,23]),e(S,[2,24]),e(S,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:i,23:s,25:o,27:l,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:u,37:h,38:d,39:f,40:p,41:m,43:g,46:y,47:x,51:b,53:T,54:C,55:v},{12:M,42:64,44:R,45:P,48:66,49:67,51:V,52:U},e(z,[2,41]),e(z,[2,42]),{15:72,43:I,44:F,45:P},{12:M,42:73,44:R,45:P,48:66,49:67,51:V,52:U},{6:j,9:K,19:[1,75],35:74,50:Z},{12:[1,79],14:[1,80]},e(S,[2,16],{67:35,11:81,16:[1,82],45:P,69:_,70:A,71:B,72:$,73:O}),{18:[1,83]},e(S,[2,13]),{17:84,18:[2,63],56:55,57:56,61:N},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:_,70:A,71:B,72:$,73:O},e(ce,[2,82]),e(ce,[2,83]),e(S,[2,31]),e(S,E),{6:j,9:K,35:90,45:te,50:Z},{43:[1,92],44:[1,93]},e(me,[2,47],{49:94,12:M,44:R,51:V,52:U}),e(he,[2,49]),e(he,[2,54]),e(he,[2,55]),e(he,[2,56]),e(he,[2,57]),e(S,[2,45],{45:P}),{6:j,9:K,35:95,45:te,50:Z},e(S,[2,32]),{10:97,36:96,43:g,51:b,53:T,54:C,55:v},e(S,[2,51]),e(S,[2,52]),e(S,[2,53]),{13:98,43:we,53:ye,76:ke},{15:102,43:I,44:F},{10:103,43:g,51:b,53:T,54:C,55:v},{17:104,18:[1,105],56:55,57:56,61:N},e(S,[2,11]),{18:[2,64]},e(Fe,[2,65],{59:106,60:107,63:108,65:Ge,66:Me}),e([18,61,65,66],[2,71]),{61:[2,70]},e(S,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(S,[2,40]),{12:M,44:R,48:113,49:67,51:V,52:U},e(z,[2,43]),e(z,[2,44]),e(he,[2,50]),e(S,[2,46]),{10:115,20:[1,114],43:g,51:b,53:T,54:C,55:v},e(at,[2,34]),e(S,[2,7]),e(S,[2,84]),e(S,[2,85]),e(S,[2,86]),{12:[1,116],45:P},{12:[1,118],14:[1,117]},{18:[1,119]},e(S,[2,14]),e(Fe,[2,66],{60:120,64:[1,121],66:Me}),e(Fe,[2,67]),e(ht,[2,72]),e(Fe,[2,75]),e(ht,[2,74]),{17:122,18:[1,123],56:55,57:56,61:N},{15:124,43:I,44:F},e(me,[2,48],{49:94,12:M,44:R,51:V,52:U}),{6:j,9:K,35:125,50:Z},e(at,[2,35]),{13:126,43:we,53:ye,76:ke},{15:127,43:I,44:F},{13:128,43:we,53:ye,76:ke},e(S,[2,12]),e(Fe,[2,68]),{63:129,65:Ge},{18:[1,130]},e(S,[2,19]),e(S,[2,22],{16:[1,131],45:P}),e(S,[2,33]),e(S,[2,10]),{12:[1,132],45:P},e(S,[2,9]),e(ht,[2,73]),e(S,[2,17]),{17:133,18:[1,134],56:55,57:56,61:N},{13:135,43:we,53:ye,76:ke},{18:[1,136]},e(S,[2,20]),e(S,[2,8]),e(S,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:a(function(Q,ne){if(ne.recoverable)this.trace(Q);else{var re=new Error(Q);throw re.hash=ne,re}},"parseError"),parse:a(function(Q){var ne=this,re=[0],se=[],fe=[null],J=[],L=this.table,W="",ae=0,X=0,xe=0,ee=2,Y=1,q=J.slice.call(arguments,1),ve=Object.create(this.lexer),Se={yy:{}};for(var Ae in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ae)&&(Se.yy[Ae]=this.yy[Ae]);ve.setInput(Q,Se.yy),Se.yy.lexer=ve,Se.yy.parser=this,typeof ve.yylloc>"u"&&(ve.yylloc={});var Ee=ve.yylloc;J.push(Ee);var Qe=ve.options&&ve.options.ranges;typeof Se.yy.parseError=="function"?this.parseError=Se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qe(At){re.length=re.length-2*At,fe.length=fe.length-At,J.length=J.length-At}a(qe,"popStack");function lt(){var At;return At=se.pop()||ve.lex()||Y,typeof At!="number"&&(At instanceof Array&&(se=At,At=se.pop()),At=ne.symbols_[At]||At),At}a(lt,"lex");for(var Ve,Ye,Je,Oe,Vt,Ce,Ut={},Re,vt,Zt,_t;;){if(Je=re[re.length-1],this.defaultActions[Je]?Oe=this.defaultActions[Je]:((Ve===null||typeof Ve>"u")&&(Ve=lt()),Oe=L[Je]&&L[Je][Ve]),typeof Oe>"u"||!Oe.length||!Oe[0]){var qt="";_t=[];for(Re in L[Je])this.terminals_[Re]&&Re>ee&&_t.push("'"+this.terminals_[Re]+"'");ve.showPosition?qt="Parse error on line "+(ae+1)+`: +`+ve.showPosition()+` +Expecting `+_t.join(", ")+", got '"+(this.terminals_[Ve]||Ve)+"'":qt="Parse error on line "+(ae+1)+": Unexpected "+(Ve==Y?"end of input":"'"+(this.terminals_[Ve]||Ve)+"'"),this.parseError(qt,{text:ve.match,token:this.terminals_[Ve]||Ve,line:ve.yylineno,loc:Ee,expected:_t})}if(Oe[0]instanceof Array&&Oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Je+", token: "+Ve);switch(Oe[0]){case 1:re.push(Ve),fe.push(ve.yytext),J.push(ve.yylloc),re.push(Oe[1]),Ve=null,Ye?(Ve=Ye,Ye=null):(X=ve.yyleng,W=ve.yytext,ae=ve.yylineno,Ee=ve.yylloc,xe>0&&xe--);break;case 2:if(vt=this.productions_[Oe[1]][1],Ut.$=fe[fe.length-vt],Ut._$={first_line:J[J.length-(vt||1)].first_line,last_line:J[J.length-1].last_line,first_column:J[J.length-(vt||1)].first_column,last_column:J[J.length-1].last_column},Qe&&(Ut._$.range=[J[J.length-(vt||1)].range[0],J[J.length-1].range[1]]),Ce=this.performAction.apply(Ut,[W,X,ae,Se.yy,Oe[1],fe,J].concat(q)),typeof Ce<"u")return Ce;vt&&(re=re.slice(0,-1*vt*2),fe=fe.slice(0,-1*vt),J=J.slice(0,-1*vt)),re.push(this.productions_[Oe[1]][0]),fe.push(Ut.$),J.push(Ut._$),Zt=L[re[re.length-2]][re[re.length-1]],re.push(Zt);break;case 3:return!0}}return!0},"parse")},De=(function(){var Ie={EOF:1,parseError:a(function(ne,re){if(this.yy.parser)this.yy.parser.parseError(ne,re);else throw new Error(ne)},"parseError"),setInput:a(function(Q,ne){return this.yy=ne||this.yy||{},this._input=Q,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var Q=this._input[0];this.yytext+=Q,this.yyleng++,this.offset++,this.match+=Q,this.matched+=Q;var ne=Q.match(/(?:\r\n?|\n).*/g);return ne?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Q},"input"),unput:a(function(Q){var ne=Q.length,re=Q.split(/(?:\r\n?|\n)/g);this._input=Q+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ne),this.offset-=ne;var se=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),re.length-1&&(this.yylineno-=re.length-1);var fe=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:re?(re.length===se.length?this.yylloc.first_column:0)+se[se.length-re.length].length-re[0].length:this.yylloc.first_column-ne},this.options.ranges&&(this.yylloc.range=[fe[0],fe[0]+this.yyleng-ne]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(Q){this.unput(this.match.slice(Q))},"less"),pastInput:a(function(){var Q=this.matched.substr(0,this.matched.length-this.match.length);return(Q.length>20?"...":"")+Q.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var Q=this.match;return Q.length<20&&(Q+=this._input.substr(0,20-Q.length)),(Q.substr(0,20)+(Q.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var Q=this.pastInput(),ne=new Array(Q.length+1).join("-");return Q+this.upcomingInput()+` +`+ne+"^"},"showPosition"),test_match:a(function(Q,ne){var re,se,fe;if(this.options.backtrack_lexer&&(fe={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&&(fe.yylloc.range=this.yylloc.range.slice(0))),se=Q[0].match(/(?:\r\n?|\n).*/g),se&&(this.yylineno+=se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:se?se[se.length-1].length-se[se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Q[0].length},this.yytext+=Q[0],this.match+=Q[0],this.matches=Q,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(Q[0].length),this.matched+=Q[0],re=this.performAction.call(this,this.yy,this,ne,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),re)return re;if(this._backtrack){for(var J in fe)this[J]=fe[J];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Q,ne,re,se;this._more||(this.yytext="",this.match="");for(var fe=this._currentRules(),J=0;Jne[0].length)){if(ne=re,se=J,this.options.backtrack_lexer){if(Q=this.test_match(re,fe[J]),Q!==!1)return Q;if(this._backtrack){ne=!1;continue}else return!1}else if(!this.options.flex)break}return ne?(Q=this.test_match(ne,fe[se]),Q!==!1?Q:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var ne=this.next();return ne||this.lex()},"lex"),begin:a(function(ne){this.conditionStack.push(ne)},"begin"),popState:a(function(){var ne=this.conditionStack.length-1;return ne>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(ne){return ne=this.conditionStack.length-1-Math.abs(ne||0),ne>=0?this.conditionStack[ne]:"INITIAL"},"topState"),pushState:a(function(ne){this.begin(ne)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(ne,re,se,fe){var J=fe;switch(se){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;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 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return re.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return re.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return Ie})();ge.lexer=De;function Le(){this.yy={}}return a(Le,"Parser"),Le.prototype=ge,ge.Parser=Le,new Le})();D5.parser=D5;bhe=D5});var WE,Che=w(()=>{"use strict";bt();Gt();Ir();fn();jt();WE=class{constructor(){this.entities=new Map;this.relationships=[];this.classes=new Map;this.subgraphDepth=0;this.subGraphs=[];this.subGraphLookup=new Map;this.subCount=0;this.direction="TB";this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"};this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"};this.setAccTitle=hr;this.getAccTitle=gr;this.setAccDescription=fr;this.getAccDescription=yr;this.setDiagramTitle=Cr;this.getDiagramTitle=xr;this.getConfig=a(()=>_e().er,"getConfig");this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{a(this,"ErDB")}addEntity(t,r=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&r&&(this.entities.get(t).alias=r,H.info(`Add alias '${r}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:r,shape:"erBox",look:_e().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),H.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,r){let n=this.addEntity(t),i;for(i=r.length-1;i>=0;i--)r[i].keys||(r[i].keys=[]),r[i].comment||(r[i].comment=""),n.attributes.push(r[i]),H.debug("Added attribute ",r[i].name)}addRelationship(t,r,n,i){let s;if(this.subGraphLookup.has(t))s=t;else{let u=this.addEntity(t);if(!u)return;s=u.id}let o;if(this.subGraphLookup.has(n))o=n;else{let u=this.addEntity(n);if(!u)return;o=u.id}let l={entityA:s,roleA:r,entityB:o,relSpec:i};this.relationships.push(l),H.debug("Added new relationship :",l)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(s=>s.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(s=>s.trim()))}return r}addCssStyles(t,r){for(let n of t){let i=this.entities.get(n),s=this.subGraphLookup.get(n);if(r){if(i)for(let o of r)i.cssStyles.push(o);if(s){s.cssStyles||(s.cssStyles=[]);for(let o of r)s.cssStyles.push(o)}}}}addClass(t,r){t.forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(s){if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)})})}addSubGraph(t,r,n){let i=t.text.trim(),s=n.text,l=a(f=>{let p=new Set,m;return{nodeList:f.filter(y=>{if(y?.stmt)return y.stmt==="dir"&&(m=y.value),!1;if(typeof y!="string")return!1;let x=y.trim();return!x||p.has(x)?!1:(p.add(x),!0)}),dir:m}},"uniq")(r.flat()),u=l.nodeList,h=l.dir;i=i??"subGraph"+this.subCount,s=s||"",s=this.sanitizeText(s),this.subCount=this.subCount+1;let d={id:i,nodes:u,title:s.trim(),classes:[],cssStyles:[],dir:h,labelType:this.sanitizeNodeLabelType(n?.type)};return H.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes,this.subGraphs.push(d),this.subGraphLookup.set(i,d),i}getSubGraphs(){return this.subGraphs}setClass(t,r){for(let n of t){let i=this.entities.get(n);if(i)for(let o of r)i.cssClasses+=" "+o;let s=this.subGraphLookup.get(n);if(s)for(let o of r)s.classes.push(o)}}subgraphNodeCache(t){let r=new Set;for(let n of t)for(let i of n.nodes)r.add(i);return r}makeUniq(t,r){let n=this.subgraphNodeCache(r),i=[];return t.nodes.forEach((s,o)=>{n.has(s)?H.warn(`Entity '${s}' already belongs to another subgraph and will be ignored`):i.push(t.nodes[o])}),{nodes:i}}sanitizeText(t){return gt.sanitizeText(t,_e())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,or()}getData(){let t=[],r=[],n=_e(),i=this.getSubGraphs(),s=new Map,o=new Map;for(let d=i.length-1;d>=0;d--){let f=i[d];f.nodes.length>0&&o.set(f.id,!0);for(let p of f.nodes)s.set(p,f.id)}for(let d=i.length-1;d>=0;d--){let f=i[d];t.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:s.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssStyles:f.cssStyles,cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:n.look})}let l=new Set(i.map(d=>d.id)),u=0;for(let d of this.entities.keys()){if(l.has(d))continue;let f=this.entities.get(d);f&&(f.cssCompiledStyles=this.getCompiledStyles(f.cssClasses.split(" ")),f.colorIndex=u++,t.push({...f,parentId:s.get(d),isGroup:!1}))}let h=0;for(let d of this.relationships){let f={id:oo(d.entityA,d.entityB,{prefix:"id",counter:h++}),type:"normal",curve:"basis",start:d.entityA,end:d.entityB,label:d.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:d.relSpec.cardB.toLowerCase(),arrowTypeEnd:d.relSpec.cardA.toLowerCase(),pattern:d.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look,labelType:"markdown"};r.push(f)}return{nodes:t,edges:r,other:{},config:n,direction:this.direction}}}});var N5={};ir(N5,{draw:()=>Qje});var Qje,khe=w(()=>{"use strict";Gt();bt();rh();Yc();Kc();jt();Lr();Qje=a(async function(e,t,r,n){H.info("REF0:"),H.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:s,layout:o}=_e(),l=n.db.getData(),u=ca(t,i);l.type=n.type,l.layoutAlgorithm=Ta(o),l.config.flowchart.nodeSpacing=s?.nodeSpacing||140,l.config.flowchart.rankSpacing=s?.rankSpacing||80,l.direction=n.db.getDirection();let{config:h}=l,{look:d}=h;d==="neo"?l.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:l.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=t,await ba(l,u);let f=u.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let m=st(this),y=m.attr("id").replace("-background",""),x=u.select(`#${CSS.escape(y)}`);if(!x.empty()){let b=x.attr("transform");m.attr("transform",b)}});let p=8;Xt.insertTitle(u,"erDiagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Is(u,p,"erDiagram",s?.useMaxWidth??!0)},"draw")});var She,Zje,Jje,Ehe,vhe=w(()=>{"use strict";Ai();Wi();She=a((e,t)=>{let r=kc,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Qn(n,i,s,t)},"fade"),Zje=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Di(e.look),s=zi(r),o="";for(let l=0;l{let{look:t,theme:r,erEdgeLabelBackground:n,strokeWidth:i}=e;return` + ${Zje(e)} + .entityBox { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${e.tertiaryColor}; + opacity: 0.7; + background-color: ${e.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${K0.has(r)&&n?n:She(e.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${K0.has(r)&&n?n:e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${K0.has(r)&&n?n:e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.textColor}; + } + + .edgeLabel .label { + fill: ${e.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${t==="neo"?i:"1px"}; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: ${t==="neo"?i:"1px"}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${She(e.tertiaryColor,.5)}; + } + + .cluster rect { + fill: ${e.clusterBkg??e.mainBkg}; + stroke: ${e.clusterBorder??e.nodeBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor??e.textColor}; + } + + .cluster-label text { + fill: ${e.titleColor??e.textColor}; + } +`},"getStyles"),Ehe=Jje});var whe={};ir(whe,{diagram:()=>eqe});var eqe,_he=w(()=>{"use strict";The();Che();khe();vhe();eqe={parser:bhe,get db(){return new WE},renderer:N5,styles:Ehe}});function fs(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function So(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function nu(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function ife(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function Og(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function zg(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function XB(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function QB(e){return zg(e)&&typeof e.fullText=="string"}function afe(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function Rb(e){return!!e&&typeof e[Symbol.iterator]=="function"}function qn(...e){if(e.length===1){let t=e[0];if(t instanceof zh)return t;if(Rb(t))return new zh(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new zh(()=>({index:0}),r=>r.index1?new zh(()=>({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{fs(i)&&(i.$container=e,i.$containerProperty=r,i.$containerIndex=s,t.deep&&Kv(i,t))}):fs(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&Kv(n,t)))}function Hb(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function tc(e){let r=Cb(e).$document;if(!r)throw new Error("AST node has no document.");return r}function Cb(e){for(;e.$container;)e=e.$container;return e}function s6(e){return So(e)?e.ref?[e.ref]:[]:nu(e)?e.items.map(t=>t.ref):[]}function yw(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new zh(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexyw(r,t))}function rc(e,t){if(e){if(t?.range&&!Xv(e,t.range))return new Yv(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new Yv(e,r=>yw(r,t),{includeRoot:!0})}function Xv(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?Ife(r,t):!1}function Lb(e){return new zh(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexzg(t)?t.content:[],{includeRoot:!0})}function Afe(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Rfe(e){return{start:{line:e.startLine-1,character:e.startColumn-1},end:{line:e.endLine-1,character:e.endColumn}}}function Zv(e){let{startOffset:t,endOffset:r}=e;return typeof t=="number"&&Number.isFinite(t)&&t>=0&&typeof r=="number"&&Number.isFinite(r)&&r>=t}function Db(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function Lfe(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return tu.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.linetu.After}function Dfe(e,t){if(e){let r=Nfe(e,!0);if(r&&d6(r,t))return r;if(QB(e)){let n=e.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let s=e.content[i];if(d6(s,t))return s}}}}function d6(e,t){return XB(e)&&t.includes(e.tokenType.name)}function Nfe(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e);for(;n>0;){n--;let i=r.content[n];if(t||!i.hidden)return i}e=r}}function Kg(e,t="Error: Got unexpected value."){throw new Error(typeof t=="string"?t:t())}function wr(e){return e.charCodeAt(0)}function wv(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function Lg(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function Lf(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function gb(){throw Error("Internal Error - Should never get here!")}function f6(e){return e.type==="Character"}function Pfe(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),B5.reset(e),B5.visit(Wqe.pattern(e)),B5.multiline}catch{return!1}}function n$(e){let t=typeof e=="string"?new RegExp(e):e;return qqe.some(r=>t.test(r))}function Xb(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bfe(e,t){let r=$fe(e),n=t.match(r);return!!n&&n[0].length>0}function $fe(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,n=0;function i(){let s="",o;function l(h){s+=r.substr(n,h),n+=h}a(l,"appendRaw"),k(l,"appendRaw");function u(h){s+="(?:"+r.substr(n,h)+"|$)",n+=h}for(a(u,"appendOptional"),k(u,"appendOptional");n",n)-n+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?l(o[0].length):u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":s+="(?:",n+=3,s+=i()+"|$)";break;case"=":s+="(?=",n+=3,s+=i()+")";break;case"!":o=n,n+=3,i(),s+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,i(),s+=r.substr(o,n-o);break;default:l(r.indexOf(">",n)-n+1),s+=i()+"|$)";break}break}else l(1),s+=i()+"|$)";break;case")":return++n,s;default:u(1);break}return s}return a(i,"process2"),k(i,"process"),new RegExp(i(),e.flags)}function Ffe(e){return e.rules.find(t=>sc(t)&&t.entry)}function Gfe(e){return e.rules.filter(t=>ac(t)&&t.hidden)}function i$(e,t){let r=new Set,n=Ffe(e);if(!n)return new Set(e.rules);let i=[n].concat(Gfe(e));for(let o of i)s$(o,r,t);let s=new Set;for(let o of e.rules)(r.has(o.name)||ac(o)&&o.hidden)&&s.add(o);return s}function s$(e,t,r){t.add(e.name),Hg(e).forEach(n=>{if(jh(n)||r&&t$(n)){let i=n.rule.ref;i&&!t.has(i.name)&&s$(i,t,r)}})}function Vfe(e){if(e.terminal)return e.terminal;if(e.type.ref)return o$(e.type.ref)?.terminal}function zfe(e){return e.hidden&&!n$(Cw(e))}function Ufe(e,t){return!e||!t?[]:Tw(e,t,e.astNode,!0)}function a$(e,t,r){if(!e||!t)return;let n=Tw(e,t,e.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function Tw(e,t,r,n){if(!n){let i=Hb(e.grammarSource,Uh);if(i&&i.feature===t)return[e]}return zg(e)&&e.astNode===r?e.content.flatMap(i=>Tw(i,t,r,!1)):[]}function Wfe(e,t,r){if(!e)return;let n=jfe(e,t,e?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function jfe(e,t,r){if(e.astNode!==r)return[];if(Wh(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=Qv(e).iterator(),i,s=[];do if(i=n.next(),!i.done){let o=i.value;o.astNode===r?Wh(o.grammarSource)&&o.grammarSource.value===t&&s.push(o):n.prune()}while(!i.done);return s}function qfe(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=Hb(e.grammarSource,Uh);if(r)return r;e=e.container}}function o$(e){let t=e;return e$(t)&&(Yb(t.$container)?t=t.$container.$container:Yg(t.$container)?t=t.$container:Kg(t.$container)),l$(e,t,new Map)}function l$(e,t,r){function n(i,s){let o;return Hb(i,Uh)||(o=l$(s,s,r)),r.set(e,o),o}if(a(n,"go"),k(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let i of Hg(t)){if(Uh(i)&&i.feature.toLowerCase()==="name")return r.set(e,i),i;if(jh(i)&&sc(i.rule.ref))return n(i,i.rule.ref);if(Cfe(i)&&i.typeRef?.ref)return n(i,i.typeRef.ref)}}function c$(e){return u$(e,new Set)}function u$(e,t){if(t.has(e))return!0;t.add(e);for(let r of Hg(e))if(jh(r)){if(!r.rule.ref||sc(r.rule.ref)&&!u$(r.rule.ref,t)||Ib(r.rule.ref))return!1}else{if(Uh(r))return!1;if(Yb(r))return!1}return!!e.definition}function h$(e){if(!ac(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}}}function Ug(e){if(Yg(e))return sc(e)&&c$(e)?e.name:h$(e)??e.name;if(mfe(e)||Efe(e)||Tfe(e))return e.name;if(Yb(e)){let t=Hfe(e);if(t)return t}else if(e$(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function Hfe(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return Ug(e.type.ref)}function Yfe(e){return ac(e)?e.type?.name??"string":h$(e)??e.name}function Cw(e){let t={s:!1,i:!1,u:!1},r=Qf(e.definition,t),n=Object.entries(t).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Qf(e,t){if(kfe(e))return Kfe(e);if(Sfe(e))return Xfe(e);if(hfe(e))return Jfe(e);if(t$(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return nc(Qf(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(gfe(e))return Zfe(e);if(vfe(e))return Qfe(e);if(bfe(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),i=e.regex.substring(r+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),nc(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(wfe(e))return nc(d$,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}function Kfe(e){return nc(e.elements.map(t=>Qf(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Xfe(e){return nc(e.elements.map(t=>Qf(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Qfe(e){return nc(`${d$}*?${Qf(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Zfe(e){return nc(`(?!${Qf(e.terminal)})${d$}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Jfe(e){return e.right?nc(`[${_v(e.left)}-${_v(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):nc(_v(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function _v(e){return Xb(e.value)}function nc(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function epe(e){let t=[],r=e.Grammar;for(let n of r.rules)ac(n)&&zfe(n)&&Pfe(Cw(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:Gqe}}function tw(e){console&&console.error&&console.error(`Error: ${e}`)}function f$(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function p$(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function m$(e){function t(){}a(t,"FakeConstructor"),k(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return a(n,"fakeAccess"),k(n,"fakeAccess"),n(),n(),e;(0,eval)(e)}function tpe(e){return rpe(e)?e.LABEL:e.name}function rpe(e){return typeof e.LABEL=="string"&&e.LABEL!==""}function npe(e){return e.map(kb)}function kb(e){function t(r){return r.map(kb)}if(a(t,"convertDefinition"),k(t,"convertDefinition"),e instanceof Ys){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return typeof e.label=="string"&&(r.label=e.label),r}else{if(e instanceof ka)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Cs)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ya)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Ka)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:kb(new Gn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Sa)return{type:"RepetitionWithSeparator",idx:e.idx,separator:kb(new Gn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof pi)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Ea)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Gn){let r={type:"Terminal",name:e.terminalType.name,label:tpe(e.terminalType),idx:e.idx};typeof e.label=="string"&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=n instanceof RegExp?n.source:n),r}else{if(e instanceof Xg)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}function dl(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function ipe(e){return e instanceof ka||e instanceof Cs||e instanceof pi||e instanceof Ya||e instanceof Ka||e instanceof Sa||e instanceof Gn||e instanceof Xg}function Nb(e,t=[]){return e instanceof Cs||e instanceof pi||e instanceof Sa?!0:e instanceof Ea?e.definition.some(n=>Nb(n,t)):e instanceof Ys&&t.includes(e)?!1:e instanceof oc?(e instanceof Ys&&t.push(e),e.definition.every(n=>Nb(n,t))):!1}function spe(e){return e instanceof Ea}function cl(e){if(e instanceof Ys)return"SUBRULE";if(e instanceof Cs)return"OPTION";if(e instanceof Ea)return"OR";if(e instanceof Ya)return"AT_LEAST_ONE";if(e instanceof Ka)return"AT_LEAST_ONE_SEP";if(e instanceof Sa)return"MANY_SEP";if(e instanceof pi)return"MANY";if(e instanceof Gn)return"CONSUME";throw Error("non exhaustive match")}function p6(e,t,r){return[new Cs({definition:[new Gn({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Zg(e){if(e instanceof Ys)return Zg(e.referencedRule);if(e instanceof Gn)return lpe(e);if(ipe(e))return ape(e);if(spe(e))return ope(e);throw Error("non exhaustive match")}function ape(e){let t=[],r=e.definition,n=0,i=r.length>n,s,o=!0;for(;i&&o;)s=r[n],o=Nb(s),t=t.concat(Zg(s)),n=n+1,i=r.length>n;return[...new Set(t)]}function ope(e){let t=e.definition.map(r=>Zg(r));return[...new Set(t.flat())]}function lpe(e){return[e.terminalType]}function upe(e){let t={};return e.forEach(r=>{let n=new Hqe(r).startWalking();Object.assign(t,n)}),t}function hpe(e,t){return e.name+t+cpe}function Jg(e){let t=e.toString();if(Av.hasOwnProperty(t))return Av[t];{let r=Yqe.pattern(t);return Av[t]=r,r}}function dpe(){Av={}}function ppe(e,t=!1){try{let r=Jg(e);return nw(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===fpe)t&&f$(`${rw} 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.`),tw(`${rw} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function nw(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i{if(typeof u=="number")yb(u,t,r);else{let h=u;if(r===!0)for(let d=h.from;d<=h.to;d++)yb(d,t,r);else{for(let d=h.from;d<=h.to&&d=bb){let d=h.from>=bb?h.from:bb,f=h.to,p=iu(d),m=iu(f);for(let g=p;g<=m;g++)t[g]=g}}}});break;case"Group":nw(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&iw(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Object.values(t)}function yb(e,t,r){let n=iu(e);t[n]=n,r===!0&&mpe(e,t)}function mpe(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=iu(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let s=iu(i.charCodeAt(0));t[s]=s}}}function m6(e,t){return e.value.find(r=>{if(typeof r=="number")return t.includes(r);{let n=r;return t.find(i=>n.from<=i&&i<=n.to)!==void 0}})}function iw(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Array.isArray(e.value)?e.value.every(iw):iw(e.value):!1}function Sw(e,t){if(t instanceof RegExp){let r=Jg(t),n=new Kqe(e);return n.visit(r),n.found}else{for(let r of t){let n=r.charCodeAt(0);if(e.includes(n))return!0}return!1}}function gpe(e,t){t=Object.assign({safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:k((T,C)=>C(),"tracer")},t);let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{Bpe()});let n;r("Reject Lexer.NA",()=>{n=e.filter(T=>T[Yf]!==Ca.NA)});let i=!1,s;r("Transform Patterns",()=>{i=!1,s=n.map(T=>{let C=T[Yf];if(C instanceof RegExp){let v=C.source;return v.length===1&&v!=="^"&&v!=="$"&&v!=="."&&!C.ignoreCase?v:v.length===2&&v[0]==="\\"&&!["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"].includes(v[1])?v[1]:b6(C)}else{if(typeof C=="function")return i=!0,{exec:C};if(typeof C=="object")return i=!0,C;if(typeof C=="string"){if(C.length===1)return C;{let v=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),E=new RegExp(v);return b6(E)}}else throw Error("non exhaustive match")}})});let o,l,u,h,d;r("misc mapping",()=>{o=n.map(T=>T.tokenTypeIdx),l=n.map(T=>{let C=T.GROUP;if(C!==Ca.SKIPPED){if(typeof C=="string")return C;if(C===void 0)return!1;throw Error("non exhaustive match")}}),u=n.map(T=>{let C=T.LONGER_ALT;if(C)return Array.isArray(C)?C.map(E=>n.indexOf(E)):[n.indexOf(C)]}),h=n.map(T=>T.PUSH_MODE),d=n.map(T=>Object.hasOwn(T,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let T=x$(t.lineTerminatorCharacters);f=n.map(C=>!1),t.positionTracking!=="onlyOffset"&&(f=n.map(C=>Object.hasOwn(C,"LINE_BREAKS")?!!C.LINE_BREAKS:y$(C,T)===!1&&Sw(T,C.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=n.map(g$),m=s.map(Ope),g=n.reduce((T,C)=>{let v=C.GROUP;return typeof v=="string"&&v!==Ca.SKIPPED&&(T[v]=[]),T},{}),y=s.map((T,C)=>{let v=l[C]===void 0&&u[C]===void 0?ype(n[C].PATTERN):void 0;return{pattern:s[C],asciiClass:v,longerAlt:u[C],canLineTerminator:f[C],matchType:v!==void 0?x6:m[C]!==!1?g6:p[C]?Rv:y6,short:m[C],group:l[C],push:h[C],pop:d[C],tokenTypeIdx:o[C],tokenType:n[C]}})});let x=!0,b=[];return t.safeMode||r("First Char Optimization",()=>{b=n.reduce((T,C,v)=>{if(typeof C.PATTERN=="string"){let E=C.PATTERN.charCodeAt(0),S=iu(E);Lv(T,S,y[v])}else if(Array.isArray(C.START_CHARS_HINT)){let E;C.START_CHARS_HINT.forEach(S=>{let _=typeof S=="string"?S.charCodeAt(0):S,A=iu(_);E!==A&&(E=A,Lv(T,A,y[v]))})}else if(C.PATTERN instanceof RegExp)if(C.PATTERN.unicode)x=!1,t.ensureOptimizations&&tw(`${rw} Unable to analyze < ${C.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 E=ppe(C.PATTERN,t.ensureOptimizations);E.length===0&&(x=!1),E.forEach(S=>{Lv(T,S,y[v])})}else t.ensureOptimizations&&tw(`${rw} TokenType: <${C.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`),x=!1;return T},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:i,canBeOptimized:x}}function ype(e){var t,r;if(!(e instanceof RegExp)||e.flags!=="")return;let n;try{n=Jg(e)}catch{return}if(n.value.value.length!==1||n.value.value[0].value.length!==1)return;let i=n.value.value[0].value[0],s;for(;i.type==="Group";){if(i.capturing||i.quantifier!==void 0&&s!==void 0||i.value.value.length!==1||i.value.value[0].value.length!==1)return;s=(t=i.quantifier)!==null&&t!==void 0?t:s,i=i.value.value[0].value[0]}if(i.type!=="Set"||i.complement||i.quantifier!==void 0&&s!==void 0||(s=(r=i.quantifier)!==null&&r!==void 0?r:s,s?.atLeast!==1||s.atMost!==1/0||!s.greedy))return;let o=new Uint8Array(128);for(let l of i.value){let u=typeof l=="number"?l:l.from,h=typeof l=="number"?l:l.to;if(u<0||h>=o.length)return;o.fill(1,u,h+1)}return o}function xpe(e,t){let r=[],n=Tpe(e);r=r.concat(n.errors);let i=Cpe(n.valid),s=i.valid;return r=r.concat(i.errors),r=r.concat(bpe(s)),r=r.concat(_pe(s)),r=r.concat(Ape(s,t)),r=r.concat(Rpe(s)),r}function bpe(e){let t=[],r=e.filter(n=>n[Yf]instanceof RegExp);return t=t.concat(kpe(r)),t=t.concat(Epe(r)),t=t.concat(vpe(r)),t=t.concat(wpe(r)),t=t.concat(Spe(r)),t}function Tpe(e){let t=e.filter(i=>!Object.hasOwn(i,Yf)),r=t.map(i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:mi.MISSING_PATTERN,tokenTypes:[i]})),n=e.filter(i=>!t.includes(i));return{errors:r,valid:n}}function Cpe(e){let t=e.filter(i=>{let s=i[Yf];return!(s instanceof RegExp)&&typeof s!="function"&&!Object.hasOwn(s,"exec")&&typeof s!="string"}),r=t.map(i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:mi.INVALID_PATTERN,tokenTypes:[i]})),n=e.filter(i=>!t.includes(i));return{errors:r,valid:n}}function kpe(e){class t extends bw{static{a(this,"EndAnchorFinder")}static{k(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}return e.filter(i=>{let s=i.PATTERN;try{let o=Jg(s),l=new t;return l.visit(o),l.found}catch{return Xqe.test(s.source)}}).map(i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:mi.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Spe(e){return e.filter(n=>n.PATTERN.test("")).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:mi.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function Epe(e){class t extends bw{static{a(this,"StartAnchorFinder")}static{k(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}return e.filter(i=>{let s=i.PATTERN;try{let o=Jg(s),l=new t;return l.visit(o),l.found}catch{return Qqe.test(s.source)}}).map(i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:mi.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function vpe(e){return e.filter(n=>{let i=n[Yf];return i instanceof RegExp&&(i.multiline||i.global)}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:mi.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function wpe(e){let t=[],r=e.map(s=>e.reduce((o,l)=>(s.PATTERN.source===l.PATTERN.source&&!t.includes(l)&&l.PATTERN!==Ca.NA&&(t.push(l),o.push(l)),o),[]));return r=r.filter(Boolean),r.filter(s=>s.length>1).map(s=>{let o=s.map(u=>u.name);return{message:`The same RegExp pattern ->${s[0].PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:mi.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function _pe(e){return e.filter(n=>{if(!Object.hasOwn(n,"GROUP"))return!1;let i=n.GROUP;return i!==Ca.SKIPPED&&i!==Ca.NA&&typeof i!="string"}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:mi.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function Ape(e,t){return e.filter(i=>i.PUSH_MODE!==void 0&&!t.includes(i.PUSH_MODE)).map(i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:mi.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function Rpe(e){let t=[],r=e.reduce((n,i,s)=>{let o=i.PATTERN;return o===Ca.NA||(typeof o=="string"?n.push({str:o,idx:s,tokenType:i}):o instanceof RegExp&&Ipe(o)&&n.push({str:o.source,idx:s,tokenType:i})),n},[]);return e.forEach((n,i)=>{r.forEach(({str:s,idx:o,tokenType:l})=>{if(i${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:mi.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}function Lpe(e,t){if(t instanceof RegExp){if(Dpe(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(typeof t=="function")return t(e,0,[],{});if(Object.hasOwn(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function Ipe(e){return[".","\\","[","]","|","^","$","(",")","?","*","+","{"].find(r=>e.source.indexOf(r)!==-1)===void 0}function Dpe(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:mi.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,KE)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+KE+`> property in its definition +`,type:mi.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,KE)&&Object.hasOwn(e,xb)&&!Object.hasOwn(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${xb}: <${e.defaultMode}>which does not exist +`,type:mi.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,KE)&&Object.keys(e.modes).forEach(i=>{let s=e.modes[i];s.forEach((o,l)=>{o===void 0?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${l}> +`,type:mi.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(o,"LONGER_ALT")&&(Array.isArray(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT]).forEach(h=>{h!==void 0&&!s.includes(h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${i}> +`,type:mi.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),n}function Mpe(e,t,r){let n=[],i=!1,o=Object.values(e.modes||{}).flat().filter(Boolean).filter(u=>u[Yf]!==Ca.NA),l=x$(r);return t&&o.forEach(u=>{let h=y$(u,l);if(h!==!1){let f={message:Ppe(u,h),type:h.issue,tokenType:u};n.push(f)}else Object.hasOwn(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):Sw(l,u.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:mi.NO_LINE_BREAKS_FLAGS}),n}function g$(e){let t=e.PATTERN;if(t instanceof RegExp)return!1;if(typeof t=="function")return!0;if(Object.hasOwn(t,"exec"))return!0;if(typeof t=="string")return!1;throw Error("non exhaustive match")}function Ope(e){return typeof e=="string"&&e.length===1?e.charCodeAt(0):!1}function y$(e,t){if(Object.hasOwn(e,"LINE_BREAKS"))return!1;if(e.PATTERN instanceof RegExp){try{Sw(t,e.PATTERN)}catch(r){return{issue:mi.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(typeof e.PATTERN=="string")return!1;if(g$(e))return{issue:mi.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function Ppe(e,t){if(t.issue===mi.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${e.name}> Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===mi.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${e.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function x$(e){return e.map(r=>typeof r=="string"?r.charCodeAt(0):r)}function Lv(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function iu(e){return e255?255+~~(e/255):e}}function ey(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function Mb(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function ty(e){let t=Fpe(e);Gpe(t),zpe(t),Vpe(t),t.forEach(r=>{r.isParent=r.categoryMatches.length>0})}function Fpe(e){let t=[...e],r=e,n=!0;for(;n;){r=r.map(s=>s.CATEGORIES).flat().filter(Boolean);let i=r.filter(s=>!t.includes(s));t=t.concat(i),i.length===0?n=!1:r=i}return t}function Gpe(e){e.forEach(t=>{T$(t)||($pe[$he]=t,t.tokenTypeIdx=$he++),T6(t)&&!Array.isArray(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),T6(t)||(t.CATEGORIES=[]),Upe(t)||(t.categoryMatches=[]),Wpe(t)||(t.categoryMatchesMap={})})}function Vpe(e){e.forEach(t=>{t.categoryMatches=[],Object.keys(t.categoryMatchesMap).forEach(r=>{t.categoryMatches.push($pe[r].tokenTypeIdx)})})}function zpe(e){e.forEach(t=>{b$([],t)})}function b$(e,t){e.forEach(r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(r=>{let n=e.concat(t);n.includes(r)||b$(n,r)})}function T$(e){return Object.hasOwn(e??{},"tokenTypeIdx")}function T6(e){return Object.hasOwn(e??{},"CATEGORIES")}function Upe(e){return Object.hasOwn(e??{},"categoryMatches")}function Wpe(e){return Object.hasOwn(e??{},"categoryMatchesMap")}function jpe(e){return Object.hasOwn(e??{},"tokenTypeIdx")}function Hf(e){return C$(e)?e.LABEL:e.name}function C$(e){return typeof e.LABEL=="string"&&e.LABEL!==""}function k$(e){return qpe(e)}function qpe(e){let t=e.pattern,r={};if(r.name=e.name,t!==void 0&&(r.PATTERN=t),Object.hasOwn(e,Jqe))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Object.hasOwn(e,Fhe)&&(r.CATEGORIES=e[Fhe]),ty([r]),Object.hasOwn(e,Ghe)&&(r.LABEL=e[Ghe]),Object.hasOwn(e,Vhe)&&(r.GROUP=e[Vhe]),Object.hasOwn(e,Uhe)&&(r.POP_MODE=e[Uhe]),Object.hasOwn(e,zhe)&&(r.PUSH_MODE=e[zhe]),Object.hasOwn(e,Whe)&&(r.LONGER_ALT=e[Whe]),Object.hasOwn(e,jhe)&&(r.LINE_BREAKS=e[jhe]),Object.hasOwn(e,qhe)&&(r.START_CHARS_HINT=e[qhe]),r}function Ew(e,t,r,n,i,s,o,l){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:s,startColumn:o,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function vw(e,t){return ey(e,t)}function Hpe(e,t){let r=new tHe(e,t);return r.resolveRefs(),r.errors}function sw(e,t,r=[]){r=[...r];let n=[],i=0;function s(l){return l.concat(e.slice(i+1))}a(s,"remainingPathWith"),k(s,"remainingPathWith");function o(l){let u=sw(s(l),t,r);return n.concat(u)}for(a(o,"getAlternativesForProd"),k(o,"getAlternativesForProd");r.length{u.definition.length!==0&&(n=o(u.definition))}),n;if(l instanceof Gn)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:e.slice(i)}),n}function Ype(e,t,r,n){let i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE",l=!1,u=t.length,h=u-n-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});f.length!==0;){let p=f.pop();if(p===o){l&&f.at(-1).idx<=h&&f.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,x=p.occurrenceStack;if(m.length===0)continue;let b=m[0];if(b===i){let T={idx:g,def:m.slice(1),ruleStack:y.slice(0,-1),occurrenceStack:x.slice(0,-1)};f.push(T)}else if(b instanceof Gn)if(g=0;T--){let C=b.definition[T],v={idx:g,def:C.definition.concat(m.slice(1)),ruleStack:y,occurrenceStack:x};f.push(v),f.push(o)}else if(b instanceof ka)f.push({idx:g,def:b.definition.concat(m.slice(1)),ruleStack:y,occurrenceStack:x});else if(b instanceof Xg)f.push(Kpe(b,g,y,x));else throw Error("non exhaustive match")}return d}function Kpe(e,t,r,n){let i=[...r];i.push(e.name);let s=[...n];return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}function _w(e){if(e instanceof Cs||e==="Option")return ti.OPTION;if(e instanceof pi||e==="Repetition")return ti.REPETITION;if(e instanceof Ya||e==="RepetitionMandatory")return ti.REPETITION_MANDATORY;if(e instanceof Ka||e==="RepetitionMandatoryWithSeparator")return ti.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Sa||e==="RepetitionWithSeparator")return ti.REPETITION_WITH_SEPARATOR;if(e instanceof Ea||e==="Alternation")return ti.ALTERNATION;throw Error("non exhaustive match")}function k6(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:i}=e,s=_w(n);return s===ti.ALTERNATION?Qb(t,r,i):Zb(t,r,s,i)}function Xpe(e,t,r,n,i,s){let o=Qb(e,t,r),l=E$(o)?Mb:ey;return s(o,n,l,i)}function Qpe(e,t,r,n,i,s){let o=Zb(e,t,i,r),l=E$(o)?Mb:ey;return s(o[0],l,n)}function Zpe(e,t,r,n){let i=e.length,s=e.every(o=>o.every(l=>l.length===1));if(t)return function(o){let l=o.map(u=>u.GATE);for(let u=0;uu.flat()).reduce((u,h,d)=>(h.forEach(f=>{f.tokenTypeIdx in u||(u[f.tokenTypeIdx]=d),f.categoryMatches.forEach(p=>{Object.hasOwn(u,p)||(u[p]=d)})}),u),{});return function(){let u=this.LA_FAST(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;os.length===1),i=e.length;if(n&&!r){let s=e.flat();if(s.length===1&&s[0].categoryMatches.length===0){let l=s[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===l}}else{let o=s.reduce((l,u,h)=>(l[u.tokenTypeIdx]=!0,u.categoryMatches.forEach(d=>{l[d]=!0}),l),[]);return function(){let l=this.LA_FAST(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;ssw([o],1)),n=S6(r.length),i=r.map(o=>{let l={};return o.forEach(u=>{Dv(u.partialPath).forEach(d=>{l[d]=!0})}),l}),s=r;for(let o=1;o<=t;o++){let l=s;s=S6(l.length);for(let u=0;u{Dv(x.partialPath).forEach(T=>{i[u][T]=!0})})}}}}return n}function Qb(e,t,r,n){let i=new eme(e,ti.ALTERNATION,n);return t.accept(i),S$(i.result,r)}function Zb(e,t,r,n){let i=new eme(e,r);t.accept(i);let s=i.result,l=new aHe(t,e,r).startWalking(),u=new ka({definition:s}),h=new ka({definition:l});return S$([u,h],n)}function aw(e,t){e:for(let r=0;r{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function E$(e){return e.every(t=>t.every(r=>r.every(n=>n.categoryMatches.length===0)))}function nme(e){return e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(r=>Object.assign({type:Ks.CUSTOM_LOOKAHEAD_VALIDATION},r))}function ime(e,t,r,n){let i=e.flatMap(u=>sme(u,r)),s=mme(e,t,r),o=e.flatMap(u=>hme(u,r)),l=e.flatMap(u=>ome(u,e,n,r));return i.concat(s,o,l)}function sme(e,t){let r=new oHe;e.accept(r);let n=r.allProductions,i=Object.groupBy(n,ame),s=Object.fromEntries(Object.entries(i).filter(([l,u])=>u.length>1));return Object.values(s).map(l=>{let u=l[0],h=t.buildDuplicateFoundError(e,l),d=cl(u),f={message:h,type:Ks.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:u.idx},p=v$(u);return p&&(f.parameter=p),f})}function ame(e){return`${cl(e)}_#_${e.idx}_#_${v$(e)}`}function v$(e){return e instanceof Gn?e.terminalType.name:e instanceof Ys?e.nonTerminalName:""}function ome(e,t,r,n){let i=[];if(t.reduce((o,l)=>l.name===e.name?o+1:o,0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:o,type:Ks.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function lme(e,t,r){let n=[],i;return t.includes(e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ks.INVALID_RULE_OVERRIDE,ruleName:e})),n}function w$(e,t,r,n=[]){let i=[],s=Sb(t.definition);if(s.length===0)return[];{let o=e.name;s.includes(e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ks.LEFT_RECURSION,ruleName:o});let u=n.concat([e]),d=s.filter(f=>!u.includes(f)).flatMap(f=>{let p=[...n];return p.push(f),w$(e,f,r,p)});return i.concat(d)}}function Sb(e){let t=[];if(e.length===0)return t;let r=e[0];if(r instanceof Ys)t.push(r.referencedRule);else if(r instanceof ka||r instanceof Cs||r instanceof Ya||r instanceof Ka||r instanceof Sa||r instanceof pi)t=t.concat(Sb(r.definition));else if(r instanceof Ea)t=r.definition.map(s=>Sb(s.definition)).flat();else if(!(r instanceof Gn))throw Error("non exhaustive match");let n=Nb(r),i=e.length>1;if(n&&i){let s=e.slice(1);return t.concat(Sb(s))}else return t}function cme(e,t){let r=new _$;return e.accept(r),r.alternations.flatMap(s=>s.definition.slice(0,-1).flatMap((l,u)=>Ype([l],[],ey,1).length===0?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:u}),type:Ks.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:u+1}]:[]))}function ume(e,t,r){let n=new _$;e.accept(n);let i=n.alternations;return i=i.filter(o=>o.ignoreAmbiguities!==!0),i.flatMap(o=>{let l=o.idx,u=o.maxLookahead||t,h=Qb(l,e,u,o),d=fme(h,o,e,r),f=pme(h,o,e,r);return d.concat(f)})}function hme(e,t){let r=new _$;return e.accept(r),r.alternations.flatMap(s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:Ks.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}function dme(e,t,r){let n=[];return e.forEach(i=>{let s=new lHe;i.accept(s),s.allProductions.forEach(l=>{let u=_w(l),h=l.maxLookahead||t,d=l.idx;if(Zb(d,i,u,h)[0].flat().length===0){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:Ks.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function fme(e,t,r,n){let i=[];return e.reduce((l,u,h)=>(t.definition[h].ignoreAmbiguities===!0||u.forEach(d=>{let f=[h];e.forEach((p,m)=>{h!==m&&aw(p,d)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!aw(i,d)&&(i.push(d),l.push({alts:f,path:d}))}),l),[]).map(l=>{let u=l.alts.map(d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:Ks.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}function pme(e,t,r,n){let i=e.reduce((o,l,u)=>{let h=l.map(d=>({idx:u,path:d}));return o.concat(h)},[]);return i.flatMap(o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path;return i.filter(p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{let m=[p.idx+1,u+1],g=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:Ks.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})})}function mme(e,t,r){let n=[],i=t.map(s=>s.name);return e.forEach(s=>{let o=s.name;if(i.includes(o)){let l=r.buildNamespaceConflictError(s);n.push({message:l,type:Ks.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}function gme(e){let t=Object.assign({errMsgProvider:eHe},e),r={};return e.rules.forEach(n=>{r[n.name]=n}),Hpe(r,t.errMsgProvider)}function yme(e){var t;let r=(t=e.errMsgProvider)!==null&&t!==void 0?t:qf;return ime(e.rules,e.tokenTypes,r,e.grammarName)}function Ob(e){return kme.includes(e.name)}function vme(e,t,r,n,i,s,o){var l,u,h;let d=n|i,f=(l=(u=this.firstAfterRepMap)[h=this.currRuleShortName])!==null&&l!==void 0?l:u[h]=[],p=f[d];if(p===void 0){let x=this.getCurrRuleFullName(),b=this.getGAstProductions()[x];p=new s(b,i).startWalking(),f[d]=p}let m=p.token,g=p.occurrence,y=p.isEndOfRule;this.RULE_STACK_IDX===0&&y&&m===void 0&&(m=su,g=1),!(m===void 0||g===void 0)&&this.shouldInRepetitionRecoveryBeTried(m,g,o)&&this.tryInRepetitionRecovery(e,t,r,m)}function Ame(e){XE.reset(),e.accept(XE);let t=XE.dslMethods;return XE.reset(),t}function _6(e,t){e.startOffset===-1?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffseto.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${s.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Nme(e,t,r){let n=k(function(){},"derivedConstructor");R$(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return t.forEach(s=>{i[s]=Ime}),n.prototype=i,n.prototype.constructor=n,n}function Mme(e,t){return Ome(e,t)}function Ome(e,t){return t.filter(i=>typeof e[i]!="function").map(i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:R6.MISSING_METHOD,methodName:i})).filter(Boolean)}function Ig(e,t,r,n=!1){Pb(r);let i=this.recordingProdStack.at(-1),s=typeof t=="function"?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),Object.hasOwn(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),i.definition.push(o),this.recordingProdStack.pop(),Rw}function $me(e,t){Pb(t);let r=this.recordingProdStack.at(-1),n=Array.isArray(e)===!1,i=n===!1?e:e.DEF,s=new Ea({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});Object.hasOwn(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);let o=i.some(l=>typeof l.GATE=="function");return s.hasPredicates=o,r.definition.push(s),i.forEach(l=>{let u=new ka({definition:[]});s.definition.push(u),Object.hasOwn(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Object.hasOwn(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),Rw}function L6(e){return e===0?"":`${e}`}function Pb(e){if(e<0||e>Xhe){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${Xhe+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function Fme(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,i);s&&(s.get||s.set)?Object.defineProperty(e.prototype,i,s):e.prototype[i]=r.prototype[i]})})}function I6(e=void 0){return function(){return e}}function Vme(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r-1}function Xme(e,t){var r=this.__data__,n=Lw(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Zf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tl))return!1;var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&$Ye?new Rge:void 0;for(s.set(e,t),s.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=bKe}function Jge(e){return jg(e)&&N$(e.length)&&!!Fn[ny(e)]}function eye(e){return function(t){return e(t)}}function rye(e,t){var r=Xs(e),n=!r&&Mw(e),i=!r&&!n&&lw(e),s=!r&&!n&&!i&&M$(e),o=r||n||i||s,l=o?lKe(e.length,String):[],u=l.length;for(var h in e)(t||XKe.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||s&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Qge(h,u)))&&l.push(h);return l}function nye(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ZKe;return e===r}function sye(e,t){return function(r){return e(t(r))}}function aye(e){if(!iye(e))return tXe(e);var t=[];for(var r in Object(e))nXe.call(e,r)&&r!="constructor"&&t.push(r);return t}function lye(e){return e!=null&&N$(e.length)&&!lge(e)}function cye(e){return Ow(e)?QKe(e):oye(e)}function uye(e){return rKe(e,O$,oKe)}function hye(e,t,r,n,i,s){var o=r&iXe,l=lde(e),u=l.length,h=lde(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:aXe.call(t,p)))return!1}var m=s.get(e),g=s.get(t);if(m&&g)return m==t&&g==e;var y=!0;s.set(e,t),s.set(t,e);for(var x=o;++fV$(e,t,o));return ip(e,t,n,r,...i)}function i1e(e,t,r){let n=qi(e,t,r,{type:qh});lu(e,n);let i=ip(e,t,n,r,Yh(e,t,r));return s1e(e,t,r,i)}function Yh(e,t,r){let n=sQe(ru(r.definition,i=>V$(e,t,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:o1e(e,n)}function z$(e,t,r,n,i){let s=n.left,o=n.right,l=qi(e,t,r,{type:uQe});lu(e,l);let u=qi(e,t,r,{type:Kye});return s.loopback=l,u.loopback=l,e.decisionMap[Kf(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,Ti(o,l),i===void 0?(Ti(l,s),Ti(l,u)):(Ti(l,u),Ti(l,i.left),Ti(i.right,s)),{left:s,right:u}}function U$(e,t,r,n,i){let s=n.left,o=n.right,l=qi(e,t,r,{type:cQe});lu(e,l);let u=qi(e,t,r,{type:Kye}),h=qi(e,t,r,{type:lQe});return l.loopback=h,u.loopback=h,Ti(l,s),Ti(l,u),Ti(o,h),i!==void 0?(Ti(h,u),Ti(h,i.left),Ti(i.right,s)):Ti(h,l),e.decisionMap[Kf(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}function s1e(e,t,r,n){let i=n.left,s=n.right;return Ti(i,s),e.decisionMap[Kf(t,"Option",r.idx)]=i,n}function lu(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function ip(e,t,r,n,...i){let s=qi(e,t,n,{type:oQe,start:r});r.end=s;for(let l of i)l!==void 0?(Ti(r,l.left),Ti(l.right,s)):Ti(r,s);let o={left:r,right:s};return e.decisionMap[Kf(t,a1e(n),n.idx)]=r,o}function a1e(e){if(e instanceof Ea)return"Alternation";if(e instanceof Cs)return"Option";if(e instanceof pi)return"Repetition";if(e instanceof Sa)return"RepetitionWithSeparator";if(e instanceof Ya)return"RepetitionMandatory";if(e instanceof Ka)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function o1e(e,t){let r=t.length;for(let s=0;sr.stateNumber.toString()).join("_")}`}function h1e(e,t,r){for(var n=-1,i=e.length;++n0&&r(l)?t>1?j$(l,t-1,r,n,i):Fge(i,l):n||(i[i.length]=l)}return i}function g1e(e,t){return m1e(ru(e,t),1)}function y1e(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s-1}function k1e(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=wQe){var h=t?null:vQe(e);if(h)return D$(h);o=!1,i=Dge,u=new Rge}else u=t?[]:l;e:for(;++n{let i=n.toString(),s=r[i];return s!==void 0||(s={atnStartState:e,decision:t,states:{}},r[i]=s),s}}function B6(e,t=!0){let r=new Set;for(let n of e){let i=new Set;for(let s of n){if(s===void 0){if(t)break;return!1}let o=[s.tokenTypeIdx].concat(s.categoryMatches);for(let l of o)if(r.has(l)){if(!i.has(l))return!1}else r.add(l),i.add(l)}}return!0}function P1e(e){let t=new Map;for(let r of e.states)for(let n of r.transitions)if(n instanceof zw){let i=t.get(n.rule);i===void 0&&(i=[],t.set(n.rule,i)),i.push(n.followState)}return t}function $6(e,t){let r=new Set,n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(!n.has(s)){if(n.add(s),s.type===np){if(t!==void 0){let o=t.get(s.rule);o!==void 0&&i.push(...o)}continue}for(let o of s.transitions)if(o instanceof Vw){r.add(o.tokenType.tokenTypeIdx);for(let l of o.tokenType.categoryMatches)r.add(l)}else i.push(o.target)}}return r}function B1e(e,t,r){let n=t==="RepetitionMandatoryWithSeparator",i=e.transitions[n?1:0],s=e.transitions[n?0:1];if(i===void 0||s===void 0)return!1;let o=$6(i.target),l=$6(s.target,r);for(let u of o)if(l.has(u))return!0;return!1}function $1e(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;nHf(i)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${U1e(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n}function U1e(e){if(e instanceof Ys)return"SUBRULE";if(e instanceof Cs)return"OPTION";if(e instanceof Ea)return"OR";if(e instanceof Ya)return"AT_LEAST_ONE";if(e instanceof Ka)return"AT_LEAST_ONE_SEP";if(e instanceof Sa)return"MANY_SEP";if(e instanceof pi)return"MANY";if(e instanceof Gn)return"CONSUME";throw Error("non exhaustive match")}function W1e(e,t,r){let n=mQe(t.configs.elements,s=>s.state.transitions),i=AQe(n.filter(s=>s instanceof Vw).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:e}}function j1e(e,t){return e.edges[t.tokenTypeIdx]}function q1e(e,t,r){let n=new P6,i=[];for(let o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===np){i.push(o);continue}let l=o.state.transitions.length;for(let u=0;u0&&!Q1e(s))for(let o of i)s.add(o);return s}function H1e(e,t){if(e instanceof Vw&&vw(t,e.tokenType))return e.target}function Y1e(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function q$(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function F6(e,t,r,n){return n=H$(e,n),t.edges[r.tokenTypeIdx]=n,n}function H$(e,t){if(t===cw)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}function K1e(e){let t=new P6,r=e.transitions.length;for(let n=0;n0){let i=[...e.stack],o={state:i.pop(),alt:e.alt,stack:i};Gb(o,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function r0e(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function n0e(e,t){let r;for(let n of e.configs.elements)if(!(t.is(n.alt)===!1||n.state.type===np)){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function Df(e){return e|0}function Pv(e){return e.$type===G6}function K$(e,t,r){return d0e({parser:t,tokens:r,ruleNames:new Map},e),t}function d0e(e,t){let r=i$(t,!1),n=qn(t.rules).filter(sc).filter(s=>r.has(s));for(let s of n){let o={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(s,Hh(o,s.definition))}let i=qn(t.rules).filter(Ib).filter(s=>r.has(s));for(let s of i)e.parser.rule(s,f0e(e,s))}function f0e(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(ac(r))throw new Error("Cannot use terminal rule in infix expression");let n=t.operators.precedences.flatMap(m=>m.operators),i={$type:"Group",elements:[]},s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,o);let u={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},h={...s,$container:o};o.elements.push(u,h);let f=n.map(m=>e.tokens[m.value]).map((m,g)=>({ALT:k(()=>e.parser.consume(g,m,u),"ALT")})),p;return m=>{p??(p=jw(e,r)),e.parser.subrule(0,p,!1,s,m),e.parser.many(0,{DEF:k(()=>{e.parser.alternatives(0,f),e.parser.subrule(1,p,!1,h,m)},"DEF")})}}function Hh(e,t,r=!1){let n;if(Wh(t))n=T0e(e,t);else if(Yb(t))n=p0e(e,t);else if(Uh(t))n=Hh(e,t.terminal);else if(Kb(t))n=X$(e,t);else if(jh(t))n=m0e(e,t);else if(JB(t))n=y0e(e,t);else if(r$(t))n=x0e(e,t);else if(xw(t))n=b0e(e,t);else if(pfe(t)){let i=e.consume++;n=k(()=>e.parser.consume(i,su,t),"method")}else throw new Mfe(t.$cstNode,`Unexpected element type: ${t.$type}`);return Q$(e,r?void 0:Vb(t),n,t.cardinality)}function p0e(e,t){let r=Ug(t);return()=>e.parser.action(r,t)}function m0e(e,t){let r=t.rule.ref;if(Yg(r)){let n=e.subrule++,i=sc(r)&&r.fragment,s=t.arguments.length>0?g0e(r,t.arguments):()=>({}),o;return l=>{o??(o=jw(e,r)),e.parser.subrule(n,o,i,t,s(l))}}else if(ac(r)){let n=e.consume++,i=uw(e,r.name);return()=>e.parser.consume(n,i,t)}else if(r)Kg(r);else throw new Mfe(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function g0e(e,t){if(t.some(n=>n.calledByName)){let n=t.map(i=>({parameterName:i.parameter?.ref?.name,predicate:ul(i.value)}));return i=>{let s={};for(let{parameterName:o,predicate:l}of n)o&&(s[o]=l(i));return s}}else{let n=t.map(i=>ul(i.value));return i=>{let s={};for(let o=0;ot(n)||r(n)}else if(dfe(e)){let t=ul(e.left),r=ul(e.right);return n=>t(n)&&r(n)}else if(yfe(e)){let t=ul(e.value);return r=>!t(r)}else if(xfe(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(ufe(e)){let t=!!e.true;return()=>t}Kg(e)}function y0e(e,t){if(t.elements.length===1)return Hh(e,t.elements[0]);{let r=[];for(let i of t.elements){let s={ALT:Hh(e,i,!0)},o=Vb(i);o&&(s.GATE=ul(o)),r.push(s)}let n=e.or++;return i=>e.parser.alternatives(n,r.map(s=>{let o={ALT:k(()=>s.ALT(i),"ALT")},l=s.GATE;return l&&(o.GATE=()=>l(i)),o}))}}function x0e(e,t){if(t.elements.length===1)return Hh(e,t.elements[0]);let r=[];for(let l of t.elements){let u={ALT:Hh(e,l,!0)},h=Vb(l);h&&(u.GATE=ul(h)),r.push(u)}let n=e.or++,i=k((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`},"idFunc"),s=k(l=>e.parser.alternatives(n,r.map((u,h)=>{let d={ALT:k(()=>!0,"ALT")},f=e.parser;d.ALT=()=>{if(u.ALT(l),!f.isRecording()){let m=i(n,f);f.unorderedGroups.get(m)||f.unorderedGroups.set(m,[]);let g=f.unorderedGroups.get(m);typeof g?.[h]>"u"&&(g[h]=!0)}};let p=u.GATE;return p?d.GATE=()=>p(l):d.GATE=()=>!f.unorderedGroups.get(i(n,f))?.[h],d})),"alternatives"),o=Q$(e,Vb(t),s,"*");return l=>{o(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(n,e.parser))}}function b0e(e,t){let r=t.elements.map(n=>Hh(e,n));return n=>r.forEach(i=>i(n))}function Vb(e){if(xw(e))return e.guardCondition}function X$(e,t,r=t.terminal){if(r)if(jh(r)&&sc(r.rule.ref)){let n=r.rule.ref,i=e.subrule++,s;return o=>{s??(s=jw(e,n)),e.parser.subrule(i,s,!1,t,o)}}else if(jh(r)&&ac(r.rule.ref)){let n=e.consume++,i=uw(e,r.rule.ref.name);return()=>e.parser.consume(n,i,t)}else if(Wh(r)){let n=e.consume++,i=uw(e,r.value);return()=>e.parser.consume(n,i,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let i=o$(t.type.ref)?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Ug(t.type.ref));return X$(e,t,i)}}function T0e(e,t){let r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}function Q$(e,t,r,n){let i=t&&ul(t);if(!n)if(i){let s=e.or++;return o=>e.parser.alternatives(s,[{ALT:k(()=>r(o),"ALT"),GATE:k(()=>i(o),"GATE")},{ALT:I6(),GATE:k(()=>!i(o),"GATE")}])}else return r;if(n==="*"){let s=e.many++;return o=>e.parser.many(s,{DEF:k(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else if(n==="+"){let s=e.many++;if(i){let o=e.or++;return l=>e.parser.alternatives(o,[{ALT:k(()=>e.parser.atLeastOne(s,{DEF:k(()=>r(l),"DEF")}),"ALT"),GATE:k(()=>i(l),"GATE")},{ALT:I6(),GATE:k(()=>!i(l),"GATE")}])}else return o=>e.parser.atLeastOne(s,{DEF:k(()=>r(o),"DEF")})}else if(n==="?"){let s=e.optional++;return o=>e.parser.optional(s,{DEF:k(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else Kg(n)}function jw(e,t){let r=C0e(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function C0e(e,t){if(Yg(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,i=t.$type;for(;!sc(n);)(xw(n)||JB(n)||r$(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,e.ruleNames.set(t,i),i}}function uw(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function k0e(e){let t=e.Grammar,r=e.parser.Lexer,n=new zQe(e);return K$(t,n,r.definition),n.finalize(),n}function S0e(e){let t=E0e(e);return t.finalize(),t}function E0e(e){let t=e.Grammar,r=e.parser.Lexer,n=new GQe(e);return K$(t,n,r.definition)}function _0e(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function A0e(){return Bv=performance.now(),new ri.CancellationTokenSource}function Jb(e){return e===Bg}async function Ds(e){if(e===ri.CancellationToken.None)return;let t=performance.now();if(t-Bv>=jQe&&(Bv=t,await _0e(),Bv=performance.now()),e.isCancellationRequested)throw Bg}function hw(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);hw(n,t),hw(i,t);let s=0,o=0,l=0;for(;sr.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function R0e(e){let t=e8(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function I0e(e){return typeof e.name=="string"}function N0e(e){return typeof e.$comment=="string"}function W6(e){return typeof e=="object"&&!!e&&("$ref"in e||"$refs"in e||"$error"in e)}function $g(e){return{code:e}}function M0e(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=a$(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=Wfe(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function $v(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function O0e(e){switch(e){case"error":return $g(hl.LexingError);case"warning":return $g(hl.LexingWarning);case"info":return $g(hl.LexingInfo);case"hint":return $g(hl.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function P0e(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function t8(e){return e&&"modes"in e&&"defaultMode"in e}function q6(e){return!P0e(e)&&!t8(e)}function B0e(e,t,r){let n,i;typeof e=="string"?(i=t,n=r):(i=e.range.start,n=t),i||(i=Cn.create(0,0));let s=r8(e),o=qw(n),l=F0e({lines:s,position:i,options:o});return z0e({index:0,tokens:l,position:i})}function $0e(e,t){let r=qw(t),n=r8(e);if(n.length===0)return!1;let i=n[0],s=n[n.length-1],o=r.start,l=r.end;return!!o?.exec(i)&&!!l?.exec(s)}function r8(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(Uqe)}function F0e(e){let t=[],r=e.position.line,n=e.position.character;for(let i=0;i=l.length){if(t.length>0){let d=Cn.create(r,n);t.push({type:"break",content:"",range:jr.create(d,d)})}}else{wde.lastIndex=u;let d=wde.exec(l);if(d){let f=d[0],p=d[1],m=Cn.create(r,n+u),g=Cn.create(r,n+u+f.length);t.push({type:"tag",content:p,range:jr.create(m,g)}),u+=f.length,u=dw(l,u)}if(u0&&t[t.length-1].type==="break"?t.slice(0,-1):t}function G0e(e,t,r,n){let i=[];if(e.length===0){let s=Cn.create(r,n),o=Cn.create(r,n+t.length);i.push({type:"text",content:t,range:jr.create(s,o)})}else{let s=0;for(let l of e){let u=l.index,h=t.substring(s,u);h.length>0&&i.push({type:"text",content:t.substring(s,u),range:jr.create(Cn.create(r,s+n),Cn.create(r,u+n))});let d=h.length+1,f=l[1];if(i.push({type:"inline-tag",content:f,range:jr.create(Cn.create(r,s+d+n),Cn.create(r,s+d+f.length+n))}),d+=f.length,l.length===4){d+=l[2].length;let p=l[3];i.push({type:"text",content:p,range:jr.create(Cn.create(r,s+d+n),Cn.create(r,s+d+p.length+n))})}else i.push({type:"text",content:"",range:jr.create(Cn.create(r,s+d+n),Cn.create(r,s+d+n))});s=u+l[0].length}let o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:jr.create(Cn.create(r,s+n),Cn.create(r,s+n+o.length))})}return i}function dw(e,t){let r=e.substring(t).match(SZe);return r?t+r.index:e.length}function V0e(e){let t=e.match(EZe);if(t&&typeof t.index=="number")return t.index}function z0e(e){let t=Cn.create(e.position.line,e.position.character);if(e.tokens.length===0)return new _de([],jr.create(t,t));let r=[];for(;e.index0){let o=dw(t,n);i=t.substring(o),t=t.substring(0,n)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(i=`\`${i}\``),r.renderLink?.(t,i)??H0e(t,i)}}function H0e(e,t){try{return Ha.parse(e,!0),`[${t}](${e})`}catch{return e}}function Y6(e){return e.endsWith(` +`)?` +`:` + +`}function sn(e){return{documentation:{CommentProvider:k(t=>new wZe(t),"CommentProvider"),DocumentationProvider:k(t=>new vZe(t),"DocumentationProvider")},parser:{AsyncParser:k(t=>new _Ze(t),"AsyncParser"),GrammarConfig:k(t=>epe(t),"GrammarConfig"),LangiumParser:k(t=>S0e(t),"LangiumParser"),CompletionParser:k(t=>k0e(t),"CompletionParser"),ValueConverter:k(()=>new w0e,"ValueConverter"),TokenBuilder:k(()=>new v0e,"TokenBuilder"),Lexer:k(t=>new CZe(t),"Lexer"),ParserErrorMessageProvider:k(()=>new u0e,"ParserErrorMessageProvider"),LexerErrorMessageProvider:k(()=>new bZe,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:k(()=>new fZe,"AstNodeLocator"),AstNodeDescriptionProvider:k(t=>new hZe(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:k(t=>new dZe(t),"ReferenceDescriptionProvider")},references:{Linker:k(t=>new QQe(t),"Linker"),NameProvider:k(()=>new ZQe,"NameProvider"),ScopeProvider:k(t=>new sZe(t),"ScopeProvider"),ScopeComputation:k(t=>new eZe(t),"ScopeComputation"),References:k(t=>new JQe(t),"References")},serializer:{Hydrator:k(t=>new RZe(t),"Hydrator"),JsonSerializer:k(t=>new aZe(t),"JsonSerializer")},validation:{DocumentValidator:k(t=>new uZe(t),"DocumentValidator"),ValidationRegistry:k(t=>new lZe(t),"ValidationRegistry")},shared:k(()=>e.shared,"shared")}}function an(e){return{ServiceRegistry:k(t=>new oZe(t),"ServiceRegistry"),workspace:{LangiumDocuments:k(t=>new YQe(t),"LangiumDocuments"),LangiumDocumentFactory:k(t=>new HQe(t),"LangiumDocumentFactory"),DocumentBuilder:k(t=>new gZe(t),"DocumentBuilder"),IndexManager:k(t=>new yZe(t),"IndexManager"),WorkspaceManager:k(t=>new xZe(t),"WorkspaceManager"),FileSystemProvider:k(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:k(()=>new AZe,"WorkspaceLock"),ConfigurationProvider:k(t=>new mZe(t),"ConfigurationProvider")},profilers:{}}}function _r(e,t,r,n,i,s,o,l,u){let h=[e,t,r,n,i,s,o,l,u].reduce(qg,{});return a8(h)}function a8(e,t){let r=new Proxy({},{deleteProperty:k(()=>!1,"deleteProperty"),set:k(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:k((n,i)=>i===LZe?!0:K6(n,i,e,t||r),"get"),getOwnPropertyDescriptor:k((n,i)=>(K6(n,i,e,t||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:k((n,i)=>i in e,"has"),ownKeys:k(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function K6(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]===Rde)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let i=r[t];e[t]=Rde;try{e[t]=typeof i=="function"?i(n):a8(i,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}function qg(e,t){if(t){for(let[r,n]of Object.entries(t))if(!(r==="__proto__"||r==="constructor"||r==="prototype")&&n!=null)if(typeof n=="object"){let i=e[r];typeof i=="object"&&i!==null?e[r]=qg(i,n):e[r]=qg({},n)}else e[r]=n}return e}function K0e(){let e=_r(an(un),NZe),t=_r(sn({shared:e}),DZe);return e.ServiceRegistry.register(t),t}function Ns(e){let t=K0e(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Ha.parse(`memory:/${r.name??"grammar"}.langium`)),r}function X0e(e){return Ci.isInstance(e,ll.$type)}function Q0e(e){return Ci.isInstance(e,wb.$type)}function Z0e(e){return Ci.isInstance(e,Bf.$type)}function J0e(e){return Ci.isInstance(e,Fh.$type)}function exe(e){return Ci.isInstance(e,_b.$type)}function txe(e){return Ci.isInstance(e,pw.$type)}function rxe(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}function Hw(e){return Ci.isInstance(e,Jc.$type)}function nxe(e){return Ci.isInstance(e,Gh.$type)}function ixe(e){return Ci.isInstance(e,Fg.$type)}function sxe(e){return Ci.isInstance(e,$f.$type)}function axe(e){return Ci.isInstance(e,Ff.$type)}function oxe(e){return Ci.isInstance(e,Gf.$type)}function lxe(e){return Ci.isInstance(e,Vh.$type)}function cxe(e){return Ci.isInstance(e,Ab.$type)}function uxe(e){return Ci.isInstance(e,Vf.$type)}function hxe(e){return Ci.isInstance(e,zf.$type)}function dxe(e){return Ci.isInstance(e,Uf.$type)}function fxe(e){return Ci.isInstance(e,Wf.$type)}function pxe(e){return Ci.isInstance(e,Gg.$type)}function mxe(e){return Ci.isInstance(e,jf.$type)}function gxe(e){return Ci.isInstance(e,ds.$type)}var iqe,Ub,sqe,WB,aqe,oqe,k,lqe,Pr,cqe,Kde,jB,qB,Wb,Xde,Zde,uqe,Xf,jb,HB,hqe,efe,dqe,fqe,pqe,mqe,qb,mw,rP,hv,nP,sb,Cn,jr,ab,iP,dv,sP,aP,oP,lP,fv,cP,uP,hP,ob,vf,Ql,Nh,hs,Xc,lb,bg,Tg,Cg,pv,Yx,dP,M5,rfe,fP,pP,cb,mP,gP,mv,Mh,yP,xP,bP,TP,CP,kP,SP,EP,vP,ub,wP,_P,AP,RP,LP,IP,DP,NP,MP,OP,PP,hb,BP,gv,$P,FP,GP,VP,zP,UP,WP,jP,qP,HP,YP,KP,yv,xv,XP,bv,QP,ZP,JP,e6,t6,r6,nfe,n6,Rhe,We,gw,Hn,YB,gqe,yqe,xqe,bqe,Tqe,Cqe,kqe,Sqe,Eqe,vqe,wqe,_qe,Aqe,Rqe,Lqe,Iqe,Dqe,Nqe,Mqe,Oqe,Pqe,Bqe,$qe,Fqe,KB,sfe,zh,ofe,qa,Yv,i6,ja,Tv,jE,ol,wf,Cv,Lhe,Ihe,_f,a6,Af,mg,kv,Rf,Sv,o6,Cf,Dhe,kg,l6,Zc,O5,Nhe,db,fb,qE,Sg,c6,Mhe,HE,u6,Zl,P5,Eg,h6,vg,pb,Ohe,wg,ko,_g,Oh,Ag,Ev,Kx,Xx,Phe,vv,Rg,Qx,mb,_fe,nn,tu,Gqe,Mfe,Jv,ew,Bhe,Vqe,YE,zqe,Ofe,bw,Uqe,Wqe,jqe,B5,qqe,d$,oc,Ys,Xg,ka,Cs,Ya,Ka,pi,Sa,Ea,Gn,Qg,kw,cpe,Hqe,Av,Yqe,fpe,rw,Kqe,Yf,xb,KE,g6,Rv,y6,x6,Xqe,Qqe,Zqe,bb,Iv,$he,$pe,C6,mi,Tb,Ca,Jqe,Fhe,Ghe,Vhe,zhe,Uhe,Whe,jhe,qhe,su,Pg,eHe,qf,tHe,rHe,nHe,ww,iHe,Hhe,sHe,Yhe,ti,aHe,eme,oHe,_$,lHe,xme,bme,Tme,Cme,kme,Aw,Sme,cHe,uHe,hHe,$5,Eme,dHe,fHe,ry,wme,_me,E6,v6,w6,Nv,A$,pHe,mHe,XE,gHe,R6,yHe,xHe,bHe,THe,CHe,Rw,Khe,Xhe,Pme,Bme,kHe,SHe,EHe,Wg,au,ow,Ks,L$,vHe,zme,wHe,jme,Lw,_He,AHe,RHe,LHe,IHe,DHe,Iw,NHe,MHe,OHe,PHe,BHe,tge,$He,FHe,ou,GHe,ic,rge,VHe,zHe,Zx,UHe,WHe,jHe,qHe,HHe,YHe,Qhe,ny,I$,KHe,XHe,QHe,ZHe,lge,JHe,F5,Zhe,eYe,tYe,rYe,Jf,nYe,iYe,sYe,aYe,oYe,lYe,cYe,uYe,hYe,iy,dYe,Bb,fYe,$b,pYe,mYe,gYe,yYe,xYe,bYe,TYe,CYe,kYe,SYe,EYe,Jhe,vYe,wYe,Dw,_Ye,AYe,RYe,LYe,Nw,IYe,DYe,Mv,NYe,MYe,OYe,Rge,PYe,Dge,BYe,$Ye,Mge,FYe,ede,GYe,D$,VYe,zYe,UYe,WYe,jYe,qYe,HYe,YYe,KYe,XYe,QYe,ZYe,JYe,tde,G5,eKe,Fge,tKe,Xs,rKe,zge,nKe,iKe,sKe,rde,aKe,oKe,lKe,jg,cKe,nde,Hge,uKe,hKe,dKe,Mw,fKe,Kge,ide,pKe,sde,mKe,gKe,lw,yKe,xKe,Qge,bKe,N$,TKe,CKe,kKe,SKe,EKe,vKe,wKe,_Ke,AKe,RKe,LKe,IKe,DKe,NKe,MKe,OKe,PKe,BKe,$Ke,FKe,GKe,VKe,zKe,UKe,Fn,WKe,jKe,tye,Eb,qKe,V5,HKe,ade,ode,YKe,M$,KKe,XKe,QKe,ZKe,iye,JKe,eXe,tXe,rXe,nXe,oye,Ow,O$,lde,iXe,sXe,aXe,oXe,lXe,D6,cXe,N6,uXe,Vg,hXe,M6,cde,dXe,ude,hde,dde,fde,fXe,pXe,mXe,gXe,yXe,If,O6,xXe,pde,mde,QE,bXe,gde,TXe,fye,CXe,kXe,SXe,gye,EXe,bye,vXe,wXe,Pw,_Xe,AXe,B$,RXe,LXe,IXe,DXe,NXe,MXe,OXe,PXe,BXe,yde,xde,$Xe,FXe,wye,GXe,$w,Rye,VXe,zXe,UXe,WXe,jXe,qXe,HXe,F$,YXe,KXe,XXe,Fw,QXe,ZXe,JXe,eQe,tQe,rQe,Gw,nQe,ru,iQe,sQe,qh,aQe,Hye,Yye,np,oQe,lQe,cQe,uQe,Kye,G$,Vw,Xye,zw,cw,P6,hQe,dQe,fQe,bde,pQe,m1e,mQe,gQe,yQe,xQe,bQe,TQe,CQe,kQe,SQe,EQe,vQe,wQe,_Qe,AQe,RQe,LQe,IQe,z5,DQe,NQe,MQe,OQe,PQe,BQe,$Qe,Tde,O1e,Cde,FQe,i0e,s0e,a0e,Y$,o0e,G6,kde,l0e,c0e,GQe,VQe,u0e,zQe,UQe,h0e,WQe,v0e,w0e,eu,ri,Bv,jQe,Bg,Z$,Sde,z6,L0e,Ha,Jx,Eo,qQe,zr,HQe,YQe,gg,KQe,XQe,QQe,ZQe,JQe,zb,Ede,eZe,vde,tZe,D0e,rZe,nZe,iZe,sZe,aZe,oZe,j6,lZe,cZe,uZe,hl,hZe,dZe,fZe,pZe,mZe,ZE,vb,gZe,yZe,xZe,bZe,TZe,CZe,wde,kZe,SZe,EZe,_de,U5,H6,Y0e,vZe,wZe,_Ze,fw,AZe,RZe,Ade,LZe,Rde,IZe,un,DZe,NZe,X6,Q6,Z6,J6,eB,tB,rB,nB,iB,sB,aB,oB,lB,cB,uB,umr,hB,dB,Gv,fB,pB,mB,Nf,Vv,gB,yB,JE,W5,ev,eb,j5,ll,tv,wb,Lde,rv,q5,Bf,nv,kf,iv,Fh,sv,Ide,yg,_b,pw,xB,bB,TB,CB,kB,SB,EB,Dg,Ph,vB,zv,wB,_B,Uv,AB,RB,Xl,Mf,Bh,tb,Dde,H5,av,Jc,Dh,Y5,Jl,Nde,ov,K5,Gh,rb,Fg,nb,X5,ib,lv,Sf,$f,cv,Q5,Ff,Gf,LB,IB,DB,NB,MB,Wv,Ng,jv,OB,qv,Vh,Ab,Z5,uv,$h,Vf,zf,PB,Uf,ec,BB,$B,FB,Wf,Hv,GB,VB,zB,UB,J5,xg,eP,Of,Gg,jf,tP,Pf,Mg,ds,yxe,Ci,Mde,MZe,Ode,OZe,Pde,PZe,Bde,BZe,$de,$Ze,Fde,FZe,Gde,GZe,Vde,VZe,zde,zZe,Ude,UZe,Wde,WZe,jde,jZe,qde,qZe,Hde,HZe,Yde,YZe,KZe,XZe,QZe,ZZe,JZe,eJe,tJe,rJe,nJe,iJe,sJe,aJe,oJe,lJe,cJe,hn,o8,l8,c8,u8,h8,d8,f8,p8,m8,g8,y8,x8,b8,T8,C8,uJe,hJe,dJe,fJe,Oi,Xa,mn,pJe,on=w(()=>{"use strict";iqe=Object.create,Ub=Object.defineProperty,sqe=Object.getOwnPropertyDescriptor,WB=Object.getOwnPropertyNames,aqe=Object.getPrototypeOf,oqe=Object.prototype.hasOwnProperty,k=a((e,t)=>Ub(e,"name",{value:t,configurable:!0}),"__name"),lqe=a((e,t)=>a(function(){return e&&(t=(0,e[WB(e)[0]])(e=0)),t},"__init"),"__esm"),Pr=a((e,t)=>a(function(){return t||(0,e[WB(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),cqe=a((e,t)=>{for(var r in t)Ub(e,r,{get:t[r],enumerable:!0})},"__export"),Kde=a((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WB(t))!oqe.call(e,i)&&i!==r&&Ub(e,i,{get:a(()=>t[i],"get"),enumerable:!(n=sqe(t,i))||n.enumerable});return e},"__copyProps"),jB=a((e,t,r)=>(r=e!=null?iqe(aqe(e)):{},Kde(t||!e||!e.__esModule?Ub(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),qB=a(e=>Kde(Ub({},"__esModule",{value:!0}),e),"__toCommonJS"),Wb=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boolean=t,e.string=r,e.number=n,e.error=i,e.func=s,e.array=o,e.stringArray=l;function t(u){return u===!0||u===!1}a(t,"boolean"),k(t,"boolean");function r(u){return typeof u=="string"||u instanceof String}a(r,"string"),k(r,"string");function n(u){return typeof u=="number"||u instanceof Number}a(n,"number"),k(n,"number");function i(u){return u instanceof Error}a(i,"error"),k(i,"error");function s(u){return typeof u=="function"}a(s,"func"),k(s,"func");function o(u){return Array.isArray(u)}a(o,"array"),k(o,"array");function l(u){return o(u)&&u.every(h=>r(h))}a(l,"stringArray"),k(l,"stringArray")}}),Xde=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(D,M,R,P){P===void 0&&(P=R);var V=Object.getOwnPropertyDescriptor(M,R);(!V||("get"in V?!M.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:k(function(){return M[R]},"get")}),Object.defineProperty(D,P,V)}):(function(D,M,R,P){P===void 0&&(P=R),D[P]=M[R]})),r=e&&e.__setModuleDefault||(Object.create?(function(D,M){Object.defineProperty(D,"default",{enumerable:!0,value:M})}):function(D,M){D.default=M}),n=e&&e.__importStar||(function(){var D=k(function(M){return D=Object.getOwnPropertyNames||function(R){var P=[];for(var V in R)Object.prototype.hasOwnProperty.call(R,V)&&(P[P.length]=V);return P},D(M)},"ownKeys");return function(M){if(M&&M.__esModule)return M;var R={};if(M!=null)for(var P=D(M),V=0;Vo,next:k(()=>{if(this._state!==i)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:s.key,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}values(){let i=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:k(()=>{if(this._state!==i)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:s.value,done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}entries(){let i=this._state,s=this._head,o={[Symbol.iterator]:()=>o,next:k(()=>{if(this._state!==i)throw new Error("LinkedMap got modified during iteration.");if(s){let l={value:[s.key,s.value],done:!1};return s=s.next,l}else return{value:void 0,done:!0}},"next")};return o}[Symbol.iterator](){return this.entries()}trimOld(i){if(i>=this.size)return;if(i===0){this.clear();return}let s=this._head,o=this.size;for(;s&&o>i;)this._map.delete(s.key),s=s.next,o--;this._head=s,this._size=o,s&&(s.previous=void 0),this._state++}addItemFirst(i){if(!this._head&&!this._tail)this._tail=i;else if(this._head)i.next=this._head,this._head.previous=i;else throw new Error("Invalid list");this._head=i,this._state++}addItemLast(i){if(!this._head&&!this._tail)this._head=i;else if(this._tail)i.previous=this._tail,this._tail.next=i;else throw new Error("Invalid list");this._tail=i,this._state++}removeItem(i){if(i===this._head&&i===this._tail)this._head=void 0,this._tail=void 0;else if(i===this._head){if(!i.next)throw new Error("Invalid list");i.next.previous=void 0,this._head=i.next}else if(i===this._tail){if(!i.previous)throw new Error("Invalid list");i.previous.next=void 0,this._tail=i.previous}else{let s=i.next,o=i.previous;if(!s||!o)throw new Error("Invalid list");s.previous=o,o.next=s}i.next=void 0,i.previous=void 0,this._state++}touch(i,s){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(s!==t.First&&s!==t.Last)){if(s===t.First){if(i===this._head)return;let o=i.next,l=i.previous;i===this._tail?(l.next=void 0,this._tail=l):(o.previous=l,l.next=o),i.previous=void 0,i.next=this._head,this._head.previous=i,this._head=i,this._state++}else if(s===t.Last){if(i===this._tail)return;let o=i.next,l=i.previous;i===this._head?(o.previous=void 0,this._head=o):(o.previous=l,l.next=o),i.next=void 0,i.previous=this._tail,this._tail.next=i,this._tail=i,this._state++}}}toJSON(){let i=[];return this.forEach((s,o)=>{i.push([o,s])}),i}fromJSON(i){this.clear();for(let[s,o]of i)this.set(s,o)}};e.LinkedMap=r;var n=class extends r{static{a(this,"LRUCache")}static{k(this,"LRUCache")}_limit;_ratio;constructor(i,s=1){super(),this._limit=i,this._ratio=Math.min(Math.max(0,s),1)}get limit(){return this._limit}set limit(i){this._limit=i,this.checkTrim()}get ratio(){return this._ratio}set ratio(i){this._ratio=Math.min(Math.max(0,i),1),this.checkTrim()}get(i,s=t.AsNew){return super.get(i,s)}peek(i){return super.get(i,t.None)}set(i,s){return super.set(i,s,t.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),uqe=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/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(i){return{dispose:i}}a(n,"create"),k(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),Xf=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/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}a(r,"RAL"),k(r,"RAL"),(function(n){function i(s){if(s===void 0)throw new Error("No runtime abstraction layer provided");t=s}a(i,"install"),k(i,"install"),n.install=i})(r||(r={})),e.default=r}}),jb=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var r=t(Xf()),n;(function(o){let l={dispose(){}};o.None=function(){return l}})(n||(e.Event=n={}));var i=class{static{a(this,"CallbackList")}static{k(this,"CallbackList")}_callbacks;_contexts;add(o,l=null,u){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(o),this._contexts.push(l),Array.isArray(u)&&u.push({dispose:k(()=>this.remove(o,l),"dispose")})}remove(o,l=null){if(!this._callbacks)return;let u=!1;for(let h=0,d=this._callbacks.length;h{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,u);let d={dispose:k(()=>{this._callbacks&&(this._callbacks.remove(l,u),d.dispose=Jde._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(h)&&h.push(d),d}),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=s}}),HB=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(p,m,g,y){y===void 0&&(y=g);var x=Object.getOwnPropertyDescriptor(m,g);(!x||("get"in x?!m.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:k(function(){return m[g]},"get")}),Object.defineProperty(p,y,x)}):(function(p,m,g,y){y===void 0&&(y=g),p[y]=m[g]})),r=e&&e.__setModuleDefault||(Object.create?(function(p,m){Object.defineProperty(p,"default",{enumerable:!0,value:m})}):function(p,m){p.default=m}),n=e&&e.__importStar||(function(){var p=k(function(m){return p=Object.getOwnPropertyNames||function(g){var y=[];for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(y[y.length]=x);return y},p(m)},"ownKeys");return function(m){if(m&&m.__esModule)return m;var g={};if(m!=null)for(var y=p(m),x=0;x{this._waiting.push({thunk:i,resolve:s,reject:o}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("Too many thunks active");try{let s=i.thunk();s instanceof Promise?s.then(o=>{this._active--,i.resolve(o),this.runNext()},o=>{this._active--,i.reject(o),this.runNext()}):(this._active--,i.resolve(s),this.runNext())}catch(s){this._active--,i.reject(s),this.runNext()}}};e.Semaphore=n}}),dqe=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(m,g,y,x){x===void 0&&(x=y);var b=Object.getOwnPropertyDescriptor(g,y);(!b||("get"in b?!g.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:k(function(){return g[y]},"get")}),Object.defineProperty(m,x,b)}):(function(m,g,y,x){x===void 0&&(x=y),m[x]=g[y]})),r=e&&e.__setModuleDefault||(Object.create?(function(m,g){Object.defineProperty(m,"default",{enumerable:!0,value:g})}):function(m,g){m.default=g}),n=e&&e.__importStar||(function(){var m=k(function(g){return m=Object.getOwnPropertyNames||function(y){var x=[];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(x[x.length]=b);return x},m(g)},"ownKeys");return function(g){if(g&&g.__esModule)return g;var y={};if(g!=null)for(var x=m(g),b=0;b{this.onData(y)});return this.readable.onError(y=>this.fireError(y)),this.readable.onClose(()=>this.fireClose()),g}onData(m){try{for(this.buffer.append(m);;){if(this.nextMessageLength===-1){let y=this.buffer.tryReadHeaders(!0);if(!y)return;let x=y.get("content-length");if(!x){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(y))}`));return}let b=parseInt(x);if(isNaN(b)){this.fireError(new Error(`Content-Length value must be a number. Got ${x}`));return}this.nextMessageLength=b}let g=this.buffer.tryReadBody(this.nextMessageLength);if(g===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let y=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(g):g,x=await this.options.contentTypeDecoder.decode(y,this.options);this.callback(x)}).catch(y=>{this.fireError(y)})}}catch(g){this.fireError(g)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,s.default)().timer.setTimeout((m,g)=>{this.partialMessageTimer=void 0,m===this.messageToken&&(this.firePartialMessage({messageToken:m,waitingTime:g}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=p}}),fqe=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(y,x,b,T){T===void 0&&(T=b);var C=Object.getOwnPropertyDescriptor(x,b);(!C||("get"in C?!x.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:k(function(){return x[b]},"get")}),Object.defineProperty(y,T,C)}):(function(y,x,b,T){T===void 0&&(T=b),y[T]=x[b]})),r=e&&e.__setModuleDefault||(Object.create?(function(y,x){Object.defineProperty(y,"default",{enumerable:!0,value:x})}):function(y,x){y.default=x}),n=e&&e.__importStar||(function(){var y=k(function(x){return y=Object.getOwnPropertyNames||function(b){var T=[];for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(T[T.length]=C);return T},y(x)},"ownKeys");return function(x){if(x&&x.__esModule)return x;var b={};if(x!=null)for(var T=y(x),C=0;Cthis.fireError(b)),this.writable.onClose(()=>this.fireClose())}async write(y){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(y,this.options).then(b=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(b):b).then(b=>{let T=[];return T.push(h,b.byteLength.toString(),d),T.push(d),this.doWrite(y,T,b)},b=>{throw this.fireError(b),b}))}async doWrite(y,x,b){try{return await this.writable.write(x.join(""),"ascii"),this.writable.write(b)}catch(T){return this.handleError(T,y),Promise.reject(T)}}handleError(y,x){this.errorCount++,this.fireError(y,x,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=g}}),pqe=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/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 +`,i=class{static{a(this,"AbstractMessageBuffer")}static{k(this,"AbstractMessageBuffer")}_encoding;_chunks;_totalLength;constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let o=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(o),this._totalLength+=o.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let o=0,l=0,u=0,h=0;e:for(;lthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){let h=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(h)}if(this._chunks[0].byteLength>s){let h=this._chunks[0],d=this.asNative(h,s);return this._chunks[0]=h.slice(s),this._totalLength-=s,d}let o=this.allocNative(s),l=0,u=0;for(;s>0;){let h=this._chunks[u];if(h.byteLength>s){let d=h.slice(0,s);o.set(d,l),l+=s,this._chunks[u]=h.slice(s),this._totalLength-=s,s-=s}else o.set(h,l),l+=h.byteLength,this._chunks.shift(),this._totalLength-=h.byteLength,s-=h.byteLength}return o}};e.AbstractMessageBuffer=i}}),mqe=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(M,R,P,V){V===void 0&&(V=P);var U=Object.getOwnPropertyDescriptor(R,P);(!U||("get"in U?!R.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:k(function(){return R[P]},"get")}),Object.defineProperty(M,V,U)}):(function(M,R,P,V){V===void 0&&(V=P),M[V]=R[P]})),r=e&&e.__setModuleDefault||(Object.create?(function(M,R){Object.defineProperty(M,"default",{enumerable:!0,value:R})}):function(M,R){M.default=R}),n=e&&e.__importStar||(function(){var M=k(function(R){return M=Object.getOwnPropertyNames||function(P){var V=[];for(var U in P)Object.prototype.hasOwnProperty.call(P,U)&&(V[V.length]=U);return V},M(R)},"ownKeys");return function(R){if(R&&R.__esModule)return R;var P={};if(R!=null)for(var V=M(R),U=0;U{},"error"),warn:k(()=>{},"warn"),info:k(()=>{},"info"),log:k(()=>{},"log")});var x;(function(M){M[M.Off=0]="Off",M[M.Messages=1]="Messages",M[M.Compact=2]="Compact",M[M.Verbose=3]="Verbose"})(x||(e.Trace=x={}));var b;(function(M){M.Off="off",M.Messages="messages",M.Compact="compact",M.Verbose="verbose"})(b||(e.TraceValue=b={})),e.TraceValues=b,(function(M){function R(V){if(!o.string(V))return M.Off;switch(V=V.toLowerCase(),V){case"off":return M.Off;case"messages":return M.Messages;case"compact":return M.Compact;case"verbose":return M.Verbose;default:return M.Off}}a(R,"fromString"),k(R,"fromString"),M.fromString=R;function P(V){switch(V){case M.Off:return"off";case M.Messages:return"messages";case M.Compact:return"compact";case M.Verbose:return"verbose";default:return"off"}}a(P,"toString3"),k(P,"toString"),M.toString=P})(x||(e.Trace=x={}));var T;(function(M){M.Text="text",M.JSON="json"})(T||(e.TraceFormat=T={})),(function(M){function R(P){return o.string(P)?(P=P.toLowerCase(),P==="json"?M.JSON:M.Text):M.Text}a(R,"fromString"),k(R,"fromString"),M.fromString=R})(T||(e.TraceFormat=T={}));var C;(function(M){M.type=new l.NotificationType("$/setTrace")})(C||(e.SetTraceNotification=C={}));var v;(function(M){M.type=new l.NotificationType("$/logTrace")})(v||(e.LogTraceNotification=v={}));var E;(function(M){M[M.Closed=1]="Closed",M[M.Disposed=2]="Disposed",M[M.AlreadyListening=3]="AlreadyListening"})(E||(e.ConnectionErrors=E={}));var S=class tfe extends Error{static{a(this,"_ConnectionError")}static{k(this,"ConnectionError")}code;constructor(R,P){super(P),this.code=R,Object.setPrototypeOf(this,tfe.prototype)}};e.ConnectionError=S;var _;(function(M){function R(P){let V=P;return V&&o.func(V.cancelUndispatched)}a(R,"is"),k(R,"is"),M.is=R})(_||(e.ConnectionStrategy=_={}));var A;(function(M){function R(P){let V=P;return V&&(V.kind===void 0||V.kind==="id")&&o.func(V.createCancellationTokenSource)&&(V.dispose===void 0||o.func(V.dispose))}a(R,"is"),k(R,"is"),M.is=R})(A||(e.IdCancellationReceiverStrategy=A={}));var B;(function(M){function R(P){let V=P;return V&&V.kind==="request"&&o.func(V.createCancellationTokenSource)&&(V.dispose===void 0||o.func(V.dispose))}a(R,"is"),k(R,"is"),M.is=R})(B||(e.RequestCancellationReceiverStrategy=B={}));var $;(function(M){M.Message=Object.freeze({createCancellationTokenSource(P){return new d.CancellationTokenSource}});function R(P){return A.is(P)||B.is(P)}a(R,"is"),k(R,"is"),M.is=R})($||(e.CancellationReceiverStrategy=$={}));var O;(function(M){M.Message=Object.freeze({sendCancellation(P,V){return P.sendNotification(f.type,{id:V})},cleanup(P){}});function R(P){let V=P;return V&&o.func(V.sendCancellation)&&o.func(V.cleanup)}a(R,"is"),k(R,"is"),M.is=R})(O||(e.CancellationSenderStrategy=O={}));var G;(function(M){M.Message=Object.freeze({receiver:$.Message,sender:O.Message});function R(P){let V=P;return V&&$.is(V.receiver)&&O.is(V.sender)}a(R,"is"),k(R,"is"),M.is=R})(G||(e.CancellationStrategy=G={}));var I;(function(M){function R(P){let V=P;return V&&o.func(V.handleMessage)}a(R,"is"),k(R,"is"),M.is=R})(I||(e.MessageStrategy=I={}));var F;(function(M){function R(P){let V=P;return V&&(G.is(V.cancellationStrategy)||_.is(V.connectionStrategy)||I.is(V.messageStrategy)||o.number(V.maxParallelism))}a(R,"is"),k(R,"is"),M.is=R})(F||(e.ConnectionOptions=F={}));var N;(function(M){M[M.New=1]="New",M[M.Listening=2]="Listening",M[M.Closed=3]="Closed",M[M.Disposed=4]="Disposed"})(N||(N={}));function D(M,R,P,V){let U=P!==void 0?P:e.NullLogger,z=0,j=0,K=0,Z="2.0",ce=V?.maxParallelism??-1,te=0,me,he=new Map,we,ye=new Map,ke=new Map,Fe,Ge=new u.LinkedMap,Me=new Map,at=new Set,ht=new Map,ge=x.Off,De=T.Text,Le,Ie=N.New,Q=new h.Emitter,ne=new h.Emitter,re=new h.Emitter,se=new h.Emitter,fe=new h.Emitter,J=V&&V.cancellationStrategy?V.cancellationStrategy:G.Message;function L(de){}a(L,"cancelUndispatched"),k(L,"cancelUndispatched");function W(){return Ie===N.Listening}a(W,"isListening"),k(W,"isListening");function ae(){return Ie===N.Closed}a(ae,"isClosed"),k(ae,"isClosed");function X(){return Ie===N.Disposed}a(X,"isDisposed"),k(X,"isDisposed");function xe(){(Ie===N.New||Ie===N.Listening)&&(Ie=N.Closed,ne.fire(void 0))}a(xe,"closeHandler"),k(xe,"closeHandler");function ee(de){Q.fire([de,void 0,void 0])}a(ee,"readErrorHandler"),k(ee,"readErrorHandler");function Y(de){Q.fire(de)}a(Y,"writeErrorHandler"),k(Y,"writeErrorHandler"),M.onClose(xe),M.onError(ee),R.onClose(xe),R.onError(Y);function q(de){if(de===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+de.toString()}a(q,"createRequestQueueKey"),k(q,"createRequestQueueKey");function ve(de){return de===null?"res-unknown-"+(++K).toString():"res-"+de.toString()}a(ve,"createResponseQueueKey"),k(ve,"createResponseQueueKey");function Se(){return"not-"+(++j).toString()}a(Se,"createNotificationQueueKey"),k(Se,"createNotificationQueueKey");function Ae(de,Ne){l.Message.isRequest(Ne)?de.set(q(Ne.id),Ne):l.Message.isResponse(Ne)?ce===-1?de.set(ve(Ne.id),Ne):Ve(Ne):de.set(Se(),Ne)}a(Ae,"addMessageToQueue"),k(Ae,"addMessageToQueue");function Ee(){Fe||Ge.size===0||ce!==-1&&te>=ce||(Fe=(0,s.default)().timer.setImmediate(async()=>{if(Fe=void 0,Ge.size===0||ce!==-1&&te>=ce)return;let de=Ge.shift(),Ne;try{te++;let nt=V?.messageStrategy;I.is(nt)?Ne=nt.handleMessage(de,Qe):Ne=Qe(de)}catch(nt){U.error(`Processing message queue failed: ${nt.toString()}`)}finally{Ne instanceof Promise?Ne.then(()=>{te--,Ee()}).catch(nt=>{U.error(`Processing message queue failed: ${nt.toString()}`)}):te--,Ee()}}))}a(Ee,"triggerMessageQueue"),k(Ee,"triggerMessageQueue");async function Qe(de){return l.Message.isRequest(de)?lt(de):l.Message.isNotification(de)?Ye(de):l.Message.isResponse(de)?Ve(de):Je(de)}a(Qe,"handleMessage"),k(Qe,"handleMessage");let qe=k(de=>{try{if(l.Message.isNotification(de)&&de.method===f.type.method){let Ne=de.params.id,nt=q(Ne),ft=Ge.get(nt);if(l.Message.isRequest(ft)){let cr=V?.connectionStrategy,$e=cr&&cr.cancelUndispatched?cr.cancelUndispatched(ft,L):void 0;if($e&&($e.error!==void 0||$e.result!==void 0)){Ge.delete(nt),ht.delete(Ne),$e.id=ft.id,Ut($e,de.method,Date.now()),R.write($e).catch(()=>U.error("Sending response for canceled message failed."));return}}let dt=ht.get(Ne);if(dt!==void 0){dt.cancel(),vt(de);return}else at.add(Ne)}Ae(Ge,de)}finally{Ee()}},"callback");async function lt(de){if(X())return Promise.resolve();function Ne(it,mt,wt){let Dt={jsonrpc:Z,id:de.id};return it instanceof l.ResponseError?Dt.error=it.toJson():Dt.result=it===void 0?null:it,Ut(Dt,mt,wt),R.write(Dt)}a(Ne,"reply"),k(Ne,"reply");function nt(it,mt,wt){let Dt={jsonrpc:Z,id:de.id,error:it.toJson()};return Ut(Dt,mt,wt),R.write(Dt)}a(nt,"replyError"),k(nt,"replyError"),Re(de);let ft=he.get(de.method),dt,cr;ft&&(dt=ft.type,cr=ft.handler);let $e=Date.now();if(cr||me){let it=de.id??String(Date.now()),mt=A.is(J.receiver)?J.receiver.createCancellationTokenSource(it):J.receiver.createCancellationTokenSource(de);de.id!==null&&at.has(de.id)&&mt.cancel(),de.id!==null&&ht.set(it,mt);try{let wt;if(cr)if(de.params===void 0){if(dt!==void 0&&dt.numberOfParams!==0)return nt(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${de.method} defines ${dt.numberOfParams} params but received none.`),de.method,$e);wt=cr(mt.token)}else if(Array.isArray(de.params)){if(dt!==void 0&&dt.parameterStructures===l.ParameterStructures.byName)return nt(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${de.method} defines parameters by name but received parameters by position`),de.method,$e);wt=cr(...de.params,mt.token)}else{if(dt!==void 0&&dt.parameterStructures===l.ParameterStructures.byPosition)return nt(new l.ResponseError(l.ErrorCodes.InvalidParams,`Request ${de.method} defines parameters by position but received parameters by name`),de.method,$e);wt=cr(de.params,mt.token)}else me&&(wt=me(de.method,de.params,mt.token));let Dt=await wt;await Ne(Dt,de.method,$e)}catch(wt){wt instanceof l.ResponseError?await Ne(wt,de.method,$e):wt&&o.string(wt.message)?await nt(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${de.method} failed with message: ${wt.message}`),de.method,$e):await nt(new l.ResponseError(l.ErrorCodes.InternalError,`Request ${de.method} failed unexpectedly without providing any details.`),de.method,$e)}finally{ht.delete(it)}}else await nt(new l.ResponseError(l.ErrorCodes.MethodNotFound,`Unhandled method ${de.method}`),de.method,$e)}a(lt,"handleRequest"),k(lt,"handleRequest");function Ve(de){if(!X())if(de.id===null)de.error?U.error(`Received response message without id: Error is: +${JSON.stringify(de.error,void 0,4)}`):U.error("Received response message without id. No further error information provided.");else{let Ne=de.id,nt=Me.get(Ne);if(Zt(de,nt),nt!==void 0){Me.delete(Ne);try{if(de.error){let ft=de.error;nt.reject(new l.ResponseError(ft.code,ft.message,ft.data))}else if(de.result!==void 0)nt.resolve(de.result);else throw new Error("Should never happen.")}catch(ft){ft.message?U.error(`Response handler '${nt.method}' failed with message: ${ft.message}`):U.error(`Response handler '${nt.method}' failed unexpectedly.`)}}}}a(Ve,"handleResponse"),k(Ve,"handleResponse");async function Ye(de){if(X())return;let Ne,nt;if(de.method===f.type.method){let ft=de.params.id;at.delete(ft),vt(de);return}else{let ft=ye.get(de.method);ft&&(nt=ft.handler,Ne=ft.type)}if(nt||we)try{if(vt(de),nt)if(de.params===void 0)Ne!==void 0&&Ne.numberOfParams!==0&&Ne.parameterStructures!==l.ParameterStructures.byName&&U.error(`Notification ${de.method} defines ${Ne.numberOfParams} params but received none.`),await nt();else if(Array.isArray(de.params)){let ft=de.params;de.method===m.type.method&&ft.length===2&&p.is(ft[0])?await nt({token:ft[0],value:ft[1]}):(Ne!==void 0&&(Ne.parameterStructures===l.ParameterStructures.byName&&U.error(`Notification ${de.method} defines parameters by name but received parameters by position`),Ne.numberOfParams!==de.params.length&&U.error(`Notification ${de.method} defines ${Ne.numberOfParams} params but received ${ft.length} arguments`)),await nt(...ft))}else Ne!==void 0&&Ne.parameterStructures===l.ParameterStructures.byPosition&&U.error(`Notification ${de.method} defines parameters by position but received parameters by name`),await nt(de.params);else we&&await we(de.method,de.params)}catch(ft){ft.message?U.error(`Notification handler '${de.method}' failed with message: ${ft.message}`):U.error(`Notification handler '${de.method}' failed unexpectedly.`)}else re.fire(de)}a(Ye,"handleNotification"),k(Ye,"handleNotification");function Je(de){if(!de){U.error("Received empty message.");return}U.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(de,null,4)}`);let Ne=de;if(o.string(Ne.id)||o.number(Ne.id)){let nt=Ne.id,ft=Me.get(nt);ft&&ft.reject(new Error("The received response has neither a result nor an error property."))}}a(Je,"handleInvalidMessage"),k(Je,"handleInvalidMessage");function Oe(de){if(de!=null)switch(ge){case x.Verbose:return JSON.stringify(de,null,4);case x.Compact:return JSON.stringify(de);default:return}}a(Oe,"stringifyTrace"),k(Oe,"stringifyTrace");function Vt(de){if(!(ge===x.Off||!Le))if(De===T.Text){let Ne;(ge===x.Verbose||ge===x.Compact)&&de.params&&(Ne=`Params: ${Oe(de.params)}`),Le.log(`Sending request '${de.method} - (${de.id})'.`,Ne)}else _t("send-request",de)}a(Vt,"traceSendingRequest"),k(Vt,"traceSendingRequest");function Ce(de){if(!(ge===x.Off||!Le))if(De===T.Text){let Ne;(ge===x.Verbose||ge===x.Compact)&&(de.params?Ne=`Params: ${Oe(de.params)}`:Ne="No parameters provided."),Le.log(`Sending notification '${de.method}'.`,Ne)}else _t("send-notification",de)}a(Ce,"traceSendingNotification"),k(Ce,"traceSendingNotification");function Ut(de,Ne,nt){if(!(ge===x.Off||!Le))if(De===T.Text){let ft;(ge===x.Verbose||ge===x.Compact)&&(de.error&&de.error.data?ft=`Error data: ${Oe(de.error.data)}`:de.result?ft=`Result: ${Oe(de.result)}`:de.error===void 0&&(ft="No result returned."));let dt=de.error?` Request failed: ${de.error.message} (${de.error.code}).`:"";Le.log(`Sending response '${Ne} - (${de.id})'. Processing request took ${Date.now()-nt}ms.${dt}`,ft)}else _t("send-response",de)}a(Ut,"traceSendingResponse"),k(Ut,"traceSendingResponse");function Re(de){if(!(ge===x.Off||!Le))if(De===T.Text){let Ne;(ge===x.Verbose||ge===x.Compact)&&de.params&&(Ne=`Params: ${Oe(de.params)}`),Le.log(`Received request '${de.method} - (${de.id})'.`,Ne)}else _t("receive-request",de)}a(Re,"traceReceivedRequest"),k(Re,"traceReceivedRequest");function vt(de){if(!(ge===x.Off||!Le||de.method===v.type.method))if(De===T.Text){let Ne;(ge===x.Verbose||ge===x.Compact)&&(de.params?Ne=`Params: ${Oe(de.params)}`:Ne="No parameters provided."),Le.log(`Received notification '${de.method}'.`,Ne)}else _t("receive-notification",de)}a(vt,"traceReceivedNotification"),k(vt,"traceReceivedNotification");function Zt(de,Ne){if(!(ge===x.Off||!Le))if(De===T.Text){let nt;if((ge===x.Verbose||ge===x.Compact)&&(de.error&&de.error.data?nt=`Error data: ${Oe(de.error.data)}`:de.result?nt=`Result: ${Oe(de.result)}`:de.error===void 0&&(nt="No result returned.")),Ne){let ft=de.error?` Request failed: ${de.error.message} (${de.error.code}).`:"";Le.log(`Received response '${Ne.method} - (${de.id})' in ${Date.now()-Ne.timerStart}ms.${ft}`,nt)}else Le.log(`Received response ${de.id} without active response promise.`,nt)}else _t("receive-response",de)}a(Zt,"traceReceivedResponse"),k(Zt,"traceReceivedResponse");function _t(de,Ne){if(!Le||ge===x.Off)return;let nt={isLSPMessage:!0,type:de,message:Ne,timestamp:Date.now()};Le.log(nt)}a(_t,"logLSPMessage"),k(_t,"logLSPMessage");function qt(){if(ae())throw new S(E.Closed,"Connection is closed.");if(X())throw new S(E.Disposed,"Connection is disposed.")}a(qt,"throwIfClosedOrDisposed"),k(qt,"throwIfClosedOrDisposed");function At(){if(W())throw new S(E.AlreadyListening,"Connection is already listening")}a(At,"throwIfListening"),k(At,"throwIfListening");function zt(){if(!W())throw new Error("Call listen() first.")}a(zt,"throwIfNotListening"),k(zt,"throwIfNotListening");function ot(de){return de===void 0?null:de}a(ot,"undefinedToNull"),k(ot,"undefinedToNull");function Rt(de){if(de!==null)return de}a(Rt,"nullToUndefined"),k(Rt,"nullToUndefined");function Ar(de){return de!=null&&!Array.isArray(de)&&typeof de=="object"}a(Ar,"isNamedParam"),k(Ar,"isNamedParam");function ie(de,Ne){switch(de){case l.ParameterStructures.auto:return Ar(Ne)?Rt(Ne):[ot(Ne)];case l.ParameterStructures.byName:if(!Ar(Ne))throw new Error("Received parameters by name but param is not an object literal.");return Rt(Ne);case l.ParameterStructures.byPosition:return[ot(Ne)];default:throw new Error(`Unknown parameter structure ${de.toString()}`)}}a(ie,"computeSingleParam"),k(ie,"computeSingleParam");function xt(de,Ne){let nt,ft=de.numberOfParams;switch(ft){case 0:nt=void 0;break;case 1:nt=ie(de.parameterStructures,Ne[0]);break;default:nt=[];for(let dt=0;dt{qt();let nt,ft;if(o.string(de)){nt=de;let cr=Ne[0],$e=0,it=l.ParameterStructures.auto;l.ParameterStructures.is(cr)&&($e=1,it=cr);let mt=Ne.length,wt=mt-$e;switch(wt){case 0:ft=void 0;break;case 1:ft=ie(it,Ne[$e]);break;default:if(it===l.ParameterStructures.byName)throw new Error(`Received ${wt} parameters for 'by Name' notification parameter structure.`);ft=Ne.slice($e,mt).map(Dt=>ot(Dt));break}}else{let cr=Ne;nt=de.method,ft=xt(de,cr)}let dt={jsonrpc:Z,method:nt,params:ft};return Ce(dt),R.write(dt).catch(cr=>{throw U.error("Sending notification failed."),cr})},"sendNotification"),onNotification:k((de,Ne)=>{qt();let nt;return o.func(de)?we=de:Ne&&(o.string(de)?(nt=de,ye.set(de,{type:void 0,handler:Ne})):(nt=de.method,ye.set(de.method,{type:de,handler:Ne}))),{dispose:k(()=>{nt!==void 0?ye.get(nt)?.handler===Ne&&ye.delete(nt):we===de&&(we=void 0)},"dispose")}},"onNotification"),onProgress:k((de,Ne,nt)=>{if(ke.has(Ne))throw new Error(`Progress handler for token ${Ne} already registered`);return ke.set(Ne,nt),{dispose:k(()=>{ke.get(Ne)===nt&&ke.delete(Ne)},"dispose")}},"onProgress"),sendProgress:k((de,Ne,nt)=>kt.sendNotification(m.type,{token:Ne,value:nt}),"sendProgress"),onUnhandledProgress:se.event,sendRequest:k((de,...Ne)=>{qt(),zt();function nt(Dt,Jt){let mr=J.sender.sendCancellation(Dt,Jt);mr===void 0?U.log(`Received no promise from cancellation strategy when cancelling id ${Jt}`):mr.catch(()=>{U.log(`Sending cancellation messages for id ${Jt} failed.`)})}a(nt,"sendCancellation"),k(nt,"sendCancellation");let ft,dt,cr;if(o.string(de)){ft=de;let Dt=Ne[0],Jt=Ne[Ne.length-1],mr=0,ar=l.ParameterStructures.auto;l.ParameterStructures.is(Dt)&&(mr=1,ar=Dt);let Yt=Ne.length;d.CancellationToken.is(Jt)&&(Yt=Yt-1,cr=Jt);let St=Yt-mr;switch(St){case 0:dt=void 0;break;case 1:dt=ie(ar,Ne[mr]);break;default:if(ar===l.ParameterStructures.byName)throw new Error(`Received ${St} parameters for 'by Name' request parameter structure.`);dt=Ne.slice(mr,Yt).map(Lt=>ot(Lt));break}}else{let Dt=Ne;ft=de.method,dt=xt(de,Dt);let Jt=de.numberOfParams;cr=d.CancellationToken.is(Dt[Jt])?Dt[Jt]:void 0}let $e=z++,it,mt=!1;cr!==void 0&&(cr.isCancellationRequested?mt=!0:it=cr.onCancellationRequested(()=>{nt(kt,$e)}));let wt={jsonrpc:Z,id:$e,method:ft,params:dt};return Vt(wt),typeof J.sender.enableCancellation=="function"&&J.sender.enableCancellation(wt),new Promise(async(Dt,Jt)=>{let mr=k(St=>{Dt(St),J.sender.cleanup($e),it?.dispose()},"resolveWithCleanup"),ar=k(St=>{Jt(St),J.sender.cleanup($e),it?.dispose()},"rejectWithCleanup"),Yt={method:ft,timerStart:Date.now(),resolve:mr,reject:ar};try{Me.set($e,Yt),await R.write(wt),mt&&nt(kt,$e)}catch(St){Me.delete($e),Yt.reject(new l.ResponseError(l.ErrorCodes.MessageWriteError,St.message?St.message:"Unknown reason")),U.error("Sending request failed.")}})},"sendRequest"),onRequest:k((de,Ne)=>{qt();let nt=null;return y.is(de)?(nt=void 0,me=de):o.string(de)?(nt=null,Ne!==void 0&&(nt=de,he.set(de,{handler:Ne,type:void 0}))):Ne!==void 0&&(nt=de.method,he.set(de.method,{type:de,handler:Ne})),{dispose:k(()=>{nt!==null&&(nt!==void 0?he.get(nt)?.handler===Ne&&he.delete(nt):me===de&&(me=void 0))},"dispose")}},"onRequest"),hasPendingResponse:k(()=>Me.size>0,"hasPendingResponse"),trace:k(async(de,Ne,nt)=>{let ft=!1,dt=T.Text;nt!==void 0&&(o.boolean(nt)?ft=nt:(ft=nt.sendNotification||!1,dt=nt.traceFormat||T.Text)),ge=de,De=dt,ge===x.Off?Le=void 0:Le=Ne,ft&&!ae()&&!X()&&await kt.sendNotification(C.type,{value:x.toString(de)})},"trace"),onError:Q.event,onClose:ne.event,onUnhandledNotification:re.event,onDispose:fe.event,end:k(()=>{R.end()},"end"),dispose:k(()=>{if(X())return;Ie=N.Disposed,fe.fire(void 0);let de=new l.ResponseError(l.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Ne of Me.values())Ne.reject(de);Me=new Map,ht=new Map,at=new Set,Ge=new u.LinkedMap,o.func(R.dispose)&&R.dispose(),o.func(M.dispose)&&M.dispose()},"dispose"),listen:k(()=>{qt(),At(),Ie=N.Listening,M.listen(qe)},"listen"),inspect:k(()=>{(0,s.default)().console.log("inspect")},"inspect")};return kt.onNotification(v.type,de=>{if(ge===x.Off||!Le)return;let Ne=ge===x.Verbose||ge===x.Compact;Le.log(de.message,Ne?de.verbose:void 0)}),kt.onNotification(m.type,async de=>{let Ne=ke.get(de.token);Ne?await Ne(de.value):se.fire(de)}),kt}a(D,"createMessageConnection"),k(D,"createMessageConnection")}}),qb=Pr({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";var t=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};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.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.TraceValue=e.Trace=void 0;var r=Xde();Object.defineProperty(e,"Message",{enumerable:!0,get:k(function(){return r.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:k(function(){return r.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:k(function(){return r.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:k(function(){return r.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:k(function(){return r.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:k(function(){return r.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:k(function(){return r.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:k(function(){return r.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:k(function(){return r.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:k(function(){return r.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:k(function(){return r.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:k(function(){return r.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:k(function(){return r.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:k(function(){return r.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:k(function(){return r.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:k(function(){return r.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:k(function(){return r.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:k(function(){return r.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:k(function(){return r.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:k(function(){return r.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:k(function(){return r.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:k(function(){return r.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:k(function(){return r.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:k(function(){return r.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:k(function(){return r.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:k(function(){return r.ParameterStructures},"get")});var n=Zde();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:k(function(){return n.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:k(function(){return n.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:k(function(){return n.Touch},"get")});var i=uqe();Object.defineProperty(e,"Disposable",{enumerable:!0,get:k(function(){return i.Disposable},"get")});var s=jb();Object.defineProperty(e,"Event",{enumerable:!0,get:k(function(){return s.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:k(function(){return s.Emitter},"get")});var o=HB();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:k(function(){return o.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:k(function(){return o.CancellationToken},"get")});var l=hqe();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:k(function(){return l.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:k(function(){return l.SharedArrayReceiverStrategy},"get")});var u=dqe();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:k(function(){return u.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:k(function(){return u.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:k(function(){return u.ReadableStreamMessageReader},"get")});var h=fqe();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:k(function(){return h.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:k(function(){return h.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:k(function(){return h.WriteableStreamMessageWriter},"get")});var d=pqe();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:k(function(){return d.AbstractMessageBuffer},"get")});var f=mqe();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:k(function(){return f.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:k(function(){return f.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:k(function(){return f.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:k(function(){return f.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:k(function(){return f.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:k(function(){return f.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:k(function(){return f.Trace},"get")}),Object.defineProperty(e,"TraceValue",{enumerable:!0,get:k(function(){return f.TraceValue},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:k(function(){return f.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:k(function(){return f.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:k(function(){return f.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:k(function(){return f.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:k(function(){return f.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:k(function(){return f.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"IdCancellationReceiverStrategy",{enumerable:!0,get:k(function(){return f.IdCancellationReceiverStrategy},"get")}),Object.defineProperty(e,"RequestCancellationReceiverStrategy",{enumerable:!0,get:k(function(){return f.RequestCancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:k(function(){return f.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:k(function(){return f.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:k(function(){return f.MessageStrategy},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:k(function(){return f.TraceValues},"get")});var p=t(Xf());e.RAL=p.default}}),mw={};cqe(mw,{AnnotatedTextEdit:a(()=>Xc,"AnnotatedTextEdit"),ApplyKind:a(()=>kP,"ApplyKind"),ChangeAnnotation:a(()=>Nh,"ChangeAnnotation"),ChangeAnnotationIdentifier:a(()=>hs,"ChangeAnnotationIdentifier"),CodeAction:a(()=>$P,"CodeAction"),CodeActionContext:a(()=>BP,"CodeActionContext"),CodeActionKind:a(()=>PP,"CodeActionKind"),CodeActionTag:a(()=>gv,"CodeActionTag"),CodeActionTriggerKind:a(()=>hb,"CodeActionTriggerKind"),CodeDescription:a(()=>hP,"CodeDescription"),CodeLens:a(()=>FP,"CodeLens"),Color:a(()=>dv,"Color"),ColorInformation:a(()=>sP,"ColorInformation"),ColorPresentation:a(()=>aP,"ColorPresentation"),Command:a(()=>vf,"Command"),CompletionItem:a(()=>EP,"CompletionItem"),CompletionItemKind:a(()=>yP,"CompletionItemKind"),CompletionItemLabelDetails:a(()=>SP,"CompletionItemLabelDetails"),CompletionItemTag:a(()=>bP,"CompletionItemTag"),CompletionList:a(()=>vP,"CompletionList"),CreateFile:a(()=>bg,"CreateFile"),DeleteFile:a(()=>Cg,"DeleteFile"),Diagnostic:a(()=>ob,"Diagnostic"),DiagnosticRelatedInformation:a(()=>fv,"DiagnosticRelatedInformation"),DiagnosticSeverity:a(()=>cP,"DiagnosticSeverity"),DiagnosticTag:a(()=>uP,"DiagnosticTag"),DocumentHighlight:a(()=>LP,"DocumentHighlight"),DocumentHighlightKind:a(()=>RP,"DocumentHighlightKind"),DocumentLink:a(()=>VP,"DocumentLink"),DocumentSymbol:a(()=>OP,"DocumentSymbol"),DocumentUri:a(()=>rP,"DocumentUri"),EOL:a(()=>nfe,"EOL"),FoldingRange:a(()=>lP,"FoldingRange"),FoldingRangeKind:a(()=>oP,"FoldingRangeKind"),FormattingOptions:a(()=>GP,"FormattingOptions"),Hover:a(()=>wP,"Hover"),InlayHint:a(()=>XP,"InlayHint"),InlayHintKind:a(()=>yv,"InlayHintKind"),InlayHintLabelPart:a(()=>xv,"InlayHintLabelPart"),InlineCompletionContext:a(()=>t6,"InlineCompletionContext"),InlineCompletionItem:a(()=>QP,"InlineCompletionItem"),InlineCompletionList:a(()=>ZP,"InlineCompletionList"),InlineCompletionTriggerKind:a(()=>JP,"InlineCompletionTriggerKind"),InlineValueContext:a(()=>KP,"InlineValueContext"),InlineValueEvaluatableExpression:a(()=>YP,"InlineValueEvaluatableExpression"),InlineValueText:a(()=>qP,"InlineValueText"),InlineValueVariableLookup:a(()=>HP,"InlineValueVariableLookup"),InsertReplaceEdit:a(()=>TP,"InsertReplaceEdit"),InsertTextFormat:a(()=>xP,"InsertTextFormat"),InsertTextMode:a(()=>CP,"InsertTextMode"),LanguageKind:a(()=>mP,"LanguageKind"),Location:a(()=>ab,"Location"),LocationLink:a(()=>iP,"LocationLink"),MarkedString:a(()=>ub,"MarkedString"),MarkupContent:a(()=>Mh,"MarkupContent"),MarkupKind:a(()=>mv,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:a(()=>cb,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:a(()=>_P,"ParameterInformation"),Position:a(()=>Cn,"Position"),Range:a(()=>jr,"Range"),RenameFile:a(()=>Tg,"RenameFile"),SelectedCompletionInfo:a(()=>e6,"SelectedCompletionInfo"),SelectionRange:a(()=>zP,"SelectionRange"),SemanticTokenModifiers:a(()=>WP,"SemanticTokenModifiers"),SemanticTokenTypes:a(()=>UP,"SemanticTokenTypes"),SemanticTokens:a(()=>jP,"SemanticTokens"),SignatureInformation:a(()=>AP,"SignatureInformation"),SnippetTextEdit:a(()=>dP,"SnippetTextEdit"),StringValue:a(()=>bv,"StringValue"),SymbolInformation:a(()=>NP,"SymbolInformation"),SymbolKind:a(()=>IP,"SymbolKind"),SymbolTag:a(()=>DP,"SymbolTag"),TextDocument:a(()=>n6,"TextDocument"),TextDocumentEdit:a(()=>lb,"TextDocumentEdit"),TextDocumentIdentifier:a(()=>fP,"TextDocumentIdentifier"),TextDocumentItem:a(()=>gP,"TextDocumentItem"),TextEdit:a(()=>Ql,"TextEdit"),URI:a(()=>hv,"URI"),VersionedTextDocumentIdentifier:a(()=>pP,"VersionedTextDocumentIdentifier"),WorkspaceChange:a(()=>rfe,"WorkspaceChange"),WorkspaceEdit:a(()=>pv,"WorkspaceEdit"),WorkspaceFolder:a(()=>r6,"WorkspaceFolder"),WorkspaceSymbol:a(()=>MP,"WorkspaceSymbol"),integer:a(()=>nP,"integer"),uinteger:a(()=>sb,"uinteger")});gw=lqe({"../../node_modules/.pnpm/vscode-languageserver-types@3.18.4/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(r){return typeof r=="string"}a(t,"is"),k(t,"is"),e.is=t})(rP||(rP={})),(function(e){function t(r){return typeof r=="string"}a(t,"is"),k(t,"is"),e.is=t})(hv||(hv={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}a(t,"is"),k(t,"is"),e.is=t})(nP||(nP={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}a(t,"is"),k(t,"is"),e.is=t})(sb||(sb={})),(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=sb.MAX_VALUE),i===Number.MAX_VALUE&&(i=sb.MAX_VALUE),{line:n,character:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&We.uinteger(i.line)&&We.uinteger(i.character)}a(r,"is"),k(r,"is"),e.is=r})(Cn||(Cn={})),(function(e){function t(n,i,s,o){if(We.uinteger(n)&&We.uinteger(i)&&We.uinteger(s)&&We.uinteger(o))return{start:Cn.create(n,i),end:Cn.create(s,o)};if(Cn.is(n)&&Cn.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${s}, ${o}]`)}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&Cn.is(i.start)&&Cn.is(i.end)}a(r,"is"),k(r,"is"),e.is=r})(jr||(jr={})),(function(e){function t(n,i){return{uri:n,range:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&jr.is(i.range)&&(We.string(i.uri)||We.undefined(i.uri))}a(r,"is"),k(r,"is"),e.is=r})(ab||(ab={})),(function(e){function t(n,i,s,o){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&jr.is(i.targetRange)&&We.string(i.targetUri)&&jr.is(i.targetSelectionRange)&&(jr.is(i.originSelectionRange)||We.undefined(i.originSelectionRange))}a(r,"is"),k(r,"is"),e.is=r})(iP||(iP={})),(function(e){function t(n,i,s,o){return{red:n,green:i,blue:s,alpha:o}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&We.numberRange(i.red,0,1)&&We.numberRange(i.green,0,1)&&We.numberRange(i.blue,0,1)&&We.numberRange(i.alpha,0,1)}a(r,"is"),k(r,"is"),e.is=r})(dv||(dv={})),(function(e){function t(n,i){return{range:n,color:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&jr.is(i.range)&&dv.is(i.color)}a(r,"is"),k(r,"is"),e.is=r})(sP||(sP={})),(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&We.string(i.label)&&(We.undefined(i.textEdit)||Ql.is(i))&&(We.undefined(i.additionalTextEdits)||We.typedArray(i.additionalTextEdits,Ql.is))}a(r,"is"),k(r,"is"),e.is=r})(aP||(aP={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(oP||(oP={})),(function(e){function t(n,i,s,o,l,u){let h={startLine:n,endLine:i};return We.defined(s)&&(h.startCharacter=s),We.defined(o)&&(h.endCharacter=o),We.defined(l)&&(h.kind=l),We.defined(u)&&(h.collapsedText=u),h}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&We.uinteger(i.startLine)&&We.uinteger(i.startLine)&&(We.undefined(i.startCharacter)||We.uinteger(i.startCharacter))&&(We.undefined(i.endCharacter)||We.uinteger(i.endCharacter))&&(We.undefined(i.kind)||We.string(i.kind))}a(r,"is"),k(r,"is"),e.is=r})(lP||(lP={})),(function(e){function t(n,i){return{location:n,message:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&ab.is(i.location)&&We.string(i.message)}a(r,"is"),k(r,"is"),e.is=r})(fv||(fv={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(cP||(cP={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(uP||(uP={})),(function(e){function t(r){let n=r;return We.objectLiteral(n)&&We.string(n.href)}a(t,"is"),k(t,"is"),e.is=t})(hP||(hP={})),(function(e){function t(s,o,l,u,h,d){let f={range:s,message:o};return We.defined(l)&&(f.severity=l),We.defined(u)&&(f.code=u),We.defined(h)&&(f.source=h),We.defined(d)&&(f.relatedInformation=d),f}a(t,"create"),k(t,"create"),e.create=t;function r(s){var o;let l=s;return We.defined(l)&&jr.is(l.range)&&(We.string(l.message)||Mh.is(l.message))&&(We.number(l.severity)||We.undefined(l.severity))&&(We.integer(l.code)||We.string(l.code)||We.undefined(l.code))&&(We.undefined(l.codeDescription)||We.string((o=l.codeDescription)===null||o===void 0?void 0:o.href))&&(We.string(l.source)||We.undefined(l.source))&&(We.undefined(l.relatedInformation)||We.typedArray(l.relatedInformation,fv.is))}a(r,"is"),k(r,"is"),e.is=r;function n(s){return We.string(s.message)}a(n,"is3_17"),k(n,"is3_17"),e.is3_17=n;function i(s){if(We.string(s.message))return s.message;if(Mh.is(s.message))return s.message.value;throw new Error(`Unknown message type ${typeof s.message}`)}a(i,"getMessageString"),k(i,"getMessageString"),e.getMessageString=i})(ob||(ob={})),(function(e){function t(n,i,...s){let o={title:n,command:i};return We.defined(s)&&s.length>0&&(o.arguments=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.string(i.title)&&(i.tooltip===void 0||We.string(i.tooltip))&&We.string(i.command)}a(r,"is"),k(r,"is"),e.is=r})(vf||(vf={})),(function(e){function t(s,o){return{range:s,newText:o}}a(t,"replace"),k(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}a(r,"insert"),k(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}a(n,"del"),k(n,"del"),e.del=n;function i(s){let o=s;return We.objectLiteral(o)&&We.string(o.newText)&&jr.is(o.range)}a(i,"is"),k(i,"is"),e.is=i})(Ql||(Ql={})),(function(e){function t(n,i,s){let o={label:n};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&We.string(i.label)&&(We.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(We.string(i.description)||i.description===void 0)}a(r,"is"),k(r,"is"),e.is=r})(Nh||(Nh={})),(function(e){function t(r){let n=r;return We.string(n)}a(t,"is"),k(t,"is"),e.is=t})(hs||(hs={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}a(t,"replace"),k(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}a(r,"insert"),k(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}a(n,"del"),k(n,"del"),e.del=n;function i(s){let o=s;return Ql.is(o)&&(Nh.is(o.annotationId)||hs.is(o.annotationId))}a(i,"is"),k(i,"is"),e.is=i})(Xc||(Xc={})),(function(e){function t(n,i){return{textDocument:n,edits:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&cb.is(i.textDocument)&&Array.isArray(i.edits)}a(r,"is"),k(r,"is"),e.is=r})(lb||(lb={})),(function(e){function t(n,i,s){let o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&We.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||We.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||We.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||hs.is(i.annotationId))}a(r,"is"),k(r,"is"),e.is=r})(bg||(bg={})),(function(e){function t(n,i,s,o){let l={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&We.string(i.oldUri)&&We.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||We.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||We.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||hs.is(i.annotationId))}a(r,"is"),k(r,"is"),e.is=r})(Tg||(Tg={})),(function(e){function t(n,i,s){let o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&We.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||We.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||We.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||hs.is(i.annotationId))}a(r,"is"),k(r,"is"),e.is=r})(Cg||(Cg={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>We.string(i.kind)?bg.is(i)||Tg.is(i)||Cg.is(i):lb.is(i)))}a(t,"is"),k(t,"is"),e.is=t})(pv||(pv={})),Yx=class{static{a(this,"TextEditChangeImpl")}static{k(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,i;if(r===void 0?n=Ql.insert(e,t):hs.is(r)?(i=r,n=Xc.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Xc.insert(e,t,i)),this.edits.push(n),i!==void 0)return i}replace(e,t,r){let n,i;if(r===void 0?n=Ql.replace(e,t):hs.is(r)?(i=r,n=Xc.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Xc.replace(e,t,i)),this.edits.push(n),i!==void 0)return i}delete(e,t){let r,n;if(t===void 0?r=Ql.del(e):hs.is(t)?(n=t,r=Xc.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=Xc.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.")}},(function(e){function t(r){let n=r;return We.objectLiteral(n)&&jr.is(n.range)&&bv.isSnippet(n.snippet)&&(n.annotationId===void 0||Nh.is(n.annotationId)||hs.is(n.annotationId))}a(t,"is"),k(t,"is"),e.is=t})(dP||(dP={})),M5=class{static{a(this,"ChangeAnnotations")}static{k(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(hs.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()}},rfe=class{static{a(this,"WorkspaceChange")}static{k(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new M5(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(lb.is(t)){let r=new Yx(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new Yx(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(cb.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=[],i={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(i),r=new Yx(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 Yx(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new M5,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;Nh.is(t)||hs.is(t)?n=t:r=t;let i,s;if(n===void 0?i=bg.create(e,r):(s=hs.is(n)?n:this._changeAnnotations.manage(n),i=bg.create(e,r,s)),this._workspaceEdit.documentChanges.push(i),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 i;Nh.is(r)||hs.is(r)?i=r:n=r;let s,o;if(i===void 0?s=Tg.create(e,t,n):(o=hs.is(i)?i:this._changeAnnotations.manage(i),s=Tg.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}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;Nh.is(t)||hs.is(t)?n=t:r=t;let i,s;if(n===void 0?i=Cg.create(e,r):(s=hs.is(n)?n:this._changeAnnotations.manage(n),i=Cg.create(e,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.string(i.uri)}a(r,"is"),k(r,"is"),e.is=r})(fP||(fP={})),(function(e){function t(n,i){return{uri:n,version:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.string(i.uri)&&We.integer(i.version)}a(r,"is"),k(r,"is"),e.is=r})(pP||(pP={})),(function(e){function t(n,i){return{uri:n,version:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.string(i.uri)&&(i.version===null||We.integer(i.version))}a(r,"is"),k(r,"is"),e.is=r})(cb||(cb={})),(function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="git-rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Plaintext="plaintext",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"})(mP||(mP={})),(function(e){function t(n,i,s,o){return{uri:n,languageId:i,version:s,text:o}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.string(i.uri)&&We.string(i.languageId)&&We.integer(i.version)&&We.string(i.text)}a(r,"is"),k(r,"is"),e.is=r})(gP||(gP={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}a(t,"is"),k(t,"is"),e.is=t})(mv||(mv={})),(function(e){function t(r){let n=r;return We.objectLiteral(r)&&mv.is(n.kind)&&We.string(n.value)}a(t,"is"),k(t,"is"),e.is=t})(Mh||(Mh={})),(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})(yP||(yP={})),(function(e){e.PlainText=1,e.Snippet=2})(xP||(xP={})),(function(e){e.Deprecated=1})(bP||(bP={})),(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i&&We.string(i.newText)&&jr.is(i.insert)&&jr.is(i.replace)}a(r,"is"),k(r,"is"),e.is=r})(TP||(TP={})),(function(e){e.asIs=1,e.adjustIndentation=2})(CP||(CP={})),(function(e){e.Replace=1,e.Merge=2})(kP||(kP={})),(function(e){function t(r){let n=r;return n&&(We.string(n.detail)||n.detail===void 0)&&(We.string(n.description)||n.description===void 0)}a(t,"is"),k(t,"is"),e.is=t})(SP||(SP={})),(function(e){function t(r){return{label:r}}a(t,"create"),k(t,"create"),e.create=t})(EP||(EP={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}a(t,"create"),k(t,"create"),e.create=t})(vP||(vP={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}a(t,"fromPlainText"),k(t,"fromPlainText"),e.fromPlainText=t;function r(n){let i=n;return We.string(i)||We.objectLiteral(i)&&We.string(i.language)&&We.string(i.value)}a(r,"is"),k(r,"is"),e.is=r})(ub||(ub={})),(function(e){function t(r){let n=r;return!!n&&We.objectLiteral(n)&&(Mh.is(n.contents)||ub.is(n.contents)||We.typedArray(n.contents,ub.is))&&(r.range===void 0||jr.is(r.range))}a(t,"is"),k(t,"is"),e.is=t})(wP||(wP={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}a(t,"create"),k(t,"create"),e.create=t})(_P||(_P={})),(function(e){function t(r,n,...i){let s={label:r};return We.defined(n)&&(s.documentation=n),We.defined(i)?s.parameters=i:s.parameters=[],s}a(t,"create"),k(t,"create"),e.create=t})(AP||(AP={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(RP||(RP={})),(function(e){function t(r,n){let i={range:r};return We.number(n)&&(i.kind=n),i}a(t,"create"),k(t,"create"),e.create=t})(LP||(LP={})),(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})(IP||(IP={})),(function(e){e.Deprecated=1})(DP||(DP={})),(function(e){function t(r,n,i,s,o){let l={name:r,kind:n,location:{uri:s,range:i}};return o&&(l.containerName=o),l}a(t,"create"),k(t,"create"),e.create=t})(NP||(NP={})),(function(e){function t(r,n,i,s){return s!==void 0?{name:r,kind:n,location:{uri:i,range:s}}:{name:r,kind:n,location:{uri:i}}}a(t,"create"),k(t,"create"),e.create=t})(MP||(MP={})),(function(e){function t(n,i,s,o,l,u){let h={name:n,detail:i,kind:s,range:o,selectionRange:l};return u!==void 0&&(h.children=u),h}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i&&We.string(i.name)&&We.number(i.kind)&&jr.is(i.range)&&jr.is(i.selectionRange)&&(i.detail===void 0||We.string(i.detail))&&(i.deprecated===void 0||We.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}a(r,"is"),k(r,"is"),e.is=r})(OP||(OP={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"})(PP||(PP={})),(function(e){e.Invoked=1,e.Automatic=2})(hb||(hb={})),(function(e){function t(n,i,s){let o={diagnostics:n};return i!=null&&(o.only=i),s!=null&&(o.triggerKind=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.typedArray(i.diagnostics,ob.is)&&(i.only===void 0||We.typedArray(i.only,We.string))&&(i.triggerKind===void 0||i.triggerKind===hb.Invoked||i.triggerKind===hb.Automatic)}a(r,"is"),k(r,"is"),e.is=r})(BP||(BP={})),(function(e){e.LLMGenerated=1;function t(r){return We.defined(r)&&r===e.LLMGenerated}a(t,"is"),k(t,"is"),e.is=t})(gv||(gv={})),(function(e){function t(n,i,s){let o={title:n},l=!0;return typeof i=="string"?(l=!1,o.kind=i):vf.is(i)?o.command=i:o.edit=i,l&&s!==void 0&&(o.kind=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i&&We.string(i.title)&&(i.diagnostics===void 0||We.typedArray(i.diagnostics,ob.is))&&(i.kind===void 0||We.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||vf.is(i.command))&&(i.isPreferred===void 0||We.boolean(i.isPreferred))&&(i.edit===void 0||pv.is(i.edit))&&(i.tags===void 0||We.typedArray(i.tags,gv.is))}a(r,"is"),k(r,"is"),e.is=r})($P||($P={})),(function(e){function t(n,i){let s={range:n};return We.defined(i)&&(s.data=i),s}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&jr.is(i.range)&&(We.undefined(i.command)||vf.is(i.command))}a(r,"is"),k(r,"is"),e.is=r})(FP||(FP={})),(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&We.uinteger(i.tabSize)&&We.boolean(i.insertSpaces)}a(r,"is"),k(r,"is"),e.is=r})(GP||(GP={})),(function(e){function t(n,i,s){return{range:n,target:i,data:s}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&jr.is(i.range)&&(We.undefined(i.target)||We.string(i.target))}a(r,"is"),k(r,"is"),e.is=r})(VP||(VP={})),(function(e){function t(n,i){return{range:n,parent:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&jr.is(i.range)&&(i.parent===void 0||e.is(i.parent))}a(r,"is"),k(r,"is"),e.is=r})(zP||(zP={})),(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",e.label="label"})(UP||(UP={})),(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"})(WP||(WP={})),(function(e){function t(r){let n=r;return We.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}a(t,"is"),k(t,"is"),e.is=t})(jP||(jP={})),(function(e){function t(n,i){return{range:n,text:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&jr.is(i.range)&&We.string(i.text)}a(r,"is"),k(r,"is"),e.is=r})(qP||(qP={})),(function(e){function t(n,i,s){return{range:n,variableName:i,caseSensitiveLookup:s}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&jr.is(i.range)&&We.boolean(i.caseSensitiveLookup)&&(We.string(i.variableName)||i.variableName===void 0)}a(r,"is"),k(r,"is"),e.is=r})(HP||(HP={})),(function(e){function t(n,i){return{range:n,expression:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&jr.is(i.range)&&(We.string(i.expression)||i.expression===void 0)}a(r,"is"),k(r,"is"),e.is=r})(YP||(YP={})),(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.defined(i)&&jr.is(n.stoppedLocation)}a(r,"is"),k(r,"is"),e.is=r})(KP||(KP={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}a(t,"is"),k(t,"is"),e.is=t})(yv||(yv={})),(function(e){function t(n){return{value:n}}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&(i.tooltip===void 0||We.string(i.tooltip)||Mh.is(i.tooltip))&&(i.location===void 0||ab.is(i.location))&&(i.command===void 0||vf.is(i.command))}a(r,"is"),k(r,"is"),e.is=r})(xv||(xv={})),(function(e){function t(n,i,s){let o={position:n,label:i};return s!==void 0&&(o.kind=s),o}a(t,"create"),k(t,"create"),e.create=t;function r(n){let i=n;return We.objectLiteral(i)&&Cn.is(i.position)&&(We.string(i.label)||We.typedArray(i.label,xv.is))&&(i.kind===void 0||yv.is(i.kind))&&i.textEdits===void 0||We.typedArray(i.textEdits,Ql.is)&&(i.tooltip===void 0||We.string(i.tooltip)||Mh.is(i.tooltip))&&(i.paddingLeft===void 0||We.boolean(i.paddingLeft))&&(i.paddingRight===void 0||We.boolean(i.paddingRight))}a(r,"is"),k(r,"is"),e.is=r})(XP||(XP={})),(function(e){function t(n){return{kind:"snippet",value:n}}a(t,"createSnippet"),k(t,"createSnippet"),e.createSnippet=t;function r(n){let i=n;return We.objectLiteral(i)&&i.kind==="snippet"&&We.string(i.value)}a(r,"isSnippet"),k(r,"isSnippet"),e.isSnippet=r})(bv||(bv={})),(function(e){function t(r,n,i,s){return{insertText:r,filterText:n,range:i,command:s}}a(t,"create"),k(t,"create"),e.create=t})(QP||(QP={})),(function(e){function t(r){return{items:r}}a(t,"create"),k(t,"create"),e.create=t})(ZP||(ZP={})),(function(e){e.Invoked=1,e.Automatic=2})(JP||(JP={})),(function(e){function t(r,n){return{range:r,text:n}}a(t,"create"),k(t,"create"),e.create=t})(e6||(e6={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}a(t,"create"),k(t,"create"),e.create=t})(t6||(t6={})),(function(e){function t(r){let n=r;return We.objectLiteral(n)&&hv.is(n.uri)&&We.string(n.name)}a(t,"is"),k(t,"is"),e.is=t})(r6||(r6={})),nfe=[` +`,`\r +`,"\r"],(function(e){function t(s,o,l,u){return new Rhe(s,o,l,u)}a(t,"create"),k(t,"create"),e.create=t;function r(s){let o=s;return!!(We.defined(o)&&We.string(o.uri)&&(We.undefined(o.languageId)||We.string(o.languageId))&&We.uinteger(o.lineCount)&&We.func(o.getText)&&We.func(o.positionAt)&&We.func(o.offsetAt))}a(r,"is"),k(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=i(o,(d,f)=>{let p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p}),h=l.length;for(let d=u.length-1;d>=0;d--){let f=u[d],p=s.offsetAt(f.range.start),m=s.offsetAt(f.range.end);if(m<=h)l=l.substring(0,p)+f.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p}return l}a(n,"applyEdits"),k(n,"applyEdits"),e.applyEdits=n;function i(s,o){if(s.length<=1)return s;let l=s.length/2|0,u=s.slice(0,l),h=s.slice(l);i(u,o),i(h,o);let d=0,f=0,p=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 Cn.create(0,e);for(;re?n=s:r=s+1}let i=r-1;return Cn.create(i,e-t[i])}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"}a(n,"undefined2"),k(n,"undefined"),e.undefined=n;function i(m){return m===!0||m===!1}a(i,"boolean"),k(i,"boolean"),e.boolean=i;function s(m){return t.call(m)==="[object String]"}a(s,"string"),k(s,"string"),e.string=s;function o(m){return t.call(m)==="[object Number]"}a(o,"number"),k(o,"number"),e.number=o;function l(m,g,y){return t.call(m)==="[object Number]"&&g<=m&&m<=y}a(l,"numberRange"),k(l,"numberRange"),e.numberRange=l;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}a(u,"integer2"),k(u,"integer"),e.integer=u;function h(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}a(h,"uinteger2"),k(h,"uinteger"),e.uinteger=h;function d(m){return t.call(m)==="[object Function]"}a(d,"func"),k(d,"func"),e.func=d;function f(m){return m!==null&&typeof m=="object"}a(f,"objectLiteral"),k(f,"objectLiteral"),e.objectLiteral=f;function p(m,g){return Array.isArray(m)&&m.every(g)}a(p,"typedArray"),k(p,"typedArray"),e.typedArray=p})(We||(We={}))}}),Hn=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CM=e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=qb(),r;(function(h){h.clientToServer="clientToServer",h.serverToClient="serverToClient",h.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{a(this,"RegistrationType")}static{k(this,"RegistrationType")}____;method;constructor(h){this.method=h}};e.RegistrationType=n;var i=class extends t.RequestType0{static{a(this,"ProtocolRequestType0")}static{k(this,"ProtocolRequestType0")}__;___;____;_pr;constructor(h){super(h)}};e.ProtocolRequestType0=i;var s=class extends t.RequestType{static{a(this,"ProtocolRequestType")}static{k(this,"ProtocolRequestType")}__;___;____;_pr;constructor(h){super(h,t.ParameterStructures.byName)}};e.ProtocolRequestType=s;var o=class extends t.NotificationType0{static{a(this,"ProtocolNotificationType0")}static{k(this,"ProtocolNotificationType0")}___;____;constructor(h){super(h)}};e.ProtocolNotificationType0=o;var l=class extends t.NotificationType{static{a(this,"ProtocolNotificationType")}static{k(this,"ProtocolNotificationType")}___;____;constructor(h){super(h,t.ParameterStructures.byName)}};e.ProtocolNotificationType=l;var u;(function(h){function d(f,p){return{client:f,server:p}}a(d,"create"),k(d,"create"),h.create=d})(u||(e.CM=u={}))}}),YB=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boolean=t,e.string=r,e.number=n,e.error=i,e.func=s,e.array=o,e.stringArray=l,e.typedArray=u,e.objectLiteral=h;function t(d){return d===!0||d===!1}a(t,"boolean"),k(t,"boolean");function r(d){return typeof d=="string"||d instanceof String}a(r,"string"),k(r,"string");function n(d){return typeof d=="number"||d instanceof Number}a(n,"number"),k(n,"number");function i(d){return d instanceof Error}a(i,"error"),k(i,"error");function s(d){return typeof d=="function"}a(s,"func"),k(s,"func");function o(d){return Array.isArray(d)}a(o,"array"),k(o,"array");function l(d){return o(d)&&d.every(f=>r(f))}a(l,"stringArray"),k(l,"stringArray");function u(d,f){return Array.isArray(d)&&d.every(f)}a(u,"typedArray"),k(u,"typedArray");function h(d){return d!==null&&typeof d=="object"}a(h,"objectLiteral"),k(h,"objectLiteral")}}),gqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("textDocument.implementation","implementationProvider")})(r||(e.ImplementationRequest=r={}))}}),yqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("textDocument.typeDefinition","typeDefinitionProvider")})(r||(e.TypeDefinitionRequest=r={}))}}),xqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(i){i.method="workspace/workspaceFolders",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method),i.capabilities=t.CM.create("workspace.workspaceFolders","workspace.workspaceFolders")})(r||(e.WorkspaceFoldersRequest=r={}));var n;(function(i){i.method="workspace/didChangeWorkspaceFolders",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolNotificationType(i.method),i.capabilities=t.CM.create(void 0,"workspace.workspaceFolders.changeNotifications")})(n||(e.DidChangeWorkspaceFoldersNotification=n={}))}}),bqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("workspace.configuration",void 0)})(r||(e.ConfigurationRequest=r={}))}}),Tqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(i){i.method="textDocument/documentColor",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method),i.capabilities=t.CM.create("textDocument.colorProvider","colorProvider")})(r||(e.DocumentColorRequest=r={}));var n;(function(i){i.method="textDocument/colorPresentation",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method),i.capabilities=t.CM.create("textDocument.colorProvider","colorProvider")})(n||(e.ColorPresentationRequest=n={}))}}),Cqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(i){i.method="textDocument/foldingRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method),i.capabilities=t.CM.create("textDocument.foldingRange","foldingRangeProvider")})(r||(e.FoldingRangeRequest=r={}));var n;(function(i){i.method="workspace/foldingRange/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method),i.capabilities=t.CM.create("workspace.foldingRange.refreshSupport",void 0)})(n||(e.FoldingRangeRefreshRequest=n={}))}}),kqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("textDocument.declaration","declarationProvider")})(r||(e.DeclarationRequest=r={}))}}),Sqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("textDocument.selectionRange","selectionRangeProvider")})(r||(e.SelectionRangeRequest=r={}))}}),Eqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=qb(),r=Hn(),n;(function(o){o.type=new t.ProgressType;function l(u){return u===o.type}a(l,"is"),k(l,"is"),o.is=l})(n||(e.WorkDoneProgress=n={}));var i;(function(o){o.method="window/workDoneProgress/create",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType(o.method),o.capabilities=r.CM.create("window.workDoneProgress",void 0)})(i||(e.WorkDoneProgressCreateRequest=i={}));var s;(function(o){o.method="window/workDoneProgress/cancel",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method)})(s||(e.WorkDoneProgressCancelNotification=s={}))}}),vqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(s){s.method="textDocument/prepareCallHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(r||(e.CallHierarchyPrepareRequest=r={}));var n;(function(s){s.method="callHierarchy/incomingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(n||(e.CallHierarchyIncomingCallsRequest=n={}));var i;(function(s){s.method="callHierarchy/outgoingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.callHierarchy","callHierarchyProvider")})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),wqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(u){u.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(u){u.method="textDocument/semanticTokens",u.type=new t.RegistrationType(u.method)})(n||(e.SemanticTokensRegistrationType=n={}));var i;(function(u){u.method="textDocument/semanticTokens/full",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method,u.capabilities=t.CM.create("textDocument.semanticTokens","semanticTokensProvider")})(i||(e.SemanticTokensRequest=i={}));var s;(function(u){u.method="textDocument/semanticTokens/full/delta",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method,u.capabilities=t.CM.create("textDocument.semanticTokens.requests.full.delta","semanticTokensProvider.full.delta")})(s||(e.SemanticTokensDeltaRequest=s={}));var o;(function(u){u.method="textDocument/semanticTokens/range",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method,u.capabilities=t.CM.create("textDocument.semanticTokens.requests.range","semanticTokensProvider.range")})(o||(e.SemanticTokensRangeRequest=o={}));var l;(function(u){u.method="workspace/semanticTokens/refresh",u.messageDirection=t.MessageDirection.serverToClient,u.type=new t.ProtocolRequestType0(u.method),u.capabilities=t.CM.create("workspace.semanticTokens.refreshSupport",void 0)})(l||(e.SemanticTokensRefreshRequest=l={}))}}),_qe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("window.showDocument.support",void 0)})(r||(e.ShowDocumentRequest=r={}))}}),Aqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method),n.capabilities=t.CM.create("textDocument.linkedEditingRange","linkedEditingRangeProvider")})(r||(e.LinkedEditingRangeRequest=r={}))}}),Rqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(h){h.file="file",h.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(h){h.method="workspace/willCreateFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method),h.capabilities=t.CM.create("workspace.fileOperations.willCreate","workspace.fileOperations.willCreate")})(n||(e.WillCreateFilesRequest=n={}));var i;(function(h){h.method="workspace/didCreateFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method),h.capabilities=t.CM.create("workspace.fileOperations.didCreate","workspace.fileOperations.didCreate")})(i||(e.DidCreateFilesNotification=i={}));var s;(function(h){h.method="workspace/willRenameFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method),h.capabilities=t.CM.create("workspace.fileOperations.willRename","workspace.fileOperations.willRename")})(s||(e.WillRenameFilesRequest=s={}));var o;(function(h){h.method="workspace/didRenameFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method),h.capabilities=t.CM.create("workspace.fileOperations.didRename","workspace.fileOperations.didRename")})(o||(e.DidRenameFilesNotification=o={}));var l;(function(h){h.method="workspace/didDeleteFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method),h.capabilities=t.CM.create("workspace.fileOperations.didDelete","workspace.fileOperations.didDelete")})(l||(e.DidDeleteFilesNotification=l={}));var u;(function(h){h.method="workspace/willDeleteFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method),h.capabilities=t.CM.create("workspace.fileOperations.willDelete","workspace.fileOperations.willDelete")})(u||(e.WillDeleteFilesRequest=u={}))}}),Lqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),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 i;(function(s){s.method="textDocument/moniker",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.moniker","monikerProvider")})(i||(e.MonikerRequest=i={}))}}),Iqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(s){s.method="textDocument/prepareTypeHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.typeHierarchy","typeHierarchyProvider")})(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 i;(function(s){s.method="typeHierarchy/subtypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Dqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(i){i.method="textDocument/inlineValue",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method),i.capabilities=t.CM.create("textDocument.inlineValue","inlineValueProvider")})(r||(e.InlineValueRequest=r={}));var n;(function(i){i.method="workspace/inlineValue/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method),i.capabilities=t.CM.create("workspace.inlineValue.refreshSupport",void 0)})(n||(e.InlineValueRefreshRequest=n={}))}}),Nqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/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=Hn(),r;(function(s){s.method="textDocument/inlayHint",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.inlayHint","inlayHintProvider")})(r||(e.InlayHintRequest=r={}));var n;(function(s){s.method="inlayHint/resolve",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method),s.capabilities=t.CM.create("textDocument.inlayHint.resolveSupport","inlayHintProvider.resolveProvider")})(n||(e.InlayHintResolveRequest=n={}));var i;(function(s){s.method="workspace/inlayHint/refresh",s.messageDirection=t.MessageDirection.serverToClient,s.type=new t.ProtocolRequestType0(s.method),s.capabilities=t.CM.create("workspace.inlayHint.refreshSupport",void 0)})(i||(e.InlayHintRefreshRequest=i={}))}}),Mqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(p,m,g,y){y===void 0&&(y=g);var x=Object.getOwnPropertyDescriptor(m,g);(!x||("get"in x?!m.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:k(function(){return m[g]},"get")}),Object.defineProperty(p,y,x)}):(function(p,m,g,y){y===void 0&&(y=g),p[y]=m[g]})),r=e&&e.__setModuleDefault||(Object.create?(function(p,m){Object.defineProperty(p,"default",{enumerable:!0,value:m})}):function(p,m){p.default=m}),n=e&&e.__importStar||(function(){var p=k(function(m){return p=Object.getOwnPropertyNames||function(g){var y=[];for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(y[y.length]=x);return y},p(m)},"ownKeys");return function(m){if(m&&m.__esModule)return m;var g={};if(m!=null)for(var y=p(m),x=0;x0}a(xt,"hasId"),k(xt,"hasId"),ie.hasId=xt})(j||(e.StaticRegistrationOptions=j={}));var K;(function(ie){function xt(kt){let de=kt;return de&&(de.documentSelector===null||D.is(de.documentSelector))}a(xt,"is"),k(xt,"is"),ie.is=xt})(K||(e.TextDocumentRegistrationOptions=K={}));var Z;(function(ie){function xt(de){let Ne=de;return o.objectLiteral(Ne)&&(Ne.workDoneProgress===void 0||o.boolean(Ne.workDoneProgress))}a(xt,"is"),k(xt,"is"),ie.is=xt;function kt(de){let Ne=de;return Ne&&o.boolean(Ne.workDoneProgress)}a(kt,"hasWorkDoneProgress"),k(kt,"hasWorkDoneProgress"),ie.hasWorkDoneProgress=kt})(Z||(e.WorkDoneProgressOptions=Z={}));var ce;(function(ie){ie.method="initialize",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method)})(ce||(e.InitializeRequest=ce={}));var te;(function(ie){ie.unknownProtocolVersion=1})(te||(e.InitializeErrorCodes=te={}));var me;(function(ie){ie.method="initialized",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method)})(me||(e.InitializedNotification=me={}));var he;(function(ie){ie.method="shutdown",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType0(ie.method)})(he||(e.ShutdownRequest=he={}));var we;(function(ie){ie.method="exit",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType0(ie.method)})(we||(e.ExitNotification=we={}));var ye;(function(ie){ie.method="workspace/didChangeConfiguration",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("workspace.didChangeConfiguration",void 0)})(ye||(e.DidChangeConfigurationNotification=ye={}));var ke;(function(ie){ie.Error=1,ie.Warning=2,ie.Info=3,ie.Log=4,ie.Debug=5})(ke||(e.MessageType=ke={}));var Fe;(function(ie){ie.method="window/showMessage",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("window.showMessage",void 0)})(Fe||(e.ShowMessageNotification=Fe={}));var Ge;(function(ie){ie.method="window/showMessageRequest",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("window.showMessage",void 0)})(Ge||(e.ShowMessageRequest=Ge={}));var Me;(function(ie){ie.method="window/logMessage",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolNotificationType(ie.method)})(Me||(e.LogMessageNotification=Me={}));var at;(function(ie){ie.method="telemetry/event",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolNotificationType(ie.method)})(at||(e.TelemetryEventNotification=at={}));var ht;(function(ie){ie.None=0,ie.Full=1,ie.Incremental=2})(ht||(e.TextDocumentSyncKind=ht={}));var ge;(function(ie){ie.method="textDocument/didOpen",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(ge||(e.DidOpenTextDocumentNotification=ge={}));var De;(function(ie){function xt(de){let Ne=de;return Ne!=null&&typeof Ne.text=="string"&&Ne.range!==void 0&&(Ne.rangeLength===void 0||typeof Ne.rangeLength=="number")}a(xt,"isIncremental"),k(xt,"isIncremental"),ie.isIncremental=xt;function kt(de){let Ne=de;return Ne!=null&&typeof Ne.text=="string"&&Ne.range===void 0&&Ne.rangeLength===void 0}a(kt,"isFull"),k(kt,"isFull"),ie.isFull=kt})(De||(e.TextDocumentContentChangeEvent=De={}));var Le;(function(ie){ie.method="textDocument/didChange",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("textDocument.synchronization","textDocumentSync")})(Le||(e.DidChangeTextDocumentNotification=Le={}));var Ie;(function(ie){ie.method="textDocument/didClose",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("textDocument.synchronization","textDocumentSync.openClose")})(Ie||(e.DidCloseTextDocumentNotification=Ie={}));var Q;(function(ie){ie.method="textDocument/didSave",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("textDocument.synchronization.didSave","textDocumentSync.save")})(Q||(e.DidSaveTextDocumentNotification=Q={}));var ne;(function(ie){ie.Manual=1,ie.AfterDelay=2,ie.FocusOut=3})(ne||(e.TextDocumentSaveReason=ne={}));var re;(function(ie){ie.method="textDocument/willSave",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("textDocument.synchronization.willSave","textDocumentSync.willSave")})(re||(e.WillSaveTextDocumentNotification=re={}));var se;(function(ie){ie.method="textDocument/willSaveWaitUntil",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.synchronization.willSaveWaitUntil","textDocumentSync.willSaveWaitUntil")})(se||(e.WillSaveTextDocumentWaitUntilRequest=se={}));var fe;(function(ie){ie.method="workspace/didChangeWatchedFiles",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("workspace.didChangeWatchedFiles",void 0)})(fe||(e.DidChangeWatchedFilesNotification=fe={}));var J;(function(ie){ie.Created=1,ie.Changed=2,ie.Deleted=3})(J||(e.FileChangeType=J={}));var L;(function(ie){function xt(kt){let de=kt;return o.objectLiteral(de)&&(s.URI.is(de.baseUri)||s.WorkspaceFolder.is(de.baseUri))&&o.string(de.pattern)}a(xt,"is"),k(xt,"is"),ie.is=xt})(L||(e.RelativePattern=L={}));var W;(function(ie){function xt(kt){let de=kt;return o.string(de)||L.is(de)}a(xt,"is"),k(xt,"is"),ie.is=xt})(W||(e.GlobPattern=W={}));var ae;(function(ie){ie.Create=1,ie.Change=2,ie.Delete=4})(ae||(e.WatchKind=ae={}));var X;(function(ie){ie.method="textDocument/publishDiagnostics",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolNotificationType(ie.method),ie.capabilities=i.CM.create("textDocument.publishDiagnostics",void 0)})(X||(e.PublishDiagnosticsNotification=X={}));var xe;(function(ie){ie.Invoked=1,ie.TriggerCharacter=2,ie.TriggerForIncompleteCompletions=3})(xe||(e.CompletionTriggerKind=xe={}));var ee;(function(ie){ie.method="textDocument/completion",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.completion","completionProvider")})(ee||(e.CompletionRequest=ee={}));var Y;(function(ie){ie.method="completionItem/resolve",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.completion.completionItem.resolveSupport","completionProvider.resolveProvider")})(Y||(e.CompletionResolveRequest=Y={}));var q;(function(ie){ie.method="textDocument/hover",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.hover","hoverProvider")})(q||(e.HoverRequest=q={}));var ve;(function(ie){ie.Invoked=1,ie.TriggerCharacter=2,ie.ContentChange=3})(ve||(e.SignatureHelpTriggerKind=ve={}));var Se;(function(ie){ie.method="textDocument/signatureHelp",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.signatureHelp","signatureHelpProvider")})(Se||(e.SignatureHelpRequest=Se={}));var Ae;(function(ie){ie.method="textDocument/definition",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.definition","definitionProvider")})(Ae||(e.DefinitionRequest=Ae={}));var Ee;(function(ie){ie.method="textDocument/references",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.references","referencesProvider")})(Ee||(e.ReferencesRequest=Ee={}));var Qe;(function(ie){ie.method="textDocument/documentHighlight",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.documentHighlight","documentHighlightProvider")})(Qe||(e.DocumentHighlightRequest=Qe={}));var qe;(function(ie){ie.method="textDocument/documentSymbol",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.documentSymbol","documentSymbolProvider")})(qe||(e.DocumentSymbolRequest=qe={}));var lt;(function(ie){ie.method="textDocument/codeAction",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.codeAction","codeActionProvider")})(lt||(e.CodeActionRequest=lt={}));var Ve;(function(ie){ie.method="codeAction/resolve",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.codeAction.resolveSupport","codeActionProvider.resolveProvider")})(Ve||(e.CodeActionResolveRequest=Ve={}));var Ye;(function(ie){ie.method="workspace/symbol",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("workspace.symbol","workspaceSymbolProvider")})(Ye||(e.WorkspaceSymbolRequest=Ye={}));var Je;(function(ie){ie.method="workspaceSymbol/resolve",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("workspace.symbol.resolveSupport","workspaceSymbolProvider.resolveProvider")})(Je||(e.WorkspaceSymbolResolveRequest=Je={}));var Oe;(function(ie){ie.method="textDocument/codeLens",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.codeLens","codeLensProvider")})(Oe||(e.CodeLensRequest=Oe={}));var Vt;(function(ie){ie.method="codeLens/resolve",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.codeLens.resolveSupport","codeLensProvider.resolveProvider")})(Vt||(e.CodeLensResolveRequest=Vt={}));var Ce;(function(ie){ie.method="workspace/codeLens/refresh",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolRequestType0(ie.method),ie.capabilities=i.CM.create("workspace.codeLens",void 0)})(Ce||(e.CodeLensRefreshRequest=Ce={}));var Ut;(function(ie){ie.method="textDocument/documentLink",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.documentLink","documentLinkProvider")})(Ut||(e.DocumentLinkRequest=Ut={}));var Re;(function(ie){ie.method="documentLink/resolve",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.documentLink","documentLinkProvider.resolveProvider")})(Re||(e.DocumentLinkResolveRequest=Re={}));var vt;(function(ie){ie.method="textDocument/formatting",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.formatting","documentFormattingProvider")})(vt||(e.DocumentFormattingRequest=vt={}));var Zt;(function(ie){ie.method="textDocument/rangeFormatting",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.rangeFormatting","documentRangeFormattingProvider")})(Zt||(e.DocumentRangeFormattingRequest=Zt={}));var _t;(function(ie){ie.method="textDocument/rangesFormatting",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.rangeFormatting.rangesSupport","documentRangeFormattingProvider.rangesSupport")})(_t||(e.DocumentRangesFormattingRequest=_t={}));var qt;(function(ie){ie.method="textDocument/onTypeFormatting",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.onTypeFormatting","documentOnTypeFormattingProvider")})(qt||(e.DocumentOnTypeFormattingRequest=qt={}));var At;(function(ie){ie.Identifier=1})(At||(e.PrepareSupportDefaultBehavior=At={}));var zt;(function(ie){ie.method="textDocument/rename",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.rename","renameProvider")})(zt||(e.RenameRequest=zt={}));var ot;(function(ie){ie.method="textDocument/prepareRename",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("textDocument.rename.prepareSupport","renameProvider.prepareProvider")})(ot||(e.PrepareRenameRequest=ot={}));var Rt;(function(ie){ie.method="workspace/executeCommand",ie.messageDirection=i.MessageDirection.clientToServer,ie.type=new i.ProtocolRequestType(ie.method),ie.capabilities=i.CM.create("workspace.executeCommand","executeCommandProvider")})(Rt||(e.ExecuteCommandRequest=Rt={}));var Ar;(function(ie){ie.method="workspace/applyEdit",ie.messageDirection=i.MessageDirection.serverToClient,ie.type=new i.ProtocolRequestType("workspace/applyEdit"),ie.capabilities=i.CM.create("workspace.applyEdit",void 0)})(Ar||(e.ApplyWorkspaceEditRequest=Ar={}))}}),Fqe=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=r;var t=qb();function r(n,i,s,o){return t.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,t.createMessageConnection)(n,i,s,o)}a(r,"createProtocolConnection"),k(r,"createProtocolConnection")}}),KB=Pr({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.18.4/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(s,o,l,u){u===void 0&&(u=l);var h=Object.getOwnPropertyDescriptor(o,l);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:k(function(){return o[l]},"get")}),Object.defineProperty(s,u,h)}):(function(s,o,l,u){u===void 0&&(u=l),s[u]=o[l]})),r=e&&e.__exportStar||function(s,o){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l)&&t(o,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(qb(),e),r((gw(),qB(mw)),e),r(Hn(),e),r($qe(),e);var n=Fqe();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:k(function(){return n.createProtocolConnection},"get")});var i;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}});a(fs,"isAstNode");k(fs,"isAstNode");a(So,"isReference");k(So,"isReference");a(nu,"isMultiReference");k(nu,"isMultiReference");a(ife,"isAstNodeDescription");k(ife,"isAstNodeDescription");a(Og,"isLinkingError");k(Og,"isLinkingError");sfe=class{static{a(this,"AbstractAstReflection")}static{k(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 fs(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 i=this.types[e],s=i?i.superTypes.some(o=>this.isSubtype(o,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 i of r)this.isSubtype(i,e)&&n.push(i);return this.allSubtypes[e]=n,n}}isComplete(e){let t=this.getTypeMetaData(e.$type);for(let r of Object.keys(t.properties)){let n=t.properties[r];if(n.optional)continue;let i=e[n.name];if(i==null)return!1}return!0}};a(zg,"isCompositeCstNode");k(zg,"isCompositeCstNode");a(XB,"isLeafCstNode");k(XB,"isLeafCstNode");a(QB,"isRootCstNode");k(QB,"isRootCstNode");zh=class Qc{static{a(this,"_StreamImpl")}static{k(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:k(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),r=0,n=t.next();for(;!n.done;)r++,n=t.next();return r}toArray(){let t=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){let n=this.map(i=>[t?t(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(t){return new Qc(()=>({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 qa})}join(t=","){let r=this.iterator(),n="",i,s=!1;do i=r.next(),i.done||(s&&(n+=t),n+=afe(i.value)),s=!0;while(!i.done);return n}indexOf(t,r=0){let n=this.iterator(),i=0,s=n.next();for(;!s.done;){if(i>=r&&s.value===t)return i;s=n.next(),i++}return-1}every(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(!t(n.value))return!1;n=r.next()}return!0}some(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)t(i.value,n),i=r.next(),n++}map(t){return new Qc(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?qa:{done:!1,value:t(i)}})}filter(t){return new Qc(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return qa})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let n=this.iterator(),i=r,s=n.next();for(;!s.done;)i===void 0?i=s.value:i=t(i,s.value),s=n.next();return i}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let i=t.next();if(i.done)return n;let s=this.recursiveReduce(t,r,n);return s===void 0?i.value:r(s,i.value)}find(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return n.value;n=r.next()}}findIndex(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(t(i.value))return n;i=r.next(),n++}return-1}includes(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new Qc(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let s=r.iterator.next();if(s.done)r.iterator=void 0;else return s}let{done:n,value:i}=this.nextFn(r.this);if(!n){let s=t(i);if(Rb(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return qa})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new Qc(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}let{done:i,value:s}=r.nextFn(n.this);if(!i)if(Rb(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return qa})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new Qc(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?qa:this.nextFn(r.state)))}distinct(t){return new Qc(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=t?t(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return qa})}exclude(t,r){let n=new Set;for(let i of t){let s=r?r(i):i;n.add(s)}return this.filter(i=>{let s=r?r(i):i;return!n.has(s)})}};a(afe,"toString");k(afe,"toString");a(Rb,"isIterable");k(Rb,"isIterable");ofe=new zh(()=>{},()=>qa),qa=Object.freeze({done:!0,value:void 0});a(qn,"stream");k(qn,"stream");Yv=class extends zh{static{a(this,"TreeStreamImpl")}static{k(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({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 qa})}iterator(){let e={state:this.startFn(),next:k(()=>this.nextFn(e.state),"next"),prune:k(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(e){function t(s){return s.reduce((o,l)=>o+l,0)}a(t,"sum"),k(t,"sum"),e.sum=t;function r(s){return s.reduce((o,l)=>o*l,0)}a(r,"product"),k(r,"product"),e.product=r;function n(s){return s.reduce((o,l)=>Math.min(o,l))}a(n,"min2"),k(n,"min"),e.min=n;function i(s){return s.reduce((o,l)=>Math.max(o,l))}a(i,"max"),k(i,"max"),e.max=i})(i6||(i6={}));a(Kv,"linkContentToContainer");k(Kv,"linkContentToContainer");a(Hb,"getContainerOfType");k(Hb,"getContainerOfType");a(tc,"getDocument");k(tc,"getDocument");a(Cb,"findRootNode");k(Cb,"findRootNode");a(s6,"getReferenceNodes");k(s6,"getReferenceNodes");a(yw,"streamContents");k(yw,"streamContents");a(Hg,"streamAllContents");k(Hg,"streamAllContents");a(rc,"streamAst");k(rc,"streamAst");a(Xv,"isAstNodeInRange");k(Xv,"isAstNodeInRange");a(Lb,"streamReferences");k(Lb,"streamReferences");a(lfe,"assignMandatoryProperties");k(lfe,"assignMandatoryProperties");a(ZB,"copyDefaultValue");k(ZB,"copyDefaultValue");ja={$type:"AbstractElement",cardinality:"cardinality"};a(cfe,"isAbstractElement");k(cfe,"isAbstractElement");Tv={$type:"AbstractParserRule"};a(Yg,"isAbstractParserRule");k(Yg,"isAbstractParserRule");jE={$type:"AbstractRule"},ol={$type:"AbstractType"},wf={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};a(Yb,"isAction");k(Yb,"isAction");Cv={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};a(JB,"isAlternatives");k(JB,"isAlternatives");Lhe={$type:"ArrayLiteral",elements:"elements"},Ihe={$type:"ArrayType",elementType:"elementType"},_f={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};a(Uh,"isAssignment");k(Uh,"isAssignment");a6={$type:"BooleanLiteral",true:"true"};a(ufe,"isBooleanLiteral");k(ufe,"isBooleanLiteral");Af={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};a(hfe,"isCharacterRange");k(hfe,"isCharacterRange");mg={$type:"Condition"},kv={$type:"Conjunction",left:"left",right:"right"};a(dfe,"isConjunction");k(dfe,"isConjunction");Rf={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};a(Kb,"isCrossReference");k(Kb,"isCrossReference");Sv={$type:"Disjunction",left:"left",right:"right"};a(ffe,"isDisjunction");k(ffe,"isDisjunction");o6={$type:"EndOfFile",cardinality:"cardinality"};a(pfe,"isEndOfFile");k(pfe,"isEndOfFile");Cf={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dhe={$type:"GrammarImport",path:"path"},kg={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};a(xw,"isGroup");k(xw,"isGroup");l6={$type:"InferredType",name:"name"};a(e$,"isInferredType");k(e$,"isInferredType");Zc={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};a(Ib,"isInfixRule");k(Ib,"isInfixRule");O5={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Nhe={$type:"InfixRuleOperators",precedences:"precedences"},db={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};a(mfe,"isInterface");k(mfe,"isInterface");fb={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};a(Wh,"isKeyword");k(Wh,"isKeyword");qE={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},Sg={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};a(gfe,"isNegatedToken");k(gfe,"isNegatedToken");c6={$type:"Negation",value:"value"};a(yfe,"isNegation");k(yfe,"isNegation");Mhe={$type:"NumberLiteral",value:"value"},HE={$type:"Parameter",name:"name"},u6={$type:"ParameterReference",parameter:"parameter"};a(xfe,"isParameterReference");k(xfe,"isParameterReference");Zl={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};a(sc,"isParserRule");k(sc,"isParserRule");P5={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Eg={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};a(bfe,"isRegexToken");k(bfe,"isRegexToken");h6={$type:"ReturnType",name:"name"};a(Tfe,"isReturnType");k(Tfe,"isReturnType");vg={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};a(jh,"isRuleCall");k(jh,"isRuleCall");pb={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};a(Cfe,"isSimpleType");k(Cfe,"isSimpleType");Ohe={$type:"StringLiteral",value:"value"},wg={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};a(kfe,"isTerminalAlternatives");k(kfe,"isTerminalAlternatives");ko={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},_g={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};a(Sfe,"isTerminalGroup");k(Sfe,"isTerminalGroup");Oh={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};a(ac,"isTerminalRule");k(ac,"isTerminalRule");Ag={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};a(t$,"isTerminalRuleCall");k(t$,"isTerminalRuleCall");Ev={$type:"Type",name:"name",type:"type"};a(Efe,"isType");k(Efe,"isType");Kx={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Xx={$type:"TypeDefinition"},Phe={$type:"UnionType",types:"types"},vv={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};a(r$,"isUnorderedGroup");k(r$,"isUnorderedGroup");Rg={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};a(vfe,"isUntilToken");k(vfe,"isUntilToken");Qx={$type:"ValueLiteral"},mb={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};a(wfe,"isWildcard");k(wfe,"isWildcard");_fe=class extends sfe{static{a(this,"LangiumGrammarAstReflection")}static{k(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:ja.$type,properties:{cardinality:{name:ja.cardinality,optional:!0}},superTypes:[]},AbstractParserRule:{name:Tv.$type,properties:{},superTypes:[jE.$type,ol.$type]},AbstractRule:{name:jE.$type,properties:{},superTypes:[]},AbstractType:{name:ol.$type,properties:{},superTypes:[]},Action:{name:wf.$type,properties:{cardinality:{name:wf.cardinality,optional:!0},feature:{name:wf.feature,optional:!0},inferredType:{name:wf.inferredType,optional:!0},operator:{name:wf.operator,optional:!0},type:{name:wf.type,referenceType:ol.$type,optional:!0}},superTypes:[ja.$type]},Alternatives:{name:Cv.$type,properties:{cardinality:{name:Cv.cardinality,optional:!0},elements:{name:Cv.elements,defaultValue:[]}},superTypes:[ja.$type]},ArrayLiteral:{name:Lhe.$type,properties:{elements:{name:Lhe.elements,defaultValue:[]}},superTypes:[Qx.$type]},ArrayType:{name:Ihe.$type,properties:{elementType:{name:Ihe.elementType}},superTypes:[Xx.$type]},Assignment:{name:_f.$type,properties:{cardinality:{name:_f.cardinality,optional:!0},feature:{name:_f.feature},operator:{name:_f.operator},predicate:{name:_f.predicate,optional:!0},terminal:{name:_f.terminal}},superTypes:[ja.$type]},BooleanLiteral:{name:a6.$type,properties:{true:{name:a6.true,defaultValue:!1}},superTypes:[mg.$type,Qx.$type]},CharacterRange:{name:Af.$type,properties:{cardinality:{name:Af.cardinality,optional:!0},left:{name:Af.left},lookahead:{name:Af.lookahead,optional:!0},parenthesized:{name:Af.parenthesized,defaultValue:!1,optional:!0},right:{name:Af.right,optional:!0}},superTypes:[ko.$type]},Condition:{name:mg.$type,properties:{},superTypes:[]},Conjunction:{name:kv.$type,properties:{left:{name:kv.left},right:{name:kv.right}},superTypes:[mg.$type]},CrossReference:{name:Rf.$type,properties:{cardinality:{name:Rf.cardinality,optional:!0},deprecatedSyntax:{name:Rf.deprecatedSyntax,defaultValue:!1},isMulti:{name:Rf.isMulti,defaultValue:!1},terminal:{name:Rf.terminal,optional:!0},type:{name:Rf.type,referenceType:ol.$type}},superTypes:[ja.$type]},Disjunction:{name:Sv.$type,properties:{left:{name:Sv.left},right:{name:Sv.right}},superTypes:[mg.$type]},EndOfFile:{name:o6.$type,properties:{cardinality:{name:o6.cardinality,optional:!0}},superTypes:[ja.$type]},Grammar:{name:Cf.$type,properties:{imports:{name:Cf.imports,defaultValue:[]},interfaces:{name:Cf.interfaces,defaultValue:[]},isDeclared:{name:Cf.isDeclared,defaultValue:!1},name:{name:Cf.name,optional:!0},rules:{name:Cf.rules,defaultValue:[]},types:{name:Cf.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dhe.$type,properties:{path:{name:Dhe.path}},superTypes:[]},Group:{name:kg.$type,properties:{cardinality:{name:kg.cardinality,optional:!0},elements:{name:kg.elements,defaultValue:[]},guardCondition:{name:kg.guardCondition,optional:!0},predicate:{name:kg.predicate,optional:!0}},superTypes:[ja.$type]},InferredType:{name:l6.$type,properties:{name:{name:l6.name}},superTypes:[ol.$type]},InfixRule:{name:Zc.$type,properties:{call:{name:Zc.call},dataType:{name:Zc.dataType,optional:!0},inferredType:{name:Zc.inferredType,optional:!0},name:{name:Zc.name},operators:{name:Zc.operators},parameters:{name:Zc.parameters,defaultValue:[]},returnType:{name:Zc.returnType,referenceType:ol.$type,optional:!0}},superTypes:[Tv.$type]},InfixRuleOperatorList:{name:O5.$type,properties:{associativity:{name:O5.associativity,optional:!0},operators:{name:O5.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Nhe.$type,properties:{precedences:{name:Nhe.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:db.$type,properties:{attributes:{name:db.attributes,defaultValue:[]},name:{name:db.name},superTypes:{name:db.superTypes,defaultValue:[],referenceType:ol.$type}},superTypes:[ol.$type]},Keyword:{name:fb.$type,properties:{cardinality:{name:fb.cardinality,optional:!0},predicate:{name:fb.predicate,optional:!0},value:{name:fb.value}},superTypes:[ja.$type]},NamedArgument:{name:qE.$type,properties:{calledByName:{name:qE.calledByName,defaultValue:!1},parameter:{name:qE.parameter,referenceType:HE.$type,optional:!0},value:{name:qE.value}},superTypes:[]},NegatedToken:{name:Sg.$type,properties:{cardinality:{name:Sg.cardinality,optional:!0},lookahead:{name:Sg.lookahead,optional:!0},parenthesized:{name:Sg.parenthesized,defaultValue:!1,optional:!0},terminal:{name:Sg.terminal}},superTypes:[ko.$type]},Negation:{name:c6.$type,properties:{value:{name:c6.value}},superTypes:[mg.$type]},NumberLiteral:{name:Mhe.$type,properties:{value:{name:Mhe.value}},superTypes:[Qx.$type]},Parameter:{name:HE.$type,properties:{name:{name:HE.name}},superTypes:[]},ParameterReference:{name:u6.$type,properties:{parameter:{name:u6.parameter,referenceType:HE.$type}},superTypes:[mg.$type]},ParserRule:{name:Zl.$type,properties:{dataType:{name:Zl.dataType,optional:!0},definition:{name:Zl.definition},entry:{name:Zl.entry,defaultValue:!1},fragment:{name:Zl.fragment,defaultValue:!1},inferredType:{name:Zl.inferredType,optional:!0},name:{name:Zl.name},parameters:{name:Zl.parameters,defaultValue:[]},returnType:{name:Zl.returnType,referenceType:ol.$type,optional:!0}},superTypes:[Tv.$type]},ReferenceType:{name:P5.$type,properties:{isMulti:{name:P5.isMulti,defaultValue:!1},referenceType:{name:P5.referenceType}},superTypes:[Xx.$type]},RegexToken:{name:Eg.$type,properties:{cardinality:{name:Eg.cardinality,optional:!0},lookahead:{name:Eg.lookahead,optional:!0},parenthesized:{name:Eg.parenthesized,defaultValue:!1,optional:!0},regex:{name:Eg.regex}},superTypes:[ko.$type]},ReturnType:{name:h6.$type,properties:{name:{name:h6.name}},superTypes:[]},RuleCall:{name:vg.$type,properties:{arguments:{name:vg.arguments,defaultValue:[]},cardinality:{name:vg.cardinality,optional:!0},predicate:{name:vg.predicate,optional:!0},rule:{name:vg.rule,referenceType:jE.$type}},superTypes:[ja.$type]},SimpleType:{name:pb.$type,properties:{primitiveType:{name:pb.primitiveType,optional:!0},stringType:{name:pb.stringType,optional:!0},typeRef:{name:pb.typeRef,referenceType:ol.$type,optional:!0}},superTypes:[Xx.$type]},StringLiteral:{name:Ohe.$type,properties:{value:{name:Ohe.value}},superTypes:[Qx.$type]},TerminalAlternatives:{name:wg.$type,properties:{cardinality:{name:wg.cardinality,optional:!0},elements:{name:wg.elements,defaultValue:[]},lookahead:{name:wg.lookahead,optional:!0},parenthesized:{name:wg.parenthesized,defaultValue:!1,optional:!0}},superTypes:[ko.$type]},TerminalElement:{name:ko.$type,properties:{cardinality:{name:ko.cardinality,optional:!0},lookahead:{name:ko.lookahead,optional:!0},parenthesized:{name:ko.parenthesized,defaultValue:!1,optional:!0}},superTypes:[ja.$type]},TerminalGroup:{name:_g.$type,properties:{cardinality:{name:_g.cardinality,optional:!0},elements:{name:_g.elements,defaultValue:[]},lookahead:{name:_g.lookahead,optional:!0},parenthesized:{name:_g.parenthesized,defaultValue:!1,optional:!0}},superTypes:[ko.$type]},TerminalRule:{name:Oh.$type,properties:{definition:{name:Oh.definition},fragment:{name:Oh.fragment,defaultValue:!1},hidden:{name:Oh.hidden,defaultValue:!1},name:{name:Oh.name},type:{name:Oh.type,optional:!0}},superTypes:[jE.$type]},TerminalRuleCall:{name:Ag.$type,properties:{cardinality:{name:Ag.cardinality,optional:!0},lookahead:{name:Ag.lookahead,optional:!0},parenthesized:{name:Ag.parenthesized,defaultValue:!1,optional:!0},rule:{name:Ag.rule,referenceType:Oh.$type}},superTypes:[ko.$type]},Type:{name:Ev.$type,properties:{name:{name:Ev.name},type:{name:Ev.type}},superTypes:[ol.$type]},TypeAttribute:{name:Kx.$type,properties:{defaultValue:{name:Kx.defaultValue,optional:!0},isOptional:{name:Kx.isOptional,defaultValue:!1},name:{name:Kx.name},type:{name:Kx.type}},superTypes:[]},TypeDefinition:{name:Xx.$type,properties:{},superTypes:[]},UnionType:{name:Phe.$type,properties:{types:{name:Phe.types,defaultValue:[]}},superTypes:[Xx.$type]},UnorderedGroup:{name:vv.$type,properties:{cardinality:{name:vv.cardinality,optional:!0},elements:{name:vv.elements,defaultValue:[]}},superTypes:[ja.$type]},UntilToken:{name:Rg.$type,properties:{cardinality:{name:Rg.cardinality,optional:!0},lookahead:{name:Rg.lookahead,optional:!0},parenthesized:{name:Rg.parenthesized,defaultValue:!1,optional:!0},terminal:{name:Rg.terminal}},superTypes:[ko.$type]},ValueLiteral:{name:Qx.$type,properties:{},superTypes:[]},Wildcard:{name:mb.$type,properties:{cardinality:{name:mb.cardinality,optional:!0},lookahead:{name:mb.lookahead,optional:!0},parenthesized:{name:mb.parenthesized,defaultValue:!1,optional:!0}},superTypes:[ko.$type]}}}},nn=new _fe;a(Qv,"streamCst");k(Qv,"streamCst");a(Afe,"isChildNode");k(Afe,"isChildNode");a(Rfe,"tokenToRange");k(Rfe,"tokenToRange");a(Zv,"isValidTokenRange");k(Zv,"isValidTokenRange");a(Db,"toDocumentSegment");k(Db,"toDocumentSegment");(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(tu||(tu={}));a(Lfe,"compareRange");k(Lfe,"compareRange");a(Ife,"inRange");k(Ife,"inRange");Gqe=/^[\w\p{L}]$/u;a(Dfe,"findCommentNode");k(Dfe,"findCommentNode");a(d6,"isCommentNode");k(d6,"isCommentNode");a(Nfe,"getPreviousNode");k(Nfe,"getPreviousNode");Mfe=class extends Error{static{a(this,"ErrorWithLocation")}static{k(this,"ErrorWithLocation")}constructor(e,t){let r=typeof t=="string"?t:t();super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}};a(Kg,"assertUnreachable");k(Kg,"assertUnreachable");a(wr,"cc");k(wr,"cc");a(wv,"insertToSet");k(wv,"insertToSet");a(Lg,"addFlag");k(Lg,"addFlag");a(Lf,"ASSERT_EXISTS");k(Lf,"ASSERT_EXISTS");a(gb,"ASSERT_NEVER_REACH_HERE");k(gb,"ASSERT_NEVER_REACH_HERE");a(f6,"isCharacter");k(f6,"isCharacter");Jv=[];for(let e=wr("0");e<=wr("9");e++)Jv.push(e);ew=[wr("_")].concat(Jv);for(let e=wr("a");e<=wr("z");e++)ew.push(e);for(let e=wr("A");e<=wr("Z");e++)ew.push(e);Bhe=[wr(" "),wr("\f"),wr(` +`),wr("\r"),wr(" "),wr("\v"),wr(" "),wr("\xA0"),wr("\u1680"),wr("\u2000"),wr("\u2001"),wr("\u2002"),wr("\u2003"),wr("\u2004"),wr("\u2005"),wr("\u2006"),wr("\u2007"),wr("\u2008"),wr("\u2009"),wr("\u200A"),wr("\u2028"),wr("\u2029"),wr("\u202F"),wr("\u205F"),wr("\u3000"),wr("\uFEFF")],Vqe=/[0-9a-fA-F]/,YE=/[0-9]/,zqe=/[1-9]/,Ofe=class{static{a(this,"RegExpParser")}static{k(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":Lg(r,"global");break;case"i":Lg(r,"ignoreCase");break;case"m":Lg(r,"multiLine");break;case"u":Lg(r,"unicode");break;case"y":Lg(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}}Lf(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return gb()}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 i;this.isDigit()?(i=this.integerIncludingZero(),t={atLeast:n,atMost:i}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Lf(t);break}if(!(e===!0&&t===void 0)&&Lf(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()),Lf(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):gb()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[wr(` +`),wr("\r"),wr("\u2028"),wr("\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=Jv;break;case"D":e=Jv,t=!0;break;case"s":e=Bhe;break;case"S":e=Bhe,t=!0;break;case"w":e=ew;break;case"W":e=ew,t=!0;break}return Lf(e)?{type:"Set",value:e,complement:t}:gb()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=wr("\f");break;case"n":e=wr(` +`);break;case"r":e=wr("\r");break;case"t":e=wr(" ");break;case"v":e=wr("\v");break}return Lf(e)?{type:"Character",value:e}:gb()}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:wr("\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:wr(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:wr(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(f6(r)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),s=i.type==="Character";if(f6(i)){if(i.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},bw=class{static{a(this,"BaseRegExpVisitor")}static{k(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){}},Uqe=/\r?\n/gm,Wqe=new Ofe,jqe=class extends bw{static{a(this,"TerminalRegExpVisitor")}static{k(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=Xb(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)}},B5=new jqe;a(Pfe,"isMultilineComment");k(Pfe,"isMultilineComment");qqe=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");a(n$,"isWhitespace");k(n$,"isWhitespace");a(Xb,"escapeRegExp");k(Xb,"escapeRegExp");a(Bfe,"partialMatches");k(Bfe,"partialMatches");a($fe,"partialRegExp");k($fe,"partialRegExp");a(Ffe,"getEntryRule");k(Ffe,"getEntryRule");a(Gfe,"getHiddenRules");k(Gfe,"getHiddenRules");a(i$,"getAllReachableRules");k(i$,"getAllReachableRules");a(s$,"ruleDfs");k(s$,"ruleDfs");a(Vfe,"getCrossReferenceTerminal");k(Vfe,"getCrossReferenceTerminal");a(zfe,"isCommentTerminal");k(zfe,"isCommentTerminal");a(Ufe,"findNodesForProperty");k(Ufe,"findNodesForProperty");a(a$,"findNodeForProperty");k(a$,"findNodeForProperty");a(Tw,"findNodesForPropertyInternal");k(Tw,"findNodesForPropertyInternal");a(Wfe,"findNodeForKeyword");k(Wfe,"findNodeForKeyword");a(jfe,"findNodesForKeywordInternal");k(jfe,"findNodesForKeywordInternal");a(qfe,"findAssignment");k(qfe,"findAssignment");a(o$,"findNameAssignment");k(o$,"findNameAssignment");a(l$,"findNameAssignmentInternal");k(l$,"findNameAssignmentInternal");a(c$,"isDataTypeRule");k(c$,"isDataTypeRule");a(u$,"isDataTypeRuleInternal");k(u$,"isDataTypeRuleInternal");a(h$,"getExplicitRuleType");k(h$,"getExplicitRuleType");a(Ug,"getTypeName");k(Ug,"getTypeName");a(Hfe,"getActionType");k(Hfe,"getActionType");a(Yfe,"getRuleType");k(Yfe,"getRuleType");a(Cw,"terminalRegex");k(Cw,"terminalRegex");d$=/[\s\S]/.source;a(Qf,"abstractElementToRegex");k(Qf,"abstractElementToRegex");a(Kfe,"terminalAlternativesToRegex");k(Kfe,"terminalAlternativesToRegex");a(Xfe,"terminalGroupToRegex");k(Xfe,"terminalGroupToRegex");a(Qfe,"untilTokenToRegex");k(Qfe,"untilTokenToRegex");a(Zfe,"negateTokenToRegex");k(Zfe,"negateTokenToRegex");a(Jfe,"characterRangeToRegex");k(Jfe,"characterRangeToRegex");a(_v,"keywordToRegex");k(_v,"keywordToRegex");a(nc,"withCardinality");k(nc,"withCardinality");a(epe,"createGrammarConfig");k(epe,"createGrammarConfig");a(tw,"PRINT_ERROR");k(tw,"PRINT_ERROR");a(f$,"PRINT_WARNING");k(f$,"PRINT_WARNING");a(p$,"timer");k(p$,"timer");a(m$,"toFastProperties");k(m$,"toFastProperties");a(tpe,"tokenLabel");k(tpe,"tokenLabel");a(rpe,"hasTokenLabel");k(rpe,"hasTokenLabel");oc=class{static{a(this,"AbstractProduction")}static{k(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}},Ys=class extends oc{static{a(this,"NonTerminal")}static{k(this,"NonTerminal")}constructor(e){super([]),this.idx=1,Object.assign(this,dl(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Xg=class extends oc{static{a(this,"Rule")}static{k(this,"Rule")}constructor(e){super(e.definition),this.orgText="",Object.assign(this,dl(e))}},ka=class extends oc{static{a(this,"Alternative")}static{k(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,dl(e))}},Cs=class extends oc{static{a(this,"Option")}static{k(this,"Option")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,dl(e))}},Ya=class extends oc{static{a(this,"RepetitionMandatory")}static{k(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,dl(e))}},Ka=class extends oc{static{a(this,"RepetitionMandatoryWithSeparator")}static{k(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,dl(e))}},pi=class extends oc{static{a(this,"Repetition")}static{k(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,dl(e))}},Sa=class extends oc{static{a(this,"RepetitionWithSeparator")}static{k(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,dl(e))}},Ea=class extends oc{static{a(this,"Alternation")}static{k(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,Object.assign(this,dl(e))}},Gn=class{static{a(this,"Terminal")}static{k(this,"Terminal")}constructor(e){this.idx=1,Object.assign(this,dl(e))}accept(e){e.visit(this)}};a(npe,"serializeGrammar");k(npe,"serializeGrammar");a(kb,"serializeProduction");k(kb,"serializeProduction");a(dl,"pickOnlyDefined");k(dl,"pickOnlyDefined");Qg=class{static{a(this,"GAstVisitor")}static{k(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case Ys:return this.visitNonTerminal(t);case ka:return this.visitAlternative(t);case Cs:return this.visitOption(t);case Ya:return this.visitRepetitionMandatory(t);case Ka:return this.visitRepetitionMandatoryWithSeparator(t);case Sa:return this.visitRepetitionWithSeparator(t);case pi:return this.visitRepetition(t);case Ea:return this.visitAlternation(t);case Gn:return this.visitTerminal(t);case Xg: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){}};a(ipe,"isSequenceProd");k(ipe,"isSequenceProd");a(Nb,"isOptionalProd");k(Nb,"isOptionalProd");a(spe,"isBranchingProd");k(spe,"isBranchingProd");a(cl,"getProductionDslName");k(cl,"getProductionDslName");kw=class{static{a(this,"RestWalker")}static{k(this,"RestWalker")}walk(e,t=[]){e.definition.forEach((r,n)=>{let i=e.definition.slice(n+1);if(r instanceof Ys)this.walkProdRef(r,i,t);else if(r instanceof Gn)this.walkTerminal(r,i,t);else if(r instanceof ka)this.walkFlat(r,i,t);else if(r instanceof Cs)this.walkOption(r,i,t);else if(r instanceof Ya)this.walkAtLeastOne(r,i,t);else if(r instanceof Ka)this.walkAtLeastOneSep(r,i,t);else if(r instanceof Sa)this.walkManySep(r,i,t);else if(r instanceof pi)this.walkMany(r,i,t);else if(r instanceof Ea)this.walkOr(r,i,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 Cs({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=p6(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new Cs({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=p6(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);e.definition.forEach(i=>{let s=new ka({definition:[i]});this.walk(s,n)})}};a(p6,"restForRepetitionWithSeparator");k(p6,"restForRepetitionWithSeparator");a(Zg,"first");k(Zg,"first");a(ape,"firstForSequence");k(ape,"firstForSequence");a(ope,"firstForBranching");k(ope,"firstForBranching");a(lpe,"firstForTerminal");k(lpe,"firstForTerminal");cpe="_~IN~_",Hqe=class extends kw{static{a(this,"ResyncFollowsWalker")}static{k(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=hpe(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(r),s=new ka({definition:i}),o=Zg(s);this.follows[n]=o}};a(upe,"computeAllProdsFollows");k(upe,"computeAllProdsFollows");a(hpe,"buildBetweenProdsFollowPrefix");k(hpe,"buildBetweenProdsFollowPrefix");Av={},Yqe=new Ofe;a(Jg,"getRegExpAst");k(Jg,"getRegExpAst");a(dpe,"clearRegExpParserCache");k(dpe,"clearRegExpParserCache");fpe="Complement Sets are not supported for first char optimization",rw=`Unable to use "first char" lexer optimizations: +`;a(ppe,"getOptimizedStartCodesIndices");k(ppe,"getOptimizedStartCodesIndices");a(nw,"firstCharOptimizedIndices");k(nw,"firstCharOptimizedIndices");a(yb,"addOptimizedIdxToResult");k(yb,"addOptimizedIdxToResult");a(mpe,"handleIgnoreCase");k(mpe,"handleIgnoreCase");a(m6,"findCode");k(m6,"findCode");a(iw,"isWholeOptional");k(iw,"isWholeOptional");Kqe=class extends bw{static{a(this,"CharCodeFinder")}static{k(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){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?m6(e,this.targetCharCodes)===void 0&&(this.found=!0):m6(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};a(Sw,"canMatchCharCode");k(Sw,"canMatchCharCode");Yf="PATTERN",xb="defaultMode",KE="modes",g6=0,Rv=1,y6=2,x6=3;a(gpe,"analyzeTokenTypes");k(gpe,"analyzeTokenTypes");a(ype,"getAsciiClass");k(ype,"getAsciiClass");a(xpe,"validatePatterns");k(xpe,"validatePatterns");a(bpe,"validateRegExpPattern");k(bpe,"validateRegExpPattern");a(Tpe,"findMissingPatterns");k(Tpe,"findMissingPatterns");a(Cpe,"findInvalidPatterns");k(Cpe,"findInvalidPatterns");Xqe=/[^\\][$]/;a(kpe,"findEndOfInputAnchor");k(kpe,"findEndOfInputAnchor");a(Spe,"findEmptyMatchRegExps");k(Spe,"findEmptyMatchRegExps");Qqe=/[^\\[][\^]|^\^/;a(Epe,"findStartOfInputAnchor");k(Epe,"findStartOfInputAnchor");a(vpe,"findUnsupportedFlags");k(vpe,"findUnsupportedFlags");a(wpe,"findDuplicatePatterns");k(wpe,"findDuplicatePatterns");a(_pe,"findInvalidGroupType");k(_pe,"findInvalidGroupType");a(Ape,"findModesThatDoNotExist");k(Ape,"findModesThatDoNotExist");a(Rpe,"findUnreachablePatterns");k(Rpe,"findUnreachablePatterns");a(Lpe,"tryToMatchStrToPattern");k(Lpe,"tryToMatchStrToPattern");a(Ipe,"noMetaChar");k(Ipe,"noMetaChar");a(Dpe,"usesLookAheadOrBehind");k(Dpe,"usesLookAheadOrBehind");a(b6,"addStickyFlag");k(b6,"addStickyFlag");a(Npe,"performRuntimeChecks");k(Npe,"performRuntimeChecks");a(Mpe,"performWarningRuntimeChecks");k(Mpe,"performWarningRuntimeChecks");a(g$,"isCustomPattern");k(g$,"isCustomPattern");a(Ope,"isShortPattern");k(Ope,"isShortPattern");Zqe={test:k(function(e){let t=e.length;for(let r=this.lastIndex;r${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};(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"})(mi||(mi={}));Tb={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:C6,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Tb);Ca=class{static{a(this,"Lexer")}static{k(this,"Lexer")}constructor(e,t=Tb){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.cachedGroupKeys=[],this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(n,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${n}>`);let{time:o,value:l}=p$(i),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return i()},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=Object.assign({},Tb,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,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Tb.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Zqe;else if(this.config.lineTerminatorCharacters===Tb.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),Array.isArray(e)?n={modes:{defaultMode:[...e]},defaultMode:xb}:(i=!1,n=Object.assign({},e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Npe(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Mpe(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Object.entries(n.modes).forEach(([o,l])=>{n.modes[o]=l.filter(u=>u!==void 0)});let s=Object.keys(n.modes);if(Object.entries(n.modes).forEach(([o,l])=>{this.TRACE_INIT(`Mode: <${o}> processing`,()=>{if(this.modes.push(o),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(xpe(l,s))}),this.lexerDefinitionErrors.length===0){ty(l);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=gpe(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[o]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[o]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[o]=u.canBeOptimized}})}),this.defaultMode=n.defaultMode,this.cachedGroupKeys=Object.keys(this.emptyGroups),this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let l=this.lexerDefinitionErrors.map(u=>u.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+l)}this.lexerDefinitionWarning.forEach(o=>{f$(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(i&&(this.handleModes=()=>{}),this.trackStartLines===!1&&(this.computeNewColumn=o=>o),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=()=>{}),/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 o=Object.entries(this.canModeBeOptimized).reduce((l,[u,h])=>(h===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&o.length>0)throw Error(`Lexer Modes: < ${o.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",()=>{dpe()}),this.TRACE_INIT("toFastProperties",()=>{m$(this)})})}tokenize(e,t=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let n=this.lexerDefinitionErrors.map(i=>i.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,i,s,o,l,u,h,d,f,p,m,g,y,x,b=e,T=b.length,C=0,v=0,E=this.hasCustom?0:Math.floor(e.length/10),S=new Array(E),_=[],A=this.trackStartLines?1:void 0,B=this.trackStartLines?1:void 0,$={};for(let j=0;j{if(D.length===1&&j.tokenType.PUSH_MODE===void 0){let K=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(j);_.push({offset:j.startOffset,line:j.startLine,column:j.startColumn,length:j.image.length,message:K})}else{D.pop();let K=D.at(-1);F=this.patternIdxToConfig[K],N=this.charCodeToPatternIdxToConfig[K],I=F.length;let Z=this.canModeBeOptimized[K]&&this.config.safeMode===!1;N&&Z?R=!0:R=!1}},"pop_mode");function V(j){D.push(j),N=this.charCodeToPatternIdxToConfig[j],F=this.patternIdxToConfig[j],I=F.length;let K=this.canModeBeOptimized[j]&&this.config.safeMode===!1;N&&K?R=!0:R=!1}a(V,"push_mode"),k(V,"push_mode"),V.call(this,t);let U,z=this.config.recoveryEnabled;for(;Cl.length){l=s,d=s.length,u=h,U=me;break}}}break}}if(d!==-1){if(f=U.group,f!==void 0&&(l=l!==null?l:e.substring(C,C+d),p=U.tokenTypeIdx,m=this.createTokenInstance(l,C,p,U.tokenType,A,B,d),this.handlePayload(m,u),f===!1?v=this.addToken(S,v,m):$[f].push(m)),O===!0&&U.canLineTerminator===!0){let ce=0,te,me;G.lastIndex=0;do l=l!==null?l:e.substring(C,C+d),te=G.test(l),te===!0&&(me=G.lastIndex-1,ce++);while(te===!0);ce!==0?(A=A+ce,B=d-me,this.updateTokenEndLineColumnLocation(m,f,me,ce,A,B,d)):B=this.computeNewColumn(B,d)}else B=this.computeNewColumn(B,d);C=C+d,this.handleModes(U,P,V,m)}else{let ce=C,te=A,me=B,he=z===!1;for(;he===!1&&C ${Hf(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let s="Expecting: ",l=` +but found: '`+t[0].image+"'";if(n)return s+n+l;{let f=`one of these possible Token sequences: +${e.reduce((p,m)=>p.concat(m),[]).map(p=>`[${p.map(m=>Hf(m)).join(", ")}]`).map((p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return s+f+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",o=` +but found: '`+t[0].image+"'";if(r)return i+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${e.map(h=>`[${h.map(d=>Hf(d)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(Pg);eHe={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},qf={buildDuplicateFoundError(e,t){function r(d){return d instanceof Gn?d.terminalType.name:d instanceof Ys?d.nonTerminalName:""}a(r,"getExtraProductionArgument2"),k(r,"getExtraProductionArgument");let n=e.name,i=t[0],s=i.idx,o=cl(i),l=r(i),u=s>0,h=`->${o}${u?s:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,` +`),h},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=e.prefixPath.map(i=>Hf(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?"":e.alternation.idx,r=e.prefixPath.length===0,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable. +Only the last alternative may be empty. +`;else{let i=e.prefixPath.map(s=>Hf(s)).join(", ");n+=`<${i}> may appears as a prefix path in all these alternatives. +`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(e){let t=cl(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=e.leftRecursionPath.map(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 Xg?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};a(Hpe,"resolveGrammar");k(Hpe,"resolveGrammar");tHe=class extends Qg{static{a(this,"GastRefResolverVisitor")}static{k(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(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:Ks.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},rHe=class extends kw{static{a(this,"AbstractNextPossibleTokensWalker")}static{k(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=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...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(){this.ruleStack.length===0?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},nHe=class extends rHe{static{a(this,"NextAfterTokenWalker")}static{k(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),i=new ka({definition:n});this.possibleTokTypes=Zg(i),this.found=!0}}},ww=class extends kw{static{a(this,"AbstractNextTerminalAfterProductionWalker")}static{k(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}},iHe=class extends ww{static{a(this,"NextTerminalAfterManyWalker")}static{k(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Gn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},Hhe=class extends ww{static{a(this,"NextTerminalAfterManySepWalker")}static{k(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Gn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},sHe=class extends ww{static{a(this,"NextTerminalAfterAtLeastOneWalker")}static{k(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Gn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},Yhe=class extends ww{static{a(this,"NextTerminalAfterAtLeastOneSepWalker")}static{k(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Gn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};a(sw,"possiblePathsFrom");k(sw,"possiblePathsFrom");a(Ype,"nextPossibleTokensAfter");k(Ype,"nextPossibleTokensAfter");a(Kpe,"expandTopLevelRule");k(Kpe,"expandTopLevelRule");(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"})(ti||(ti={}));a(_w,"getProdType");k(_w,"getProdType");a(k6,"getLookaheadPaths");k(k6,"getLookaheadPaths");a(Xpe,"buildLookaheadFuncForOr");k(Xpe,"buildLookaheadFuncForOr");a(Qpe,"buildLookaheadFuncForOptionalProd");k(Qpe,"buildLookaheadFuncForOptionalProd");a(Zpe,"buildAlternativesLookAheadFunc");k(Zpe,"buildAlternativesLookAheadFunc");a(Jpe,"buildSingleAlternativeLookaheadFunction");k(Jpe,"buildSingleAlternativeLookaheadFunction");aHe=class extends kw{static{a(this,"RestDefinitionFinderWalker")}static{k(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=r.concat(n),!0):!1}walkOption(e,t,r){this.checkIsTarget(e,ti.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,ti.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,ti.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,ti.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,ti.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},eme=class extends Qg{static{a(this,"InsideDefinitionFinderVisitor")}static{k(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,ti.OPTION)}visitRepetition(e){this.checkIsTarget(e,ti.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,ti.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,ti.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,ti.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,ti.ALTERNATION)}};a(S6,"initializeArrayOfArrays");k(S6,"initializeArrayOfArrays");a(Dv,"pathToHashKeys");k(Dv,"pathToHashKeys");a(tme,"isUniquePrefixHash");k(tme,"isUniquePrefixHash");a(S$,"lookAheadSequenceFromAlternatives");k(S$,"lookAheadSequenceFromAlternatives");a(Qb,"getLookaheadPathsForOr");k(Qb,"getLookaheadPathsForOr");a(Zb,"getLookaheadPathsForOptionalProd");k(Zb,"getLookaheadPathsForOptionalProd");a(aw,"containsPath");k(aw,"containsPath");a(rme,"isStrictPrefixOfPath");k(rme,"isStrictPrefixOfPath");a(E$,"areTokenCategoriesNotUsed");k(E$,"areTokenCategoriesNotUsed");a(nme,"validateLookahead");k(nme,"validateLookahead");a(ime,"validateGrammar");k(ime,"validateGrammar");a(sme,"validateDuplicateProductions");k(sme,"validateDuplicateProductions");a(ame,"identifyProductionForDuplicates");k(ame,"identifyProductionForDuplicates");a(v$,"getExtraProductionArgument");k(v$,"getExtraProductionArgument");oHe=class extends Qg{static{a(this,"OccurrenceValidationCollector")}static{k(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)}};a(ome,"validateRuleDoesNotAlreadyExist");k(ome,"validateRuleDoesNotAlreadyExist");a(lme,"validateRuleIsOverridden");k(lme,"validateRuleIsOverridden");a(w$,"validateNoLeftRecursion");k(w$,"validateNoLeftRecursion");a(Sb,"getFirstNoneTerminal");k(Sb,"getFirstNoneTerminal");_$=class extends Qg{static{a(this,"OrCollector")}static{k(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};a(cme,"validateEmptyOrAlternative");k(cme,"validateEmptyOrAlternative");a(ume,"validateAmbiguousAlternationAlternatives");k(ume,"validateAmbiguousAlternationAlternatives");lHe=class extends Qg{static{a(this,"RepetitionCollector")}static{k(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)}};a(hme,"validateTooManyAlts");k(hme,"validateTooManyAlts");a(dme,"validateSomeNonEmptyLookaheadPath");k(dme,"validateSomeNonEmptyLookaheadPath");a(fme,"checkAlternativesAmbiguities");k(fme,"checkAlternativesAmbiguities");a(pme,"checkPrefixAlternativesAmbiguities");k(pme,"checkPrefixAlternativesAmbiguities");a(mme,"checkTerminalAndNoneTerminalsNameSpace");k(mme,"checkTerminalAndNoneTerminalsNameSpace");a(gme,"resolveGrammar2");k(gme,"resolveGrammar");a(yme,"validateGrammar2");k(yme,"validateGrammar");xme="MismatchedTokenException",bme="NoViableAltException",Tme="EarlyExitException",Cme="NotAllInputParsedException",kme=[xme,bme,Tme,Cme];Object.freeze(kme);a(Ob,"isRecognitionException");k(Ob,"isRecognitionException");Aw=class extends Error{static{a(this,"RecognitionException")}static{k(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)}},Sme=class extends Aw{static{a(this,"MismatchedTokenException")}static{k(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=xme}},cHe=class extends Aw{static{a(this,"NoViableAltException")}static{k(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=bme}},uHe=class extends Aw{static{a(this,"NotAllInputParsedException")}static{k(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=Cme}},hHe=class extends Aw{static{a(this,"EarlyExitException")}static{k(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Tme}},$5={},Eme="InRuleRecoveryException",dHe=class extends Error{static{a(this,"InRuleRecoveryException")}static{k(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=Eme}},fHe=class{static{a(this,"Recoverable")}static{k(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap=[],this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,"recoveryEnabled")?e.recoveryEnabled:au.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=vme)}getTokenToInsert(e){let t=Ew(e,"",-1,-1,-1,-1,-1,-1);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA_FAST(1),h=this.LA_FAST(1),d=k(()=>{let f=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:f,ruleName:this.getCurrRuleFullName()}),m=new Sme(p,u,this.LA(0));m.resyncedTokens=o.slice(0,-1),this.SAVE_ERROR(m)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(h,n)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(h,i)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA_FAST(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getNextPossibleTokenTypes(e){let t=e.ruleStack[0],n=this.getGAstProductions()[t];return new nHe(n,e).startWalking()}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 dHe("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||t.length===0)return!1;let r=this.LA_FAST(1);return t.find(i=>this.tokenMatcher(r,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(t).includes(e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA_FAST(1),r=2;for(;;){let n=e.find(i=>vw(t,i));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return $5;let e=this.currRuleShortName,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,r=this.RULE_STACK_IDX+1,n=new Array(r);for(let i=0;ithis.getFollowSetFromFollowKey(t)).flat()}getFollowSetFromFollowKey(e){if(e===$5)return[su];let t=e.ruleName+e.idxInCallingRule+cpe+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,su)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA_FAST(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return t.slice(0,-1)}attemptInRepetitionRecovery(e,t,r,n,i,s,o){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){let e=this.RULE_STACK_IDX+1,t=new Array(e);for(let r=0;rw$(t,t,qf))}validateEmptyOrAlternatives(e){return e.flatMap(t=>cme(t,qf))}validateAmbiguousAlternationAlternatives(e,t){return e.flatMap(r=>ume(r,t,qf))}validateSomeNonEmptyLookaheadPath(e,t){return dme(e,t,qf)}buildLookaheadForAlternation(e){return Xpe(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Zpe)}buildLookaheadForOptional(e){return Qpe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,_w(e.prodType),Jpe)}},pHe=class{static{a(this,"LooksAhead")}static{k(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=Object.hasOwn(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:au.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(e,"maxLookahead")?e.maxLookahead:au.maxLookahead,this.lookaheadStrategy=Object.hasOwn(e,"lookaheadStrategy")?e.lookaheadStrategy:new A$({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=[],this.currRuleLookaheadFuncs=[]}preComputeLookaheadFunctions(e){e.forEach(t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=Ame(t);r.forEach(u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${cl(u)}${h}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:t,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled});this.setLaFuncCache(this.fullRuleNameToShort[t.name],wme|u.idx,d)})}),n.forEach(u=>{this.computeLookaheadFunc(t,u.idx,E6,"Repetition",u.maxLookahead,cl(u))}),i.forEach(u=>{this.computeLookaheadFunc(t,u.idx,_me,"Option",u.maxLookahead,cl(u))}),s.forEach(u=>{this.computeLookaheadFunc(t,u.idx,v6,"RepetitionMandatory",u.maxLookahead,cl(u))}),o.forEach(u=>{this.computeLookaheadFunc(t,u.idx,Nv,"RepetitionMandatoryWithSeparator",u.maxLookahead,cl(u))}),l.forEach(u=>{this.computeLookaheadFunc(t,u.idx,w6,"RepetitionWithSeparator",u.maxLookahead,cl(u))})})})}computeLookaheadFunc(e,t,r,n,i,s){this.TRACE_INIT(`${s}${t===0?"":t}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n});this.setLaFuncCache(this.fullRuleNameToShort[e.name],r|t,o)})}setLaFuncCache(e,t,r){let n=this.lookAheadFuncsCache[e];n===void 0&&(n=[],this.lookAheadFuncsCache[e]=n),n[t]=r}},mHe=class extends Qg{static{a(this,"DslMethodsCollectorVisitor")}static{k(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)}},XE=new mHe;a(Ame,"collectMethods");k(Ame,"collectMethods");a(_6,"setNodeLocationOnlyOffset");k(_6,"setNodeLocationOnlyOffset");a(A6,"setNodeLocationFull");k(A6,"setNodeLocationFull");a(Rme,"addTerminalToCst");k(Rme,"addTerminalToCst");a(Lme,"addNoneTerminalToCst");k(Lme,"addNoneTerminalToCst");gHe="name";a(R$,"defineNameProp");k(R$,"defineNameProp");a(Ime,"defaultVisit");k(Ime,"defaultVisit");a(Dme,"createBaseSemanticVisitorConstructor");k(Dme,"createBaseSemanticVisitorConstructor");a(Nme,"createBaseVisitorConstructorWithDefaults");k(Nme,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(R6||(R6={}));a(Mme,"validateVisitor");k(Mme,"validateVisitor");a(Ome,"validateMissingCstMethods");k(Ome,"validateMissingCstMethods");yHe=class{static{a(this,"TreeBuilder")}static{k(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,"nodeLocationTracking")?e.nodeLocationTracking:au.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{};else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=A6,this.setNodeLocationFromNode=A6,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=_6,this.setNodeLocationFromNode=_6,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{};else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:-1,endOffset:-1}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:-1}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:-1,startLine:-1,startColumn:-1,endOffset:-1,endLine:-1,endColumn:-1}}setInitialNodeLocationFullRegular(e){let t=this.LA_FAST(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:-1,endLine:-1,endColumn:-1}}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!==-1&&r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=-1,r.startLine=-1,r.startColumn=-1)}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;r.startOffset!==-1&&r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=-1}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];Rme(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];Lme(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}get currCSTNode(){let e=this;return e.CST_STACK[e.CST_STACK.length-1]}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let e=Dme(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let e=Nme(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}},xHe=class{static{a(this,"LexerAdapter")}static{k(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.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):Wg}LA_FAST(e){let t=this.currIdx+e;return this.tokVector[t]}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Wg:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}},bHe=class{static{a(this,"RecognizerApi")}static{k(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=ow){if(this.definedRulesNames.includes(e)){let s={message:qf.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ks.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=ow){let n=lme(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let i=this.defineRule(e,t,r);return this[e]=i,i}BACKTRACK(e,t){var r;let n=(r=e.coreRule)!==null&&r!==void 0?r:e;return function(){this.isBackTrackingStack.push(1);let i=this.saveRecogState();try{return n.apply(this,t),!0}catch(s){if(Ob(s))return!1;throw s}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return npe(Object.values(this.gastProductionsCache))}},THe=class{static{a(this,"RecognizerEngine")}static{k(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull=[],this.fullRuleNameToShort={},this.ruleShortNameIdx=0,this.tokenMatcher=Mb,this.subruleIdx=0,this.currRuleShortName=-1,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(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(Array.isArray(e)){if(e.length===0)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(Array.isArray(e))this.tokensMap=e.reduce((i,s)=>(i[s.name]=s,i),{});else if(Object.hasOwn(e,"modes")&&Object.values(e.modes).flat().every(jpe)){let i=Object.values(e.modes).flat(),s=[...new Set(i)];this.tokensMap=s.reduce((o,l)=>(o[l.name]=l,o),{})}else if(typeof e=="object"&&e!==null)this.tokensMap=Object.assign({},e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=su;let n=(Object.hasOwn(e,"modes")?Object.values(e.modes).flat():Object.values(e)).every(i=>{var s;return((s=i.categoryMatches)===null||s===void 0?void 0:s.length)==0});this.tokenMatcher=n?Mb:ey,ty(Object.values(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=Object.hasOwn(r,"resyncEnabled")?r.resyncEnabled:ow.resyncEnabled,i=Object.hasOwn(r,"recoveryValueFunc")?r.recoveryValueFunc:ow.recoveryValueFunc,s=this.ruleShortNameIdx++;this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=k(a(function(...d){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,d);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"),"invokeRuleWithTry"):o=k(a(function(...d){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,d)}catch(f){return this.invokeRuleCatch(f,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),"invokeRuleWithTryCst"),Object.assign(k(a(function(...d){this.onBeforeParse(e);try{return o.apply(this,d)}finally{this.onAfterParse(e)}},"rootRule"),"rootRule"),{ruleName:e,originalGrammarAction:t,coreRule:o})}invokeRuleCatch(e,t,r){let n=this.RULE_STACK_IDX===0,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Ob(e)){let s=e;if(i){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return r(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else{if(n)return this.moveToTerminatedState(),r(e);throw s}}else throw e}optionInternal(e,t){let r=_me|t;return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.currRuleLookaheadFuncs[r],i;if(typeof e!="function"){i=e.DEF;let s=e.GATE;if(s!==void 0){let o=n;n=k(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else i=e;if(n.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let r=v6|e;return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.currRuleLookaheadFuncs[r],i;if(typeof t!="function"){i=t.DEF;let s=t.GATE;if(s!==void 0){let o=n;n=k(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else i=t;if(n.call(this)===!0){let s=this.doSingleRepetition(i);for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,ti.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,v6,e,sHe)}atLeastOneSepFirstInternal(e,t){let r=Nv|e;this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(this.currRuleLookaheadFuncs[r].call(this)===!0){n.call(this);let o=k(()=>this.tokenMatcher(this.LA_FAST(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,n,Yhe],o,Nv,e,Yhe)}else throw this.raiseEarlyExitException(e,ti.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=E6|e;return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.currRuleLookaheadFuncs[r],i;if(typeof t!="function"){i=t.DEF;let o=t.GATE;if(o!==void 0){let l=n;n=k(()=>o.call(this)&&l.call(this),"lookaheadFunction")}}else i=t;let s=!0;for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,E6,e,iHe,s)}manySepFirstInternal(e,t){let r=w6|e;this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(this.currRuleLookaheadFuncs[r].call(this)===!0){n.call(this);let o=k(()=>this.tokenMatcher(this.LA_FAST(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,n,Hhe],o,w6,e,Hhe)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,Nv,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=wme|t,n=Array.isArray(e)?e:e.DEF,s=this.currRuleLookaheadFuncs[r].call(this,n);if(s!==void 0)return n[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX],this.currRuleLookaheadFuncs=this.lookAheadFuncsCache[this.currRuleShortName]),this.cstFinallyStateUpdate()}subruleInternal(e,t,r){let n;try{let i=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.coreRule.apply(this,i),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(i){throw this.subruleInternalError(i,r,e.ruleName)}}subruleInternalError(e,t,r){throw Ob(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 i=this.LA_FAST(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),n=i):this.consumeInternalError(e,i,r)}catch(i){n=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,i=this.LA(0);throw r!==void 0&&r.ERR_MSG?n=r.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Sme(n,t,i))}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(i){throw i.name===Eme?r:i}}else throw r}saveRecogState(){let e=this.errors,t=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);let t=e.RULE_STACK;for(let r=0;r=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX],this.currRuleLookaheadFuncs=this.lookAheadFuncsCache[this.currRuleShortName])}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=r,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.currRuleLookaheadFuncs=this.lookAheadFuncsCache[e],this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),su)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=-1,this.currRuleLookaheadFuncs=[],this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let t=0;t{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 Wg}topLevelRuleRecord(e,t){try{let r=new Xg({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 Ig.call(this,Cs,e,t)}atLeastOneInternalRecord(e,t){Ig.call(this,Ya,t,e)}atLeastOneSepFirstInternalRecord(e,t){Ig.call(this,Ka,t,e,Khe)}manyInternalRecord(e,t){Ig.call(this,pi,t,e)}manySepFirstInternalRecord(e,t){Ig.call(this,Sa,t,e,Khe)}orInternalRecord(e,t){return $me.call(this,e,t)}subruleInternalRecord(e,t,r){if(Pb(t),!e||!Object.hasOwn(e,"ruleName")){let o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let n=this.recordingProdStack.at(-1),i=e.ruleName,s=new Ys({idx:t,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0});return n.definition.push(s),this.outputCst?kHe:Rw}consumeInternalRecord(e,t,r){if(Pb(t),!T$(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=this.recordingProdStack.at(-1),i=new Gn({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(i),Bme}};a(Ig,"recordProd");k(Ig,"recordProd");a($me,"recordOrProd");k($me,"recordOrProd");a(L6,"getIdxSuffix");k(L6,"getIdxSuffix");a(Pb,"assertMethodIdxIsValid");k(Pb,"assertMethodIdxIsValid");EHe=class{static{a(this,"PerformanceTracer")}static{k(this,"PerformanceTracer")}initPerformanceTracer(e){if(Object.hasOwn(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=au.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:i}=p$(t),s=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,i}else return t()}};a(Fme,"applyMixins");k(Fme,"applyMixins");Wg=Ew(su,"",-1,-1,-1,-1,-1,-1);Object.freeze(Wg);au=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Pg,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),ow=Object.freeze({recoveryValueFunc:k(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ks||(Ks={}));a(I6,"EMPTY_ALT");k(I6,"EMPTY_ALT");L$=class Gme{static{a(this,"_Parser")}static{k(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",()=>{m$(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),this.definedRulesNames.forEach(i=>{let o=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=gme({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(n.length===0&&this.skipValidations===!1){let i=yme({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:qf,grammarName:r}),s=nme({lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,s)}}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=upe(Object.values(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!Gme.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw t=this.definitionErrors.map(i=>i.message),new Error(`Parser Definition Errors detected: + ${t.join(` +------------------------------- +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initGastRecorder(r),n.initPerformanceTracer(r),Object.hasOwn(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=Object.hasOwn(r,"skipValidations")?r.skipValidations:au.skipValidations}};L$.DEFER_DEFINITION_ERRORS_HANDLING=!1;Fme(L$,[fHe,pHe,yHe,xHe,THe,bHe,CHe,SHe,EHe]);vHe=class extends L${static{a(this,"EmbeddedActionsParser")}static{k(this,"EmbeddedActionsParser")}constructor(e,t=au){let r=Object.assign({},t);r.outputCst=!1,super(e,r)}};a(Vme,"arrayMap");k(Vme,"arrayMap");zme=Vme;a(Ume,"listCacheClear");k(Ume,"listCacheClear");wHe=Ume;a(Wme,"eq");k(Wme,"eq");jme=Wme;a(qme,"assocIndexOf");k(qme,"assocIndexOf");Lw=qme,_He=Array.prototype,AHe=_He.splice;a(Hme,"listCacheDelete");k(Hme,"listCacheDelete");RHe=Hme;a(Yme,"listCacheGet");k(Yme,"listCacheGet");LHe=Yme;a(Kme,"listCacheHas");k(Kme,"listCacheHas");IHe=Kme;a(Xme,"listCacheSet");k(Xme,"listCacheSet");DHe=Xme;a(Zf,"ListCache");k(Zf,"ListCache");Zf.prototype.clear=wHe;Zf.prototype.delete=RHe;Zf.prototype.get=LHe;Zf.prototype.has=IHe;Zf.prototype.set=DHe;Iw=Zf;a(Qme,"stackClear");k(Qme,"stackClear");NHe=Qme;a(Zme,"stackDelete");k(Zme,"stackDelete");MHe=Zme;a(Jme,"stackGet");k(Jme,"stackGet");OHe=Jme;a(ege,"stackHas");k(ege,"stackHas");PHe=ege,BHe=typeof global=="object"&&global&&global.Object===Object&&global,tge=BHe,$He=typeof self=="object"&&self&&self.Object===Object&&self,FHe=tge||$He||Function("return this")(),ou=FHe,GHe=ou.Symbol,ic=GHe,rge=Object.prototype,VHe=rge.hasOwnProperty,zHe=rge.toString,Zx=ic?ic.toStringTag:void 0;a(nge,"getRawTag");k(nge,"getRawTag");UHe=nge,WHe=Object.prototype,jHe=WHe.toString;a(ige,"objectToString");k(ige,"objectToString");qHe=ige,HHe="[object Null]",YHe="[object Undefined]",Qhe=ic?ic.toStringTag:void 0;a(sge,"baseGetTag");k(sge,"baseGetTag");ny=sge;a(age,"isObject");k(age,"isObject");I$=age,KHe="[object AsyncFunction]",XHe="[object Function]",QHe="[object GeneratorFunction]",ZHe="[object Proxy]";a(oge,"isFunction");k(oge,"isFunction");lge=oge,JHe=ou["__core-js_shared__"],F5=JHe,Zhe=(function(){var e=/[^.]+$/.exec(F5&&F5.keys&&F5.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();a(cge,"isMasked");k(cge,"isMasked");eYe=cge,tYe=Function.prototype,rYe=tYe.toString;a(uge,"toSource");k(uge,"toSource");Jf=uge,nYe=/[\\^$.*+?()[\]{}|]/g,iYe=/^\[object .+?Constructor\]$/,sYe=Function.prototype,aYe=Object.prototype,oYe=sYe.toString,lYe=aYe.hasOwnProperty,cYe=RegExp("^"+oYe.call(lYe).replace(nYe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");a(hge,"baseIsNative");k(hge,"baseIsNative");uYe=hge;a(dge,"getValue");k(dge,"getValue");hYe=dge;a(fge,"getNative");k(fge,"getNative");iy=fge,dYe=iy(ou,"Map"),Bb=dYe,fYe=iy(Object,"create"),$b=fYe;a(pge,"hashClear");k(pge,"hashClear");pYe=pge;a(mge,"hashDelete");k(mge,"hashDelete");mYe=mge,gYe="__lodash_hash_undefined__",yYe=Object.prototype,xYe=yYe.hasOwnProperty;a(gge,"hashGet");k(gge,"hashGet");bYe=gge,TYe=Object.prototype,CYe=TYe.hasOwnProperty;a(yge,"hashHas");k(yge,"hashHas");kYe=yge,SYe="__lodash_hash_undefined__";a(xge,"hashSet");k(xge,"hashSet");EYe=xge;a(ep,"Hash");k(ep,"Hash");ep.prototype.clear=pYe;ep.prototype.delete=mYe;ep.prototype.get=bYe;ep.prototype.has=kYe;ep.prototype.set=EYe;Jhe=ep;a(bge,"mapCacheClear");k(bge,"mapCacheClear");vYe=bge;a(Tge,"isKeyable");k(Tge,"isKeyable");wYe=Tge;a(Cge,"getMapData");k(Cge,"getMapData");Dw=Cge;a(kge,"mapCacheDelete");k(kge,"mapCacheDelete");_Ye=kge;a(Sge,"mapCacheGet");k(Sge,"mapCacheGet");AYe=Sge;a(Ege,"mapCacheHas");k(Ege,"mapCacheHas");RYe=Ege;a(vge,"mapCacheSet");k(vge,"mapCacheSet");LYe=vge;a(tp,"MapCache");k(tp,"MapCache");tp.prototype.clear=vYe;tp.prototype.delete=_Ye;tp.prototype.get=AYe;tp.prototype.has=RYe;tp.prototype.set=LYe;Nw=tp,IYe=200;a(wge,"stackSet");k(wge,"stackSet");DYe=wge;a(rp,"Stack");k(rp,"Stack");rp.prototype.clear=NHe;rp.prototype.delete=MHe;rp.prototype.get=OHe;rp.prototype.has=PHe;rp.prototype.set=DYe;Mv=rp,NYe="__lodash_hash_undefined__";a(_ge,"setCacheAdd");k(_ge,"setCacheAdd");MYe=_ge;a(Age,"setCacheHas");k(Age,"setCacheHas");OYe=Age;a(Fb,"SetCache");k(Fb,"SetCache");Fb.prototype.add=Fb.prototype.push=MYe;Fb.prototype.has=OYe;Rge=Fb;a(Lge,"arraySome");k(Lge,"arraySome");PYe=Lge;a(Ige,"cacheHas");k(Ige,"cacheHas");Dge=Ige,BYe=1,$Ye=2;a(Nge,"equalArrays");k(Nge,"equalArrays");Mge=Nge,FYe=ou.Uint8Array,ede=FYe;a(Oge,"mapToArray");k(Oge,"mapToArray");GYe=Oge;a(Pge,"setToArray");k(Pge,"setToArray");D$=Pge,VYe=1,zYe=2,UYe="[object Boolean]",WYe="[object Date]",jYe="[object Error]",qYe="[object Map]",HYe="[object Number]",YYe="[object RegExp]",KYe="[object Set]",XYe="[object String]",QYe="[object Symbol]",ZYe="[object ArrayBuffer]",JYe="[object DataView]",tde=ic?ic.prototype:void 0,G5=tde?tde.valueOf:void 0;a(Bge,"equalByTag");k(Bge,"equalByTag");eKe=Bge;a($ge,"arrayPush");k($ge,"arrayPush");Fge=$ge,tKe=Array.isArray,Xs=tKe;a(Gge,"baseGetAllKeys");k(Gge,"baseGetAllKeys");rKe=Gge;a(Vge,"arrayFilter");k(Vge,"arrayFilter");zge=Vge;a(Uge,"stubArray");k(Uge,"stubArray");nKe=Uge,iKe=Object.prototype,sKe=iKe.propertyIsEnumerable,rde=Object.getOwnPropertySymbols,aKe=rde?function(e){return e==null?[]:(e=Object(e),zge(rde(e),function(t){return sKe.call(e,t)}))}:nKe,oKe=aKe;a(Wge,"baseTimes");k(Wge,"baseTimes");lKe=Wge;a(jge,"isObjectLike");k(jge,"isObjectLike");jg=jge,cKe="[object Arguments]";a(qge,"baseIsArguments");k(qge,"baseIsArguments");nde=qge,Hge=Object.prototype,uKe=Hge.hasOwnProperty,hKe=Hge.propertyIsEnumerable,dKe=nde((function(){return arguments})())?nde:function(e){return jg(e)&&uKe.call(e,"callee")&&!hKe.call(e,"callee")},Mw=dKe;a(Yge,"stubFalse");k(Yge,"stubFalse");fKe=Yge,Kge=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ide=Kge&&typeof module=="object"&&module&&!module.nodeType&&module,pKe=ide&&ide.exports===Kge,sde=pKe?ou.Buffer:void 0,mKe=sde?sde.isBuffer:void 0,gKe=mKe||fKe,lw=gKe,yKe=9007199254740991,xKe=/^(?:0|[1-9]\d*)$/;a(Xge,"isIndex");k(Xge,"isIndex");Qge=Xge,bKe=9007199254740991;a(Zge,"isLength");k(Zge,"isLength");N$=Zge,TKe="[object Arguments]",CKe="[object Array]",kKe="[object Boolean]",SKe="[object Date]",EKe="[object Error]",vKe="[object Function]",wKe="[object Map]",_Ke="[object Number]",AKe="[object Object]",RKe="[object RegExp]",LKe="[object Set]",IKe="[object String]",DKe="[object WeakMap]",NKe="[object ArrayBuffer]",MKe="[object DataView]",OKe="[object Float32Array]",PKe="[object Float64Array]",BKe="[object Int8Array]",$Ke="[object Int16Array]",FKe="[object Int32Array]",GKe="[object Uint8Array]",VKe="[object Uint8ClampedArray]",zKe="[object Uint16Array]",UKe="[object Uint32Array]",Fn={};Fn[OKe]=Fn[PKe]=Fn[BKe]=Fn[$Ke]=Fn[FKe]=Fn[GKe]=Fn[VKe]=Fn[zKe]=Fn[UKe]=!0;Fn[TKe]=Fn[CKe]=Fn[NKe]=Fn[kKe]=Fn[MKe]=Fn[SKe]=Fn[EKe]=Fn[vKe]=Fn[wKe]=Fn[_Ke]=Fn[AKe]=Fn[RKe]=Fn[LKe]=Fn[IKe]=Fn[DKe]=!1;a(Jge,"baseIsTypedArray");k(Jge,"baseIsTypedArray");WKe=Jge;a(eye,"baseUnary");k(eye,"baseUnary");jKe=eye,tye=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Eb=tye&&typeof module=="object"&&module&&!module.nodeType&&module,qKe=Eb&&Eb.exports===tye,V5=qKe&&tge.process,HKe=(function(){try{var e=Eb&&Eb.require&&Eb.require("util").types;return e||V5&&V5.binding&&V5.binding("util")}catch{}})(),ade=HKe,ode=ade&&ade.isTypedArray,YKe=ode?jKe(ode):WKe,M$=YKe,KKe=Object.prototype,XKe=KKe.hasOwnProperty;a(rye,"arrayLikeKeys");k(rye,"arrayLikeKeys");QKe=rye,ZKe=Object.prototype;a(nye,"isPrototype");k(nye,"isPrototype");iye=nye;a(sye,"overArg");k(sye,"overArg");JKe=sye,eXe=JKe(Object.keys,Object),tXe=eXe,rXe=Object.prototype,nXe=rXe.hasOwnProperty;a(aye,"baseKeys");k(aye,"baseKeys");oye=aye;a(lye,"isArrayLike");k(lye,"isArrayLike");Ow=lye;a(cye,"keys");k(cye,"keys");O$=cye;a(uye,"getAllKeys");k(uye,"getAllKeys");lde=uye,iXe=1,sXe=Object.prototype,aXe=sXe.hasOwnProperty;a(hye,"equalObjects");k(hye,"equalObjects");oXe=hye,lXe=iy(ou,"DataView"),D6=lXe,cXe=iy(ou,"Promise"),N6=cXe,uXe=iy(ou,"Set"),Vg=uXe,hXe=iy(ou,"WeakMap"),M6=hXe,cde="[object Map]",dXe="[object Object]",ude="[object Promise]",hde="[object Set]",dde="[object WeakMap]",fde="[object DataView]",fXe=Jf(D6),pXe=Jf(Bb),mXe=Jf(N6),gXe=Jf(Vg),yXe=Jf(M6),If=ny;(D6&&If(new D6(new ArrayBuffer(1)))!=fde||Bb&&If(new Bb)!=cde||N6&&If(N6.resolve())!=ude||Vg&&If(new Vg)!=hde||M6&&If(new M6)!=dde)&&(If=k(function(e){var t=ny(e),r=t==dXe?e.constructor:void 0,n=r?Jf(r):"";if(n)switch(n){case fXe:return fde;case pXe:return cde;case mXe:return ude;case gXe:return hde;case yXe:return dde}return t},"getTag"));O6=If,xXe=1,pde="[object Arguments]",mde="[object Array]",QE="[object Object]",bXe=Object.prototype,gde=bXe.hasOwnProperty;a(dye,"baseIsEqualDeep");k(dye,"baseIsEqualDeep");TXe=dye;a(P$,"baseIsEqual");k(P$,"baseIsEqual");fye=P$,CXe=1,kXe=2;a(pye,"baseIsMatch");k(pye,"baseIsMatch");SXe=pye;a(mye,"isStrictComparable");k(mye,"isStrictComparable");gye=mye;a(yye,"getMatchData");k(yye,"getMatchData");EXe=yye;a(xye,"matchesStrictComparable");k(xye,"matchesStrictComparable");bye=xye;a(Tye,"baseMatches");k(Tye,"baseMatches");vXe=Tye,wXe="[object Symbol]";a(Cye,"isSymbol");k(Cye,"isSymbol");Pw=Cye,_Xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AXe=/^\w*$/;a(kye,"isKey");k(kye,"isKey");B$=kye,RXe="Expected a function";a(Bw,"memoize");k(Bw,"memoize");Bw.Cache=Nw;LXe=Bw,IXe=500;a(Sye,"memoizeCapped");k(Sye,"memoizeCapped");DXe=Sye,NXe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MXe=/\\(\\)?/g,OXe=DXe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(NXe,function(r,n,i,s){t.push(i?s.replace(MXe,"$1"):n||r)}),t}),PXe=OXe,BXe=1/0,yde=ic?ic.prototype:void 0,xde=yde?yde.toString:void 0;a($$,"baseToString");k($$,"baseToString");$Xe=$$;a(Eye,"toString2");k(Eye,"toString");FXe=Eye;a(vye,"castPath");k(vye,"castPath");wye=vye,GXe=1/0;a(_ye,"toKey");k(_ye,"toKey");$w=_ye;a(Aye,"baseGet");k(Aye,"baseGet");Rye=Aye;a(Lye,"get");k(Lye,"get");VXe=Lye;a(Iye,"baseHasIn");k(Iye,"baseHasIn");zXe=Iye;a(Dye,"hasPath");k(Dye,"hasPath");UXe=Dye;a(Nye,"hasIn");k(Nye,"hasIn");WXe=Nye,jXe=1,qXe=2;a(Mye,"baseMatchesProperty");k(Mye,"baseMatchesProperty");HXe=Mye;a(Oye,"identity");k(Oye,"identity");F$=Oye;a(Pye,"baseProperty");k(Pye,"baseProperty");YXe=Pye;a(Bye,"basePropertyDeep");k(Bye,"basePropertyDeep");KXe=Bye;a($ye,"property");k($ye,"property");XXe=$ye;a(Fye,"baseIteratee");k(Fye,"baseIteratee");Fw=Fye;a(Gye,"createBaseFor");k(Gye,"createBaseFor");QXe=Gye,ZXe=QXe(),JXe=ZXe;a(Vye,"baseForOwn");k(Vye,"baseForOwn");eQe=Vye;a(zye,"createBaseEach");k(zye,"createBaseEach");tQe=zye,rQe=tQe(eQe),Gw=rQe;a(Uye,"baseMap");k(Uye,"baseMap");nQe=Uye;a(Wye,"map");k(Wye,"map");ru=Wye;a(jye,"baseFilter");k(jye,"baseFilter");iQe=jye;a(qye,"filter");k(qye,"filter");sQe=qye;a(Kf,"buildATNKey");k(Kf,"buildATNKey");qh=1,aQe=2,Hye=4,Yye=5,np=7,oQe=8,lQe=9,cQe=10,uQe=11,Kye=12,G$=class{static{a(this,"AbstractTransition")}static{k(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Vw=class extends G${static{a(this,"AtomTransition")}static{k(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},Xye=class extends G${static{a(this,"EpsilonTransition")}static{k(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},zw=class extends G${static{a(this,"RuleTransition")}static{k(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};a(Qye,"createATN");k(Qye,"createATN");a(Zye,"createRuleStartAndStopATNStates");k(Zye,"createRuleStartAndStopATNStates");a(V$,"atom");k(V$,"atom");a(Jye,"repetition");k(Jye,"repetition");a(e1e,"repetitionSep");k(e1e,"repetitionSep");a(t1e,"repetitionMandatory");k(t1e,"repetitionMandatory");a(r1e,"repetitionMandatorySep");k(r1e,"repetitionMandatorySep");a(n1e,"alternation");k(n1e,"alternation");a(i1e,"option");k(i1e,"option");a(Yh,"block");k(Yh,"block");a(z$,"plus");k(z$,"plus");a(U$,"star");k(U$,"star");a(s1e,"optional");k(s1e,"optional");a(lu,"defineDecisionState");k(lu,"defineDecisionState");a(ip,"makeAlts");k(ip,"makeAlts");a(a1e,"getProdType2");k(a1e,"getProdType");a(o1e,"makeBlock");k(o1e,"makeBlock");a(Uw,"tokenRef");k(Uw,"tokenRef");a(l1e,"ruleRef");k(l1e,"ruleRef");a(c1e,"buildRuleHandle");k(c1e,"buildRuleHandle");a(Ti,"epsilon");k(Ti,"epsilon");a(qi,"newState");k(qi,"newState");a(Ww,"addTransition");k(Ww,"addTransition");a(u1e,"removeState");k(u1e,"removeState");cw={},P6=class{static{a(this,"ATNConfigSet")}static{k(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=W$(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return ru(this.configs,e=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};a(W$,"getATNConfigKey");k(W$,"getATNConfigKey");a(h1e,"baseExtremum");k(h1e,"baseExtremum");hQe=h1e;a(d1e,"baseLt");k(d1e,"baseLt");dQe=d1e;a(f1e,"min");k(f1e,"min");fQe=f1e,bde=ic?ic.isConcatSpreadable:void 0;a(p1e,"isFlattenable");k(p1e,"isFlattenable");pQe=p1e;a(j$,"baseFlatten");k(j$,"baseFlatten");m1e=j$;a(g1e,"flatMap");k(g1e,"flatMap");mQe=g1e;a(y1e,"baseFindIndex");k(y1e,"baseFindIndex");gQe=y1e;a(x1e,"baseIsNaN");k(x1e,"baseIsNaN");yQe=x1e;a(b1e,"strictIndexOf");k(b1e,"strictIndexOf");xQe=b1e;a(T1e,"baseIndexOf");k(T1e,"baseIndexOf");bQe=T1e;a(C1e,"arrayIncludes");k(C1e,"arrayIncludes");TQe=C1e;a(k1e,"arrayIncludesWith");k(k1e,"arrayIncludesWith");CQe=k1e;a(S1e,"noop");k(S1e,"noop");kQe=S1e,SQe=1/0,EQe=Vg&&1/D$(new Vg([,-0]))[1]==SQe?function(e){return new Vg(e)}:kQe,vQe=EQe,wQe=200;a(E1e,"baseUniq");k(E1e,"baseUniq");_Qe=E1e;a(v1e,"uniqBy");k(v1e,"uniqBy");AQe=v1e;a(w1e,"flatten");k(w1e,"flatten");RQe=w1e;a(_1e,"arrayEach");k(_1e,"arrayEach");LQe=_1e;a(A1e,"castFunction");k(A1e,"castFunction");IQe=A1e;a(R1e,"forEach");k(R1e,"forEach");z5=R1e,DQe="[object Map]",NQe="[object Set]",MQe=Object.prototype,OQe=MQe.hasOwnProperty;a(L1e,"isEmpty");k(L1e,"isEmpty");PQe=L1e;a(I1e,"arrayReduce");k(I1e,"arrayReduce");BQe=I1e;a(D1e,"baseReduce");k(D1e,"baseReduce");$Qe=D1e;a(N1e,"reduce");k(N1e,"reduce");Tde=N1e;a(M1e,"createDFACache");k(M1e,"createDFACache");O1e=class{static{a(this,"PredicateSet")}static{k(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(n)),this.incomplete=(r=e?.incomplete)!==null&&r!==void 0?r:!1}initialize(e){this.atn=Qye(e.rules),this.dfas=$1e(this.atn),this.callers=P1e(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,l=this.incomplete,u=Kf(r,"Alternation",t),d=this.atn.decisionMap[u].decision,f=ru(k6({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),p=>ru(p,m=>m[0]));if(B6(f,!1)&&!i){let p=Tde(f,(m,g,y)=>(z5(g,x=>{x&&(m[x.tokenTypeIdx]=y,z5(x.categoryMatches,b=>{m[b]=y}))}),m),{});return n?function(m){var g;let y=this.LA_FAST(1),x=p[y.tokenTypeIdx];if(m!==void 0&&x!==void 0){let b=(g=m[x])===null||g===void 0?void 0:g.GATE;if(b!==void 0&&b.call(this)===!1)return}return x}:function(){let m=this.LA_FAST(1);return p[m.tokenTypeIdx]}}else return n?function(p){let m=new O1e,g=p===void 0?0:p.length;for(let x=0;xru(m,g=>g[0]));if(B6(p)&&p[0][0]&&!i&&!B1e(d,n,u)){let m=p[0],g=RQe(m);if(g.length===1&&PQe(g[0].categoryMatches)){let x=g[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===x}}else{let y=Tde(g,(x,b)=>(b!==void 0&&(x[b.tokenTypeIdx]=!0,z5(b.categoryMatches,T=>{x[T]=!0})),x),{});return function(){let x=this.LA_FAST(1);return y[x.tokenTypeIdx]===!0}}}return function(){let m=Ov.call(this,s,f,Cde,o,l);return typeof m=="object"?!1:m===0}}};a(B6,"isLL1Sequence");k(B6,"isLL1Sequence");a(P1e,"buildCallers");k(P1e,"buildCallers");a($6,"firstSet");k($6,"firstSet");a(B1e,"optionalHasFollowConflict");k(B1e,"optionalHasFollowConflict");a($1e,"initATNSimulator");k($1e,"initATNSimulator");a(Ov,"adaptivePredict");k(Ov,"adaptivePredict");a(F1e,"performLookahead");k(F1e,"performLookahead");a(G1e,"computeLookaheadTarget");k(G1e,"computeLookaheadTarget");a(V1e,"reportLookaheadAmbiguity");k(V1e,"reportLookaheadAmbiguity");a(z1e,"buildAmbiguityError");k(z1e,"buildAmbiguityError");a(U1e,"getProductionDslName2");k(U1e,"getProductionDslName");a(W1e,"buildAdaptivePredictError");k(W1e,"buildAdaptivePredictError");a(j1e,"getExistingTargetState");k(j1e,"getExistingTargetState");a(q1e,"computeReachSet");k(q1e,"computeReachSet");a(H1e,"getReachableTarget");k(H1e,"getReachableTarget");a(Y1e,"getUniqueAlt");k(Y1e,"getUniqueAlt");a(q$,"newDFAState");k(q$,"newDFAState");a(F6,"addDFAEdge");k(F6,"addDFAEdge");a(H$,"addDFAState");k(H$,"addDFAState");a(K1e,"computeStartState");k(K1e,"computeStartState");a(Gb,"closure");k(Gb,"closure");a(X1e,"getEpsilonTarget");k(X1e,"getEpsilonTarget");a(Q1e,"hasConfigInRuleStopState");k(Q1e,"hasConfigInRuleStopState");a(Z1e,"allConfigsInRuleStopStates");k(Z1e,"allConfigsInRuleStopStates");a(J1e,"hasConflictTerminatingPrediction");k(J1e,"hasConflictTerminatingPrediction");a(e0e,"getConflictingAltSets");k(e0e,"getConflictingAltSets");a(t0e,"hasConflictingAltSet");k(t0e,"hasConflictingAltSet");a(r0e,"hasStateAssociatedWithOneAlt");k(r0e,"hasStateAssociatedWithOneAlt");a(n0e,"getBestGuess");k(n0e,"getBestGuess");i0e=class{static{a(this,"CstNodeBuilder")}static{k(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new o0e(e),this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new Y$;return t.grammarSource=e,this.appendChild(this.current,t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=this.createLeafNode(e,!t);return t&&(r.grammarSource=t),this.appendChild(this.current,r),r}createLeafNode(e,t){return new a0e(e.startOffset,e.image.length,e.startLine-1,e.startColumn-1,e.endLine-1,e.endColumn,e.tokenType,t)}appendChild(e,t){t.container=e,e.content.push(t)}appendChildren(e,t){for(let r of t)r.container=e;e.content.length===0?e.content=t.slice():e.content.push(...t)}insertChildren(e,t,r){for(let n of r)n.container=e;e.content.splice(t,0,...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 i of e)t.push(this.createLeafNode(i,!0));let r=this.current,n=!1;if(r.content.length>0){this.appendChildren(r,t);return}for(;r.container;){let i=r.container.content.indexOf(r);if(i>0){this.insertChildren(r.container,i,t),n=!0;break}r=r.container}n||this.insertChildren(this.rootNode,0,t)}construct(e){let t=this.current;e.$cstNode=t;let r=this.nodeStack.pop();r&&(r.content.length===0?this.removeNode(r):r.content=r.content.slice())}},s0e=class{static{a(this,"AbstractCstNode")}static{k(this,"AbstractCstNode")}constructor(){this.container=void 0,this.grammarSource=void 0}get root(){let e=this;for(;e.container;)e=e.container;return e}get text(){return this.root.fullText.substring(this.offset,this.end)}},a0e=class extends s0e{static{a(this,"LeafCstNodeImpl")}static{k(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 astNode(){let e=this.container;if(!e)throw new Error("This node has no associated AST element");return e.astNode}get range(){return{start:{line:this._startLine,character:this._startColumn},end:{line:this._endLine,character:this._endColumn}}}constructor(e,t,r,n,i,s,o,l=!1){super(),this._hidden=l,this._offset=Df(e),this._length=Df(t),this._startLine=Df(r),this._startColumn=Df(n),this._endLine=Df(i),this._endColumn=Df(s),this._tokenType=o}};a(Df,"toSmi");k(Df,"toSmi");Y$=class extends s0e{static{a(this,"CompositeCstNodeImpl")}static{k(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=[],this._astNode=void 0,this._rangeCache=void 0}get astNode(){let e=this;for(;e;){if(e._astNode)return e._astNode;e=e.container}throw new Error("This node has no associated AST element")}set astNode(e){this._astNode=e}get hidden(){return!1}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._rangeCache;if(e===void 0){let t=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(t&&r){let{range:n}=t,{range:i}=r;this._rangeCache=e={start:n.start,end:i.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},o0e=class extends Y${static{a(this,"RootCstNodeImpl")}static{k(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??""}},G6=Symbol("Datatype");a(Pv,"isDataTypeNode");k(Pv,"isDataTypeNode");kde="\u200B",l0e=k(e=>e.endsWith(kde)?e:e+kde,"withRuleSuffix"),c0e=class{static{a(this,"AbstractLangiumParser")}static{k(this,"AbstractLangiumParser")}constructor(e,t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new WQe(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},t,e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new h0e(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},t)}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()}},GQe=class extends c0e{static{a(this,"LangiumParser")}static{k(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e,!1),this.nodeBuilder=new i0e,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;Ib(e)&&(n=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(l0e(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,i),sc(e)&&e.entry&&(this.mainRule=i),i}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 this.linkCstNode(t),t}linkCstNode(e){fs(e)&&e.$cstNode&&(e.$cstNode.astNode=e)}startImplementation(e,t,r){return n=>{let i=!this.isRecording()&&e!==void 0;if(i){let s={$type:e};this.stack.push(s),e===G6?s.value="":t!==void 0&&(s.$infixName=t)}return r(n),i?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 i=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(i);let s=this.nodeBuilder.buildLeafNode(n,r),{assignment:o,crossRef:l}=this.getAssignment(r),u=this.current;if(o){let h=Wh(r)?n.image:this.converter.convert(n.image,s);this.assign(o.operator,o.feature,h,s,l)}else if(Pv(u)){let h=n.image;Wh(r)||(h=this.converter.convert(h,s).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&Zv(e)}subrule(e,t,r,n,i){let s;!this.isRecording()&&!r&&(s=this.nodeBuilder.buildCompositeNode(n));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!r&&(o=this.construct()),o!==void 0&&s&&s.length>0&&this.performSubruleAssignment(o,n,s))}}performSubruleAssignment(e,t,r){let{assignment:n,crossRef:i}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,i);else if(!n){let s=this.current;if(Pv(s))s.value+=e.toString();else if(typeof e=="object"&&e){let l=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(l)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode);let n=this.nodeBuilder.buildCompositeNode(t);this.nodeBuilder.appendChild(n,r.$cstNode);let i={$type:e};this.stack.push(i),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)):Pv(e)?this.converter.convert(e.value,e.$cstNode):(lfe(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 i=0,s=-1;for(let g=0;gs?(s=x.precedence,i=g):x.precedence===s&&(x.rightAssoc||(i=g))}let o=n.slice(0,i),l=n.slice(i+1),u=r.slice(0,i+1),h=r.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:h,operators:l},p=this.constructInfix(d,t),m=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:n[i],right:m}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=Hb(e,Uh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Kb(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,i){let s=this.current,o;switch(i==="single"&&typeof r=="string"?o=this.linker.buildReference(s,t,n,r):i==="multi"&&typeof r=="string"?o=this.linker.buildMultiReference(s,t,n,r):o=r,this.linkCstNode(o),e){case"=":{s[t]=o;break}case"?=":{s[t]=!0;break}case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(let[r,n]of Object.entries(t)){let i=e[r];i===void 0?e[r]=n:Array.isArray(i)&&Array.isArray(n)&&(n.push(...i),e[r]=n)}return e.$cstNode=void 0,e}get definitionErrors(){return this.wrapper.definitionErrors}},VQe=class{static{a(this,"AbstractParserErrorMessageProvider")}static{k(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Pg.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Pg.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Pg.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Pg.buildEarlyExitMessage(e)}},u0e=class extends VQe{static{a(this,"LangiumParserErrorMessageProvider")}static{k(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}\`.`}},zQe=class extends c0e{static{a(this,"LangiumCompletionParser")}static{k(this,"LangiumCompletionParser")}constructor(e){super(e,!0),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(l0e(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,i){this.before(n),this.wrapper.wrapSubrule(e,t,i),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}},UQe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new u0e},h0e=class extends vHe{static{a(this,"ChevrotainWrapper")}static{k(this,"ChevrotainWrapper")}constructor(e,t,r){let n=t&&"maxLookahead"in t;super(e,{...UQe,lookaheadStrategy:n?new A$({maxLookahead:t.maxLookahead}):new FQe({logging:t.skipValidations?()=>{}:void 0,incomplete:r}),...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,{})}},WQe=class extends h0e{static{a(this,"ProfilerWrapper")}static{k(this,"ProfilerWrapper")}constructor(e,t,r,n){super(e,t,r),this.task=n}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))}}};a(K$,"createParser");k(K$,"createParser");a(d0e,"buildRules");k(d0e,"buildRules");a(f0e,"buildInfixRule");k(f0e,"buildInfixRule");a(Hh,"buildElement");k(Hh,"buildElement");a(p0e,"buildAction");k(p0e,"buildAction");a(m0e,"buildRuleCall");k(m0e,"buildRuleCall");a(g0e,"buildRuleCallPredicate");k(g0e,"buildRuleCallPredicate");a(ul,"buildPredicate");k(ul,"buildPredicate");a(y0e,"buildAlternatives");k(y0e,"buildAlternatives");a(x0e,"buildUnorderedGroup");k(x0e,"buildUnorderedGroup");a(b0e,"buildGroup");k(b0e,"buildGroup");a(Vb,"getGuardCondition");k(Vb,"getGuardCondition");a(X$,"buildCrossReference");k(X$,"buildCrossReference");a(T0e,"buildKeyword");k(T0e,"buildKeyword");a(Q$,"wrap");k(Q$,"wrap");a(jw,"getRule");k(jw,"getRule");a(C0e,"getRuleName");k(C0e,"getRuleName");a(uw,"getToken");k(uw,"getToken");a(k0e,"createCompletionParser");k(k0e,"createCompletionParser");a(S0e,"createLangiumParser");k(S0e,"createLangiumParser");a(E0e,"prepareLangiumParser");k(E0e,"prepareLangiumParser");v0e=class{static{a(this,"DefaultTokenBuilder")}static{k(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=qn(i$(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return i.push(...n),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(ac).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=Cw(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=n$(t)?Ca.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(Yg).flatMap(n=>Hg(n).filter(Wh)).distinct(n=>n.value).toArray().sort((n,i)=>i.value.length-n.value.length).map(n=>this.buildKeywordToken(n,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let n=this.buildKeywordPattern(e,r),i={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return typeof n=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(Xb(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{let i=n?.PATTERN;return i?.source&&Bfe("^"+i.source+"$",e.value)&&r.push(n),r},[])}},w0e=class{static{a(this,"DefaultValueConverter")}static{k(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(Kb(r)&&(r=Vfe(r)),jh(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 eu.convertInt(t);case"STRING":return eu.convertString(t);case"ID":return eu.convertID(t)}switch(Yfe(e)?.toLowerCase()){case"number":return eu.convertNumber(t);case"boolean":return eu.convertBoolean(t);case"bigint":return eu.convertBigint(t);case"date":return eu.convertDate(t);default:return t}}};(function(e){function t(h){let d="";for(let f=1;f{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},Sde=class V6{static{a(this,"_FullTextDocument")}static{k(this,"FullTextDocument")}constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(V6.isIncremental(n)){let i=e8(n.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),h=this._lineOffsets,d=U6(n.text,!1,s);if(u-l===d.length)for(let p=0,m=d.length;pt?i=o:n=o+1}let s=n-1;return t=this.ensureBeforeEOL(t,r[s]),{line:s,character:t-r[s]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let i=t.line+1=r.length){let o=r.length-1;return{start:{line:o,character:0},end:{line:o,character:this._content.length-r[o]}}}else if(t<0)return{start:{line:0,character:0},end:{line:0,character:0}};let n=r[t],i=t+1=r.length)return"";if(t<0)return"";let n=t+1r&&J$(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(i,s,o,l){return new Sde(i,s,o,l)}a(t,"create"),k(t,"create"),e.create=t;function r(i,s,o){if(i instanceof Sde)return i.update(s,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}a(r,"update"),k(r,"update"),e.update=r;function n(i,s){let o=i.getText(),l=hw(s.map(R0e),(d,f)=>{let p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p}),u=0,h=[];for(let d of l){let f=i.offsetAt(d.range.start);if(fu&&h.push(o.substring(u,f)),d.newText.length&&h.push(d.newText),u=i.offsetAt(d.range.end)}return h.push(o.substr(u)),h.join("")}a(n,"applyEdits"),k(n,"applyEdits"),e.applyEdits=n})(z6||(z6={}));a(hw,"mergeSort");k(hw,"mergeSort");a(U6,"computeLineOffsets");k(U6,"computeLineOffsets");a(J$,"isEOL");k(J$,"isEOL");a(e8,"getWellformedRange");k(e8,"getWellformedRange");a(R0e,"getWellformedEdit");k(R0e,"getWellformedEdit");(()=>{"use strict";var e={975:O=>{function G(N){if(typeof N!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(N))}a(G,"e2"),k(G,"e");function I(N,D){for(var M,R="",P=0,V=-1,U=0,z=0;z<=N.length;++z){if(z2){var j=R.lastIndexOf("/");if(j!==R.length-1){j===-1?(R="",P=0):P=(R=R.slice(0,j)).length-1-R.lastIndexOf("/"),V=z,U=0;continue}}else if(R.length===2||R.length===1){R="",P=0,V=z,U=0;continue}}D&&(R.length>0?R+="/..":R="..",P=2)}else R.length>0?R+="/"+N.slice(V+1,z):R=N.slice(V+1,z),P=z-V-1;V=z,U=0}else M===46&&U!==-1?++U:U=-1}return R}a(I,"r2"),k(I,"r");var F={resolve:k(function(){for(var N,D="",M=!1,R=arguments.length-1;R>=-1&&!M;R--){var P;R>=0?P=arguments[R]:(N===void 0&&(N=process.cwd()),P=N),G(P),P.length!==0&&(D=P+"/"+D,M=P.charCodeAt(0)===47)}return D=I(D,!M),M?D.length>0?"/"+D:"/":D.length>0?D:"."},"resolve"),normalize:k(function(N){if(G(N),N.length===0)return".";var D=N.charCodeAt(0)===47,M=N.charCodeAt(N.length-1)===47;return(N=I(N,!D)).length!==0||D||(N="."),N.length>0&&M&&(N+="/"),D?"/"+N:N},"normalize"),isAbsolute:k(function(N){return G(N),N.length>0&&N.charCodeAt(0)===47},"isAbsolute"),join:k(function(){if(arguments.length===0)return".";for(var N,D=0;D0&&(N===void 0?N=M:N+="/"+M)}return N===void 0?".":F.normalize(N)},"join"),relative:k(function(N,D){if(G(N),G(D),N===D||(N=F.resolve(N))===(D=F.resolve(D)))return"";for(var M=1;Mz){if(D.charCodeAt(V+K)===47)return D.slice(V+K+1);if(K===0)return D.slice(V+K)}else P>z&&(N.charCodeAt(M+K)===47?j=K:K===0&&(j=0));break}var Z=N.charCodeAt(M+K);if(Z!==D.charCodeAt(V+K))break;Z===47&&(j=K)}var ce="";for(K=M+j+1;K<=R;++K)K!==R&&N.charCodeAt(K)!==47||(ce.length===0?ce+="..":ce+="/..");return ce.length>0?ce+D.slice(V+j):(V+=j,D.charCodeAt(V)===47&&++V,D.slice(V))},"relative"),_makeLong:k(function(N){return N},"_makeLong"),dirname:k(function(N){if(G(N),N.length===0)return".";for(var D=N.charCodeAt(0),M=D===47,R=-1,P=!0,V=N.length-1;V>=1;--V)if((D=N.charCodeAt(V))===47){if(!P){R=V;break}}else P=!1;return R===-1?M?"/":".":M&&R===1?"//":N.slice(0,R)},"dirname"),basename:k(function(N,D){if(D!==void 0&&typeof D!="string")throw new TypeError('"ext" argument must be a string');G(N);var M,R=0,P=-1,V=!0;if(D!==void 0&&D.length>0&&D.length<=N.length){if(D.length===N.length&&D===N)return"";var U=D.length-1,z=-1;for(M=N.length-1;M>=0;--M){var j=N.charCodeAt(M);if(j===47){if(!V){R=M+1;break}}else z===-1&&(V=!1,z=M+1),U>=0&&(j===D.charCodeAt(U)?--U==-1&&(P=M):(U=-1,P=z))}return R===P?P=z:P===-1&&(P=N.length),N.slice(R,P)}for(M=N.length-1;M>=0;--M)if(N.charCodeAt(M)===47){if(!V){R=M+1;break}}else P===-1&&(V=!1,P=M+1);return P===-1?"":N.slice(R,P)},"basename"),extname:k(function(N){G(N);for(var D=-1,M=0,R=-1,P=!0,V=0,U=N.length-1;U>=0;--U){var z=N.charCodeAt(U);if(z!==47)R===-1&&(P=!1,R=U+1),z===46?D===-1?D=U:V!==1&&(V=1):D!==-1&&(V=-1);else if(!P){M=U+1;break}}return D===-1||R===-1||V===0||V===1&&D===R-1&&D===M+1?"":N.slice(D,R)},"extname"),format:k(function(N){if(N===null||typeof N!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof N);return(function(D,M){var R=M.dir||M.root,P=M.base||(M.name||"")+(M.ext||"");return R?R===M.root?R+P:R+"/"+P:P})(0,N)},"format"),parse:k(function(N){G(N);var D={root:"",dir:"",base:"",ext:"",name:""};if(N.length===0)return D;var M,R=N.charCodeAt(0),P=R===47;P?(D.root="/",M=1):M=0;for(var V=-1,U=0,z=-1,j=!0,K=N.length-1,Z=0;K>=M;--K)if((R=N.charCodeAt(K))!==47)z===-1&&(j=!1,z=K+1),R===46?V===-1?V=K:Z!==1&&(Z=1):V!==-1&&(Z=-1);else if(!j){U=K+1;break}return V===-1||z===-1||Z===0||Z===1&&V===z-1&&V===U+1?z!==-1&&(D.base=D.name=U===0&&P?N.slice(1,z):N.slice(U,z)):(U===0&&P?(D.name=N.slice(1,V),D.base=N.slice(1,z)):(D.name=N.slice(U,V),D.base=N.slice(U,z)),D.ext=N.slice(V,z)),U>0?D.dir=N.slice(0,U-1):P&&(D.dir="/"),D},"parse"),sep:"/",delimiter:":",win32:null,posix:null};F.posix=F,O.exports=F}},t={};function r(O){var G=t[O];if(G!==void 0)return G.exports;var I=t[O]={exports:{}};return e[O](I,I.exports,r),I.exports}a(r,"r"),k(r,"r"),r.d=(O,G)=>{for(var I in G)r.o(G,I)&&!r.o(O,I)&&Object.defineProperty(O,I,{enumerable:!0,get:G[I]})},r.o=(O,G)=>Object.prototype.hasOwnProperty.call(O,G),r.r=O=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:k(()=>p,"URI"),Utils:k(()=>$,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(O,G){if(!O.scheme&&G)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(!o.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(l.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 ("//")')}}a(u,"a"),k(u,"a");let h="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{a(this,"l")}static{k(this,"l")}static isUri(G){return G instanceof p||!!G&&typeof G.authority=="string"&&typeof G.fragment=="string"&&typeof G.path=="string"&&typeof G.query=="string"&&typeof G.scheme=="string"&&typeof G.fsPath=="string"&&typeof G.with=="function"&&typeof G.toString=="function"}scheme;authority;path;query;fragment;constructor(G,I,F,N,D,M=!1){typeof G=="object"?(this.scheme=G.scheme||h,this.authority=G.authority||h,this.path=G.path||h,this.query=G.query||h,this.fragment=G.fragment||h):(this.scheme=(function(R,P){return R||P?R:"file"})(G,M),this.authority=I||h,this.path=(function(R,P){switch(R){case"https":case"http":case"file":P?P[0]!==d&&(P=d+P):P=d}return P})(this.scheme,F||h),this.query=N||h,this.fragment=D||h,u(this,M))}get fsPath(){return T(this,!1)}with(G){if(!G)return this;let{scheme:I,authority:F,path:N,query:D,fragment:M}=G;return I===void 0?I=this.scheme:I===null&&(I=h),F===void 0?F=this.authority:F===null&&(F=h),N===void 0?N=this.path:N===null&&(N=h),D===void 0?D=this.query:D===null&&(D=h),M===void 0?M=this.fragment:M===null&&(M=h),I===this.scheme&&F===this.authority&&N===this.path&&D===this.query&&M===this.fragment?this:new g(I,F,N,D,M)}static parse(G,I=!1){let F=f.exec(G);return F?new g(F[2]||h,S(F[4]||h),S(F[5]||h),S(F[7]||h),S(F[9]||h),I):new g(h,h,h,h,h)}static file(G){let I=h;if(i&&(G=G.replace(/\\/g,d)),G[0]===d&&G[1]===d){let F=G.indexOf(d,2);F===-1?(I=G.substring(2),G=d):(I=G.substring(2,F),G=G.substring(F)||d)}return new g("file",I,G,h,h)}static from(G){let I=new g(G.scheme,G.authority,G.path,G.query,G.fragment);return u(I,!0),I}toString(G=!1){return C(this,G)}toJSON(){return this}static revive(G){if(G){if(G instanceof p)return G;{let I=new g(G);return I._formatted=G.external,I._fsPath=G._sep===m?G.fsPath:null,I}}return G}}let m=i?1:void 0;class g extends p{static{a(this,"d")}static{k(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath}toString(G=!1){return G?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){let G={$mid:1};return this._fsPath&&(G.fsPath=this._fsPath,G._sep=m),this._formatted&&(G.external=this._formatted),this.path&&(G.path=this.path),this.scheme&&(G.scheme=this.scheme),this.authority&&(G.authority=this.authority),this.query&&(G.query=this.query),this.fragment&&(G.fragment=this.fragment),G}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function x(O,G,I){let F,N=-1;for(let D=0;D=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57||M===45||M===46||M===95||M===126||G&&M===47||I&&M===91||I&&M===93||I&&M===58)N!==-1&&(F+=encodeURIComponent(O.substring(N,D)),N=-1),F!==void 0&&(F+=O.charAt(D));else{F===void 0&&(F=O.substr(0,D));let R=y[M];R!==void 0?(N!==-1&&(F+=encodeURIComponent(O.substring(N,D)),N=-1),F+=R):N===-1&&(N=D)}}return N!==-1&&(F+=encodeURIComponent(O.substring(N))),F!==void 0?F:O}a(x,"m"),k(x,"m");function b(O){let G;for(let I=0;I1&&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?G?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,i&&(I=I.replace(/\//g,"\\")),I}a(T,"v"),k(T,"v");function C(O,G){let I=G?b:x,F="",{scheme:N,authority:D,path:M,query:R,fragment:P}=O;if(N&&(F+=N,F+=":"),(D||N==="file")&&(F+=d,F+=d),D){let V=D.indexOf("@");if(V!==-1){let U=D.substr(0,V);D=D.substr(V+1),V=U.lastIndexOf(":"),V===-1?F+=I(U,!1,!1):(F+=I(U.substr(0,V),!1,!1),F+=":",F+=I(U.substr(V+1),!1,!0)),F+="@"}D=D.toLowerCase(),V=D.lastIndexOf(":"),V===-1?F+=I(D,!1,!0):(F+=I(D.substr(0,V),!1,!0),F+=D.substr(V))}if(M){if(M.length>=3&&M.charCodeAt(0)===47&&M.charCodeAt(2)===58){let V=M.charCodeAt(1);V>=65&&V<=90&&(M=`/${String.fromCharCode(V+32)}:${M.substr(3)}`)}else if(M.length>=2&&M.charCodeAt(1)===58){let V=M.charCodeAt(0);V>=65&&V<=90&&(M=`${String.fromCharCode(V+32)}:${M.substr(2)}`)}F+=I(M,!0,!1)}return R&&(F+="?",F+=I(R,!1,!1)),P&&(F+="#",F+=G?P:x(P,!1,!1)),F}a(C,"b"),k(C,"b");function v(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+v(O.substr(3)):O}}a(v,"C"),k(v,"C");let E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(O){return O.match(E)?O.replace(E,(G=>v(G))):O}a(S,"w"),k(S,"w");var _=r(975);let A=_.posix||_,B="/";var $;(function(O){O.joinPath=function(G,...I){return G.with({path:A.join(G.path,...I)})},O.resolvePath=function(G,...I){let F=G.path,N=!1;F[0]!==B&&(F=B+F,N=!0);let D=A.resolve(F,...I);return N&&D[0]===B&&!G.authority&&(D=D.substring(1)),G.with({path:D})},O.dirname=function(G){if(G.path.length===0||G.path===B)return G;let I=A.dirname(G.path);return I.length===1&&I.charCodeAt(0)===46&&(I=""),G.with({path:I})},O.basename=function(G){return A.basename(G.path)},O.extname=function(G){return A.extname(G.path)}})($||($={})),L0e=n})();({URI:Ha,Utils:Jx}=L0e);(function(e){e.basename=Jx.basename,e.dirname=Jx.dirname,e.extname=Jx.extname,e.joinPath=Jx.joinPath,e.resolvePath=Jx.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(o,l){return o?.toString()===l?.toString()}a(r,"equals"),k(r,"equals"),e.equals=r;function n(o,l){let u=typeof o=="string"?Ha.parse(o).path:o.path,h=typeof l=="string"?Ha.parse(l).path:l.path,d=u.split("/").filter(y=>y.length>0),f=h.split("/").filter(y=>y.length>0);if(t){let y=/^[A-Z]:$/;if(d[0]&&y.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]&&y.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]!==f[0])return h.substring(1)}let p=0;for(;p({name:n.name,uri:Eo.joinPath(Ha.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(this.normalizeUri(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 i of r){let s=n.children.get(i);if(!s)if(t)s={name:i,children:new Map,parent:n},n.children.set(i,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}};(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"})(zr||(zr={}));HQe=class{static{a(this,"DefaultLangiumDocumentFactory")}static{k(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=ri.CancellationToken.None){let r=await this.getInitialText(e,t);return this.createAsync(e,r,t)}async getInitialText(e,t){return this.fileSystemProvider.readFile(e)}fromTextDocument(e,t,r){return t=t??Ha.parse(e.uri),ri.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return ri.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 i;if(r)i={parseResult:e,uri:t,state:zr.Parsed,references:[],textDocument:r};else{let s=this.createTextDocumentGetter(t,n);i={parseResult:e,uri:t,state:zr.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=i,i}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),i=await this.getUpdatedText(e,n,t);if(n)Object.defineProperty(e,"textDocument",{value:n});else{let s=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:s})}return r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=zr.Parsed,e}async getUpdatedText(e,t,r){return t?t.getText():await this.fileSystemProvider.readFile(e.uri)}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=z6.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},YQe=class{static{a(this,"DefaultLangiumDocuments")}static{k(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new qQe,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return qn(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,zr.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=zr.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let n of r)n.state=zr.Changed;return this.documentTrie.delete(t),r}},gg=Symbol("RefResolving"),KQe=class{static{a(this,"DefaultReferenceImpl")}static{k(this,"DefaultReferenceImpl")}constructor(e,t,r,n,i){this.resolver=e,this.node=t,this.property=r,this._ref=void 0,this.$refNode=n,this.$refText=i}get ref(){return this.resolver.resolveReference(this,this.node,this.property)}get $nodeDescription(){return this._nodeDescription}get error(){return Og(this._ref)?this._ref:void 0}},XQe=class{static{a(this,"DefaultMultiReferenceImpl")}static{k(this,"DefaultMultiReferenceImpl")}constructor(e,t,r,n,i){this.resolver=e,this.node=t,this.property=r,this._items=void 0,this.$refNode=n,this.$refText=i}get items(){return this.resolver.resolveMultiReference(this,this.node,this.property)}get error(){return this._linkingError}},QQe=class{static{a(this,"DefaultLinker")}static{k(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,this.referenceResolver={resolveReference:this.resolveReference.bind(this),resolveMultiReference:this.resolveMultiReference.bind(this)}}async link(e,t=ri.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let n of rc(e.parseResult.value))await Ds(t),Lb(n).forEach(i=>{let s=`${n.$type}:${i.property}`;r.startSubTask(s);try{this.doLink(i,e)}finally{r.stopSubTask(s)}})}finally{r.stop()}}else for(let r of rc(e.parseResult.value))await Ds(t),Lb(r).forEach(n=>this.doLink(n,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=gg;try{let n=this.getCandidate(e);if(Og(n))r._ref=n;else{r._nodeDescription=n;let i=this.loadAstNode(n);r._ref=i??this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);let i=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${i}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=gg;try{let n=this.getCandidates(e),i=[];if(Og(n))r._linkingError=n;else for(let s of n){let o=this.loadAstNode(s);o&&i.push({ref:o,$nodeDescription:s})}r._items=i}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){return new KQe(this.referenceResolver,e,t,r,n)}buildMultiReference(e,t,r,n){return new XQe(this.referenceResolver,e,t,r,n)}resolveReference(e,t,r){if(fs(e._ref))return e._ref;if(ife(e._nodeDescription)){let n=this.loadAstNode(e._nodeDescription);e._ref=n??this.createLinkingError({reference:e,container:t,property:r},e._nodeDescription)}else if(e._ref===void 0){e._ref=gg;let n=Cb(t).$document,i=this.getLinkedNode({reference:e,container:t,property:r});if(i.error&&n&&n.stateKb(t)&&t.isMulti)}findDeclarations(e){if(e){let t=qfe(e),r=e.astNode;if(t&&r){let n=r[t.feature];if(So(n)||nu(n))return s6(n);if(Array.isArray(n)){for(let i of n)if((So(i)||nu(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return s6(i)}}if(r){let n=this.nameProvider.getNameNode(r);if(n&&(n===e||Afe(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 Lb(r))if(nu(n.reference)&&n.reference.items.some(i=>i.ref===e))return n.reference.items.map(i=>i.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 i=this.nameProvider.getNameNode(n)??n.$cstNode;i&&r.push(i)}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(i=>Eo.equals(i.sourceUri,t.documentUri))),r.push(...n),qn(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let n of t){let i=this.nameProvider.getNameNode(n);if(i){let s=tc(n),o=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:s.uri,sourcePath:o,targetUri:s.uri,targetPath:o,segment:Db(i),local:!0})}}return r}},zb=class{static{a(this,"MultiMap")}static{k(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return i6.sum(qn(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?qn(t):ofe}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 qn(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return qn(this.map.keys())}values(){return qn(this.map.values()).flat()}entriesGroupedByKey(){return qn(this.map.entries())}},Ede=class{static{a(this,"BiMap")}static{k(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}},eZe=class{static{a(this,"DefaultScopeComputation")}static{k(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=ri.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=yw,n=ri.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let s of r(e))await Ds(n),this.addExportedSymbol(s,i,t);return i}addExportedSymbol(e,t,r){let n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=ri.CancellationToken.None){let r=e.parseResult.value,n=new zb;for(let i of Hg(r))await Ds(t),this.addLocalSymbol(i,e,n);return n}addLocalSymbol(e,t,r){let n=e.$container;if(n){let i=this.nameProvider.getName(e);i&&r.add(n,this.descriptions.createDescription(e,i,t))}}},vde=class{static{a(this,"StreamScope")}static{k(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}},tZe=class{static{a(this,"MultiMapScope")}static{k(this,"MultiMapScope")}constructor(e,t,r){this.elements=new zb,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(i,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?qn(r).concat(this.outerScope.getElements(e)):qn(r)}getAllElements(){let e=qn(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},D0e=class{static{a(this,"DisposableCache")}static{k(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")}},rZe=class extends D0e{static{a(this,"SimpleCache")}static{k(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()}},nZe=class extends D0e{static{a(this,"ContextCache")}static{k(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 i=r();return n.set(t,i),i}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}},iZe=class extends rZe{static{a(this,"WorkspaceCache")}static{k(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()}))}},sZe=class{static{a(this,"DefaultScopeProvider")}static{k(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 iZe(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),n=tc(e.container).localSymbols;if(n){let s=e.container;do n.has(s)&&t.push(n.getStream(s).filter(o=>this.reflection.isSubtype(o.type,r))),s=s.$container;while(s)}let i=this.getGlobalScope(r,e);for(let s=t.length-1;s>=0;s--)i=this.createScope(t[s],i);return i}createScope(e,t,r){return new vde(qn(e),t,r)}createScopeForNodes(e,t,r){let n=qn(e).map(i=>{let s=this.nameProvider.getName(i);if(s)return this.descriptions.createDescription(i,s)}).nonNullable();return new vde(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new tZe(this.indexManager.allElements(e)))}};a(N0e,"isAstNodeWithComment");k(N0e,"isAstNodeWithComment");a(W6,"isIntermediateReference");k(W6,"isIntermediateReference");aZe=class{static{a(this,"DefaultJsonSerializer")}static{k(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,i=k((o,l)=>this.replacer(o,l,r),"defaultReplacer"),s=n?(o,l)=>n(o,l,i):i;try{return this.currentDocument=tc(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:i,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e))if(So(t)){let l=t.ref,u=r?t.$refText:void 0;if(l){let h=tc(l),d="";this.currentDocument&&this.currentDocument!==h&&(o?d=o(h.uri,l):d=h.uri.toString());let f=this.astNodeLocator.getAstNodePath(l);return{$ref:`${d}#${f}`,$refText:u}}else return{$error:t.error?.message??"Could not resolve reference",$refText:u}}else if(nu(t)){let l=r?t.$refText:void 0,u=[];for(let h of t.items){let d=h.ref,f=tc(h.ref),p="";this.currentDocument&&this.currentDocument!==f&&(o?p=o(f.uri,d):p=f.uri.toString());let m=this.astNodeLocator.getAstNodePath(d);u.push(`${p}#${m}`)}return{$refs:u,$refText:l}}else if(fs(t)){let l;if(i&&(l=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&l?.$textRegion&&(l.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(l??(l={...t}),l.$sourceText=t.$cstNode?.text),s){l??(l={...t});let u=this.commentProvider.getComment(t);u&&(l.$comment=u.replace(/\r/g,""))}return l??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=k(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(i=>!i.startsWith("$")).forEach(i=>{let s=Ufe(e.$cstNode,i).map(t);s.length!==0&&(n[i]=s)}),e}}linkNode(e,t,r,n,i,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h{await this.handleException(()=>e.call(t,r,n,i),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(i){if(Jb(i))throw i;console.error(`${t}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);let s=i instanceof Error?i.message:String(i);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=qn(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,i,s,o)=>{await this.handleException(()=>e.call(r,n,i,s,o),t,i,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},cZe=Object.freeze({validateNode:!0,validateChildren:!0}),uZe=class{static{a(this,"DefaultDocumentValidator")}static{k(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=ri.CancellationToken.None){let n=e.parseResult,i=[];if(await Ds(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,i,t),t.stopAfterLexingErrors&&i.some(s=>s.data?.code===hl.LexingError)||(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(s=>s.data?.code===hl.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(s=>s.data?.code===hl.LinkingError))))return i;try{i.push(...await this.validateAst(n.value,t,r))}catch(s){if(Jb(s))throw s;console.error("An error occurred during validation:",s)}return await Ds(r),i}processLexingErrors(e,t,r){let n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let i of n){let s=i.severity??"error",o={severity:$v(s),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:O0e(s),source:this.getSource()};t.push(o)}}processParsingErrors(e,t,r){for(let n of e.parserErrors){let i;if(Zv(n.token))i=Rfe(n.token);else if("previousToken"in n){let s=n.previousToken;if(Zv(s)){let o={line:s.endLine-1,character:s.endColumn};i={start:o,end:o}}else{let o={line:0,character:0};i={start:o,end:o}}}if(i){let s={severity:$v("error"),range:i,message:n.message,data:$g(hl.ParsingError),source:this.getSource()};t.push(s)}}}processLinkingErrors(e,t,r){for(let n of e.references){let i=n.error;if(i){let s={node:i.info.container,range:n.$refNode?.range,property:i.info.property,index:i.info.index,data:{code:hl.LinkingError,containerType:i.info.container.$type,property:i.info.property,refText:i.info.reference.$refText}};t.push(this.toDiagnostic("error",i.message,s))}}}async validateAst(e,t,r=ri.CancellationToken.None){let n=[],i=k((s,o,l)=>{n.push(this.toDiagnostic(s,o,l))},"acceptor");return await this.validateAstBefore(e,t,i,r),await this.validateAstNodes(e,t,i,r),await this.validateAstAfter(e,t,i,r),n}async validateAstBefore(e,t,r,n=ri.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let s of i)await Ds(n),await s(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=ri.CancellationToken.None){if(this.profiler?.isActive("validating")){let i=this.profiler.createTask("validating",this.languageId);i.start();try{let s=rc(e).iterator();for(let o of s){i.startSubTask(o.$type);let l=this.validateSingleNodeOptions(o,t);if(l.validateNode)try{let u=this.validationRegistry.getChecks(o.$type,t.categories);for(let h of u)await h(o,r,n)}finally{i.stopSubTask(o.$type)}l.validateChildren||s.prune()}}finally{i.stop()}}else{let i=rc(e).iterator();for(let s of i){await Ds(n);let o=this.validateSingleNodeOptions(s,t);if(o.validateNode){let l=this.validationRegistry.getChecks(s.$type,t.categories);for(let u of l)await u(s,r,n)}o.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return cZe}async validateAstAfter(e,t,r,n=ri.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let s of i)await Ds(n),await s(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:M0e(r),severity:$v(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};a(M0e,"getDiagnosticRange");k(M0e,"getDiagnosticRange");a($v,"toDiagnosticSeverity");k($v,"toDiagnosticSeverity");a(O0e,"toDiagnosticData");k(O0e,"toDiagnosticData");(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(hl||(hl={}));hZe=class{static{a(this,"DefaultAstNodeDescriptionProvider")}static{k(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let n=r??tc(e);t??(t=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let s,o=k(()=>s??(s=Db(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return o()},selectionSegment:Db(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},dZe=class{static{a(this,"DefaultReferenceDescriptionProvider")}static{k(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=ri.CancellationToken.None){let r=[],n=e.parseResult.value;for(let i of rc(n))await Ds(t),Lb(i).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=[];So(t)&&t.$nodeDescription?r=[t.$nodeDescription]:nu(t)&&(r=t.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));let n=tc(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),s=[],o=Db(t.$refNode);for(let l of r)s.push({sourceUri:n,sourcePath:i,targetUri:l.documentUri,targetPath:l.path,segment:o,local:Eo.equals(l.documentUri,n)});return s}},fZe=class{static{a(this,"DefaultAstNodeLocator")}static{k(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,i)=>{if(!n||i.length===0)return n;let s=i.indexOf(this.indexSeparator);if(s>0){let o=i.substring(0,s),l=parseInt(i.substring(s+1));return n[o]?.[l]}return n[i]},e)}},pZe=jB(KB(),1),mZe=class{static{a(this,"DefaultConfigurationProvider")}static{k(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Z$,this.onConfigurationSectionUpdateEmitter=new pZe.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,i)=>{this.updateSectionConfiguration(n.section,r[i])})}}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}},ZE=jB(KB(),1);(function(e){function t(r){return{dispose:k(async()=>await r(),"dispose")}}a(t,"create"),k(t,"create"),e.create=t})(vb||(vb={}));gZe=class{static{a(this,"DefaultDocumentBuilder")}static{k(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new zb,this.documentPhaseListeners=new zb,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=zr.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=ri.CancellationToken.None){for(let n of e){let i=n.uri.toString();if(n.state===zr.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,zr.IndexedReferences);else if(typeof t.validation=="object"){let s=this.findMissingValidationCategories(n,t);s.length>0&&(this.buildState.set(i,{completed:!1,options:{validation:{categories:s}},result:this.buildState.get(i)?.result}),n.state=zr.IndexedReferences)}}else this.buildState.delete(i)}this.currentState=zr.Changed,await this.emitUpdate(e.map(n=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=ri.CancellationToken.None){this.currentState=zr.Changed;let n=[];for(let l of t){let u=this.langiumDocuments.deleteDocuments(l);for(let h of u)n.push(h.uri),this.cleanUpDeleted(h)}let i=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(let l of i){let u=this.langiumDocuments.getDocument(l);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=zr.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,zr.Changed)}let s=qn(i).concat(n).map(l=>l.toString()).toSet();this.langiumDocuments.all.filter(l=>!s.has(l.uri.toString())&&this.shouldRelink(l,s)).forEach(l=>this.resetToState(l,zr.ComputedScopes)),await this.emitUpdate(i,n),await Ds(r);let o=this.sortDocuments(this.langiumDocuments.all.filter(l=>l.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=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 qn(s).filter(o=>!i.has(o)).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),vb.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case zr.Changed:case zr.Parsed:this.indexManager.removeContent(e.uri);case zr.IndexedContent:e.localSymbols=void 0;case zr.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case zr.Linked:this.indexManager.removeReferences(e.uri);case zr.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case zr.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=zr.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,zr.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,zr.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,zr.ComputedScopes,r,async s=>{let o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=await o.collectLocalSymbols(s,r)});let n=e.filter(s=>this.shouldLink(s));await this.runCancelable(n,zr.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(n,zr.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));let i=e.filter(s=>this.shouldValidate(s)?!0:(this.markAsCompleted(s),!1));await this.runCancelable(i,zr.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(),i=this.buildState.get(n);(!i||i.completed)&&this.buildState.set(n,{completed:!1,options:t,result:i?.result})}}async runCancelable(e,t,r,n){for(let s of e)s.states.state===t);await this.notifyBuildPhase(i,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),vb.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),vb.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=ri.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(Bg);if(this.currentState>=e&&e>n.state)return Promise.reject(new ZE.ResponseError(ZE.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${zr[n.state]}, requiring ${zr[e]}, but workspace state is already ${zr[this.currentState]}. Returning undefined.`))}else return Promise.reject(new ZE.ResponseError(ZE.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((i,s)=>{let o=this.onDocumentPhase(e,u=>{Eo.equals(u.uri,t)&&(o.dispose(),l.dispose(),i(u.uri))}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(Bg)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Bg):new Promise((r,n)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),s.dispose(),r()}),s=t.onCancellationRequested(()=>{i.dispose(),s.dispose(),n(Bg)})})}async notifyDocumentPhase(e,t,r){let i=this.documentPhaseListeners.get(t).slice();for(let s of i)try{await Ds(r),await s(e,r)}catch(o){if(!Jb(o))throw o}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let i=this.buildPhaseListeners.get(t).slice();for(let s of i)await Ds(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),i=typeof n.validation=="object"?{...n.validation}:{};i.categories=this.findMissingValidationCategories(e,n);let s=await r.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;let o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=qn(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},yZe=class{static{a(this,"DefaultIndexManager")}static{k(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new nZe,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=tc(e).uri,n=[];return this.referenceIndex.forEach(i=>{i.forEach(s=>{Eo.equals(s.targetUri,r)&&s.targetPath===t&&n.push(s)})}),qn(n)}allElements(e,t){let r=qn(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(i=>this.astReflection.isSubtype(i.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=ri.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,n),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=ri.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}},xZe=class{static{a(this,"DefaultWorkspaceManager")}static{k(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Z$,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=ri.CancellationToken.None){let r=await this.performStartup(e);await Ds(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=k(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 i=qn(n).distinct(s=>s.toString()).filter(s=>!this.langiumDocuments.hasDocument(s));return await this.loadWorkspaceDocuments(i,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 Ha.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=Eo.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},bZe=class{static{a(this,"DefaultLexerErrorMessageProvider")}static{k(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return C6.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return C6.buildUnableToPopLexerModeMessage(e)}},TZe={mode:"full"},CZe=class{static{a(this,"DefaultLexer")}static{k(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=q6(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Ca(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=TZe){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(q6(e))return e;let t=t8(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};a(P0e,"isTokenTypeArray");k(P0e,"isTokenTypeArray");a(t8,"isIMultiModeLexerDefinition");k(t8,"isIMultiModeLexerDefinition");a(q6,"isTokenTypeDictionary");k(q6,"isTokenTypeDictionary");gw();a(B0e,"parseJSDoc");k(B0e,"parseJSDoc");a($0e,"isJSDoc");k($0e,"isJSDoc");a(r8,"getLines");k(r8,"getLines");wde=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,kZe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;a(F0e,"tokenize");k(F0e,"tokenize");a(G0e,"buildInlineTokens");k(G0e,"buildInlineTokens");SZe=/\S/,EZe=/\s*$/;a(dw,"skipWhitespace");k(dw,"skipWhitespace");a(V0e,"lastCharacter");k(V0e,"lastCharacter");a(z0e,"parseJSDocComment");k(z0e,"parseJSDocComment");a(U0e,"parseJSDocElement");k(U0e,"parseJSDocElement");a(W0e,"appendEmptyLine");k(W0e,"appendEmptyLine");a(n8,"parseJSDocText");k(n8,"parseJSDocText");a(j0e,"parseJSDocInline");k(j0e,"parseJSDocInline");a(i8,"parseJSDocTag");k(i8,"parseJSDocTag");a(s8,"parseJSDocLine");k(s8,"parseJSDocLine");a(qw,"normalizeOptions");k(qw,"normalizeOptions");a(Fv,"normalizeOption");k(Fv,"normalizeOption");_de=class{static{a(this,"JSDocCommentImpl")}static{k(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.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+=Y6(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+=Y6(t)+n}return t.trim()}},U5=class{static{a(this,"JSDocTagImpl")}static{k(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 i=q0e(this.name,t,e??{});if(typeof i=="string")return i}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}};a(q0e,"renderInlineTag");k(q0e,"renderInlineTag");a(H0e,"renderLinkDefault");k(H0e,"renderLinkDefault");H6=class{static{a(this,"JSDocTextImpl")}static{k(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}},Y0e=class{static{a(this,"JSDocLineImpl")}static{k(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};a(Y6,"fillNewlines");k(Y6,"fillNewlines");vZe=class{static{a(this,"JSDocDocumentationProvider")}static{k(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&&$0e(t))return B0e(t).toMarkdown({renderLink:k((n,i)=>this.documentationLinkRenderer(e,n,i),"renderLink"),renderTag:k(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 i=n.nameSegment.range.start.line+1,s=n.nameSegment.range.start.character+1,o=n.documentUri.with({fragment:`L${i},${s}`});return`[${r}](${o.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=tc(e).localSymbols;if(!n)return;let i=e;do{let o=n.getStream(i).find(l=>l.name===t);if(o)return o;i=i.$container}while(i)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(n=>n.name===t)}},wZe=class{static{a(this,"DefaultCommentProvider")}static{k(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return N0e(e)?e.$comment:Dfe(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},_Ze=class{static{a(this,"DefaultAsyncParser")}static{k(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}};(function(e){e[e.Normal=0]="Normal",e[e.Immediate=1]="Immediate"})(fw||(fw={}));AZe=class{static{a(this,"DefaultWorkspaceLock")}static{k(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new ri.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.immediateReads=[],this.done=!0}write(e){this.cancelWrite();let t=A0e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e,t=fw.Normal){if(t===fw.Immediate){let r=Promise.resolve().then(()=>e());this.immediateReads.push(r);let n=k(()=>{this.immediateReads.splice(this.immediateReads.indexOf(r),1)},"remove");return r.then(n,n),r}return this.enqueue(this.readQueue,e)}enqueue(e,t,r=ri.CancellationToken.None){let n=new Z$,i={action:t,deferred:n,cancellationToken:r};return e.push(i),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)for(e.push(this.writeQueue.shift()),this.done=!1;this.immediateReads.length>0;)await Promise.allSettled(this.immediateReads.slice());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length)),this.done=!1;else return;await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:n})=>{try{let i=await Promise.resolve().then(()=>t(n));r.resolve(i)}catch(i){Jb(i)?r.resolve(void 0):r.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},RZe=class{static{a(this,"DefaultHydrator")}static{k(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new Ede,this.tokenTypeIdMap=new Ede,this.cstNodeBuilder=new i0e,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 rc(e))t.set(n,{});if(e.$cstNode)for(let n of Qv(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,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){let s=[];r[n]=s;for(let o of i)fs(o)?s.push(this.dehydrateAstNode(o,t)):So(o)?s.push(this.dehydrateReference(o,t)):s.push(o)}else fs(i)?r[n]=this.dehydrateAstNode(i,t):So(i)?r[n]=this.dehydrateReference(i,t):i!==void 0&&(r[n]=i);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);if(QB(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,zg(e))r.content=e.content.map(n=>this.dehydrateCstNode(n,t));else if(XB(e)){r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length;let{start:n,end:i}=e.range;r.startLine=n.line,r.startColumn=n.character,r.endLine=i.line,r.endColumn=i.character}return 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 n of rc(e))t.set(n,{});if(e.$cstNode)for(let n of Qv(e.$cstNode)){let i;"fullText"in n?i=new o0e(n.fullText):"content"in n?i=new Y$:"tokenType"in n&&(i=this.hydrateCstLeafNode(n)),i&&r.set(n,i)}return{astNodes:t,cstNodes:r,linkedCstNodes:new Set}}hydrateAstNode(e,t){let r=t.astNodes.get(e);if(r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode){let n=t.cstNodes.get(e.$cstNode);r.$cstNode=n,n&&!t.linkedCstNodes.has(n)&&(t.linkedCstNodes.add(n),n.astNode=r)}for(let[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){let s=[];r[n]=s;for(let o of i)fs(o)?s.push(this.setParent(this.hydrateAstNode(o,t),r)):So(o)?s.push(this.hydrateReference(o,r,n,t)):s.push(o)}else fs(i)?r[n]=this.setParent(this.hydrateAstNode(i,t),r):So(i)?r[n]=this.hydrateReference(i,r,n,t):i!==void 0&&(r[n]=i);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)),zg(n)){let i=[];for(let s of e.content)i.push(this.hydrateCstNode(s,t,r++));this.cstNodeBuilder.appendChildren(n,i)}return n}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType);return new a0e(e.offset,e.length,e.startLine,e.startColumn,e.endLine,e.endColumn,t,e.hidden)}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 rc(this.grammar))cfe(t)&&this.grammarElementIdMap.set(t,e++)}};a(sn,"createDefaultCoreModule");k(sn,"createDefaultCoreModule");a(an,"createDefaultSharedCoreModule");k(an,"createDefaultSharedCoreModule");(function(e){e.merge=(t,r)=>qg(qg({},t),r)})(Ade||(Ade={}));a(_r,"inject");k(_r,"inject");LZe=Symbol("isProxy");a(a8,"_inject");k(a8,"_inject");Rde=Symbol();a(K6,"_resolve");k(K6,"_resolve");a(qg,"_merge");k(qg,"_merge");IZe=class{static{a(this,"EmptyFileSystemProvider")}static{k(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[]}},un={fileSystemProvider:k(()=>new IZe,"fileSystemProvider")},DZe={Grammar:k(()=>{},"Grammar"),LanguageMetaData:k(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},NZe={AstReflection:k(()=>new _fe,"AstReflection")};a(K0e,"createMinimalGrammarServices");k(K0e,"createMinimalGrammarServices");a(Ns,"loadGrammarFromJson");k(Ns,"loadGrammarFromJson");(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:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/}})(X6||(X6={}));(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,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]*/}})(Q6||(Q6={}));(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]*/}})(Z6||(Z6={}));(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])?/}})(J6||(J6={}));(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]*/}})(eB||(eB={}));(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]*/}})(tB||(tB={}));(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]*/}})(rB||(rB={}));(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]*/}})(nB||(nB={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(iB||(iB={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(sB||(sB={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(aB||(aB={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(oB||(oB={}));(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:/"[^"]*"|'[^']*'/}})(lB||(lB={}));(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]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(cB||(cB={}));(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]*/}})(uB||(uB={}));umr={...X6.Terminals,...Q6.Terminals,...Z6.Terminals,...J6.Terminals,...eB.Terminals,...tB.Terminals,...rB.Terminals,...nB.Terminals,...iB.Terminals,...sB.Terminals,...aB.Terminals,...oB.Terminals,...cB.Terminals,...lB.Terminals,...uB.Terminals},hB={$type:"AbnfAlternation",alternatives:"alternatives"},dB={$type:"AbnfConcatenation",elements:"elements"},Gv={$type:"AbnfElement",primary:"primary",repeat:"repeat"},fB={$type:"AbnfGroup",element:"element"},pB={$type:"AbnfNumVal",value:"value"},mB={$type:"AbnfOptionalGroup",element:"element"},Nf={$type:"AbnfPrimary"},Vv={$type:"AbnfRule",definition:"definition",name:"name"},gB={$type:"AbnfRuleName",name:"name"},yB={$type:"AbnfStringLiteral",value:"value"},JE={$type:"Accelerator",name:"name",x:"x",y:"y"},W5={$type:"Alignment",direction:"direction",members:"members"},ev={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},eb={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},j5={$type:"Annotations",x:"x",y:"y"},ll={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};a(X0e,"isArchitecture");k(X0e,"isArchitecture");tv={$type:"Axis",label:"label",name:"name"},wb={$type:"Branch",name:"name",order:"order"};a(Q0e,"isBranch");k(Q0e,"isBranch");Lde={$type:"Checkout",branch:"branch"},rv={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},q5={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Bf={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};a(Z0e,"isCommit");k(Z0e,"isCommit");nv={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},kf={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},iv={$type:"Curve",entries:"entries",label:"label",name:"name"},Fh={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};a(J0e,"isCynefin");k(J0e,"isCynefin");sv={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Ide={$type:"Decorator",strategy:"strategy"},yg={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},_b={$type:"DomainBlock",domain:"domain",items:"items"};a(exe,"isDomainBlock");k(exe,"isDomainBlock");pw={$type:"DomainItem",label:"label"};a(txe,"isDomainItem");k(txe,"isDomainItem");xB={$type:"EbnfChoice",alternatives:"alternatives"},bB={$type:"EbnfExceptionPostfix",except:"except"},TB={$type:"EbnfGroup",element:"element"},CB={$type:"EbnfNonTerminal",name:"name"},kB={$type:"EbnfOneOrMorePostfix",operator:"operator"},SB={$type:"EbnfOptional",element:"element"},EB={$type:"EbnfOptionalPostfix",operator:"operator"},Dg={$type:"EbnfPostfix"},Ph={$type:"EbnfPrimary"},vB={$type:"EbnfRepetition",element:"element"},zv={$type:"EbnfRule",definition:"definition",name:"name"},wB={$type:"EbnfSequence",elements:"elements"},_B={$type:"EbnfSpecial",text:"text"},Uv={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},AB={$type:"EbnfTerminal",value:"value"},RB={$type:"EbnfZeroOrMorePostfix",operator:"operator"},Xl={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Mf={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Bh={$type:"EmFrame"},tb={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Dde={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},H5={$type:"EmModelEntity",name:"name"};a(rxe,"isEmModelEntityType");k(rxe,"isEmModelEntityType");av={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},Jc={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};a(Hw,"isEmResetFrame");k(Hw,"isEmResetFrame");Dh={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Y5={$type:"Entry",axis:"axis",value:"value"},Jl={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},Nde={$type:"Evolution",stages:"stages"},ov={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},K5={$type:"Evolve",component:"component",target:"target"},Gh={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};a(nxe,"isGitGraph");k(nxe,"isGitGraph");rb={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Fg={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};a(ixe,"isInfo");k(ixe,"isInfo");nb={$type:"Item",classSelector:"classSelector",name:"name"},X5={$type:"Junction",id:"id",in:"in"},ib={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},lv={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},Sf={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},$f={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};a(sxe,"isMerge");k(sxe,"isMerge");cv={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Q5={$type:"Option",name:"name",value:"value"},Ff={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};a(axe,"isPacket");k(axe,"isPacket");Gf={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};a(oxe,"isPacketBlock");k(oxe,"isPacketBlock");LB={$type:"PegAny",dot:"dot"},IB={$type:"PegGroup",element:"element"},DB={$type:"PegIdentifier",name:"name"},NB={$type:"PegLiteral",value:"value"},MB={$type:"PegOrderedChoice",alternatives:"alternatives"},Wv={$type:"PegPrefix",operator:"operator",suffix:"suffix"},Ng={$type:"PegPrimary"},jv={$type:"PegRule",definition:"definition",name:"name"},OB={$type:"PegSequence",elements:"elements"},qv={$type:"PegSuffix",operator:"operator",primary:"primary"},Vh={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};a(lxe,"isPie");k(lxe,"isPie");Ab={$type:"PieSection",label:"label",value:"value"};a(cxe,"isPieSection");k(cxe,"isPieSection");Z5={$type:"Pipeline",components:"components",parent:"parent"},uv={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},$h={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Vf={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};a(uxe,"isRailroad");k(uxe,"isRailroad");zf={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};a(hxe,"isRailroadAbnf");k(hxe,"isRailroadAbnf");PB={$type:"RailroadChoiceExpr",alternatives:"alternatives"},Uf={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};a(dxe,"isRailroadEbnf");k(dxe,"isRailroadEbnf");ec={$type:"RailroadExpression"},BB={$type:"RailroadNonTerminalExpr",name:"name"},$B={$type:"RailroadOneOrMoreExpr",element:"element"},FB={$type:"RailroadOptionalExpr",element:"element"},Wf={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};a(fxe,"isRailroadPeg");k(fxe,"isRailroadPeg");Hv={$type:"RailroadRule",definition:"definition",name:"name"},GB={$type:"RailroadSequenceExpr",elements:"elements"},VB={$type:"RailroadSpecialExpr",text:"text"},zB={$type:"RailroadTerminalExpr",value:"value"},UB={$type:"RailroadZeroOrMoreExpr",element:"element"},J5={$type:"Section",classSelector:"classSelector",name:"name"},xg={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},eP={$type:"Size",height:"height",width:"width"},Of={$type:"Statement"},Gg={$type:"Transition",from:"from",label:"label",to:"to"};a(pxe,"isTransition");k(pxe,"isTransition");jf={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};a(mxe,"isTreemap");k(mxe,"isTreemap");tP={$type:"TreemapRow",indent:"indent",item:"item"},Pf={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},Mg={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},ds={$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"};a(gxe,"isWardley");k(gxe,"isWardley");yxe=class extends sfe{static{a(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={AbnfAlternation:{name:hB.$type,properties:{alternatives:{name:hB.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:dB.$type,properties:{elements:{name:dB.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:Gv.$type,properties:{primary:{name:Gv.primary},repeat:{name:Gv.repeat,optional:!0}},superTypes:[]},AbnfGroup:{name:fB.$type,properties:{element:{name:fB.element}},superTypes:[Nf.$type]},AbnfNumVal:{name:pB.$type,properties:{value:{name:pB.value}},superTypes:[Nf.$type]},AbnfOptionalGroup:{name:mB.$type,properties:{element:{name:mB.element}},superTypes:[Nf.$type]},AbnfPrimary:{name:Nf.$type,properties:{},superTypes:[]},AbnfRule:{name:Vv.$type,properties:{definition:{name:Vv.definition},name:{name:Vv.name}},superTypes:[]},AbnfRuleName:{name:gB.$type,properties:{name:{name:gB.name}},superTypes:[Nf.$type]},AbnfStringLiteral:{name:yB.$type,properties:{value:{name:yB.value}},superTypes:[Nf.$type]},Accelerator:{name:JE.$type,properties:{name:{name:JE.name},x:{name:JE.x},y:{name:JE.y}},superTypes:[]},Alignment:{name:W5.$type,properties:{direction:{name:W5.direction},members:{name:W5.members,defaultValue:[]}},superTypes:[]},Anchor:{name:ev.$type,properties:{evolution:{name:ev.evolution},name:{name:ev.name},visibility:{name:ev.visibility}},superTypes:[]},Annotation:{name:eb.$type,properties:{number:{name:eb.number},text:{name:eb.text},x:{name:eb.x},y:{name:eb.y}},superTypes:[]},Annotations:{name:j5.$type,properties:{x:{name:j5.x},y:{name:j5.y}},superTypes:[]},Architecture:{name:ll.$type,properties:{accDescr:{name:ll.accDescr,optional:!0},accTitle:{name:ll.accTitle,optional:!0},alignments:{name:ll.alignments,defaultValue:[],optional:!0},edges:{name:ll.edges,defaultValue:[],optional:!0},groups:{name:ll.groups,defaultValue:[],optional:!0},junctions:{name:ll.junctions,defaultValue:[],optional:!0},services:{name:ll.services,defaultValue:[],optional:!0},title:{name:ll.title,optional:!0}},superTypes:[]},Axis:{name:tv.$type,properties:{label:{name:tv.label,optional:!0},name:{name:tv.name}},superTypes:[]},Branch:{name:wb.$type,properties:{name:{name:wb.name},order:{name:wb.order}},superTypes:[Of.$type]},Checkout:{name:Lde.$type,properties:{branch:{name:Lde.branch}},superTypes:[Of.$type]},CherryPicking:{name:rv.$type,properties:{id:{name:rv.id},parent:{name:rv.parent},tags:{name:rv.tags,defaultValue:[]}},superTypes:[Of.$type]},ClassDefStatement:{name:q5.$type,properties:{className:{name:q5.className},styleText:{name:q5.styleText}},superTypes:[]},Commit:{name:Bf.$type,properties:{id:{name:Bf.id},message:{name:Bf.message},tags:{name:Bf.tags,defaultValue:[]},type:{name:Bf.type}},superTypes:[Of.$type]},Common:{name:nv.$type,properties:{accDescr:{name:nv.accDescr,optional:!0},accTitle:{name:nv.accTitle,optional:!0},title:{name:nv.title,optional:!0}},superTypes:[]},Component:{name:kf.$type,properties:{decorator:{name:kf.decorator,optional:!0},evolution:{name:kf.evolution},inertia:{name:kf.inertia,defaultValue:!1},label:{name:kf.label,optional:!0},name:{name:kf.name},visibility:{name:kf.visibility}},superTypes:[]},Curve:{name:iv.$type,properties:{entries:{name:iv.entries,defaultValue:[]},label:{name:iv.label,optional:!0},name:{name:iv.name}},superTypes:[]},Cynefin:{name:Fh.$type,properties:{accDescr:{name:Fh.accDescr,optional:!0},accTitle:{name:Fh.accTitle,optional:!0},domains:{name:Fh.domains,defaultValue:[],optional:!0},title:{name:Fh.title,optional:!0},transitions:{name:Fh.transitions,defaultValue:[],optional:!0}},superTypes:[]},Deaccelerator:{name:sv.$type,properties:{name:{name:sv.name},x:{name:sv.x},y:{name:sv.y}},superTypes:[]},Decorator:{name:Ide.$type,properties:{strategy:{name:Ide.strategy}},superTypes:[]},Direction:{name:yg.$type,properties:{accDescr:{name:yg.accDescr},accTitle:{name:yg.accTitle},dir:{name:yg.dir},statements:{name:yg.statements,defaultValue:[]},title:{name:yg.title}},superTypes:[Gh.$type]},DomainBlock:{name:_b.$type,properties:{domain:{name:_b.domain},items:{name:_b.items,defaultValue:[],optional:!0}},superTypes:[]},DomainItem:{name:pw.$type,properties:{label:{name:pw.label}},superTypes:[]},EbnfChoice:{name:xB.$type,properties:{alternatives:{name:xB.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:bB.$type,properties:{except:{name:bB.except}},superTypes:[Dg.$type]},EbnfGroup:{name:TB.$type,properties:{element:{name:TB.element}},superTypes:[Ph.$type]},EbnfNonTerminal:{name:CB.$type,properties:{name:{name:CB.name}},superTypes:[Ph.$type]},EbnfOneOrMorePostfix:{name:kB.$type,properties:{operator:{name:kB.operator}},superTypes:[Dg.$type]},EbnfOptional:{name:SB.$type,properties:{element:{name:SB.element}},superTypes:[Ph.$type]},EbnfOptionalPostfix:{name:EB.$type,properties:{operator:{name:EB.operator}},superTypes:[Dg.$type]},EbnfPostfix:{name:Dg.$type,properties:{},superTypes:[]},EbnfPrimary:{name:Ph.$type,properties:{},superTypes:[]},EbnfRepetition:{name:vB.$type,properties:{element:{name:vB.element}},superTypes:[Ph.$type]},EbnfRule:{name:zv.$type,properties:{definition:{name:zv.definition},name:{name:zv.name}},superTypes:[]},EbnfSequence:{name:wB.$type,properties:{elements:{name:wB.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:_B.$type,properties:{text:{name:_B.text}},superTypes:[Ph.$type]},EbnfTerm:{name:Uv.$type,properties:{base:{name:Uv.base},postfixes:{name:Uv.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:AB.$type,properties:{value:{name:AB.value}},superTypes:[Ph.$type]},EbnfZeroOrMorePostfix:{name:RB.$type,properties:{operator:{name:RB.operator}},superTypes:[Dg.$type]},Edge:{name:Xl.$type,properties:{lhsDir:{name:Xl.lhsDir},lhsGroup:{name:Xl.lhsGroup,defaultValue:!1,optional:!0},lhsId:{name:Xl.lhsId},lhsInto:{name:Xl.lhsInto,defaultValue:!1,optional:!0},rhsDir:{name:Xl.rhsDir},rhsGroup:{name:Xl.rhsGroup,defaultValue:!1,optional:!0},rhsId:{name:Xl.rhsId},rhsInto:{name:Xl.rhsInto,defaultValue:!1,optional:!0},title:{name:Xl.title,optional:!0}},superTypes:[]},EmDataEntity:{name:Mf.$type,properties:{dataBlockValue:{name:Mf.dataBlockValue},dataType:{name:Mf.dataType,optional:!0},name:{name:Mf.name}},superTypes:[]},EmFrame:{name:Bh.$type,properties:{},superTypes:[]},EmGwt:{name:tb.$type,properties:{givenStatements:{name:tb.givenStatements,defaultValue:[]},sourceFrame:{name:tb.sourceFrame,referenceType:Bh.$type},thenStatements:{name:tb.thenStatements,defaultValue:[]},whenStatements:{name:tb.whenStatements,defaultValue:[],optional:!0}},superTypes:[]},EmGwtStatement:{name:Dde.$type,properties:{entityIdentifier:{name:Dde.entityIdentifier,referenceType:H5.$type}},superTypes:[]},EmModelEntity:{name:H5.$type,properties:{name:{name:H5.name}},superTypes:[]},EmNoteEntity:{name:av.$type,properties:{dataBlockValue:{name:av.dataBlockValue},dataType:{name:av.dataType,optional:!0},sourceFrame:{name:av.sourceFrame,referenceType:Bh.$type}},superTypes:[]},EmResetFrame:{name:Jc.$type,properties:{dataInlineValue:{name:Jc.dataInlineValue,optional:!0},dataReference:{name:Jc.dataReference,referenceType:Mf.$type,optional:!0},dataType:{name:Jc.dataType,optional:!0},entityIdentifier:{name:Jc.entityIdentifier},modelEntityType:{name:Jc.modelEntityType},name:{name:Jc.name},sourceFrames:{name:Jc.sourceFrames,defaultValue:[],referenceType:Bh.$type,optional:!0}},superTypes:[Bh.$type]},EmTimeFrame:{name:Dh.$type,properties:{dataInlineValue:{name:Dh.dataInlineValue,optional:!0},dataReference:{name:Dh.dataReference,referenceType:Mf.$type,optional:!0},dataType:{name:Dh.dataType,optional:!0},entityIdentifier:{name:Dh.entityIdentifier},modelEntityType:{name:Dh.modelEntityType},name:{name:Dh.name},sourceFrames:{name:Dh.sourceFrames,defaultValue:[],referenceType:Bh.$type,optional:!0}},superTypes:[Bh.$type]},Entry:{name:Y5.$type,properties:{axis:{name:Y5.axis,referenceType:tv.$type,optional:!0},value:{name:Y5.value}},superTypes:[]},EventModel:{name:Jl.$type,properties:{accDescr:{name:Jl.accDescr,optional:!0},accTitle:{name:Jl.accTitle,optional:!0},dataEntities:{name:Jl.dataEntities,defaultValue:[],optional:!0},frames:{name:Jl.frames,defaultValue:[],optional:!0},gwtEntities:{name:Jl.gwtEntities,defaultValue:[],optional:!0},modelEntities:{name:Jl.modelEntities,defaultValue:[],optional:!0},noteEntities:{name:Jl.noteEntities,defaultValue:[],optional:!0},title:{name:Jl.title,optional:!0}},superTypes:[]},Evolution:{name:Nde.$type,properties:{stages:{name:Nde.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:ov.$type,properties:{boundary:{name:ov.boundary,optional:!0},name:{name:ov.name},secondName:{name:ov.secondName,optional:!0}},superTypes:[]},Evolve:{name:K5.$type,properties:{component:{name:K5.component},target:{name:K5.target}},superTypes:[]},GitGraph:{name:Gh.$type,properties:{accDescr:{name:Gh.accDescr},accTitle:{name:Gh.accTitle},statements:{name:Gh.statements,defaultValue:[]},title:{name:Gh.title}},superTypes:[]},Group:{name:rb.$type,properties:{icon:{name:rb.icon,optional:!0},id:{name:rb.id},in:{name:rb.in},title:{name:rb.title,optional:!0}},superTypes:[]},Info:{name:Fg.$type,properties:{accDescr:{name:Fg.accDescr,optional:!0},accTitle:{name:Fg.accTitle,optional:!0},title:{name:Fg.title,optional:!0}},superTypes:[]},Item:{name:nb.$type,properties:{classSelector:{name:nb.classSelector,optional:!0},name:{name:nb.name}},superTypes:[]},Junction:{name:X5.$type,properties:{id:{name:X5.id},in:{name:X5.in}},superTypes:[]},Label:{name:ib.$type,properties:{negX:{name:ib.negX,defaultValue:!1,optional:!0},negY:{name:ib.negY,defaultValue:!1,optional:!0},offsetX:{name:ib.offsetX},offsetY:{name:ib.offsetY}},superTypes:[]},Leaf:{name:lv.$type,properties:{classSelector:{name:lv.classSelector,optional:!0},name:{name:lv.name},value:{name:lv.value}},superTypes:[nb.$type]},Link:{name:Sf.$type,properties:{arrow:{name:Sf.arrow,optional:!0},from:{name:Sf.from},fromPort:{name:Sf.fromPort,optional:!0},linkLabel:{name:Sf.linkLabel,optional:!0},to:{name:Sf.to},toPort:{name:Sf.toPort,optional:!0}},superTypes:[]},Merge:{name:$f.$type,properties:{branch:{name:$f.branch},id:{name:$f.id},tags:{name:$f.tags,defaultValue:[]},type:{name:$f.type}},superTypes:[Of.$type]},Note:{name:cv.$type,properties:{evolution:{name:cv.evolution},text:{name:cv.text},visibility:{name:cv.visibility}},superTypes:[]},Option:{name:Q5.$type,properties:{name:{name:Q5.name},value:{name:Q5.value,defaultValue:!1}},superTypes:[]},Packet:{name:Ff.$type,properties:{accDescr:{name:Ff.accDescr,optional:!0},accTitle:{name:Ff.accTitle,optional:!0},blocks:{name:Ff.blocks,defaultValue:[],optional:!0},title:{name:Ff.title,optional:!0}},superTypes:[]},PacketBlock:{name:Gf.$type,properties:{bits:{name:Gf.bits},end:{name:Gf.end,optional:!0},label:{name:Gf.label},start:{name:Gf.start}},superTypes:[]},PegAny:{name:LB.$type,properties:{dot:{name:LB.dot}},superTypes:[Ng.$type]},PegGroup:{name:IB.$type,properties:{element:{name:IB.element}},superTypes:[Ng.$type]},PegIdentifier:{name:DB.$type,properties:{name:{name:DB.name}},superTypes:[Ng.$type]},PegLiteral:{name:NB.$type,properties:{value:{name:NB.value}},superTypes:[Ng.$type]},PegOrderedChoice:{name:MB.$type,properties:{alternatives:{name:MB.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:Wv.$type,properties:{operator:{name:Wv.operator,optional:!0},suffix:{name:Wv.suffix}},superTypes:[]},PegPrimary:{name:Ng.$type,properties:{},superTypes:[]},PegRule:{name:jv.$type,properties:{definition:{name:jv.definition},name:{name:jv.name}},superTypes:[]},PegSequence:{name:OB.$type,properties:{elements:{name:OB.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:qv.$type,properties:{operator:{name:qv.operator,optional:!0},primary:{name:qv.primary}},superTypes:[]},Pie:{name:Vh.$type,properties:{accDescr:{name:Vh.accDescr,optional:!0},accTitle:{name:Vh.accTitle,optional:!0},sections:{name:Vh.sections,defaultValue:[],optional:!0},showData:{name:Vh.showData,defaultValue:!1,optional:!0},title:{name:Vh.title,optional:!0}},superTypes:[]},PieSection:{name:Ab.$type,properties:{label:{name:Ab.label},value:{name:Ab.value}},superTypes:[]},Pipeline:{name:Z5.$type,properties:{components:{name:Z5.components,defaultValue:[]},parent:{name:Z5.parent}},superTypes:[]},PipelineComponent:{name:uv.$type,properties:{evolution:{name:uv.evolution},label:{name:uv.label,optional:!0},name:{name:uv.name}},superTypes:[]},Radar:{name:$h.$type,properties:{accDescr:{name:$h.accDescr,optional:!0},accTitle:{name:$h.accTitle,optional:!0},axes:{name:$h.axes,defaultValue:[],optional:!0},curves:{name:$h.curves,defaultValue:[],optional:!0},options:{name:$h.options,defaultValue:[],optional:!0},title:{name:$h.title,optional:!0}},superTypes:[]},Railroad:{name:Vf.$type,properties:{accDescr:{name:Vf.accDescr,optional:!0},accTitle:{name:Vf.accTitle,optional:!0},rules:{name:Vf.rules,defaultValue:[]},title:{name:Vf.title,optional:!0}},superTypes:[]},RailroadAbnf:{name:zf.$type,properties:{accDescr:{name:zf.accDescr,optional:!0},accTitle:{name:zf.accTitle,optional:!0},rules:{name:zf.rules,defaultValue:[]},title:{name:zf.title,optional:!0}},superTypes:[]},RailroadChoiceExpr:{name:PB.$type,properties:{alternatives:{name:PB.alternatives,defaultValue:[]}},superTypes:[ec.$type]},RailroadEbnf:{name:Uf.$type,properties:{accDescr:{name:Uf.accDescr,optional:!0},accTitle:{name:Uf.accTitle,optional:!0},rules:{name:Uf.rules,defaultValue:[]},title:{name:Uf.title,optional:!0}},superTypes:[]},RailroadExpression:{name:ec.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:BB.$type,properties:{name:{name:BB.name}},superTypes:[ec.$type]},RailroadOneOrMoreExpr:{name:$B.$type,properties:{element:{name:$B.element}},superTypes:[ec.$type]},RailroadOptionalExpr:{name:FB.$type,properties:{element:{name:FB.element}},superTypes:[ec.$type]},RailroadPeg:{name:Wf.$type,properties:{accDescr:{name:Wf.accDescr,optional:!0},accTitle:{name:Wf.accTitle,optional:!0},rules:{name:Wf.rules,defaultValue:[]},title:{name:Wf.title,optional:!0}},superTypes:[]},RailroadRule:{name:Hv.$type,properties:{definition:{name:Hv.definition},name:{name:Hv.name}},superTypes:[]},RailroadSequenceExpr:{name:GB.$type,properties:{elements:{name:GB.elements,defaultValue:[]}},superTypes:[ec.$type]},RailroadSpecialExpr:{name:VB.$type,properties:{text:{name:VB.text}},superTypes:[ec.$type]},RailroadTerminalExpr:{name:zB.$type,properties:{value:{name:zB.value}},superTypes:[ec.$type]},RailroadZeroOrMoreExpr:{name:UB.$type,properties:{element:{name:UB.element}},superTypes:[ec.$type]},Section:{name:J5.$type,properties:{classSelector:{name:J5.classSelector,optional:!0},name:{name:J5.name}},superTypes:[nb.$type]},Service:{name:xg.$type,properties:{icon:{name:xg.icon,optional:!0},iconText:{name:xg.iconText,optional:!0},id:{name:xg.id},in:{name:xg.in},title:{name:xg.title,optional:!0}},superTypes:[]},Size:{name:eP.$type,properties:{height:{name:eP.height},width:{name:eP.width}},superTypes:[]},Statement:{name:Of.$type,properties:{},superTypes:[]},Transition:{name:Gg.$type,properties:{from:{name:Gg.from},label:{name:Gg.label},to:{name:Gg.to}},superTypes:[]},TreeNode:{name:Pf.$type,properties:{classAnnotation:{name:Pf.classAnnotation,optional:!0},descAnnotation:{name:Pf.descAnnotation,optional:!0},iconAnnotation:{name:Pf.iconAnnotation,optional:!0},indent:{name:Pf.indent,optional:!0},name:{name:Pf.name}},superTypes:[]},TreeView:{name:Mg.$type,properties:{accDescr:{name:Mg.accDescr,optional:!0},accTitle:{name:Mg.accTitle,optional:!0},nodes:{name:Mg.nodes,defaultValue:[]},title:{name:Mg.title,optional:!0}},superTypes:[]},Treemap:{name:jf.$type,properties:{accDescr:{name:jf.accDescr,optional:!0},accTitle:{name:jf.accTitle,optional:!0},title:{name:jf.title,optional:!0},TreemapRows:{name:jf.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:tP.$type,properties:{indent:{name:tP.indent,optional:!0},item:{name:tP.item}},superTypes:[]},Wardley:{name:ds.$type,properties:{accDescr:{name:ds.accDescr,optional:!0},accelerators:{name:ds.accelerators,defaultValue:[],optional:!0},accTitle:{name:ds.accTitle,optional:!0},anchors:{name:ds.anchors,defaultValue:[],optional:!0},annotation:{name:ds.annotation,defaultValue:[],optional:!0},annotations:{name:ds.annotations,defaultValue:[],optional:!0},components:{name:ds.components,defaultValue:[],optional:!0},deaccelerators:{name:ds.deaccelerators,defaultValue:[],optional:!0},evolution:{name:ds.evolution,optional:!0},evolves:{name:ds.evolves,defaultValue:[],optional:!0},links:{name:ds.links,defaultValue:[],optional:!0},notes:{name:ds.notes,defaultValue:[],optional:!0},pipelines:{name:ds.pipelines,defaultValue:[],optional:!0},size:{name:ds.size,optional:!0},title:{name:ds.title,optional:!0}},superTypes:[]}}}static{k(this,"MermaidAstReflection")}},Ci=new yxe,MZe=k(()=>Mde??(Mde=Ns(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"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":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"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@10"},"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@10"},"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@12"},"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@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@24"},"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@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"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":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[^\\\\[\\\\]\\\\r\\\\n]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),OZe=k(()=>Ode??(Ode=Ns(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"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":[]}`)),"CynefinGrammarGrammar"),PZe=k(()=>Pde??(Pde=Ns('{"$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"),BZe=k(()=>Bde??(Bde=Ns(`{"$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"),$Ze=k(()=>$de??($de=Ns(`{"$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"),FZe=k(()=>Fde??(Fde=Ns(`{"$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"),GZe=k(()=>Gde??(Gde=Ns(`{"$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"),VZe=k(()=>Vde??(Vde=Ns(`{"$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"),zZe=k(()=>zde??(zde=Ns('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar"),UZe=k(()=>Ude??(Ude=Ns(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadEbnfGrammarGrammar"),WZe=k(()=>Wde??(Wde=Ns(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadGrammarGrammar"),jZe=k(()=>jde??(jde=Ns(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","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":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadPegGrammarGrammar"),qZe=k(()=>qde??(qde=Ns(`{"$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"),HZe=k(()=>Hde??(Hde=Ns(`{"$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@14"},"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":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","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":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"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 *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),YZe=k(()=>Yde??(Yde=Ns(`{"$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"),KZe={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},XZe={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},QZe={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ZZe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},JZe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},eJe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},tJe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},rJe={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},nJe={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},iJe={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sJe={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},aJe={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},oJe={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},lJe={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cJe={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hn={AstReflection:k(()=>new yxe,"AstReflection")},o8={Grammar:k(()=>MZe(),"Grammar"),LanguageMetaData:k(()=>KZe,"LanguageMetaData"),parser:{}},l8={Grammar:k(()=>OZe(),"Grammar"),LanguageMetaData:k(()=>XZe,"LanguageMetaData"),parser:{}},c8={Grammar:k(()=>PZe(),"Grammar"),LanguageMetaData:k(()=>QZe,"LanguageMetaData"),parser:{}},u8={Grammar:k(()=>BZe(),"Grammar"),LanguageMetaData:k(()=>ZZe,"LanguageMetaData"),parser:{}},h8={Grammar:k(()=>$Ze(),"Grammar"),LanguageMetaData:k(()=>JZe,"LanguageMetaData"),parser:{}},d8={Grammar:k(()=>FZe(),"Grammar"),LanguageMetaData:k(()=>eJe,"LanguageMetaData"),parser:{}},f8={Grammar:k(()=>GZe(),"Grammar"),LanguageMetaData:k(()=>tJe,"LanguageMetaData"),parser:{}},p8={Grammar:k(()=>VZe(),"Grammar"),LanguageMetaData:k(()=>rJe,"LanguageMetaData"),parser:{}},m8={Grammar:k(()=>zZe(),"Grammar"),LanguageMetaData:k(()=>nJe,"LanguageMetaData"),parser:{}},g8={Grammar:k(()=>UZe(),"Grammar"),LanguageMetaData:k(()=>iJe,"LanguageMetaData"),parser:{}},y8={Grammar:k(()=>WZe(),"Grammar"),LanguageMetaData:k(()=>sJe,"LanguageMetaData"),parser:{}},x8={Grammar:k(()=>jZe(),"Grammar"),LanguageMetaData:k(()=>aJe,"LanguageMetaData"),parser:{}},b8={Grammar:k(()=>qZe(),"Grammar"),LanguageMetaData:k(()=>oJe,"LanguageMetaData"),parser:{}},T8={Grammar:k(()=>HZe(),"Grammar"),LanguageMetaData:k(()=>lJe,"LanguageMetaData"),parser:{}},C8={Grammar:k(()=>YZe(),"Grammar"),LanguageMetaData:k(()=>cJe,"LanguageMetaData"),parser:{}},uJe=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,hJe=/accTitle[\t ]*:([^\n\r]*)/,dJe=/title([\t ][^\n\r]*|)/,fJe={ACC_DESCR:uJe,ACC_TITLE:hJe,TITLE:dJe},Oi=class extends w0e{static{a(this,"AbstractMermaidValueConverter")}static{k(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=fJe[e.name];if(n===void 0)return;let i=n.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},Xa=class extends Oi{static{a(this,"CommonValueConverter")}static{k(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},mn=class extends v0e{static{a(this,"AbstractMermaidTokenBuilder")}static{k(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},pJe=class extends mn{static{a(this,"CommonTokenBuilder")}static{k(this,"CommonTokenBuilder")}}});function Kw(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),p8,Yw);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var mJe,Yw,k8=w(()=>{"use strict";on();mJe=class extends mn{static{a(this,"RadarTokenBuilder")}static{k(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},Yw={parser:{TokenBuilder:k(()=>new mJe,"TokenBuilder"),ValueConverter:k(()=>new Xa,"ValueConverter")}};a(Kw,"createRadarServices");k(Kw,"createRadarServices")});function sy(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),y8,Xw);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}var gJe,xxe,yJe,Xw,S8=w(()=>{"use strict";on();gJe=class extends mn{static{a(this,"RailroadTokenBuilder")}static{k(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},xxe=k(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew gJe,"TokenBuilder"),ValueConverter:k(()=>new yJe,"ValueConverter")}};a(sy,"createRailroadServices");k(sy,"createRailroadServices")});function ay(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),g8,Qw);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}var xJe,bxe,bJe,Qw,E8=w(()=>{"use strict";on();xJe=class extends mn{static{a(this,"RailroadEbnfTokenBuilder")}static{k(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},bxe=k(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew xJe,"TokenBuilder"),ValueConverter:k(()=>new bJe,"ValueConverter")}};a(ay,"createRailroadEbnfServices");k(ay,"createRailroadEbnfServices")});function oy(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),m8,Zw);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}var TJe,CJe,Zw,v8=w(()=>{"use strict";on();TJe=class extends mn{static{a(this,"RailroadAbnfTokenBuilder")}static{k(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},CJe=class extends Oi{static{a(this,"RailroadAbnfValueConverter")}static{k(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){let i=n.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1)}return n}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1)}},Zw={parser:{TokenBuilder:k(()=>new TJe,"TokenBuilder"),ValueConverter:k(()=>new CJe,"ValueConverter")}};a(oy,"createRailroadAbnfServices");k(oy,"createRailroadAbnfServices")});function ly(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),x8,Jw);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}var kJe,Txe,SJe,Jw,w8=w(()=>{"use strict";on();kJe=class extends mn{static{a(this,"RailroadPegTokenBuilder")}static{k(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},Txe=k(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew kJe,"TokenBuilder"),ValueConverter:k(()=>new SJe,"ValueConverter")}};a(ly,"createRailroadPegServices");k(ly,"createRailroadPegServices")});function Cxe(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}function t_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),b8,e_);return t.ServiceRegistry.register(r),Cxe(r),{shared:t,Treemap:r}}var EJe,vJe,wJe,_Je,e_,_8=w(()=>{"use strict";on();EJe=class extends mn{static{a(this,"TreemapTokenBuilder")}static{k(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},vJe=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,wJe=class extends Oi{static{a(this,"TreemapValueConverter")}static{k(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR")return t.substring(1,t.length-1);if(e.name==="STRING2")return t.substring(1,t.length-1);if(e.name==="INDENTATION")return t.length;if(e.name==="ClassDef"){if(typeof t!="string")return t;let n=vJe.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}}};a(Cxe,"registerValidationChecks");k(Cxe,"registerValidationChecks");_Je=class{static{a(this,"TreemapValidator")}static{k(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows)n.item&&(r===void 0&&n.indent===void 0?r=0:n.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}):r!==void 0&&r>=parseInt(n.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},e_={parser:{TokenBuilder:k(()=>new EJe,"TokenBuilder"),ValueConverter:k(()=>new wJe,"ValueConverter")},validation:{TreemapValidator:k(()=>new _Je,"TreemapValidator")}};a(t_,"createTreemapServices");k(t_,"createTreemapServices")});function n_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),C8,r_);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}var AJe,r_,A8=w(()=>{"use strict";on();AJe=class extends Oi{static{a(this,"WardleyValueConverter")}static{k(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},r_={parser:{ValueConverter:k(()=>new AJe,"ValueConverter")}};a(n_,"createWardleyServices");k(n_,"createWardleyServices")});function s_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),l8,i_);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}var RJe,i_,R8=w(()=>{"use strict";on();RJe=class extends mn{static{a(this,"CynefinTokenBuilder")}static{k(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},i_={parser:{TokenBuilder:k(()=>new RJe,"TokenBuilder"),ValueConverter:k(()=>new Xa,"ValueConverter")}};a(s_,"createCynefinServices");k(s_,"createCynefinServices")});function o_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),u8,a_);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var LJe,a_,L8=w(()=>{"use strict";on();LJe=class extends mn{static{a(this,"GitGraphTokenBuilder")}static{k(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},a_={parser:{TokenBuilder:k(()=>new LJe,"TokenBuilder"),ValueConverter:k(()=>new Xa,"ValueConverter")}};a(o_,"createGitGraphServices");k(o_,"createGitGraphServices")});function c_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),h8,l_);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var IJe,l_,I8=w(()=>{"use strict";on();IJe=class extends mn{static{a(this,"InfoTokenBuilder")}static{k(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},l_={parser:{TokenBuilder:k(()=>new IJe,"TokenBuilder"),ValueConverter:k(()=>new Xa,"ValueConverter")}};a(c_,"createInfoServices");k(c_,"createInfoServices")});function h_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),d8,u_);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var DJe,u_,D8=w(()=>{"use strict";on();DJe=class extends mn{static{a(this,"PacketTokenBuilder")}static{k(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},u_={parser:{TokenBuilder:k(()=>new DJe,"TokenBuilder"),ValueConverter:k(()=>new Xa,"ValueConverter")}};a(h_,"createPacketServices");k(h_,"createPacketServices")});function f_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),f8,d_);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var NJe,MJe,d_,N8=w(()=>{"use strict";on();NJe=class extends mn{static{a(this,"PieTokenBuilder")}static{k(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},MJe=class extends Oi{static{a(this,"PieValueConverter")}static{k(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},d_={parser:{TokenBuilder:k(()=>new NJe,"TokenBuilder"),ValueConverter:k(()=>new MJe,"ValueConverter")}};a(f_,"createPieServices");k(f_,"createPieServices")});function m_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),T8,p_);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}var OJe,PJe,p_,M8=w(()=>{"use strict";on();OJe=class extends Oi{static{a(this,"TreeViewValueConverter")}static{k(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim()}},PJe=class extends mn{static{a(this,"TreeViewTokenBuilder")}static{k(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},p_={parser:{TokenBuilder:k(()=>new PJe,"TokenBuilder"),ValueConverter:k(()=>new OJe,"ValueConverter")}};a(m_,"createTreeViewServices");k(m_,"createTreeViewServices")});function y_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),o8,g_);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var BJe,$Je,g_,O8=w(()=>{"use strict";on();BJe=class extends mn{static{a(this,"ArchitectureTokenBuilder")}static{k(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},$Je=class extends Oi{static{a(this,"ArchitectureValueConverter")}static{k(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();return(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'")),n.trim()}}},g_={parser:{TokenBuilder:k(()=>new BJe,"TokenBuilder"),ValueConverter:k(()=>new $Je,"ValueConverter")}};a(y_,"createArchitectureServices");k(y_,"createArchitectureServices")});function wxe(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}function b_(e=un){let t=_r(an(e),hn),r=_r(sn({shared:t}),c8,x_);return t.ServiceRegistry.register(r),wxe(r),{shared:t,EventModel:r}}var FJe,kxe,Sxe,P8,Exe,vxe,GJe,x_,B8=w(()=>{"use strict";on();FJe=class extends mn{static{a(this,"EventModelingTokenBuilder")}static{k(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},kxe=new Set(["cmd","command"]),Sxe=new Set(["evt","event"]),P8=new Set(["rmo","readmodel"]),Exe=new Set(["pcr","processor"]),vxe=new Set(["ui"]);a(wxe,"registerValidationChecks");k(wxe,"registerValidationChecks");GJe=class{static{a(this,"EventModelingValidator")}static{k(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(kxe.has(e.modelEntityType)?this.validateSources(e,new Set([...vxe,...Exe]),"command","ui or processor",t):Sxe.has(e.modelEntityType)?this.validateSources(e,kxe,"event","command",t):P8.has(e.modelEntityType)?this.validateSources(e,Sxe,"read model","event",t):Exe.has(e.modelEntityType)?this.validateSources(e,P8,"processor","read model",t):vxe.has(e.modelEntityType)&&this.validateSources(e,P8,"ui","read model",t))}validateSources(e,t,r,n,i){for(let s of e.sourceFrames){let o=s.ref;o!==void 0&&!t.has(o.modelEntityType)&&i("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},x_={parser:{TokenBuilder:k(()=>new FJe,"TokenBuilder"),ValueConverter:k(()=>new Xa,"ValueConverter")},validation:{EventModelingValidator:k(()=>new GJe,"EventModelingValidator")}};a(b_,"createEventModelingServices");k(b_,"createEventModelingServices")});var _xe={};ir(_xe,{InfoModule:()=>l_,createInfoServices:()=>c_});var Axe=w(()=>{"use strict";I8();on()});var Rxe={};ir(Rxe,{PacketModule:()=>u_,createPacketServices:()=>h_});var Lxe=w(()=>{"use strict";D8();on()});var Ixe={};ir(Ixe,{PieModule:()=>d_,createPieServices:()=>f_});var Dxe=w(()=>{"use strict";N8();on()});var Nxe={};ir(Nxe,{TreeViewModule:()=>p_,createTreeViewServices:()=>m_});var Mxe=w(()=>{"use strict";M8();on()});var Oxe={};ir(Oxe,{ArchitectureModule:()=>g_,createArchitectureServices:()=>y_});var Pxe=w(()=>{"use strict";O8();on()});var Bxe={};ir(Bxe,{GitGraphModule:()=>a_,createGitGraphServices:()=>o_});var $xe=w(()=>{"use strict";L8();on()});var Fxe={};ir(Fxe,{EventModelingModule:()=>x_,createEventModelingServices:()=>b_});var Gxe=w(()=>{"use strict";B8();on()});var Vxe={};ir(Vxe,{RadarModule:()=>Yw,createRadarServices:()=>Kw});var zxe=w(()=>{"use strict";k8();on()});var Uxe={};ir(Uxe,{RailroadModule:()=>Xw,createRailroadServices:()=>sy});var Wxe=w(()=>{"use strict";S8();on()});var jxe={};ir(jxe,{RailroadEbnfModule:()=>Qw,createRailroadEbnfServices:()=>ay});var qxe=w(()=>{"use strict";E8();on()});var Hxe={};ir(Hxe,{RailroadAbnfModule:()=>Zw,createRailroadAbnfServices:()=>oy});var Yxe=w(()=>{"use strict";v8();on()});var Kxe={};ir(Kxe,{RailroadPegModule:()=>Jw,createRailroadPegServices:()=>ly});var Xxe=w(()=>{"use strict";w8();on()});var Qxe={};ir(Qxe,{TreemapModule:()=>e_,createTreemapServices:()=>t_});var Zxe=w(()=>{"use strict";_8();on()});var Jxe={};ir(Jxe,{WardleyModule:()=>r_,createWardleyServices:()=>n_});var ebe=w(()=>{"use strict";A8();on()});var tbe={};ir(tbe,{CynefinModule:()=>i_,createCynefinServices:()=>s_});var rbe=w(()=>{"use strict";R8();on()});async function ki(e,t){let r=VJe[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);ks[e]||await r();let i=ks[e].parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new cu(i);return i.value}var ks,VJe,T_,cu,Ms=w(()=>{"use strict";k8();S8();E8();v8();w8();_8();A8();R8();L8();I8();D8();N8();M8();O8();B8();on();ks={},VJe={info:k(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(Axe(),_xe)),t=e().Info.parser.LangiumParser;ks.info=t},"info"),packet:k(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(Lxe(),Rxe)),t=e().Packet.parser.LangiumParser;ks.packet=t},"packet"),pie:k(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(Dxe(),Ixe)),t=e().Pie.parser.LangiumParser;ks.pie=t},"pie"),treeView:k(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(Mxe(),Nxe)),t=e().TreeView.parser.LangiumParser;ks.treeView=t},"treeView"),architecture:k(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(Pxe(),Oxe)),t=e().Architecture.parser.LangiumParser;ks.architecture=t},"architecture"),gitGraph:k(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>($xe(),Bxe)),t=e().GitGraph.parser.LangiumParser;ks.gitGraph=t},"gitGraph"),eventmodeling:k(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(Gxe(),Fxe)),t=e().EventModel.parser.LangiumParser;ks.eventmodeling=t},"eventmodeling"),radar:k(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(zxe(),Vxe)),t=e().Radar.parser.LangiumParser;ks.radar=t},"radar"),railroad:k(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(Wxe(),Uxe)),t=e().Railroad.parser.LangiumParser;ks.railroad=t},"railroad"),railroadEbnf:k(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(qxe(),jxe)),t=e().RailroadEbnf.parser.LangiumParser;ks.railroadEbnf=t},"railroadEbnf"),railroadAbnf:k(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(Yxe(),Hxe)),t=e().RailroadAbnf.parser.LangiumParser;ks.railroadAbnf=t},"railroadAbnf"),railroadPeg:k(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(Xxe(),Kxe)),t=e().RailroadPeg.parser.LangiumParser;ks.railroadPeg=t},"railroadPeg"),treemap:k(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(Zxe(),Qxe)),t=e().Treemap.parser.LangiumParser;ks.treemap=t},"treemap"),wardley:k(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(ebe(),Jxe)),t=e().Wardley.parser.LangiumParser;ks.wardley=t},"wardley"),cynefin:k(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(rbe(),tbe)),t=e().Cynefin.parser.LangiumParser;ks.cynefin=t},"cynefin")};a(ki,"parse");k(ki,"parse");T_=k(e=>e!==void 0&&e>=0?e:"?","formatLocation"),cu=class extends Error{static{a(this,"MermaidParseError")}constructor(e){let t=e.lexerErrors.map(n=>{let i=T_(n.line),s=T_(n.column);return`Lexer error on line ${i}, column ${s}: ${n.message}`}).join(` +`),r=e.parserErrors.map(n=>{let i=T_(n.token.startLine),s=T_(n.token.startColumn);return`Parse error on line ${i}, column ${s}: ${n.message}`}).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{k(this,"MermaidParseError")}}});function Dn(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var va=w(()=>{"use strict";a(Dn,"populateCommonDb")});var dn,C_=w(()=>{"use strict";dn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var Kh,k_=w(()=>{"use strict";Kh=class{constructor(t){this.init=t;this.records=this.init()}static{a(this,"ImperativeState")}reset(){this.records=this.init()}}});function $8(){return BN({length:7})}function UJe(e,t){let r=Object.create(null);return e.reduce((n,i)=>{let s=t(i);return r[s]||(r[s]=!0,n.push(i)),n},[])}function nbe(e,t,r){let n=e.indexOf(t);n===-1?e.push(r):e.splice(n,1,r)}function sbe(e){let t=e.reduce((i,s)=>i.seq>s.seq?i:s,e[0]),r="";e.forEach(function(i){i===t?r+=" *":r+=" |"});let n=[r,t.id,t.seq];for(let i in Nt.records.branches)Nt.records.branches.get(i)===t.id&&n.push(i);if(H.debug(n.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let i=Nt.records.commits.get(t.parents[0]);nbe(e,t,i),t.parents[1]&&e.push(Nt.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let i=Nt.records.commits.get(t.parents[0]);nbe(e,t,i)}}e=UJe(e,i=>i.id),sbe(e)}var zJe,sp,Nt,WJe,jJe,qJe,HJe,YJe,KJe,XJe,ibe,QJe,ZJe,JJe,eet,tet,abe,ret,net,iet,S_,F8=w(()=>{"use strict";bt();jt();Tr();Ir();fn();C_();k_();Gi();zJe=dr.gitGraph,sp=a(()=>Nr({...zJe,...Ct().gitGraph}),"getConfig"),Nt=new Kh(()=>{let e=sp(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});a($8,"getID");a(UJe,"uniqBy");WJe=a(function(e){Nt.records.direction=e},"setDirection"),jJe=a(function(e){H.debug("options str",e),e=e?.trim(),e=e||"{}";try{Nt.records.options=JSON.parse(e)}catch(t){H.error("error while parsing gitGraph options",t.message)}},"setOptions"),qJe=a(function(){return Nt.records.options},"getOptions"),HJe=a(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags;H.info("commit",t,r,n,i),H.debug("Entering commit:",t,r,n,i);let s=sp();r=gt.sanitizeText(r,s),t=gt.sanitizeText(t,s),i=i?.map(l=>gt.sanitizeText(l,s));let o={id:r||Nt.records.seq+"-"+$8(),message:t,seq:Nt.records.seq++,type:n??dn.NORMAL,tags:i??[],parents:Nt.records.head==null?[]:[Nt.records.head.id],branch:Nt.records.currBranch};Nt.records.head=o,H.info("main branch",s.mainBranchName),Nt.records.commits.has(o.id)&&H.warn(`Commit ID ${o.id} already exists`),Nt.records.commits.set(o.id,o),Nt.records.branches.set(Nt.records.currBranch,o.id),H.debug("in pushCommit "+o.id)},"commit"),YJe=a(function(e){let t=e.name,r=e.order;if(t=gt.sanitizeText(t,sp()),Nt.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}")`);Nt.records.branches.set(t,Nt.records.head!=null?Nt.records.head.id:null),Nt.records.branchConfig.set(t,{name:t,order:r}),ibe(t),H.debug("in createBranch")},"branch"),KJe=a(e=>{let t=e.branch,r=e.id,n=e.type,i=e.tags,s=sp();t=gt.sanitizeText(t,s),r&&(r=gt.sanitizeText(r,s));let o=Nt.records.branches.get(Nt.records.currBranch),l=Nt.records.branches.get(t),u=o?Nt.records.commits.get(o):void 0,h=l?Nt.records.commits.get(l):void 0;if(u&&h&&u.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(Nt.records.currBranch===t){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${Nt.records.currBranch})has no commits`);throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},p}if(!Nt.records.branches.has(t)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(r&&Nt.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw p.hash={text:`merge ${t} ${r} ${n} ${i?.join(" ")}`,token:`merge ${t} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},p}let d=l||"",f={id:r||`${Nt.records.seq}-${$8()}`,message:`merged branch ${t} into ${Nt.records.currBranch}`,seq:Nt.records.seq++,parents:Nt.records.head==null?[]:[Nt.records.head.id,d],branch:Nt.records.currBranch,type:dn.MERGE,customType:n,customId:!!r,tags:i??[]};Nt.records.head=f,Nt.records.commits.set(f.id,f),Nt.records.branches.set(Nt.records.currBranch,f.id),H.debug(Nt.records.branches),H.debug("in mergeBranch")},"merge"),XJe=a(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent;H.debug("Entering cherryPick:",t,r,n);let s=sp();if(t=gt.sanitizeText(t,s),r=gt.sanitizeText(r,s),n=n?.map(u=>gt.sanitizeText(u,s)),i=gt.sanitizeText(i,s),!t||!Nt.records.commits.has(t)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},u}let o=Nt.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=o.branch;if(o.type===dn.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!Nt.records.commits.has(r)){if(l===Nt.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let u=Nt.records.branches.get(Nt.records.currBranch);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Nt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let h=Nt.records.commits.get(u);if(h===void 0||!h){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Nt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let d={id:Nt.records.seq+"-"+$8(),message:`cherry-picked ${o?.message} into ${Nt.records.currBranch}`,seq:Nt.records.seq++,parents:Nt.records.head==null?[]:[Nt.records.head.id,o.id],branch:Nt.records.currBranch,type:dn.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===dn.MERGE?`|parent:${i}`:""}`]};Nt.records.head=d,Nt.records.commits.set(d.id,d),Nt.records.branches.set(Nt.records.currBranch,d.id),H.debug(Nt.records.branches),H.debug("in cherryPick")}},"cherryPick"),ibe=a(function(e){if(e=gt.sanitizeText(e,sp()),Nt.records.branches.has(e)){Nt.records.currBranch=e;let t=Nt.records.branches.get(Nt.records.currBranch);t===void 0||!t?Nt.records.head=null:Nt.records.head=Nt.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");a(nbe,"upsert");a(sbe,"prettyPrintCommitHistory");QJe=a(function(){H.debug(Nt.records.commits);let e=abe()[0];sbe([e])},"prettyPrint"),ZJe=a(function(){Nt.reset(),or()},"clear"),JJe=a(function(){return[...Nt.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"),eet=a(function(){return Nt.records.branches},"getBranches"),tet=a(function(){return Nt.records.commits},"getCommits"),abe=a(function(){let e=[...Nt.records.commits.values()];return e.forEach(function(t){H.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),ret=a(function(){return Nt.records.currBranch},"getCurrentBranch"),net=a(function(){return Nt.records.direction},"getDirection"),iet=a(function(){return Nt.records.head},"getHead"),S_={commitType:dn,getConfig:sp,setDirection:WJe,setOptions:jJe,getOptions:qJe,commit:HJe,branch:YJe,merge:KJe,cherryPick:XJe,checkout:ibe,prettyPrint:QJe,clear:ZJe,getBranchesAsObjArray:JJe,getBranches:eet,getCommits:tet,getCommitsArray:abe,getCurrentBranch:ret,getDirection:net,getHead:iet,setAccTitle:hr,getAccTitle:gr,getAccDescription:yr,setAccDescription:fr,setDiagramTitle:Cr,getDiagramTitle:xr}});var set,aet,oet,cet,uet,het,det,obe,lbe=w(()=>{"use strict";Ms();bt();va();F8();C_();set=a((e,t)=>{Dn(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)aet(r,t)},"populate"),aet=a((e,t)=>{let n={Commit:a(i=>t.commit(oet(i)),"Commit"),Branch:a(i=>t.branch(cet(i)),"Branch"),Merge:a(i=>t.merge(uet(i)),"Merge"),Checkout:a(i=>t.checkout(het(i)),"Checkout"),CherryPicking:a(i=>t.cherryPick(det(i)),"CherryPicking")}[e.$type];n?n(e):H.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),oet=a(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?dn[e.type]:dn.NORMAL,tags:e.tags??void 0}),"parseCommit"),cet=a(e=>({name:e.name,order:e.order??0}),"parseBranch"),uet=a(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?dn[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),het=a(e=>e.branch,"parseCheckout"),det=a(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),obe={parse:a(async e=>{let t=await ki("gitGraph",e);H.debug(t),set(t,S_)},"parse")}});var Xh,Qh,lc,uu,ap,w_,G8,V8,fet,op,wa,_a,E_,eT,v_,hu,Ur,pet,ube,hbe,met,get,yet,xet,bet,Tet,Cet,ket,Eet,vet,wet,_et,cbe,Aet,tT,Ret,Let,Iet,Det,Net,dbe,fbe=w(()=>{"use strict";Lr();Gt();bt();jt();C_();Xh=10,Qh=40,lc=4,uu=2,ap=8,w_=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),G8=12,V8=new Set(["redux-color","redux-dark-color"]),fet=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),op=a((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),wa=new Map,_a=new Map,E_=30,eT=new Map,v_=[],hu=0,Ur="LR",pet=a(()=>{wa.clear(),_a.clear(),eT.clear(),hu=0,v_=[],Ur="LR"},"clear"),ube=a(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),t.appendChild(i)}),t},"drawText"),hbe=a(e=>{let t,r,n;return Ur==="BT"?(r=a((i,s)=>i<=s,"comparisonFunc"),n=1/0):(r=a((i,s)=>i>=s,"comparisonFunc"),n=0),e.forEach(i=>{let s=Ur==="TB"||Ur=="BT"?_a.get(i)?.y:_a.get(i)?.x;s!==void 0&&r(s,n)&&(t=i,n=s)}),t},"findClosestParent"),met=a(e=>{let t="",r=1/0;return e.forEach(n=>{let i=_a.get(n).y;i<=r&&(t=n,r=i)}),t||void 0},"findClosestParentBT"),get=a((e,t,r)=>{let n=r,i=r,s=[];e.forEach(o=>{let l=t.get(o);if(!l)throw new Error(`Commit not found for key ${o}`);l.parents.length?(n=xet(l),i=Math.max(n,i)):s.push(l),bet(l,n)}),n=i,s.forEach(o=>{Tet(o,n,r)}),e.forEach(o=>{let l=t.get(o);if(l?.parents.length){let u=met(l.parents);n=_a.get(u).y-Qh,n<=i&&(i=n);let h=wa.get(l.branch).pos,d=n-Xh;_a.set(l.id,{x:h,y:d})}})},"setParallelBTPos"),yet=a(e=>{let t=hbe(e.parents.filter(n=>n!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=_a.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),xet=a(e=>yet(e)+Qh,"calculateCommitPosition"),bet=a((e,t)=>{let r=wa.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let n=r.pos,i=t+Xh;return _a.set(e.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),Tet=a((e,t,r)=>{let n=wa.get(e.branch);if(!n)throw new Error(`Branch not found for commit ${e.id}`);let i=t+r,s=n.pos;_a.set(e.id,{x:s,y:i})},"setRootPosition"),Cet=a((e,t,r,n,i,s)=>{let{theme:o}=_e(),l=w_.has(o??""),u=V8.has(o??""),h=fet.has(o??"");if(s===dn.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(l?3:0)).attr("y",r.y-10+(l?3:0)).attr("width",l?14:20).attr("height",l?14:20).attr("class",`commit ${t.id} commit-highlight${op(i,ap,u)} ${n}-outer`),e.append("rect").attr("x",r.x-6+(l?2:0)).attr("y",r.y-6+(l?2:0)).attr("width",l?8:12).attr("height",l?8:12).attr("class",`commit ${t.id} commit${op(i,ap,u)} ${n}-inner`);else if(s===dn.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",l?7:10).attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`);else{let d=e.append("circle");if(d.attr("cx",r.x),d.attr("cy",r.y),d.attr("r",l?7:10),d.attr("class",`commit ${t.id} commit${op(i,ap,u)}`),s===dn.MERGE){let f=e.append("circle");f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",l?5:6),f.attr("class",`commit ${n} ${t.id} commit${op(i,ap,u)}`)}if(s===dn.REVERSE){let f=e.append("path"),p=l?4:5;f.attr("d",`M ${r.x-p},${r.y-p}L${r.x+p},${r.y+p}M${r.x-p},${r.y+p}L${r.x+p},${r.y-p}`).attr("class",`commit ${n} ${t.id} commit${op(i,ap,u)}`)}}},"drawCommitBullet"),ket=a((e,t,r,n,i)=>{if(t.type!==dn.CHERRY_PICK&&(t.customId&&t.type===dn.MERGE||t.type!==dn.MERGE)&&i.showCommitLabel){let s=e.append("g"),o=s.insert("rect").attr("class","commit-label-bkg"),l=s.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id),u=l.node()?.getBBox();if(u&&(o.attr("x",r.posWithOffset-u.width/2-uu).attr("y",r.y+13.5).attr("width",u.width+2*uu).attr("height",u.height+2*uu),Ur==="TB"||Ur==="BT"?(o.attr("x",r.x-(u.width+4*lc+5)).attr("y",r.y-12),l.attr("x",r.x-(u.width+4*lc)).attr("y",r.y+u.height-12)):l.attr("x",r.posWithOffset-u.width/2),i.rotateCommitLabel))if(Ur==="TB"||Ur==="BT")l.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let h=-7.5-(u.width+10)/25*9.5,d=10+u.width/25*8.5;s.attr("transform","translate("+h+", "+d+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),Eet=a((e,t,r,n)=>{if(t.tags.length>0){let i=0,s=0,o=0,l=[];for(let u of t.tags.reverse()){let h=e.insert("polygon"),d=e.append("circle"),f=e.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=f.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");s=Math.max(s,p.width),o=Math.max(o,p.height),f.attr("x",r.posWithOffset-p.width/2),l.push({tag:f,hole:d,rect:h,yOffset:i}),i+=20}for(let{tag:u,hole:h,rect:d,yOffset:f}of l){let p=o/2,m=r.y-19.2-f;if(d.attr("class","tag-label-bkg").attr("points",` + ${n-s/2-lc/2},${m+uu} + ${n-s/2-lc/2},${m-uu} + ${r.posWithOffset-s/2-lc},${m-p-uu} + ${r.posWithOffset+s/2+lc},${m-p-uu} + ${r.posWithOffset+s/2+lc},${m+p+uu} + ${r.posWithOffset-s/2-lc},${m+p+uu}`),h.attr("cy",m).attr("cx",n-s/2+lc/2).attr("r",1.5).attr("class","tag-hole"),Ur==="TB"||Ur==="BT"){let g=n+f;d.attr("class","tag-label-bkg").attr("points",` + ${r.x},${g+2} + ${r.x},${g-2} + ${r.x+Xh},${g-p-2} + ${r.x+Xh+s+4},${g-p-2} + ${r.x+Xh+s+4},${g+p+2} + ${r.x+Xh},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+lc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),vet=a(e=>{switch(e.customType??e.type){case dn.NORMAL:return"commit-normal";case dn.REVERSE:return"commit-reverse";case dn.HIGHLIGHT:return"commit-highlight";case dn.MERGE:return"commit-merge";case dn.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),wet=a((e,t,r,n)=>{let i={x:0,y:0};if(e.parents.length>0){let s=hbe(e.parents);if(s){let o=n.get(s)??i;return t==="TB"?o.y+Qh:t==="BT"?(n.get(e.id)??i).y-Qh:o.x+Qh}}else return t==="TB"?E_:t==="BT"?(n.get(e.id)??i).y-Qh:0;return 0},"calculatePosition"),_et=a((e,t,r)=>{let n=Ur==="BT"&&r?t:t+Xh,i=wa.get(e.branch)?.pos,s=Ur==="TB"||Ur==="BT"?wa.get(e.branch)?.pos:n;if(s===void 0||i===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let o=w_.has(_e().theme??""),l=Ur==="TB"||Ur==="BT"?n:i+(o?G8/2+1:-2);return{x:s,y:l,posWithOffset:n}},"getCommitPosition"),cbe=a((e,t,r,n)=>{let i=e.append("g").attr("class","commit-bullets"),s=e.append("g").attr("class","commit-labels"),o=Ur==="TB"||Ur==="BT"?E_:0,l=[...t.keys()],u=n.parallelCommits??!1,h=a((f,p)=>{let m=t.get(f)?.seq,g=t.get(p)?.seq;return m!==void 0&&g!==void 0?m-g:0},"sortKeys"),d=l.sort(h);Ur==="BT"&&(u&&get(d,t,o),d=d.reverse()),d.forEach(f=>{let p=t.get(f);if(!p)throw new Error(`Commit not found for key ${f}`);u&&(o=wet(p,Ur,o,_a));let m=_et(p,o,u);if(r){let g=vet(p),y=p.customType??p.type,x=wa.get(p.branch)?.index??0;Cet(i,p,m,g,x,y),ket(s,p,m,o,n),Eet(s,p,m,o)}Ur==="TB"||Ur==="BT"?_a.set(p.id,{x:m.x,y:m.posWithOffset}):_a.set(p.id,{x:m.posWithOffset,y:m.y}),o=Ur==="BT"&&u?o+Qh:o+Qh+Xh,o>hu&&(hu=o)})},"drawCommits"),Aet=a((e,t,r,n,i)=>{let o=(Ur==="TB"||Ur==="BT"?r.xh.branch===o,"isOnBranchToGetCurve"),u=a(h=>h.seq>e.seq&&h.sequ(h)&&l(h))},"shouldRerouteArrow"),tT=a((e,t,r=0)=>{let n=e+Math.abs(e-t)/2;if(r>5)return n;if(v_.every(o=>Math.abs(o-n)>=10))return v_.push(n),n;let s=Math.abs(e-t);return tT(e,t-s/5,r+1)},"findLane"),Ret=a((e,t,r,n)=>{let{theme:i}=_e(),s=V8.has(i??""),o=_a.get(t.id),l=_a.get(r.id);if(o===void 0||l===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let u=Aet(t,r,o,l,n),h="",d="",f=0,p=0,m=wa.get(r.branch)?.index;r.type===dn.MERGE&&t.id!==r.parents[0]&&(m=wa.get(t.branch)?.index);let g;if(u){h="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",f=10,p=10;let y=o.yl.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===dn.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${o.x} ${l.y-f} ${d} ${o.x-p} ${l.y} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${l.x+f} ${o.y} ${h} ${l.x} ${o.y+p} L ${l.x} ${l.y}`),o.x===l.x&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`)):Ur==="BT"?(o.xl.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===dn.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${o.x} ${l.y+f} ${h} ${o.x-p} ${l.y} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${l.x+f} ${o.y} ${d} ${l.x} ${o.y-p} L ${l.x} ${l.y}`),o.x===l.x&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`)):(o.yl.y&&(r.type===dn.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${l.x-f} ${o.y} ${h} ${l.x} ${o.y-p} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${o.x} ${l.y+f} ${d} ${o.x+p} ${l.y} L ${l.x} ${l.y}`),o.y===l.y&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`));if(g===void 0)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+op(m,ap,s))},"drawArrow"),Let=a((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(n=>{let i=t.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(s=>{Ret(r,t.get(s),i,t)})})},"drawArrows"),Iet=a((e,t,r,n)=>{let{look:i,theme:s,themeVariables:o}=_e(),{dropShadow:l,THEME_COLOR_LIMIT:u}=o,h=w_.has(s??""),d=V8.has(s??""),f=e.append("g");t.forEach((p,m)=>{let g=op(m,h?u:ap,d),y=wa.get(p.name)?.pos;if(y===void 0)throw new Error(`Position not found for branch ${p.name}`);let x=Ur==="TB"||Ur==="BT"?y:h?y+G8/2+1:y-2,b=f.append("line");b.attr("x1",0),b.attr("y1",x),b.attr("x2",hu),b.attr("y2",x),b.attr("class","branch branch"+g),Ur==="TB"?(b.attr("y1",E_),b.attr("x1",y),b.attr("y2",hu),b.attr("x2",y)):Ur==="BT"&&(b.attr("y1",hu),b.attr("x1",y),b.attr("y2",E_),b.attr("x2",y)),v_.push(x);let T=p.name,C=ube(T),v=f.insert("rect"),S=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+g);S.node().appendChild(C);let _=C.getBBox(),A=h?0:4,B=h?16:0,$=h?G8:0;i==="neo"&&v.attr("data-look","neo"),v.attr("class","branchLabelBkg label"+g).attr("style",i==="neo"?`filter:${h?`url(#${n}-drop-shadow)`:l}`:"").attr("rx",A).attr("ry",A).attr("x",-_.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+10).attr("width",_.width+18+B).attr("height",_.height+4+$),S.attr("transform","translate("+(-_.width-14-(r.rotateCommitLabel===!0?30:0)+B/2)+", "+(x-_.height/2-2)+")"),Ur==="TB"?(v.attr("x",y-_.width/2-10).attr("y",0),S.attr("transform","translate("+(y-_.width/2-5)+", 0)"),h&&(v.attr("transform",`translate(${-B/2-3}, ${-$-10})`),S.attr("transform","translate("+(y-_.width/2-5)+", "+(-$*2+7)+")"))):Ur==="BT"?(v.attr("x",y-_.width/2-10).attr("y",hu),S.attr("transform","translate("+(y-_.width/2-5)+", "+hu+")"),h&&(v.attr("transform",`translate(${-B/2-3}, ${$+10})`),S.attr("transform","translate("+(y-_.width/2-5)+", "+(hu+$*2+4)+")"))):v.attr("transform","translate(-19, "+(x-12-$/2)+")")})},"drawBranches"),Det=a(function(e,t,r,n,i){return wa.set(e,{pos:t,index:r}),t+=50+(i?40:0)+(Ur==="TB"||Ur==="BT"?n.width/2:0),t},"setBranchPosition"),Net=a(function(e,t,r,n){pet(),H.debug("in gitgraph renderer",e+` +`,"id:",t,r);let i=n.db;if(!i.getConfig){H.error("getConfig method is not available on db");return}let s=i.getConfig(),o=s.rotateCommitLabel??!1;eT=i.getCommits();let l=i.getBranchesAsObjArray();Ur=i.getDirection();let u=st(`[id="${t}"]`),{look:h,theme:d,themeVariables:f}=_e(),{useGradient:p,gradientStart:m,gradientStop:g,filterColor:y}=f;if(p){let b=u.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}h==="neo"&&w_.has(d??"")&&u.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",y);let x=0;l.forEach((b,T)=>{let C=ube(b.name),v=u.append("g"),E=v.insert("g").attr("class","branchLabel"),S=E.insert("g").attr("class","label branch-label");S.node()?.appendChild(C);let _=C.getBBox();x=Det(b.name,x,T,_,o),S.remove(),E.remove(),v.remove()}),cbe(u,eT,!1,s),s.showBranches&&Iet(u,l,s,t),Let(u,eT),cbe(u,eT,!0,s),Xt.insertTitle(u,"gitTitleText",s.titleTopMargin??0,i.getDiagramTitle()),_1(void 0,u,s.diagramPadding,s.useMaxWidth)},"draw"),dbe={draw:Net}});var pbe,mbe,Met,Oet,Pet,Bet,$et,Fet,Get,Vet,gbe,ybe=w(()=>{"use strict";Tr();pbe=8,mbe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Met=new Set(["redux-color","redux-dark-color"]),Oet=new Set(["neo","neo-dark"]),Pet=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Bet=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),$et=a(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let n=0;n{let t=Ct(),{theme:r,themeVariables:n}=t,{borderColorArray:i}=n,s=mbe.has(r);if(Oet.has(r)){let o="";for(let l=0;l`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%pbe;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"),Vet=a(e=>{let t=Ct(),{theme:r}=t,n=Bet.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); + } + + ${n?Fet(e):Get(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${n?"4 2":"2"}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?"transparent":e.commitLabelBackground}; opacity: ${n?"":.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:""} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + stroke-width: ${n?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?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: ${mbe.has(r)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},"getStyles"),gbe=Vet});var xbe={};ir(xbe,{diagram:()=>zet});var zet,bbe=w(()=>{"use strict";lbe();F8();fbe();ybe();zet={parser:obe,db:S_,renderer:dbe,styles:gbe}});var z8,kbe,Sbe=w(()=>{"use strict";z8=(function(){var e=a(function(I,F,N,D){for(N=N||{},D=I.length;D--;N[I[D]]=F);return N},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],s=[1,29],o=[1,30],l=[1,31],u=[1,32],h=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],x=[1,14],b=[1,15],T=[1,16],C=[1,19],v=[1,20],E=[1,21],S=[1,22],_=[1,23],A=[1,25],B=[1,35],$={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:a(function(F,N,D,M,R,P,V){var U=P.length-1;switch(R){case 1:return P[U-1];case 2:this.$=[];break;case 3:P[U-1].push(P[U]),this.$=P[U-1];break;case 4:case 5:this.$=P[U];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(P[U].substr(11)),this.$=P[U].substr(11);break;case 18:M.enableInclusiveEndDates(),this.$=P[U].substr(18);break;case 19:M.TopAxis(),this.$=P[U].substr(8);break;case 20:M.setAxisFormat(P[U].substr(11)),this.$=P[U].substr(11);break;case 21:M.setTickInterval(P[U].substr(13)),this.$=P[U].substr(13);break;case 22:M.setExcludes(P[U].substr(9)),this.$=P[U].substr(9);break;case 23:M.setIncludes(P[U].substr(9)),this.$=P[U].substr(9);break;case 24:M.setTodayMarker(P[U].substr(12)),this.$=P[U].substr(12);break;case 27:M.setDiagramTitle(P[U].substr(6)),this.$=P[U].substr(6);break;case 28:this.$=P[U].trim(),M.setAccTitle(this.$);break;case 29:case 30:this.$=P[U].trim(),M.setAccDescription(this.$);break;case 31:M.addSection(P[U].substr(8)),this.$=P[U].substr(8);break;case 33:M.addTask(P[U-1],P[U]),this.$="task";break;case 34:this.$=P[U-1],M.setClickEvent(P[U-1],P[U],null);break;case 35:this.$=P[U-2],M.setClickEvent(P[U-2],P[U-1],P[U]);break;case 36:this.$=P[U-2],M.setClickEvent(P[U-2],P[U-1],null),M.setLink(P[U-2],P[U]);break;case 37:this.$=P[U-3],M.setClickEvent(P[U-3],P[U-2],P[U-1]),M.setLink(P[U-3],P[U]);break;case 38:this.$=P[U-2],M.setClickEvent(P[U-2],P[U],null),M.setLink(P[U-2],P[U-1]);break;case 39:this.$=P[U-3],M.setClickEvent(P[U-3],P[U-1],P[U]),M.setLink(P[U-3],P[U-2]);break;case 40:this.$=P[U-1],M.setLink(P[U-1],P[U]);break;case 41:case 47:this.$=P[U-1]+" "+P[U];break;case 42:case 43:case 45:this.$=P[U-2]+" "+P[U-1]+" "+P[U];break;case 44:case 46:this.$=P[U-3]+" "+P[U-2]+" "+P[U-1]+" "+P[U];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:s,16:o,17:l,18:u,19:18,20:h,21:d,22:f,23:p,24:m,25:g,26:y,27:x,28:b,29:T,30:C,31:v,33:E,35:S,36:_,37:24,38:A,40:B},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:s,16:o,17:l,18:u,19:18,20:h,21:d,22:f,23:p,24:m,25:g,26:y,27:x,28:b,29:T,30:C,31:v,33:E,35:S,36:_,37:24,38:A,40:B},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:a(function(F,N){if(N.recoverable)this.trace(F);else{var D=new Error(F);throw D.hash=N,D}},"parseError"),parse:a(function(F){var N=this,D=[0],M=[],R=[null],P=[],V=this.table,U="",z=0,j=0,K=0,Z=2,ce=1,te=P.slice.call(arguments,1),me=Object.create(this.lexer),he={yy:{}};for(var we in this.yy)Object.prototype.hasOwnProperty.call(this.yy,we)&&(he.yy[we]=this.yy[we]);me.setInput(F,he.yy),he.yy.lexer=me,he.yy.parser=this,typeof me.yylloc>"u"&&(me.yylloc={});var ye=me.yylloc;P.push(ye);var ke=me.options&&me.options.ranges;typeof he.yy.parseError=="function"?this.parseError=he.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Fe(J){D.length=D.length-2*J,R.length=R.length-J,P.length=P.length-J}a(Fe,"popStack");function Ge(){var J;return J=M.pop()||me.lex()||ce,typeof J!="number"&&(J instanceof Array&&(M=J,J=M.pop()),J=N.symbols_[J]||J),J}a(Ge,"lex");for(var Me,at,ht,ge,De,Le,Ie={},Q,ne,re,se;;){if(ht=D[D.length-1],this.defaultActions[ht]?ge=this.defaultActions[ht]:((Me===null||typeof Me>"u")&&(Me=Ge()),ge=V[ht]&&V[ht][Me]),typeof ge>"u"||!ge.length||!ge[0]){var fe="";se=[];for(Q in V[ht])this.terminals_[Q]&&Q>Z&&se.push("'"+this.terminals_[Q]+"'");me.showPosition?fe="Parse error on line "+(z+1)+`: +`+me.showPosition()+` +Expecting `+se.join(", ")+", got '"+(this.terminals_[Me]||Me)+"'":fe="Parse error on line "+(z+1)+": Unexpected "+(Me==ce?"end of input":"'"+(this.terminals_[Me]||Me)+"'"),this.parseError(fe,{text:me.match,token:this.terminals_[Me]||Me,line:me.yylineno,loc:ye,expected:se})}if(ge[0]instanceof Array&&ge.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+Me);switch(ge[0]){case 1:D.push(Me),R.push(me.yytext),P.push(me.yylloc),D.push(ge[1]),Me=null,at?(Me=at,at=null):(j=me.yyleng,U=me.yytext,z=me.yylineno,ye=me.yylloc,K>0&&K--);break;case 2:if(ne=this.productions_[ge[1]][1],Ie.$=R[R.length-ne],Ie._$={first_line:P[P.length-(ne||1)].first_line,last_line:P[P.length-1].last_line,first_column:P[P.length-(ne||1)].first_column,last_column:P[P.length-1].last_column},ke&&(Ie._$.range=[P[P.length-(ne||1)].range[0],P[P.length-1].range[1]]),Le=this.performAction.apply(Ie,[U,j,z,he.yy,ge[1],R,P].concat(te)),typeof Le<"u")return Le;ne&&(D=D.slice(0,-1*ne*2),R=R.slice(0,-1*ne),P=P.slice(0,-1*ne)),D.push(this.productions_[ge[1]][0]),R.push(Ie.$),P.push(Ie._$),re=V[D[D.length-2]][D[D.length-1]],D.push(re);break;case 3:return!0}}return!0},"parse")},O=(function(){var I={EOF:1,parseError:a(function(N,D){if(this.yy.parser)this.yy.parser.parseError(N,D);else throw new Error(N)},"parseError"),setInput:a(function(F,N){return this.yy=N||this.yy||{},this._input=F,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var F=this._input[0];this.yytext+=F,this.yyleng++,this.offset++,this.match+=F,this.matched+=F;var N=F.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),F},"input"),unput:a(function(F){var N=F.length,D=F.split(/(?:\r\n?|\n)/g);this._input=F+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;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),D.length-1&&(this.yylineno-=D.length-1);var R=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===M.length?this.yylloc.first_column:0)+M[M.length-D.length].length-D[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(F){this.unput(this.match.slice(F))},"less"),pastInput:a(function(){var F=this.matched.substr(0,this.matched.length-this.match.length);return(F.length>20?"...":"")+F.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var F=this.match;return F.length<20&&(F+=this._input.substr(0,20-F.length)),(F.substr(0,20)+(F.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var F=this.pastInput(),N=new Array(F.length+1).join("-");return F+this.upcomingInput()+` +`+N+"^"},"showPosition"),test_match:a(function(F,N){var D,M,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),M=F[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+F[0].length},this.yytext+=F[0],this.match+=F[0],this.matches=F,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(F[0].length),this.matched+=F[0],D=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var P in R)this[P]=R[P];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var F,N,D,M;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),P=0;PN[0].length)){if(N=D,M=P,this.options.backtrack_lexer){if(F=this.test_match(D,R[P]),F!==!1)return F;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(F=this.test_match(N,R[M]),F!==!1?F:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var N=this.next();return N||this.lex()},"lex"),begin:a(function(N){this.conditionStack.push(N)},"begin"),popState:a(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:a(function(N){this.begin(N)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(N,D,M,R){var P=R;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 I})();$.lexer=O;function G(){this.yy={}}return a(G,"Parser"),G.prototype=$,$.Parser=G,new G})();z8.parser=z8;kbe=z8});var Ebe=dd((U8,W8)=>{"use strict";(function(e,t){typeof U8=="object"&&typeof W8<"u"?W8.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(U8,(function(){"use strict";var e="day";return function(t,r,n){var i=a(function(l){return l.add(4-l.isoWeekday(),e)},"a"),s=r.prototype;s.isoWeekYear=function(){return i(this).year()},s.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),e);var u,h,d,f,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,d=(h?n.utc:n)().year(u).startOf("year"),f=4-d.isoWeekday(),d.isoWeekday()>4&&(f+=7),d.add(f,e));return p.diff(m,"week")+1},s.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var o=s.startOf;s.startOf=function(l,u){var h=this.$utils(),d=!!h.u(u)||u;return h.p(l)==="isoweek"?d?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(l,u)}}}))});var vbe=dd((j8,q8)=>{"use strict";(function(e,t){typeof j8=="object"&&typeof q8<"u"?q8.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(j8,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,o={},l=a(function(g){return(g=+g)+(g>68?1900:2e3)},"a"),u=a(function(g){return function(y){this[g]=+y}},"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var x=y.match(/([+-]|\d\d)/g),b=60*x[1]+(+x[2]||0);return b===0?0:x[0]==="+"?-b:b})(g)}],d=a(function(g){var y=o[g];return y&&(y.indexOf?y:y.s.concat(y.f))},"u"),f=a(function(g,y){var x,b=o.meridiem;if(b){for(var T=1;T<=24;T+=1)if(g.indexOf(b(T,0,y))>-1){x=T>12;break}}else x=g===(y?"pm":"PM");return x},"d"),p={A:[s,function(g){this.afternoon=f(g,!1)}],a:[s,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[s,function(g){var y=o.ordinal,x=g.match(/\d+/);if(this.day=x[0],y)for(var b=1;b<=31;b+=1)y(b).replace(/\[|\]/g,"")===g&&(this.day=b)}],w:[i,u("week")],ww:[n,u("week")],M:[i,u("month")],MM:[n,u("month")],MMM:[s,function(g){var y=d("months"),x=(d("monthsShort")||y.map((function(b){return b.slice(0,3)}))).indexOf(g)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[s,function(g){var y=d("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=l(g)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function m(g){var y,x;y=g,x=o&&o.formats;for(var b=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,B,$){var O=$&&$.toUpperCase();return B||x[$]||e[$]||x[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(G,I,F){return I||F.slice(1)}))}))).match(t),T=b.length,C=0;C-1)return new Date((D==="X"?1e3:1)*N);var P=m(D)(N),V=P.year,U=P.month,z=P.day,j=P.hours,K=P.minutes,Z=P.seconds,ce=P.milliseconds,te=P.zone,me=P.week,he=new Date,we=z||(V||U?1:he.getDate()),ye=V||he.getFullYear(),ke=0;V&&!U||(ke=U>0?U-1:he.getMonth());var Fe,Ge=j||0,Me=K||0,at=Z||0,ht=ce||0;return te?new Date(Date.UTC(ye,ke,we,Ge,Me,at,ht+60*te.offset*1e3)):M?new Date(Date.UTC(ye,ke,we,Ge,Me,at,ht)):(Fe=new Date(ye,ke,we,Ge,Me,at,ht),me&&(Fe=R(Fe).week(me).toDate()),Fe)}catch{return new Date("")}})(v,_,E,x),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),$&&v!=this.format(_)&&(this.$d=new Date("")),o={}}else if(_ instanceof Array)for(var G=_.length,I=1;I<=G;I+=1){S[1]=_[I-1];var F=x.apply(this,S);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}I===G&&(this.$d=new Date(""))}else T.call(this,C)}}}))});var wbe=dd((H8,Y8)=>{"use strict";(function(e,t){typeof H8=="object"&&typeof Y8<"u"?Y8.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})(H8,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(i){var s=this,o=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(h){switch(h){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return o.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return o.ordinal(s.week(),"W");case"w":case"ww":return l.s(s.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(s.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(s.$H===0?24:s.$H),h==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return h}}));return n.bind(this)(u)}}}))});function Wbe(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let s="^\\s*"+i+"\\s*$",o=new RegExp(s);e[0].match(o)&&(t[i]=!0,e.shift(1),n=!0)})}var Rbe,Qa,Lbe,Ibe,Dbe,_be,cc,Z8,J8,e7,hy,dy,t7,r7,R_,fy,n7,Nbe,i7,cy,rT,s7,a7,L_,K8,qet,Het,Yet,Ket,Xet,Qet,Zet,Jet,ett,ttt,rtt,ntt,itt,stt,att,ott,Mbe,ltt,ctt,utt,htt,dtt,ftt,ptt,mtt,Obe,gtt,ytt,xtt,Pbe,btt,Bbe,X8,$be,Fbe,__,uy,Ttt,Ctt,Q8,A_,Hi,Gbe,ktt,lp,Stt,Abe,Ett,Vbe,vtt,zbe,wtt,_tt,Ube,jbe=w(()=>{"use strict";Rbe=Io(I1(),1),Qa=Io(xC(),1),Lbe=Io(Ebe(),1),Ibe=Io(vbe(),1),Dbe=Io(wbe(),1);bt();Gt();jt();fn();Qa.default.extend(Lbe.default);Qa.default.extend(Ibe.default);Qa.default.extend(Dbe.default);_be={friday:5,saturday:6},cc="",Z8="",e7="",hy=[],dy=[],t7=new Map,r7=[],R_=[],fy="",n7="",Nbe=["active","done","crit","milestone","vert"],i7=[],cy="",rT=!1,s7=!1,a7="sunday",L_="saturday",K8=0,qet=a(function(){r7=[],R_=[],fy="",i7=[],__=0,Q8=void 0,A_=void 0,Hi=[],cc="",Z8="",n7="",J8=void 0,e7="",hy=[],dy=[],rT=!1,s7=!1,K8=0,t7=new Map,cy="",or(),a7="sunday",L_="saturday"},"clear"),Het=a(function(e){cy=e},"setDiagramId"),Yet=a(function(e){Z8=e},"setAxisFormat"),Ket=a(function(){return Z8},"getAxisFormat"),Xet=a(function(e){J8=e},"setTickInterval"),Qet=a(function(){return J8},"getTickInterval"),Zet=a(function(e){e7=e},"setTodayMarker"),Jet=a(function(){return e7},"getTodayMarker"),ett=a(function(e){cc=e},"setDateFormat"),ttt=a(function(){rT=!0},"enableInclusiveEndDates"),rtt=a(function(){return rT},"endDatesAreInclusive"),ntt=a(function(){s7=!0},"enableTopAxis"),itt=a(function(){return s7},"topAxisEnabled"),stt=a(function(e){n7=e},"setDisplayMode"),att=a(function(){return n7},"getDisplayMode"),ott=a(function(){return cc},"getDateFormat"),Mbe=a((e,t)=>{let r=t.toLowerCase().split(/[\s,]+/).filter(n=>n!=="");return[...new Set([...e,...r])]},"mergeTokens"),ltt=a(function(e){hy=Mbe(hy,e)},"setIncludes"),ctt=a(function(){return hy},"getIncludes"),utt=a(function(e){dy=Mbe(dy,e)},"setExcludes"),htt=a(function(){return dy},"getExcludes"),dtt=a(function(){return t7},"getLinks"),ftt=a(function(e){fy=e,r7.push(e)},"addSection"),ptt=a(function(){return r7},"getSections"),mtt=a(function(){let e=Abe(),t=10,r=0;for(;!e&&rl))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,"d")}return[t,o]},"fixTaskDates"),Bbe=a(function(e,t){H.warn(`Gantt: the "${e}" statement references unknown task id(s): ${t.join(", ")}. Make sure the referenced tasks exist and declare an id. Milestones need both an id and a duration, e.g. "Milestone :milestone, m1, 2023-01-01, 0d".`)},"warnAboutUnknownTaskIds"),X8=a(function(e,t,r){if(r=r.trim(),a(l=>{let u=l.trim();return u==="x"||u==="X"},"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));let s=/^after\s+(?[\d\w- ]+)/.exec(r);if(s!==null){let l=null,u=[],h=s.groups.ids.split(" ").filter(f=>f!=="");for(let f of h){let p=lp(f);if(p===void 0){u.push(f);continue}(!l||p.endTime>l.endTime)&&(l=p)}if(u.length>0&&Bbe("after",u),l)return l.endTime;let d=new Date;return d.setHours(0,0,0,0),d}let o=(0,Qa.default)(r,t.trim(),!0);if(o.isValid())return o.toDate();{H.debug("Invalid date:"+r),H.debug("With date format:"+t.trim());let l=new Date(r);if(l===void 0||isNaN(l.getTime())||l.getFullYear()<-1e4||l.getFullYear()>1e4)throw new Error("Invalid date:"+r);return l}},"getStartDate"),$be=a(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Fbe=a(function(e,t,r,n=!1){r=r.trim();let s=/^until\s+(?[\d\w- ]+)/.exec(r);if(s!==null){let d=null,f=[],p=s.groups.ids.split(" ").filter(g=>g!=="");for(let g of p){let y=lp(g);if(y===void 0){f.push(g);continue}(!d||y.startTime0&&Bbe("until",f),d)return d.startTime;let m=new Date;return m.setHours(0,0,0,0),m}let o=(0,Qa.default)(r,t.trim(),!0);if(o.isValid())return n&&(o=o.add(1,"d")),o.toDate();let l=(0,Qa.default)(e),[u,h]=$be(r);if(Number.isNaN(u))H.warn(`Gantt: "${r}" is neither a valid date for the "${t.trim()}" date format nor a valid duration (e.g. "3d"), so it is ignored and the task gets a zero duration. Milestones need a duration too, e.g. "Milestone :milestone, m1, 2023-01-01, 0d".`);else{let d=l.add(u,h);d.isValid()&&(l=d)}return l.toDate()},"getEndDate"),__=0,uy=a(function(e){return e===void 0?(__=__+1,"task"+__):e},"parseId"),Ttt=a(function(e,t){let r;t.substr(0,1)===":"?r=t.substr(1,t.length):r=t;let n=r.split(","),i={};Wbe(n,i,Nbe);for(let o=0;o{window.open(r,"_self")}),t7.set(n,r))}),Vbe(e,"clickable")},"setLink"),Vbe=a(function(e,t){e.split(",").forEach(function(r){let n=lp(r);n!==void 0&&n.classes.push(t)})},"setClass"),vtt=a(function(e,t,r){if(_e().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s{Xt.runFunc(t,...n)})},"setClickFun"),zbe=a(function(e,t){i7.push(function(){let r=cy?`${cy}-${e}`:e,n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){let r=cy?`${cy}-${e}`:e,n=document.querySelector(`[id="${r}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),wtt=a(function(e,t,r){e.split(",").forEach(function(n){vtt(n,t,r)}),Vbe(e,"clickable")},"setClickEvent"),_tt=a(function(e){i7.forEach(function(t){t(e)})},"bindFunctions"),Ube={getConfig:a(()=>_e().gantt,"getConfig"),clear:qet,setDateFormat:ett,getDateFormat:ott,enableInclusiveEndDates:ttt,endDatesAreInclusive:rtt,enableTopAxis:ntt,topAxisEnabled:itt,setAxisFormat:Yet,getAxisFormat:Ket,setTickInterval:Xet,getTickInterval:Qet,setTodayMarker:Zet,getTodayMarker:Jet,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,setDiagramId:Het,setDisplayMode:stt,getDisplayMode:att,setAccDescription:fr,getAccDescription:yr,addSection:ftt,getSections:ptt,getTasks:mtt,addTask:ktt,findTaskById:lp,addTaskOrg:Stt,setIncludes:ltt,getIncludes:ctt,setExcludes:utt,getExcludes:htt,setClickEvent:wtt,setLink:Ett,getLinks:dtt,bindFunctions:_tt,parseDuration:$be,isInvalidDate:Obe,setWeekday:gtt,getWeekday:ytt,setWeekend:xtt};a(Wbe,"getTaskTags")});var qbe=dd((o7,l7)=>{"use strict";(function(e,t){typeof o7=="object"&&typeof l7<"u"?l7.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=t()})(o7,(function(){"use strict";var e,t,r=1e3,n=6e4,i=36e5,s=864e5,o=31536e6,l=2628e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:o,months:l,days:s,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},f=a(function(v){return v instanceof T},"c"),p=a(function(v,E,S){return new T(v,S,E.$l)},"f"),m=a(function(v){return t.p(v)+"s"},"m"),g=a(function(v){return v<0},"l"),y=a(function(v){return g(v)?Math.ceil(v):Math.floor(v)},"$"),x=a(function(v){return Math.abs(v)},"y"),b=a(function(v,E){return v?g(v)?{negative:!0,format:""+x(v)+E}:{negative:!1,format:""+v+E}:{negative:!1,format:""}},"v"),T=(function(){function v(S,_,A){var B=this;if(this.$d={},this.$l=A,S===void 0&&(this.$ms=0,this.parseFromMilliseconds()),_)return p(S*d[m(_)],this);if(typeof S=="number")return this.$ms=S,this.parseFromMilliseconds(),this;if(typeof S=="object")return Object.keys(S).forEach((function(G){B.$d[m(G)]=S[G]})),this.calMilliseconds(),this;if(typeof S=="string"){var $=S.match(u);if($){var O=$.slice(2).map((function(G){return G!=null?Number(G):0}));return this.$d.years=O[0],this.$d.months=O[1],this.$d.weeks=O[2],this.$d.days=O[3],this.$d.hours=O[4],this.$d.minutes=O[5],this.$d.seconds=O[6],this.calMilliseconds(),this}}return this}a(v,"l");var E=v.prototype;return E.calMilliseconds=function(){var S=this;this.$ms=Object.keys(this.$d).reduce((function(_,A){return _+(S.$d[A]||0)*d[A]}),0)},E.parseFromMilliseconds=function(){var S=this.$ms;this.$d.years=y(S/o),S%=o,this.$d.months=y(S/l),S%=l,this.$d.days=y(S/s),S%=s,this.$d.hours=y(S/i),S%=i,this.$d.minutes=y(S/n),S%=n,this.$d.seconds=y(S/r),S%=r,this.$d.milliseconds=S},E.toISOString=function(){var S=b(this.$d.years,"Y"),_=b(this.$d.months,"M"),A=+this.$d.days||0;this.$d.weeks&&(A+=7*this.$d.weeks);var B=b(A,"D"),$=b(this.$d.hours,"H"),O=b(this.$d.minutes,"M"),G=this.$d.seconds||0;this.$d.milliseconds&&(G+=this.$d.milliseconds/1e3,G=Math.round(1e3*G)/1e3);var I=b(G,"S"),F=S.negative||_.negative||B.negative||$.negative||O.negative||I.negative,N=$.format||O.format||I.format?"T":"",D=(F?"-":"")+"P"+S.format+_.format+B.format+N+$.format+O.format+I.format;return D==="P"||D==="-P"?"P0D":D},E.toJSON=function(){return this.toISOString()},E.format=function(S){var _=S||"YYYY-MM-DDTHH:mm:ss",A={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return _.replace(h,(function(B,$){return $||String(A[B])}))},E.as=function(S){return this.$ms/d[m(S)]},E.get=function(S){var _=this.$ms,A=m(S);return A==="milliseconds"?_%=1e3:_=A==="weeks"?y(_/d[A]):this.$d[A],_||0},E.add=function(S,_,A){var B;return B=_?S*d[m(_)]:f(S)?S.$ms:p(S,this).$ms,p(this.$ms+B*(A?-1:1),this)},E.subtract=function(S,_){return this.add(S,_,!0)},E.locale=function(S){var _=this.clone();return _.$l=S,_},E.clone=function(){return p(this.$ms,this)},E.humanize=function(S){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!S)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},v})(),C=a(function(v,E,S){return v.add(E.years()*S,"y").add(E.months()*S,"M").add(E.days()*S,"d").add(E.hours()*S,"h").add(E.minutes()*S,"m").add(E.seconds()*S,"s").add(E.milliseconds()*S,"ms")},"p");return function(v,E,S){e=S,t=S().$utils(),S.duration=function(B,$){var O=S.locale();return p(B,{$l:O},$)},S.isDuration=f;var _=E.prototype.add,A=E.prototype.subtract;E.prototype.add=function(B,$){return f(B)?C(this,B,1):_.bind(this)(B,$)},E.prototype.subtract=function(B,$){return f(B)?C(this,B,-1):A.bind(this)(B,$)}}}))});var py,Ybe,Att,Hbe,Rtt,du,c7,Ltt,Kbe,Xbe=w(()=>{"use strict";py=Io(xC(),1),Ybe=Io(qbe(),1);bt();Lr();Ir();Gt();Rn();py.default.extend(Ybe.default);Att=a(function(){H.debug("Something is calling, setConf, remove the call")},"setConf"),Hbe={monday:Wu,tuesday:Bk,wednesday:$k,thursday:Rl,friday:Fk,saturday:Gk,sunday:zo},Rtt=a((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((s,o)=>s.startTime-o.startTime||s.order-o.order),i=0;for(let s of n)for(let o=0;o=r[o]){r[o]=s.endTime,s.order=o+t,o>i&&(i=o);break}return i},"getMaxIntersections"),c7=1e4,Ltt=a(function(e,t,r,n){let i=_e().gantt;n.db.setDiagramId(t);let s=_e().securityLevel,o;s==="sandbox"&&(o=st("#i"+t));let l=s==="sandbox"?st(o.nodes()[0].contentDocument.body):st("body"),u=s==="sandbox"?o.nodes()[0].contentDocument:document,h=u.getElementById(t);du=h.parentElement.offsetWidth,du===void 0&&(du=1200),i.useWidth!==void 0&&(du=i.useWidth);let d=n.db.getTasks(),f=d.filter($=>!$.vert),p=[];for(let $ of f)p.push($.type);p=B(p);let m={},g=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let $={};for(let G of f)$[G.section]===void 0?$[G.section]=[G]:$[G.section].push(G);let O=0;for(let G of Object.keys($)){let I=Rtt($[G],O)+1;O+=I,g+=I*(i.barHeight+i.barGap),m[G]=I}}else{g+=f.length*(i.barHeight+i.barGap);for(let $ of p)m[$]=f.filter(O=>O.type===$).length}h.setAttribute("viewBox","0 0 "+du+" "+g);let y=l.select(`[id="${t}"]`),x=Uk().domain([YC(d,function($){return $.startTime}),HC(d,function($){return $.endTime})]).rangeRound([0,du-i.leftPadding-i.rightPadding]);function b($,O){let G=$.startTime,I=O.startTime,F=0;return G>I?F=1:Gj.vert===K.vert?0:j.vert?1:-1);let M=$.filter(j=>!j.vert),P=[...new Set(M.map(j=>j.order))].map(j=>M.find(K=>K.order===j));y.append("g").selectAll("rect").data(P).enter().append("rect").attr("x",0).attr("y",function(j,K){return K=j.order,K*O+G-2}).attr("width",function(){return D-i.rightPadding/2}).attr("height",O).attr("class",function(j){for(let[K,Z]of p.entries())if(j.type===Z)return"section section"+K%i.numberSectionStyles;return"section section0"}).enter();let V=y.append("g").selectAll("rect").data($).enter(),U=n.db.getLinks();if(V.append("rect").attr("id",function(j){return t+"-"+j.id}).attr("rx",3).attr("ry",3).attr("x",function(j){return j.milestone?x(j.startTime)+I+.5*(x(j.endTime)-x(j.startTime))-.5*F:x(j.startTime)+I}).attr("y",function(j,K){return K=j.order,j.vert?i.gridLineStartPadding:K*O+G}).attr("width",function(j){return j.milestone?F:j.vert?.08*F:x(j.renderEndTime||j.endTime)-x(j.startTime)}).attr("height",function(j){return j.vert?M.length*(i.barHeight+i.barGap)+i.barHeight*2:F}).attr("transform-origin",function(j,K){return K=j.order,(x(j.startTime)+I+.5*(x(j.endTime)-x(j.startTime))).toString()+"px "+(K*O+G+.5*F).toString()+"px"}).attr("class",function(j){let K="task",Z="";j.classes.length>0&&(Z=j.classes.join(" "));let ce=0;for(let[me,he]of p.entries())j.type===he&&(ce=me%i.numberSectionStyles);let te="";return j.active?j.crit?te+=" activeCrit":te=" active":j.done?j.crit?te=" doneCrit":te=" done":j.crit&&(te+=" crit"),te.length===0&&(te=" task"),j.milestone&&(te=" milestone "+te),j.vert&&(te=" vert "+te),te+=ce,te+=" "+Z,K+te}),V.append("text").attr("id",function(j){return t+"-"+j.id+"-text"}).text(function(j){return j.task}).attr("font-size",i.fontSize).attr("x",function(j){let K=x(j.startTime),Z=x(j.renderEndTime||j.endTime);if(j.milestone&&(K+=.5*(x(j.endTime)-x(j.startTime))-.5*F,Z=K+F),j.vert)return x(j.startTime)+I;let ce=this.getBBox().width;return ce>Z-K?Z+ce+1.5*i.leftPadding>D?K+I-5:Z+I+5:(Z-K)/2+K+I}).attr("y",function(j,K){return j.vert?i.gridLineStartPadding+M.length*(i.barHeight+i.barGap)+60:(K=j.order,K*O+i.barHeight/2+(i.fontSize/2-2)+G)}).attr("text-height",F).attr("class",function(j){let K=x(j.startTime),Z=x(j.endTime);j.milestone&&(Z=K+F);let ce=this.getBBox().width,te="";j.classes.length>0&&(te=j.classes.join(" "));let me=0;for(let[we,ye]of p.entries())j.type===ye&&(me=we%i.numberSectionStyles);let he="";return j.active&&(j.crit?he="activeCritText"+me:he="activeText"+me),j.done?j.crit?he=he+" doneCritText"+me:he=he+" doneText"+me:j.crit&&(he=he+" critText"+me),j.milestone&&(he+=" milestoneText"),j.vert&&(he+=" vertText"),ce>Z-K?Z+ce+1.5*i.leftPadding>D?te+" taskTextOutsideLeft taskTextOutside"+me+" "+he:te+" taskTextOutsideRight taskTextOutside"+me+" "+he+" width-"+ce:te+" taskText taskText"+me+" "+he+" width-"+ce}),_e().securityLevel==="sandbox"){let j;j=st("#i"+t);let K=j.nodes()[0].contentDocument;V.filter(function(Z){return U.has(Z.id)}).each(function(Z){var ce=K.querySelector("#"+CSS.escape(t+"-"+Z.id)),te=K.querySelector("#"+CSS.escape(t+"-"+Z.id+"-text"));let me=ce.parentNode;var he=K.createElement("a");he.setAttribute("xlink:href",U.get(Z.id)),he.setAttribute("target","_top"),me.appendChild(he),he.appendChild(ce),he.appendChild(te)})}}a(C,"drawRects");function v($,O,G,I,F,N,D,M){if(D.length===0&&M.length===0)return;let R,P;for(let{startTime:Z,endTime:ce}of N)(R===void 0||ZP)&&(P=ce);if(!R||!P)return;if((0,py.default)(P).diff((0,py.default)(R),"year")>5){H.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 V=n.db.getDateFormat(),U=[],z=null,j=(0,py.default)(R);for(;j.valueOf()<=P;)n.db.isInvalidDate(j,V,D,M)?z?z.end=j:z={start:j,end:j}:z&&(U.push(z),z=null),j=j.add(1,"d");y.append("g").selectAll("rect").data(U).enter().append("rect").attr("id",Z=>t+"-exclude-"+Z.start.format("YYYY-MM-DD")).attr("x",Z=>x(Z.start.startOf("day"))+G).attr("y",i.gridLineStartPadding).attr("width",Z=>x(Z.end.endOf("day"))-x(Z.start.startOf("day"))).attr("height",F-O-i.gridLineStartPadding).attr("transform-origin",function(Z,ce){return(x(Z.start)+G+.5*(x(Z.end)-x(Z.start))).toString()+"px "+(ce*$+.5*F).toString()+"px"}).attr("class","exclude-range")}a(v,"drawExcludeDays");function E($,O,G,I){if(G<=0||$>O)return 1/0;let F=O-$,N=py.default.duration({[I??"day"]:G}).asMilliseconds();return N<=0?1/0:Math.ceil(F/N)}a(E,"getEstimatedTickCount");function S($,O,G,I){let F=n.db.getDateFormat(),N=n.db.getAxisFormat(),D;N?D=N:F==="D"?D="%d":D=i.axisFormat??"%Y-%m-%d";let M=o3(x).tickSize(-I+O+i.gridLineStartPadding).tickFormat(Bd(D)),P=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(P!==null){let V=parseInt(P[1],10);if(isNaN(V)||V<=0)H.warn(`Invalid tick interval value: "${P[1]}". Skipping custom tick interval.`);else{let U=P[2],z=n.db.getWeekday()||i.weekday,j=x.domain(),K=j[0],Z=j[1],ce=E(K,Z,V,U);if(ce>c7)H.warn(`The tick interval "${V}${U}" would generate ${ce} ticks, which exceeds the maximum allowed (${c7}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(U){case"millisecond":M.ticks(_l.every(V));break;case"second":M.ticks(Ba.every(V));break;case"minute":M.ticks(Ic.every(V));break;case"hour":M.ticks(Dc.every(V));break;case"day":M.ticks(so.every(V));break;case"week":M.ticks(Hbe[z].every(V));break;case"month":M.ticks(Nc.every(V));break}}}if(y.append("g").attr("class","grid").attr("transform","translate("+$+", "+(I-50)+")").call(M).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let V=a3(x).tickSize(-I+O+i.gridLineStartPadding).tickFormat(Bd(D));if(P!==null){let U=parseInt(P[1],10);if(isNaN(U)||U<=0)H.warn(`Invalid tick interval value: "${P[1]}". Skipping custom tick interval.`);else{let z=P[2],j=n.db.getWeekday()||i.weekday,K=x.domain(),Z=K[0],ce=K[1];if(E(Z,ce,U,z)<=c7)switch(z){case"millisecond":V.ticks(_l.every(U));break;case"second":V.ticks(Ba.every(U));break;case"minute":V.ticks(Ic.every(U));break;case"hour":V.ticks(Dc.every(U));break;case"day":V.ticks(so.every(U));break;case"week":V.ticks(Hbe[j].every(U));break;case"month":V.ticks(Nc.every(U));break}}}y.append("g").attr("class","grid").attr("transform","translate("+$+", "+O+")").call(V).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}a(S,"makeGrid");function _($,O){let G=0,I=Object.keys(m).map(F=>[F,m[F]]);y.append("g").selectAll("text").data(I).enter().append(function(F){let N=F[0].split(gt.lineBreakRegex),D=-(N.length-1)/2,M=u.createElementNS("http://www.w3.org/2000/svg","text");M.setAttribute("dy",D+"em");for(let[R,P]of N.entries()){let V=u.createElementNS("http://www.w3.org/2000/svg","tspan");V.setAttribute("alignment-baseline","central"),V.setAttribute("x","10"),R>0&&V.setAttribute("dy","1em"),V.textContent=P,M.appendChild(V)}return M}).attr("x",10).attr("y",function(F,N){if(N>0)for(let D=0;D{"use strict";Itt=a(e=>` + .mermaid-main-font { + font-family: ${e.fontFamily}; + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${e.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* 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: ${e.taskTextOutsideColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* 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: ${e.taskTextOutsideColor} !important; + } + + .vert { + stroke: ${e.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${e.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: ${e.fontFamily}; + } +`,"getStyles"),Qbe=Itt});var Jbe={};ir(Jbe,{diagram:()=>Dtt});var Dtt,eTe=w(()=>{"use strict";Sbe();jbe();Xbe();Zbe();Dtt={parser:kbe,db:Ube,renderer:Kbe,styles:Qbe}});var nTe,iTe=w(()=>{"use strict";Ms();bt();nTe={parse:a(async e=>{let t=await ki("info",e);H.debug(t)},"parse")}});var Ptt,Btt,sTe,aTe=w(()=>{"use strict";Ptt={version:"12.2.0-tiny"},Btt=a(()=>Ptt.version,"getVersion"),sTe={getVersion:Btt}});var gn,Os=w(()=>{"use strict";Lr();Gt();gn=a(e=>{let{securityLevel:t}=_e(),r=st("body");if(t==="sandbox"){let s=st(`#i${e}`).node()?.contentDocument??document;r=st(s.body)}return r.select(`#${e}`)},"selectSvgElement")});var $tt,oTe,lTe=w(()=>{"use strict";bt();Os();Rn();$tt=a((e,t,r)=>{H.debug(`rendering info diagram +`+e);let n=gn(t);Dr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),oTe={draw:$tt}});var cTe={};ir(cTe,{diagram:()=>Ftt});var Ftt,uTe=w(()=>{"use strict";iTe();aTe();lTe();Ftt={parser:nTe,db:sTe,renderer:oTe}});var fTe,u7,I_,h7,ztt,Utt,Wtt,jtt,qtt,Htt,Ytt,D_,d7=w(()=>{"use strict";bt();fn();Gi();fTe=dr.pie,u7={sections:new Map,showData:!1,config:fTe},I_=u7.sections,h7=u7.showData,ztt=structuredClone(fTe),Utt=a(()=>structuredClone(ztt),"getConfig"),Wtt=a(()=>{I_=new Map,h7=u7.showData,or()},"clear"),jtt=a(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);I_.has(e)||(I_.set(e,t),H.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),qtt=a(()=>I_,"getSections"),Htt=a(e=>{h7=e},"setShowData"),Ytt=a(()=>h7,"getShowData"),D_={getConfig:Utt,clear:Wtt,setDiagramTitle:Cr,getDiagramTitle:xr,setAccTitle:hr,getAccTitle:gr,setAccDescription:fr,getAccDescription:yr,addSection:jtt,getSections:qtt,setShowData:Htt,getShowData:Ytt}});var Ktt,pTe,mTe=w(()=>{"use strict";Ms();bt();va();d7();Ktt=a((e,t)=>{Dn(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),pTe={parse:a(async e=>{let t=await ki("pie",e);H.debug(t),Ktt(t,D_)},"parse")}});var Xtt,gTe,yTe=w(()=>{"use strict";Xtt=a(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieCircle.highlighted{ + scale: 1.05; + opacity: 1; + } + .pieCircle.highlightedOnHover:hover{ + transition-duration: 250ms; + scale: 1.05; + opacity: 1; + } + .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"),gTe=Xtt});var Qtt,Ztt,xTe,bTe=w(()=>{"use strict";Lr();Gt();bt();Os();Rn();jt();Qtt=a(e=>{let t=[...e.values()].reduce((i,s)=>i+s,0),r=[...e.entries()].map(([i,s])=>({label:i,value:s})).filter(i=>i.value/t*100>=1);return Kk().value(i=>i.value).sort(null)(r)},"createPieArcs"),Ztt=a((e,t,r,n)=>{H.debug(`rendering pie chart +`+e);let i=n.db,s=_e(),o=Nr(i.getConfig(),s.pie),l=40,u=18,h=4,d=450,f=d,p=gn(t),m=p.append("g");m.attr("transform","translate("+f/2+","+d/2+")");let{themeVariables:g}=s,[y]=sa(g.pieOuterStrokeWidth);y??=2;let x=o.legendPosition,b=o.textPosition,T=o.donutHole>0&&o.donutHole<=.9?o.donutHole:0,C=Math.min(f,d)/2-l,v=jo().innerRadius(T*C).outerRadius(C),E=jo().innerRadius(C*b).outerRadius(C*b),S=m.append("g");S.append("circle").attr("cx",0).attr("cy",0).attr("r",C+y/2).attr("class","pieOuterCircle");let _=i.getSections(),A=Qtt(_),B=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],$=0;_.forEach(te=>{$+=te});let O=A.filter(te=>(te.data.value/$*100).toFixed(0)!=="0"),G=Pa(B).domain([..._.keys()]);S.selectAll("mySlices").data(O).enter().append("path").attr("d",v).attr("fill",te=>G(te.data.label)).attr("class",te=>{let me="pieCircle";return o.highlightSlice==="hover"?me+=" highlightedOnHover":o.highlightSlice===te.data.label&&(me+=" highlighted"),me}),S.selectAll("mySlices").data(O).enter().append("text").text(te=>(te.data.value/$*100).toFixed(0)+"%").attr("transform",te=>"translate("+E.centroid(te)+")").style("text-anchor","middle").attr("class","slice");let I=m.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(d-50)/2).attr("class","pieTitleText"),F=[..._.entries()].map(([te,me])=>({label:te,value:me})),N=m.selectAll(".legend").data(F).enter().append("g").attr("class","legend");N.append("rect").attr("width",u).attr("height",u).style("fill",te=>G(te.label)).style("stroke",te=>G(te.label)),N.append("text").attr("x",u+h).attr("y",u-h).text(te=>i.getShowData()?`${te.label} [${te.value}]`:te.label);let D=Math.max(...N.selectAll("text").nodes().map(te=>te?.getBoundingClientRect().width??0)),M=d,R=f+l,P=u+h,V=F.length*P;switch(x){case"center":N.attr("transform",(te,me)=>{let he=P*F.length/2,we=-D/2-(u+h),ye=me*P-he;return"translate("+we+","+ye+")"});break;case"top":M+=V,N.attr("transform",(te,me)=>{let he=C,we=-D/2-(u+h),ye=me*P-he;return`translate(${we}, ${ye})`}),S.attr("transform",()=>`translate(0, ${V+P})`);break;case"bottom":M+=V,N.attr("transform",(te,me)=>{let he=-C-P,we=-D/2-(u+h),ye=me*P-he;return"translate("+we+","+ye+")"});break;case"left":R+=u+h+D,N.attr("transform",(te,me)=>{let he=P*F.length/2,we=-C-(u+h),ye=me*P-he;return"translate("+we+","+ye+")"}),S.attr("transform",()=>`translate(${D+u+h}, 0)`);break;case"right":default:R+=u+h+D,N.attr("transform",(te,me)=>{let he=P*F.length/2,we=12*u,ye=me*P-he;return"translate("+we+","+ye+")"});break}let U=I.node()?.getBoundingClientRect().width??0,z=f/2-U/2,j=f/2+U/2,K=Math.min(0,z),ce=Math.max(R,j)-K;p.attr("viewBox",`${K} 0 ${ce} ${M}`),Dr(p,M,ce,o.useMaxWidth)},"draw"),xTe={draw:Ztt}});var TTe={};ir(TTe,{diagram:()=>Jtt});var Jtt,CTe=w(()=>{"use strict";mTe();d7();yTe();bTe();Jtt={parser:pTe,db:D_,renderer:xTe,styles:gTe}});var f7,STe,ETe=w(()=>{"use strict";f7=(function(){var e=a(function(ee,Y,q,ve){for(q=q||{},ve=ee.length;ve--;q[ee[ve]]=Y);return q},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],s=[1,7],o=[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],l=[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],u=[55,56,57],h=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],x=[1,45],b=[1,14],T=[1,23],C=[1,18],v=[1,19],E=[1,20],S=[1,21],_=[1,22],A=[1,24],B=[1,25],$=[1,26],O=[1,27],G=[1,28],I=[1,29],F=[1,32],N=[1,33],D=[1,34],M=[1,39],R=[1,40],P=[1,42],V=[1,44],U=[1,63],z=[1,62],j=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],K=[1,66],Z=[1,67],ce=[1,68],te=[1,69],me=[1,70],he=[1,71],we=[1,72],ye=[1,73],ke=[1,74],Fe=[1,75],Ge=[1,76],Me=[1,77],at=[4,5,6,7,8,9,10,11,12,13,14,15,18],ht=[1,91],ge=[1,92],De=[1,93],Le=[1,100],Ie=[1,94],Q=[1,97],ne=[1,95],re=[1,96],se=[1,98],fe=[1,99],J=[1,103],L=[10,55,56,57],W=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ae={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:a(function(Y,q,ve,Se,Ae,Ee,Qe){var qe=Ee.length-1;switch(Ae){case 23:this.$=Ee[qe];break;case 24:this.$=Ee[qe-1]+""+Ee[qe];break;case 26:this.$=Ee[qe-1]+Ee[qe];break;case 27:this.$=[Ee[qe].trim()];break;case 28:Ee[qe-2].push(Ee[qe].trim()),this.$=Ee[qe-2];break;case 29:this.$=Ee[qe-4],Se.addClass(Ee[qe-2],Ee[qe]);break;case 37:this.$=[];break;case 42:this.$=Ee[qe].trim(),Se.setDiagramTitle(this.$);break;case 43:this.$=Ee[qe].trim(),Se.setAccTitle(this.$);break;case 44:case 45:this.$=Ee[qe].trim(),Se.setAccDescription(this.$);break;case 46:Se.addSection(Ee[qe].substr(8)),this.$=Ee[qe].substr(8);break;case 47:Se.addPoint(Ee[qe-3],"",Ee[qe-1],Ee[qe],[]);break;case 48:Se.addPoint(Ee[qe-4],Ee[qe-3],Ee[qe-1],Ee[qe],[]);break;case 49:Se.addPoint(Ee[qe-4],"",Ee[qe-2],Ee[qe-1],Ee[qe]);break;case 50:Se.addPoint(Ee[qe-5],Ee[qe-4],Ee[qe-2],Ee[qe-1],Ee[qe]);break;case 51:Se.setXAxisLeftText(Ee[qe-2]),Se.setXAxisRightText(Ee[qe]);break;case 52:Ee[qe-1].text+=" \u27F6 ",Se.setXAxisLeftText(Ee[qe-1]);break;case 53:Se.setXAxisLeftText(Ee[qe]);break;case 54:Se.setYAxisBottomText(Ee[qe-2]),Se.setYAxisTopText(Ee[qe]);break;case 55:Ee[qe-1].text+=" \u27F6 ",Se.setYAxisBottomText(Ee[qe-1]);break;case 56:Se.setYAxisBottomText(Ee[qe]);break;case 57:Se.setQuadrant1Text(Ee[qe]);break;case 58:Se.setQuadrant2Text(Ee[qe]);break;case 59:Se.setQuadrant3Text(Ee[qe]);break;case 60:Se.setQuadrant4Text(Ee[qe]);break;case 64:this.$={text:Ee[qe],type:"text"};break;case 65:this.$={text:Ee[qe-1].text+""+Ee[qe],type:Ee[qe-1].type};break;case 66:this.$={text:Ee[qe],type:"text"};break;case 67:this.$={text:Ee[qe],type:"markdown"};break;case 68:this.$=Ee[qe];break;case 69:this.$=Ee[qe-1]+""+Ee[qe];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:n,56:i,57:s},{1:[3]},{18:t,26:8,27:2,28:r,55:n,56:i,57:s},{18:t,26:9,27:2,28:r,55:n,56:i,57:s},e(o,[2,33],{29:10}),e(l,[2,61]),e(l,[2,62]),e(l,[2,63]),{1:[2,30]},{1:[2,31]},e(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:g,14:y,15:x,18:b,25:T,35:C,37:v,39:E,41:S,42:_,48:A,50:B,51:$,52:O,53:G,54:I,60:F,61:N,63:D,64:M,65:R,66:P,67:V}),e(o,[2,34]),{27:46,55:n,56:i,57:s},e(u,[2,37]),e(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:g,14:y,15:x,18:b,25:T,35:C,37:v,39:E,41:S,42:_,48:A,50:B,51:$,52:O,53:G,54:I,60:F,61:N,63:D,64:M,65:R,66:P,67:V}),e(u,[2,39]),e(u,[2,40]),e(u,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(u,[2,45]),e(u,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:g,14:y,15:x,43:52,58:31,60:F,61:N,63:D,64:M,65:R,66:P,67:V},{4:d,5:f,10:p,12:m,13:g,14:y,15:x,43:53,58:31,60:F,61:N,63:D,64:M,65:R,66:P,67:V},{4:d,5:f,10:p,12:m,13:g,14:y,15:x,43:54,58:31,60:F,61:N,63:D,64:M,65:R,66:P,67:V},{4:d,5:f,10:p,12:m,13:g,14:y,15:x,43:55,58:31,60:F,61:N,63:D,64:M,65:R,66:P,67:V},{4:d,5:f,10:p,12:m,13:g,14:y,15:x,43:56,58:31,60:F,61:N,63:D,64:M,65:R,66:P,67:V},{4:d,5:f,10:p,12:m,13:g,14:y,15:x,43:57,58:31,60:F,61:N,63:D,64:M,65:R,66:P,67:V},{4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,44:[1,58],47:[1,59],58:61,59:60,63:D,64:M,65:R,66:P,67:V},e(j,[2,64]),e(j,[2,66]),e(j,[2,67]),e(j,[2,70]),e(j,[2,71]),e(j,[2,72]),e(j,[2,73]),e(j,[2,74]),e(j,[2,75]),e(j,[2,76]),e(j,[2,77]),e(j,[2,78]),e(j,[2,79]),e(j,[2,80]),e(j,[2,81]),e(o,[2,35]),e(u,[2,38]),e(u,[2,42]),e(u,[2,43]),e(u,[2,44]),{3:65,4:K,5:Z,6:ce,7:te,8:me,9:he,10:we,11:ye,12:ke,13:Fe,14:Ge,15:Me,21:64},e(u,[2,53],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,49:[1,78],63:D,64:M,65:R,66:P,67:V}),e(u,[2,56],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,49:[1,79],63:D,64:M,65:R,66:P,67:V}),e(u,[2,57],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,63:D,64:M,65:R,66:P,67:V}),e(u,[2,58],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,63:D,64:M,65:R,66:P,67:V}),e(u,[2,59],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,63:D,64:M,65:R,66:P,67:V}),e(u,[2,60],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,63:D,64:M,65:R,66:P,67:V}),{45:[1,80]},{44:[1,81]},e(j,[2,65]),e(j,[2,82]),e(j,[2,83]),e(j,[2,84]),{3:83,4:K,5:Z,6:ce,7:te,8:me,9:he,10:we,11:ye,12:ke,13:Fe,14:Ge,15:Me,18:[1,82]},e(at,[2,23]),e(at,[2,1]),e(at,[2,2]),e(at,[2,3]),e(at,[2,4]),e(at,[2,5]),e(at,[2,6]),e(at,[2,7]),e(at,[2,8]),e(at,[2,9]),e(at,[2,10]),e(at,[2,11]),e(at,[2,12]),e(u,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:g,14:y,15:x,60:F,61:N,63:D,64:M,65:R,66:P,67:V}),e(u,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:g,14:y,15:x,60:F,61:N,63:D,64:M,65:R,66:P,67:V}),{46:[1,86]},{45:[1,87]},{4:ht,5:ge,6:De,8:Le,11:Ie,13:Q,16:90,17:ne,18:re,19:se,20:fe,22:89,23:88},e(at,[2,24]),e(u,[2,51],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,63:D,64:M,65:R,66:P,67:V}),e(u,[2,54],{59:60,58:61,4:d,5:f,8:U,10:p,12:m,13:g,14:y,15:x,18:z,63:D,64:M,65:R,66:P,67:V}),e(u,[2,47],{22:89,16:90,23:101,4:ht,5:ge,6:De,8:Le,11:Ie,13:Q,17:ne,18:re,19:se,20:fe}),{46:[1,102]},e(u,[2,29],{10:J}),e(L,[2,27],{16:104,4:ht,5:ge,6:De,8:Le,11:Ie,13:Q,17:ne,18:re,19:se,20:fe}),e(W,[2,25]),e(W,[2,13]),e(W,[2,14]),e(W,[2,15]),e(W,[2,16]),e(W,[2,17]),e(W,[2,18]),e(W,[2,19]),e(W,[2,20]),e(W,[2,21]),e(W,[2,22]),e(u,[2,49],{10:J}),e(u,[2,48],{22:89,16:90,23:105,4:ht,5:ge,6:De,8:Le,11:Ie,13:Q,17:ne,18:re,19:se,20:fe}),{4:ht,5:ge,6:De,8:Le,11:Ie,13:Q,16:90,17:ne,18:re,19:se,20:fe,22:106},e(W,[2,26]),e(u,[2,50],{10:J}),e(L,[2,28],{16:104,4:ht,5:ge,6:De,8:Le,11:Ie,13:Q,17:ne,18:re,19:se,20:fe})],defaultActions:{8:[2,30],9:[2,31]},parseError:a(function(Y,q){if(q.recoverable)this.trace(Y);else{var ve=new Error(Y);throw ve.hash=q,ve}},"parseError"),parse:a(function(Y){var q=this,ve=[0],Se=[],Ae=[null],Ee=[],Qe=this.table,qe="",lt=0,Ve=0,Ye=0,Je=2,Oe=1,Vt=Ee.slice.call(arguments,1),Ce=Object.create(this.lexer),Ut={yy:{}};for(var Re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Re)&&(Ut.yy[Re]=this.yy[Re]);Ce.setInput(Y,Ut.yy),Ut.yy.lexer=Ce,Ut.yy.parser=this,typeof Ce.yylloc>"u"&&(Ce.yylloc={});var vt=Ce.yylloc;Ee.push(vt);var Zt=Ce.options&&Ce.options.ranges;typeof Ut.yy.parseError=="function"?this.parseError=Ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(dt){ve.length=ve.length-2*dt,Ae.length=Ae.length-dt,Ee.length=Ee.length-dt}a(_t,"popStack");function qt(){var dt;return dt=Se.pop()||Ce.lex()||Oe,typeof dt!="number"&&(dt instanceof Array&&(Se=dt,dt=Se.pop()),dt=q.symbols_[dt]||dt),dt}a(qt,"lex");for(var At,zt,ot,Rt,Ar,ie,xt={},kt,de,Ne,nt;;){if(ot=ve[ve.length-1],this.defaultActions[ot]?Rt=this.defaultActions[ot]:((At===null||typeof At>"u")&&(At=qt()),Rt=Qe[ot]&&Qe[ot][At]),typeof Rt>"u"||!Rt.length||!Rt[0]){var ft="";nt=[];for(kt in Qe[ot])this.terminals_[kt]&&kt>Je&&nt.push("'"+this.terminals_[kt]+"'");Ce.showPosition?ft="Parse error on line "+(lt+1)+`: +`+Ce.showPosition()+` +Expecting `+nt.join(", ")+", got '"+(this.terminals_[At]||At)+"'":ft="Parse error on line "+(lt+1)+": Unexpected "+(At==Oe?"end of input":"'"+(this.terminals_[At]||At)+"'"),this.parseError(ft,{text:Ce.match,token:this.terminals_[At]||At,line:Ce.yylineno,loc:vt,expected:nt})}if(Rt[0]instanceof Array&&Rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ot+", token: "+At);switch(Rt[0]){case 1:ve.push(At),Ae.push(Ce.yytext),Ee.push(Ce.yylloc),ve.push(Rt[1]),At=null,zt?(At=zt,zt=null):(Ve=Ce.yyleng,qe=Ce.yytext,lt=Ce.yylineno,vt=Ce.yylloc,Ye>0&&Ye--);break;case 2:if(de=this.productions_[Rt[1]][1],xt.$=Ae[Ae.length-de],xt._$={first_line:Ee[Ee.length-(de||1)].first_line,last_line:Ee[Ee.length-1].last_line,first_column:Ee[Ee.length-(de||1)].first_column,last_column:Ee[Ee.length-1].last_column},Zt&&(xt._$.range=[Ee[Ee.length-(de||1)].range[0],Ee[Ee.length-1].range[1]]),ie=this.performAction.apply(xt,[qe,Ve,lt,Ut.yy,Rt[1],Ae,Ee].concat(Vt)),typeof ie<"u")return ie;de&&(ve=ve.slice(0,-1*de*2),Ae=Ae.slice(0,-1*de),Ee=Ee.slice(0,-1*de)),ve.push(this.productions_[Rt[1]][0]),Ae.push(xt.$),Ee.push(xt._$),Ne=Qe[ve[ve.length-2]][ve[ve.length-1]],ve.push(Ne);break;case 3:return!0}}return!0},"parse")},X=(function(){var ee={EOF:1,parseError:a(function(q,ve){if(this.yy.parser)this.yy.parser.parseError(q,ve);else throw new Error(q)},"parseError"),setInput:a(function(Y,q){return this.yy=q||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var q=Y.match(/(?:\r\n?|\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},"input"),unput:a(function(Y){var q=Y.length,ve=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;var Se=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),ve.length-1&&(this.yylineno-=ve.length-1);var Ae=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:ve?(ve.length===Se.length?this.yylloc.first_column:0)+Se[Se.length-ve.length].length-ve[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[Ae[0],Ae[0]+this.yyleng-q]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(Y){this.unput(this.match.slice(Y))},"less"),pastInput:a(function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var Y=this.pastInput(),q=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+` +`+q+"^"},"showPosition"),test_match:a(function(Y,q){var ve,Se,Ae;if(this.options.backtrack_lexer&&(Ae={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&&(Ae.yylloc.range=this.yylloc.range.slice(0))),Se=Y[0].match(/(?:\r\n?|\n).*/g),Se&&(this.yylineno+=Se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Se?Se[Se.length-1].length-Se[Se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],ve=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ve)return ve;if(this._backtrack){for(var Ee in Ae)this[Ee]=Ae[Ee];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,q,ve,Se;this._more||(this.yytext="",this.match="");for(var Ae=this._currentRules(),Ee=0;Eeq[0].length)){if(q=ve,Se=Ee,this.options.backtrack_lexer){if(Y=this.test_match(ve,Ae[Ee]),Y!==!1)return Y;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?(Y=this.test_match(q,Ae[Se]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var q=this.next();return q||this.lex()},"lex"),begin:a(function(q){this.conditionStack.push(q)},"begin"),popState:a(function(){var q=this.conditionStack.length-1;return q>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},"topState"),pushState:a(function(q){this.begin(q)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(q,ve,Se,Ae){var Ee=Ae;switch(Se){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 ee})();ae.lexer=X;function xe(){this.yy={}}return a(xe,"Parser"),xe.prototype=ae,ae.Parser=xe,new xe})();f7.parser=f7;STe=f7});var Qs,N_,vTe=w(()=>{"use strict";Lr();Gi();bt();yl();Qs=Zi(),N_=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{a(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:dr.quadrantChart?.chartWidth||500,chartWidth:dr.quadrantChart?.chartHeight||500,titlePadding:dr.quadrantChart?.titlePadding||10,titleFontSize:dr.quadrantChart?.titleFontSize||20,quadrantPadding:dr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:dr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:dr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:dr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:dr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:dr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:dr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:dr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:dr.quadrantChart?.pointLabelFontSize||12,pointRadius:dr.quadrantChart?.pointRadius||5,xAxisPosition:dr.quadrantChart?.xAxisPosition||"top",yAxisPosition:dr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:dr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:dr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Qs.quadrant1Fill,quadrant2Fill:Qs.quadrant2Fill,quadrant3Fill:Qs.quadrant3Fill,quadrant4Fill:Qs.quadrant4Fill,quadrant1TextFill:Qs.quadrant1TextFill,quadrant2TextFill:Qs.quadrant2TextFill,quadrant3TextFill:Qs.quadrant3TextFill,quadrant4TextFill:Qs.quadrant4TextFill,quadrantPointFill:Qs.quadrantPointFill,quadrantPointTextFill:Qs.quadrantPointTextFill,quadrantXAxisTextFill:Qs.quadrantXAxisTextFill,quadrantYAxisTextFill:Qs.quadrantYAxisTextFill,quadrantTitleFill:Qs.quadrantTitleFill,quadrantInternalBorderStrokeFill:Qs.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Qs.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,H.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,r){this.classes.set(t,r)}setConfig(t){H.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){H.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,r,n,i){let s=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,o={top:t==="top"&&r?s:0,bottom:t==="bottom"&&r?s:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,d={top:i?h:0},f=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+o.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-o.top-o.bottom-d.top,y=m/2,x=g/2;return{xAxisSpace:o,yAxisSpace:u,titleSpace:d,quadrantSpace:{quadrantLeft:f,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:x}}}getAxisLabels(t,r,n,i){let{quadrantSpace:s,titleSpace:o}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:d,quadrantTop:f,quadrantWidth:p}=s,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?d/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+d+(m?d/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(t){let{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:s,quadrantTop:o}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+s,y:o,width:s,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:o,width:s,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:o+n,width:s,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+s,y:o+n,width:s,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(t){let{quadrantSpace:r}=t,{quadrantHeight:n,quadrantLeft:i,quadrantTop:s,quadrantWidth:o}=r,l=Vo().domain([0,1]).range([i,o+i]),u=Vo().domain([0,1]).range([n+s,s]);return this.data.points.map(d=>{let f=this.classes.get(d.className);return f&&(d={...f,...d}),{x:l(d.x),y:u(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:l(d.x),y:u(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(t){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=t,{quadrantHalfHeight:i,quadrantHeight:s,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u,x2:o+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o+h,y1:u+r,x2:o+h,y2:u+s-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u+s,x2:o+h+r,y2:u+s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o,y1:u+r,x2:o,y2:u+s-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+l,y1:u+r,x2:o+l,y2:u+s-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+r,y1:u+i,x2:o+h-r,y2:u+i}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,s=this.calculateSpace(i,t,r,n);return{points:this.getQuadrantPoints(s),quadrants:this.getQuadrants(s),axisLabels:this.getAxisLabels(i,t,r,s),borderLines:this.getBorders(s),title:this.getTitle(n)}}}});function p7(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function wTe(e){return!/^\d+$/.test(e)}function _Te(e){return!/^\d+px$/.test(e)}var cp,ATe=w(()=>{"use strict";cp=class extends Error{static{a(this,"InvalidStyleError")}constructor(t,r,n){super(`value for ${t} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};a(p7,"validateHexCode");a(wTe,"validateNumber");a(_Te,"validateSizeInPixels")});function fu(e){return vr(e.trim(),_e())}function rrt(e){Ss.setData({quadrant1Text:fu(e.text)})}function nrt(e){Ss.setData({quadrant2Text:fu(e.text)})}function irt(e){Ss.setData({quadrant3Text:fu(e.text)})}function srt(e){Ss.setData({quadrant4Text:fu(e.text)})}function art(e){Ss.setData({xAxisLeftText:fu(e.text)})}function ort(e){Ss.setData({xAxisRightText:fu(e.text)})}function lrt(e){Ss.setData({yAxisTopText:fu(e.text)})}function crt(e){Ss.setData({yAxisBottomText:fu(e.text)})}function m7(e){let t={};for(let r of e){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(wTe(i))throw new cp(n,i,"number");t.radius=parseInt(i)}else if(n==="color"){if(p7(i))throw new cp(n,i,"hex code");t.color=i}else if(n==="stroke-color"){if(p7(i))throw new cp(n,i,"hex code");t.strokeColor=i}else if(n==="stroke-width"){if(_Te(i))throw new cp(n,i,"number of pixels (eg. 10px)");t.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return t}function urt(e,t,r,n,i){let s=m7(i);Ss.addPoints([{x:r,y:n,text:fu(e.text),className:t,...s}])}function hrt(e,t){Ss.addClass(e,m7(t))}function drt(e){Ss.setConfig({chartWidth:e})}function frt(e){Ss.setConfig({chartHeight:e})}function prt(){let e=_e(),{themeVariables:t,quadrantChart:r}=e;return r&&Ss.setConfig(r),Ss.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),Ss.setData({titleText:xr()}),Ss.build()}var Ss,mrt,RTe,LTe=w(()=>{"use strict";Gt();Ir();fn();vTe();ATe();a(fu,"textSanitizer");Ss=new N_;a(rrt,"setQuadrant1Text");a(nrt,"setQuadrant2Text");a(irt,"setQuadrant3Text");a(srt,"setQuadrant4Text");a(art,"setXAxisLeftText");a(ort,"setXAxisRightText");a(lrt,"setYAxisTopText");a(crt,"setYAxisBottomText");a(m7,"parseStyles");a(urt,"addPoint");a(hrt,"addClass");a(drt,"setWidth");a(frt,"setHeight");a(prt,"getQuadrantData");mrt=a(function(){Ss.clear(),or()},"clear"),RTe={setWidth:drt,setHeight:frt,setQuadrant1Text:rrt,setQuadrant2Text:nrt,setQuadrant3Text:irt,setQuadrant4Text:srt,setXAxisLeftText:art,setXAxisRightText:ort,setYAxisTopText:lrt,setYAxisBottomText:crt,parseStyles:m7,addPoint:urt,addClass:hrt,getQuadrantData:prt,clear:mrt,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,getAccDescription:yr,setAccDescription:fr}});var grt,ITe,DTe=w(()=>{"use strict";Lr();Gt();bt();Rn();grt=a((e,t,r,n)=>{function i(A){return A==="top"?"hanging":"middle"}a(i,"getDominantBaseLine");function s(A){return A==="left"?"start":"middle"}a(s,"getTextAnchor");function o(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`}a(o,"getTransformation");let l=_e();H.debug(`Rendering quadrant chart +`+e);let u=l.securityLevel,h;u==="sandbox"&&(h=st("#i"+t));let f=(u==="sandbox"?st(h.nodes()[0].contentDocument.body):st("body")).select(`[id="${t}"]`),p=f.append("g").attr("class","main"),m=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;Dr(f,g,m,l.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+m+" "+g),n.db.setHeight(g),n.db.setWidth(m);let y=n.db.getQuadrantData(),x=p.append("g").attr("class","quadrants"),b=p.append("g").attr("class","border"),T=p.append("g").attr("class","data-points"),C=p.append("g").attr("class","labels"),v=p.append("g").attr("class","title");y.title&&v.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",i(y.title.horizontalPos)).attr("text-anchor",s(y.title.verticalPos)).attr("transform",o(y.title)).text(y.title.text),y.borderLines&&b.selectAll("line").data(y.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 E=x.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");E.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),E.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=>i(A.text.horizontalPos)).attr("text-anchor",A=>s(A.text.verticalPos)).attr("transform",A=>o(A.text)).text(A=>A.text.text),C.selectAll("g.label").data(y.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=>i(A.horizontalPos)).attr("text-anchor",A=>s(A.verticalPos)).attr("transform",A=>o(A));let _=T.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");_.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),_.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=>i(A.text.horizontalPos)).attr("text-anchor",A=>s(A.text.verticalPos)).attr("transform",A=>o(A.text))},"draw"),ITe={draw:grt}});var NTe={};ir(NTe,{diagram:()=>yrt});var yrt,MTe=w(()=>{"use strict";ETe();LTe();DTe();yrt={parser:STe,db:RTe,renderer:ITe,styles:a(()=>"","styles")}});var g7,BTe,$Te=w(()=>{"use strict";g7=(function(){var e=a(function(D,M,R,P){for(R=R||{},P=D.length;P--;R[D[P]]=M);return R},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],h=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],x=[1,34],b=[1,35],T=[1,36],C=[1,37],v=[1,43],E=[1,42],S=[1,47],_=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],B=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],$=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],O=[1,65],G=[26,28],I={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$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",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"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],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(M,R,P,V,U,z,j){var K=z.length-1;switch(U){case 5:V.setOrientation(z[K]);break;case 9:V.setDiagramTitle(z[K].text.trim());break;case 12:V.setLineData({text:"",type:"text"},z[K]);break;case 13:V.setLineData(z[K-1],z[K]);break;case 14:V.setBarData({text:"",type:"text"},z[K]);break;case 15:V.setBarData(z[K-1],z[K]);break;case 16:this.$=z[K].trim(),V.setAccTitle(this.$);break;case 17:case 18:this.$=z[K].trim(),V.setAccDescription(this.$);break;case 19:this.$=z[K-1];break;case 20:case 30:this.$=[z[K-2],...z[K]];break;case 21:case 31:this.$=[z[K]];break;case 22:this.$={value:Number(z[K-1]),label:z[K]};break;case 23:this.$={value:Number(z[K]),label:""};break;case 24:V.setXAxisTitle(z[K]);break;case 25:V.setXAxisTitle(z[K-1]);break;case 26:V.setXAxisTitle({type:"text",text:""});break;case 27:V.setXAxisBand(z[K]);break;case 28:V.setXAxisRangeData(Number(z[K-2]),Number(z[K]));break;case 29:this.$=z[K-1];break;case 32:V.setYAxisTitle(z[K]);break;case 33:V.setYAxisTitle(z[K-1]);break;case 34:V.setYAxisTitle({type:"text",text:""});break;case 35:V.setYAxisRangeData(Number(z[K-2]),Number(z[K]));break;case 39:this.$={text:z[K],type:"text"};break;case 40:this.$={text:z[K],type:"text"};break;case 41:this.$={text:z[K],type:"markdown"};break;case 42:this.$=z[K];break;case 43:this.$=z[K-1]+""+z[K];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:n,36:i,37:s,38:o}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:n,36:i,37:s,38:o}),e(t,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:i,37:s,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),{1:[2,1]},e(t,r,{4:2,7:4,3:21,5:n,36:i,37:s,38:o}),{1:[2,3]},e(l,[2,5]),e(t,[2,7],{4:22,36:i,37:s,38:o}),{11:23,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},{11:39,13:38,24:v,29:E,30:u,31:40,32:41,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},{11:45,15:44,29:S,30:u,35:46,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},{11:49,17:48,24:_,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},{11:52,17:51,24:_,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(B,[2,39],{41:55,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C}),e(B,[2,40]),e(B,[2,41]),e($,[2,42]),e($,[2,44]),e($,[2,45]),e($,[2,46]),e($,[2,47]),e($,[2,48]),e($,[2,49]),e($,[2,50]),e($,[2,51]),e($,[2,52]),e($,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:v,29:E}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},e(A,[2,11]),e(A,[2,32],{35:60,29:S}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:_},{25:63,27:64,29:O},e(A,[2,14]),{17:66,24:_},e(A,[2,16]),e(A,[2,17]),e($,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(G,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:u,34:74,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:x,49:b,50:T,51:C},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:O},e(G,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(M,R){if(R.recoverable)this.trace(M);else{var P=new Error(M);throw P.hash=R,P}},"parseError"),parse:a(function(M){var R=this,P=[0],V=[],U=[null],z=[],j=this.table,K="",Z=0,ce=0,te=0,me=2,he=1,we=z.slice.call(arguments,1),ye=Object.create(this.lexer),ke={yy:{}};for(var Fe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Fe)&&(ke.yy[Fe]=this.yy[Fe]);ye.setInput(M,ke.yy),ke.yy.lexer=ye,ke.yy.parser=this,typeof ye.yylloc>"u"&&(ye.yylloc={});var Ge=ye.yylloc;z.push(Ge);var Me=ye.options&&ye.options.ranges;typeof ke.yy.parseError=="function"?this.parseError=ke.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(ae){P.length=P.length-2*ae,U.length=U.length-ae,z.length=z.length-ae}a(at,"popStack");function ht(){var ae;return ae=V.pop()||ye.lex()||he,typeof ae!="number"&&(ae instanceof Array&&(V=ae,ae=V.pop()),ae=R.symbols_[ae]||ae),ae}a(ht,"lex");for(var ge,De,Le,Ie,Q,ne,re={},se,fe,J,L;;){if(Le=P[P.length-1],this.defaultActions[Le]?Ie=this.defaultActions[Le]:((ge===null||typeof ge>"u")&&(ge=ht()),Ie=j[Le]&&j[Le][ge]),typeof Ie>"u"||!Ie.length||!Ie[0]){var W="";L=[];for(se in j[Le])this.terminals_[se]&&se>me&&L.push("'"+this.terminals_[se]+"'");ye.showPosition?W="Parse error on line "+(Z+1)+`: +`+ye.showPosition()+` +Expecting `+L.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'":W="Parse error on line "+(Z+1)+": Unexpected "+(ge==he?"end of input":"'"+(this.terminals_[ge]||ge)+"'"),this.parseError(W,{text:ye.match,token:this.terminals_[ge]||ge,line:ye.yylineno,loc:Ge,expected:L})}if(Ie[0]instanceof Array&&Ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Le+", token: "+ge);switch(Ie[0]){case 1:P.push(ge),U.push(ye.yytext),z.push(ye.yylloc),P.push(Ie[1]),ge=null,De?(ge=De,De=null):(ce=ye.yyleng,K=ye.yytext,Z=ye.yylineno,Ge=ye.yylloc,te>0&&te--);break;case 2:if(fe=this.productions_[Ie[1]][1],re.$=U[U.length-fe],re._$={first_line:z[z.length-(fe||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(fe||1)].first_column,last_column:z[z.length-1].last_column},Me&&(re._$.range=[z[z.length-(fe||1)].range[0],z[z.length-1].range[1]]),ne=this.performAction.apply(re,[K,ce,Z,ke.yy,Ie[1],U,z].concat(we)),typeof ne<"u")return ne;fe&&(P=P.slice(0,-1*fe*2),U=U.slice(0,-1*fe),z=z.slice(0,-1*fe)),P.push(this.productions_[Ie[1]][0]),U.push(re.$),z.push(re._$),J=j[P[P.length-2]][P[P.length-1]],P.push(J);break;case 3:return!0}}return!0},"parse")},F=(function(){var D={EOF:1,parseError:a(function(R,P){if(this.yy.parser)this.yy.parser.parseError(R,P);else throw new Error(R)},"parseError"),setInput:a(function(M,R){return this.yy=R||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var R=M.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),M},"input"),unput:a(function(M){var R=M.length,P=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var V=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 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:P?(P.length===V.length?this.yylloc.first_column:0)+V[V.length-P.length].length-P[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(M){this.unput(this.match.slice(M))},"less"),pastInput:a(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var M=this.pastInput(),R=new Array(M.length+1).join("-");return M+this.upcomingInput()+` +`+R+"^"},"showPosition"),test_match:a(function(M,R){var P,V,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))),V=M[0].match(/(?:\r\n?|\n).*/g),V&&(this.yylineno+=V.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:V?V[V.length-1].length-V[V.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],P=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var z in U)this[z]=U[z];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,R,P,V;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),z=0;zR[0].length)){if(R=P,V=z,this.options.backtrack_lexer){if(M=this.test_match(P,U[z]),M!==!1)return M;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(M=this.test_match(R,U[V]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var R=this.next();return R||this.lex()},"lex"),begin:a(function(R){this.conditionStack.push(R)},"begin"),popState:a(function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},"topState"),pushState:a(function(R){this.begin(R)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(R,P,V,U){var z=U;switch(V){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;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 33;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 29;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 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"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})();I.lexer=F;function N(){this.yy={}}return a(N,"Parser"),N.prototype=I,I.Parser=N,new N})();g7.parser=g7;BTe=g7});function nT(e){return e.type==="bar"}function iT(e){return e.type==="band"}function my(e){return e.type==="linear"}var sT=w(()=>{"use strict";a(nT,"isBarPlot");a(iT,"isBandAxisData");a(my,"isLinearAxisData")});var Zh,M_=w(()=>{"use strict";qo();Zh=class{constructor(t){this.parentGroup=t}static{a(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,r){if(!this.parentGroup)return{width:t.reduce((h,d)=>Math.max(d.length,h),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r),s=i.node()?.getScreenCTM?.(),o=a(h=>h&&h>0?h:1,"toScale"),l=o(s?.a),u=o(s?.d);for(let h of t){let d=GK(i,1,h),f=d?d.width/l:h.length*r,p=d?d.height/u:r;n.width=Math.max(n.width,f),n.height=Math.max(n.height,p)}return i.remove(),n}}});var gy,y7=w(()=>{"use strict";gy=class{constructor(t,r,n,i){this.axisConfig=t;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.normalizedLabelRotationInRad=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{a(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let r=t.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*t.width;this.outerPadding=Math.min(n.width/2,i);let s=n.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(s=Math.max(s,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),s+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,s<=r&&(r-=s,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-r}calculateSpaceIfDrawnVertical(t){let r=t.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*t.height;this.outerPadding=Math.min(n.height/2,i);let s=n.width+this.axisConfig.labelPadding*2;s<=r&&(r-=s,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=t.width-r,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let r=this.normalizedLabelRotationInRad;return r===0?0:Math.sin(r)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}});var O_,FTe=w(()=>{"use strict";Lr();bt();y7();O_=class extends gy{static{a(this,"BandAxis")}constructor(t,r,n,i,s){super(t,i,s,r),this.categories=n,this.scale=fm().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=fm().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),H.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}});var P_,GTe=w(()=>{"use strict";Lr();y7();P_=class extends gy{static{a(this,"LinearAxis")}constructor(t,r,n,i,s){super(t,i,s,r),this.domain=n,this.scale=Vo().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Vo().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function x7(e,t,r,n){let i=new Zh(n);return iT(e)?new O_(t,r,e.categories,e.title,i):new P_(t,r,[e.min,e.max],e.title,i)}var VTe=w(()=>{"use strict";sT();M_();FTe();GTe();a(x7,"getAxis")});function zTe(e,t,r,n){let i=new Zh(n);return new b7(i,e,t,r)}var b7,UTe=w(()=>{"use strict";M_();b7=class{constructor(t,r,n,i){this.textDimensionCalculator=t;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.titleWidth=0;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{a(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,t.width),i=r.height+2*this.chartConfig.titlePadding;return i<=t.height&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.titleWidth=r.width,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,r){let n=Math.min(this.titleWidth,this.chartConfig.width)/2,i=Math.min(Math.max((t+r)/2,n),this.chartConfig.width-n);this.boundingRect.x=i-n,this.boundingRect.width=n*2}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};a(zTe,"getChartTitleComponent")});function WTe(e){return{fontSize:e,markerSize:e*Crt,markerSpacing:e*Srt,itemSpacing:e*krt}}function jTe(e,t,r,n){let i=new Zh(n);return new T7(i,e,t,r)}var Crt,krt,Srt,T7,qTe=w(()=>{"use strict";sT();M_();Crt=.75,krt=.5,Srt=.35;a(WTe,"getLegendLayout");T7=class{constructor(t,r,n,i){this.textDimensionCalculator=t;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.visiblePlots=[]}static{a(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(h=>h.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:r,markerSize:n,markerSpacing:i,itemSpacing:s}=WTe(this.chartConfig.legendFontSize),o=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(h=>h.title),r),l=this.chartConfig.legendPadding*2+n+i+o.width,u=this.chartConfig.legendPadding*2+this.visiblePlots.length*r+(this.visiblePlots.length-1)*s;return l<=t.width&&u<=t.height?(this.boundingRect.width=l,this.boundingRect.height=u):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:r,markerSpacing:n,itemSpacing:i}=WTe(this.chartConfig.legendFontSize),s=t+i,o=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,u=[],h=[];for(let[d,f]of this.visiblePlots.entries())if(nT(f))u.push({x:o,y:l+d*s,width:r,height:r,fill:f.fill,strokeFill:f.fill,strokeWidth:0});else{let p=l+d*s+r/2;h.push({path:`M ${o},${p} L ${o+r},${p}`,strokeFill:f.strokeFill,strokeWidth:f.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:u},{groupTexts:["legend","markers"],type:"path",data:h},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((d,f)=>({text:d.title,x:o+r+n,y:l+f*s+r/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};a(jTe,"getChartLegendComponent")});var B_,HTe=w(()=>{"use strict";Lr();B_=class{constructor(t,r,n,i,s){this.plotData=t;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=s}static{a(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r;if(this.orientation==="horizontal"?r=Fd().y(i=>i[0]).x(i=>i[1])(t):r=Fd().x(i=>i[0]).y(i=>i[1])(t),!r)return[];let n=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let o=[];for(let[l,[u,h]]of t.entries()){let d=this.plotData.pointLabels[l];d&&(this.orientation==="horizontal"?o.push({x:h+10,y:u,text:d,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):o.push({x:u,y:h-10,text:d,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}o.length>0&&n.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:o})}return n}}});var $_,YTe=w(()=>{"use strict";$_=class{constructor(t,r,n,i,s,o){this.barData=t;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=s;this.plotIndex=o}static{a(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:this.boundingRect.x,y:s[0]-i,height:n,width:s[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(s=>({x:s[0]-i,y:s[1],width:n,height:this.boundingRect.y+this.boundingRect.height-s[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function KTe(e,t,r){return new C7(e,t,r)}var C7,XTe=w(()=>{"use strict";HTe();YTe();C7=class{constructor(t,r,n){this.chartConfig=t;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0}}static{a(this,"BasePlot")}setAxes(t,r){this.xAxis=t,this.yAxis=r}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new B_(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...i.getDrawableElement())}break;case"bar":{let i=new $_(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...i.getDrawableElement())}break}return t}};a(KTe,"getPlotComponent")});var F_,QTe=w(()=>{"use strict";VTe();UTe();qTe();XTe();sT();F_=class{constructor(t,r,n,i){this.chartConfig=t;this.chartData=r;this.componentStore={title:zTe(t,r,n,i),plot:KTe(t,r,n),legend:jTe(t,r,n,i),xAxis:x7(r.xAxis,t.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:x7(r.yAxis,t.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}static{a(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,s={width:0,height:0},o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:o,height:l});t-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("bottom"),u=this.componentStore.xAxis.calculateSpace({width:t,height:r}),r-=u.height,this.componentStore.yAxis.setAxisPosition("left"),u=this.componentStore.yAxis.calculateSpace({width:t,height:r}),n=u.width,t-=u.width,s=this.componentStore.legend.calculateSpace({width:t,height:l}),t-=s.width,t>0&&(o+=t,t=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:o,height:l}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.title.alignTo(n,n+o),this.componentStore.legend.setBoundingBoxXY({x:n+o,y:i+Math.max((l-s.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+o]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+l}),this.componentStore.yAxis.setRange([i,i+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(h=>nT(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,s=0,o={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:l,height:u});t-=h.width,r-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=h.height,r-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:r}),t-=h.width,i=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:r}),r-=h.height,s=n+h.height,o=this.componentStore.legend.calculateSpace({width:t,height:u}),t-=o.width,t>0&&(l+=t,t=0),r>0&&(u+=r,r=0),this.componentStore.plot.calculateSpace({width:l,height:u}),this.componentStore.plot.setBoundingBoxXY({x:i,y:s}),this.componentStore.title.alignTo(i,i+l),this.componentStore.legend.setBoundingBoxXY({x:i+l,y:s+Math.max((u-o.height)/2,0)}),this.componentStore.yAxis.setRange([i,i+l]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([s,s+u]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(d=>nT(d))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))t.push(...r.getDrawableElements());return t}}});var G_,ZTe=w(()=>{"use strict";QTe();G_=class{static{a(this,"XYChartBuilder")}static build(t,r,n,i){return new F_(t,r,n,i).getDrawableElement()}}});function eCe(){let e=Zi(),t=Ct();return Nr(e.xyChart,t.themeVariables.xyChart)}function tCe(){let e=Ct();return Nr(dr.xyChart,e.xyChart)}function rCe(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function yy(e){let t=Ct();return vr(e.trim(),t)}function Ert(e){JTe=e}function vrt(e){e==="horizontal"?oT.chartOrientation="horizontal":oT.chartOrientation="vertical"}function wrt(e){en.xAxis.title=yy(e.text)}function nCe(e,t){en.xAxis={type:"linear",title:en.xAxis.title,min:e,max:t},V_=!0}function _rt(e){en.xAxis={type:"band",title:en.xAxis.title,categories:e.map(t=>yy(t.text))},V_=!0}function Art(e){en.yAxis.title=yy(e.text)}function Rrt(e,t){en.yAxis={type:"linear",title:en.yAxis.title,min:e,max:t},S7=!0}function Lrt(e){let t=Math.min(...e),r=Math.max(...e),n=my(en.yAxis)?en.yAxis.min:1/0,i=my(en.yAxis)?en.yAxis.max:-1/0;en.yAxis={type:"linear",title:en.yAxis.title,min:Math.min(n,t),max:Math.max(i,r)}}function iCe(e){let t=[];if(e.length===0)return t;if(!V_){let r=my(en.xAxis)?en.xAxis.min:1/0,n=my(en.xAxis)?en.xAxis.max:-1/0;nCe(Math.min(r,1),Math.max(n,e.length))}if(iT(en.xAxis)&&e.length>en.xAxis.categories.length&&(e=e.slice(0,en.xAxis.categories.length)),S7||Lrt(e),iT(en.xAxis)&&(t=en.xAxis.categories.map((r,n)=>[r,e[n]])),my(en.xAxis)){let r=en.xAxis.min,n=en.xAxis.max;if(e.length===1)t=[[`${r}`,e[0]]];else{let i=(n-r)/(e.length-1);t=e.map((s,o)=>[`${r+o*i}`,s])}}return t}function sCe(e){return k7[e===0?0:e%k7.length]}function Irt(e,t){let r=t.map(o=>o.value),n=t.map(o=>o.label?yy(o.label):""),i=iCe(r),s=n.some(o=>o!=="");en.plots.push({type:"line",title:yy(e.text),strokeFill:sCe(aT),strokeWidth:2,data:i,...s?{pointLabels:n}:{}}),aT++}function Drt(e,t){let r=t.map(i=>i.value),n=iCe(r);en.plots.push({type:"bar",title:yy(e.text),fill:sCe(aT),data:n}),aT++}function Nrt(){if(en.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return en.title=xr(),G_.build(oT,en,lT,JTe)}function Mrt(){return lT}function Ort(){return oT}function Prt(){return en}var aT,JTe,oT,lT,en,k7,V_,S7,Brt,aCe,oCe=w(()=>{"use strict";Tr();Gi();yl();jt();Ir();fn();ZTe();sT();aT=0,oT=tCe(),lT=eCe(),en=rCe(),k7=lT.plotColorPalette.split(",").map(e=>e.trim()),V_=!1,S7=!1;a(eCe,"getChartDefaultThemeConfig");a(tCe,"getChartDefaultConfig");a(rCe,"getChartDefaultData");a(yy,"textSanitizer");a(Ert,"setTmpSVGG");a(vrt,"setOrientation");a(wrt,"setXAxisTitle");a(nCe,"setXAxisRangeData");a(_rt,"setXAxisBand");a(Art,"setYAxisTitle");a(Rrt,"setYAxisRangeData");a(Lrt,"setYAxisRangeFromPlotData");a(iCe,"transformDataWithoutCategory");a(sCe,"getPlotColorFromPalette");a(Irt,"setLineData");a(Drt,"setBarData");a(Nrt,"getDrawableElem");a(Mrt,"getChartThemeConfig");a(Ort,"getChartConfig");a(Prt,"getXYChartData");Brt=a(function(){or(),aT=0,oT=tCe(),en=rCe(),lT=eCe(),k7=lT.plotColorPalette.split(",").map(e=>e.trim()),V_=!1,S7=!1},"clear"),aCe={getDrawableElem:Nrt,clear:Brt,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,getAccDescription:yr,setAccDescription:fr,setOrientation:vrt,setXAxisTitle:wrt,setXAxisRangeData:nCe,setXAxisBand:_rt,setYAxisTitle:Art,setYAxisRangeData:Rrt,setLineData:Irt,setBarData:Drt,setTmpSVGG:Ert,getChartThemeConfig:Mrt,getChartConfig:Ort,getXYChartData:Prt}});var $rt,lCe,cCe=w(()=>{"use strict";bt();Os();Rn();$rt=a((e,t,r,n)=>{let i=n.db,s=i.getChartThemeConfig(),o=i.getChartConfig(),l=i.getXYChartData().plots[0].data.map(C=>C[1]);function u(C){return C==="top"?"text-before-edge":"middle"}a(u,"getDominantBaseLine");function h(C){return C==="left"?"start":C==="right"?"end":"middle"}a(h,"getTextAnchor");function d(C){return`translate(${C.x}, ${C.y}) rotate(${C.rotation||0})`}a(d,"getTextTransformation"),H.debug(`Rendering xychart chart +`+e);let f=gn(t),p=f.append("g").attr("class","main"),m=p.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");Dr(f,o.height,o.width,!0),f.attr("viewBox",`0 0 ${o.width} ${o.height}`),m.attr("fill",s.backgroundColor),i.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let g=i.getDrawableElem(),y={};function x(C){let v=p,E="";for(let[S]of C.entries()){let _=p;S>0&&y[E]&&(_=y[E]),E+=C[S],v=y[E],v||(v=y[E]=_.append("g").attr("class",C[S]))}return v}a(x,"getGroup");for(let C of g){if(C.data.length===0)continue;let v=x(C.groupTexts);switch(C.type){case"rect":if(v.selectAll("rect").data(C.data).enter().append("rect").attr("x",E=>E.x).attr("y",E=>E.y).attr("width",E=>E.width).attr("height",E=>E.height).attr("fill",E=>E.fill).attr("stroke",E=>E.strokeFill).attr("stroke-width",E=>E.strokeWidth),o.showDataLabel){let E=o.showDataLabelOutsideBar;if(o.chartOrientation==="horizontal"){let B=function(I,F){let{data:N,label:D}=I;return F*D.length*.7<=N.width-10};var b=B;a(B,"fitsHorizontally");let S=.7,_=10,A=C.data.map((I,F)=>({data:I,label:l[F].toString()})).filter(I=>I.data.width>0&&I.data.height>0),$=A.map(I=>{let{data:F}=I,N=F.height*.7;for(;!B(I,N)&&N>0;)N-=1;return N}),O=Math.floor(Math.min(...$)),G=a(I=>E?I.data.x+I.data.width+10:I.data.x+I.data.width-10,"determineLabelXPosition");v.selectAll("text").data(A).enter().append("text").attr("x",G).attr("y",I=>I.data.y+I.data.height/2).attr("text-anchor",E?"start":"end").attr("dominant-baseline","middle").attr("fill",s.dataLabelColor).attr("font-size",`${O}px`).text(I=>I.label)}else{let A=function(G,I,F){let{data:N,label:D}=G,R=I*D.length*.7,P=N.x+N.width/2,V=P-R/2,U=P+R/2,z=V>=N.x&&U<=N.x+N.width,j=N.y+F+I<=N.y+N.height;return z&&j};var T=A;a(A,"fitsInBar");let S=10,_=C.data.map((G,I)=>({data:G,label:l[I].toString()})).filter(G=>G.data.width>0&&G.data.height>0),B=_.map(G=>{let{data:I,label:F}=G,N=I.width/(F.length*.7);for(;!A(G,N,10)&&N>0;)N-=1;return N}),$=Math.floor(Math.min(...B)),O=a(G=>E?G.data.y-10:G.data.y+10,"determineLabelYPosition");v.selectAll("text").data(_).enter().append("text").attr("x",G=>G.data.x+G.data.width/2).attr("y",O).attr("text-anchor","middle").attr("dominant-baseline",E?"auto":"hanging").attr("fill",s.dataLabelColor).attr("font-size",`${$}px`).text(G=>G.label)}}break;case"text":v.selectAll("text").data(C.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",E=>E.fill).attr("font-size",E=>E.fontSize).attr("dominant-baseline",E=>u(E.verticalPos)).attr("text-anchor",E=>h(E.horizontalPos)).attr("transform",E=>d(E)).text(E=>E.text);break;case"path":v.selectAll("path").data(C.data).enter().append("path").attr("d",E=>E.path).attr("fill",E=>E.fill?E.fill:"none").attr("stroke",E=>E.strokeFill).attr("stroke-width",E=>E.strokeWidth);break}}},"draw"),lCe={draw:$rt}});var uCe={};ir(uCe,{diagram:()=>Frt});var Frt,hCe=w(()=>{"use strict";$Te();oCe();cCe();Frt={parser:BTe,db:aCe,renderer:lCe}});var E7,pCe,mCe=w(()=>{"use strict";E7=(function(){var e=a(function(W,ae,X,xe){for(X=X||{},xe=W.length;xe--;X[W[xe]]=ae);return X},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],s=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],l=[2,7],u=[1,26],h=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],g=[1,35],y=[1,36],x=[1,37],b=[1,38],T=[1,24],C=[1,31],v=[1,32],E=[1,30],S=[1,39],_=[1,40],A=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],B=[1,61],$=[89,90],O=[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],G=[27,29],I=[1,70],F=[1,71],N=[1,72],D=[1,73],M=[1,74],R=[1,75],P=[1,76],V=[1,83],U=[1,80],z=[1,84],j=[1,85],K=[1,86],Z=[1,87],ce=[1,88],te=[1,89],me=[1,90],he=[1,91],we=[1,92],ye=[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],ke=[63,64],Fe=[1,101],Ge=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Me=[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],at=[1,110],ht=[1,106],ge=[1,107],De=[1,108],Le=[1,109],Ie=[1,111],Q=[1,116],ne=[1,117],re=[1,114],se=[1,115],fe={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:a(function(ae,X,xe,ee,Y,q,ve){var Se=q.length-1;switch(Y){case 4:this.$=q[Se].trim(),ee.setAccTitle(this.$);break;case 5:case 6:this.$=q[Se].trim(),ee.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:ee.setDirection("TB");break;case 18:ee.setDirection("BT");break;case 19:ee.setDirection("RL");break;case 20:ee.setDirection("LR");break;case 21:ee.addRequirement(q[Se-3],q[Se-4]);break;case 22:ee.addRequirement(q[Se-5],q[Se-6]),ee.setClass([q[Se-5]],q[Se-3]);break;case 23:ee.setNewReqId(q[Se-2]);break;case 24:ee.setNewReqText(q[Se-2]);break;case 25:ee.setNewReqRisk(q[Se-2]);break;case 26:ee.setNewReqVerifyMethod(q[Se-2]);break;case 29:this.$=ee.RequirementType.REQUIREMENT;break;case 30:this.$=ee.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=ee.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=ee.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=ee.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=ee.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=ee.RiskLevel.LOW_RISK;break;case 36:this.$=ee.RiskLevel.MED_RISK;break;case 37:this.$=ee.RiskLevel.HIGH_RISK;break;case 38:this.$=ee.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=ee.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=ee.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=ee.VerifyType.VERIFY_TEST;break;case 42:ee.addElement(q[Se-3]);break;case 43:ee.addElement(q[Se-5]),ee.setClass([q[Se-5]],q[Se-3]);break;case 44:ee.setNewElementType(q[Se-2]);break;case 45:ee.setNewElementDocRef(q[Se-2]);break;case 48:ee.addRelationship(q[Se-2],q[Se],q[Se-4]);break;case 49:ee.addRelationship(q[Se-2],q[Se-4],q[Se]);break;case 50:this.$=ee.Relationships.CONTAINS;break;case 51:this.$=ee.Relationships.COPIES;break;case 52:this.$=ee.Relationships.DERIVES;break;case 53:this.$=ee.Relationships.SATISFIES;break;case 54:this.$=ee.Relationships.VERIFIES;break;case 55:this.$=ee.Relationships.REFINES;break;case 56:this.$=ee.Relationships.TRACES;break;case 57:this.$=q[Se-2],ee.defineClass(q[Se-1],q[Se]);break;case 58:ee.setClass(q[Se-1],q[Se]);break;case 59:ee.setClass([q[Se-2]],q[Se]);break;case 60:case 62:this.$=[q[Se]];break;case 61:case 63:this.$=q[Se-2].concat([q[Se]]);break;case 64:this.$=q[Se-2],ee.setCssStyle(q[Se-1],q[Se]);break;case 65:this.$=[q[Se]];break;case 66:q[Se-2].push(q[Se]),this.$=q[Se-2];break;case 68:this.$=q[Se-1]+q[Se];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(s,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:o,7:13,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},e(s,[2,4]),e(s,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:43,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:44,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:45,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:46,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:47,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:48,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:49,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{4:17,5:o,7:50,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:x,46:b,54:T,72:C,74:v,77:E,89:S,90:_},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(A,[2,17]),e(A,[2,18]),e(A,[2,19]),e(A,[2,20]),{30:60,33:62,75:B,89:S,90:_},{30:63,33:62,75:B,89:S,90:_},{30:64,33:62,75:B,89:S,90:_},e($,[2,29]),e($,[2,30]),e($,[2,31]),e($,[2,32]),e($,[2,33]),e($,[2,34]),e(O,[2,81]),e(O,[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(G,[2,79]),e(G,[2,80]),{27:[1,67],29:[1,68]},e(G,[2,85]),e(G,[2,86]),{62:69,65:I,66:F,67:N,68:D,69:M,70:R,71:P},{62:77,65:I,66:F,67:N,68:D,69:M,70:R,71:P},{30:78,33:62,75:B,89:S,90:_},{73:79,75:V,76:U,78:81,79:82,80:z,81:j,82:K,83:Z,84:ce,85:te,86:me,87:he,88:we},e(ye,[2,60]),e(ye,[2,62]),{73:93,75:V,76:U,78:81,79:82,80:z,81:j,82:K,83:Z,84:ce,85:te,86:me,87:he,88:we},{30:94,33:62,75:B,76:U,89:S,90:_},{5:[1,95]},{30:96,33:62,75:B,89:S,90:_},{5:[1,97]},{30:98,33:62,75:B,89:S,90:_},{63:[1,99]},e(ke,[2,50]),e(ke,[2,51]),e(ke,[2,52]),e(ke,[2,53]),e(ke,[2,54]),e(ke,[2,55]),e(ke,[2,56]),{64:[1,100]},e(A,[2,59],{76:U}),e(A,[2,64],{76:Fe}),{33:103,75:[1,102],89:S,90:_},e(Ge,[2,65],{79:104,75:V,80:z,81:j,82:K,83:Z,84:ce,85:te,86:me,87:he,88:we}),e(Me,[2,67]),e(Me,[2,69]),e(Me,[2,70]),e(Me,[2,71]),e(Me,[2,72]),e(Me,[2,73]),e(Me,[2,74]),e(Me,[2,75]),e(Me,[2,76]),e(Me,[2,77]),e(Me,[2,78]),e(A,[2,57],{76:Fe}),e(A,[2,58],{76:U}),{5:at,28:105,31:ht,34:ge,36:De,38:Le,40:Ie},{27:[1,112],76:U},{5:Q,40:ne,56:113,57:re,59:se},{27:[1,118],76:U},{33:119,89:S,90:_},{33:120,89:S,90:_},{75:V,78:121,79:82,80:z,81:j,82:K,83:Z,84:ce,85:te,86:me,87:he,88:we},e(ye,[2,61]),e(ye,[2,63]),e(Me,[2,68]),e(A,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:at,28:126,31:ht,34:ge,36:De,38:Le,40:Ie},e(A,[2,28]),{5:[1,127]},e(A,[2,42]),{32:[1,128]},{32:[1,129]},{5:Q,40:ne,56:130,57:re,59:se},e(A,[2,47]),{5:[1,131]},e(A,[2,48]),e(A,[2,49]),e(Ge,[2,66],{79:104,75:V,80:z,81:j,82:K,83:Z,84:ce,85:te,86:me,87:he,88:we}),{33:132,89:S,90:_},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(A,[2,27]),{5:at,28:145,31:ht,34:ge,36:De,38:Le,40:Ie},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(A,[2,46]),{5:Q,40:ne,56:152,57:re,59:se},{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(A,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(A,[2,43]),{5:at,28:159,31:ht,34:ge,36:De,38:Le,40:Ie},{5:at,28:160,31:ht,34:ge,36:De,38:Le,40:Ie},{5:at,28:161,31:ht,34:ge,36:De,38:Le,40:Ie},{5:at,28:162,31:ht,34:ge,36:De,38:Le,40:Ie},{5:Q,40:ne,56:163,57:re,59:se},{5:Q,40:ne,56:164,57:re,59:se},e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),e(A,[2,26]),e(A,[2,44]),e(A,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:a(function(ae,X){if(X.recoverable)this.trace(ae);else{var xe=new Error(ae);throw xe.hash=X,xe}},"parseError"),parse:a(function(ae){var X=this,xe=[0],ee=[],Y=[null],q=[],ve=this.table,Se="",Ae=0,Ee=0,Qe=0,qe=2,lt=1,Ve=q.slice.call(arguments,1),Ye=Object.create(this.lexer),Je={yy:{}};for(var Oe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Oe)&&(Je.yy[Oe]=this.yy[Oe]);Ye.setInput(ae,Je.yy),Je.yy.lexer=Ye,Je.yy.parser=this,typeof Ye.yylloc>"u"&&(Ye.yylloc={});var Vt=Ye.yylloc;q.push(Vt);var Ce=Ye.options&&Ye.options.ranges;typeof Je.yy.parseError=="function"?this.parseError=Je.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ut(de){xe.length=xe.length-2*de,Y.length=Y.length-de,q.length=q.length-de}a(Ut,"popStack");function Re(){var de;return de=ee.pop()||Ye.lex()||lt,typeof de!="number"&&(de instanceof Array&&(ee=de,de=ee.pop()),de=X.symbols_[de]||de),de}a(Re,"lex");for(var vt,Zt,_t,qt,At,zt,ot={},Rt,Ar,ie,xt;;){if(_t=xe[xe.length-1],this.defaultActions[_t]?qt=this.defaultActions[_t]:((vt===null||typeof vt>"u")&&(vt=Re()),qt=ve[_t]&&ve[_t][vt]),typeof qt>"u"||!qt.length||!qt[0]){var kt="";xt=[];for(Rt in ve[_t])this.terminals_[Rt]&&Rt>qe&&xt.push("'"+this.terminals_[Rt]+"'");Ye.showPosition?kt="Parse error on line "+(Ae+1)+`: +`+Ye.showPosition()+` +Expecting `+xt.join(", ")+", got '"+(this.terminals_[vt]||vt)+"'":kt="Parse error on line "+(Ae+1)+": Unexpected "+(vt==lt?"end of input":"'"+(this.terminals_[vt]||vt)+"'"),this.parseError(kt,{text:Ye.match,token:this.terminals_[vt]||vt,line:Ye.yylineno,loc:Vt,expected:xt})}if(qt[0]instanceof Array&&qt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_t+", token: "+vt);switch(qt[0]){case 1:xe.push(vt),Y.push(Ye.yytext),q.push(Ye.yylloc),xe.push(qt[1]),vt=null,Zt?(vt=Zt,Zt=null):(Ee=Ye.yyleng,Se=Ye.yytext,Ae=Ye.yylineno,Vt=Ye.yylloc,Qe>0&&Qe--);break;case 2:if(Ar=this.productions_[qt[1]][1],ot.$=Y[Y.length-Ar],ot._$={first_line:q[q.length-(Ar||1)].first_line,last_line:q[q.length-1].last_line,first_column:q[q.length-(Ar||1)].first_column,last_column:q[q.length-1].last_column},Ce&&(ot._$.range=[q[q.length-(Ar||1)].range[0],q[q.length-1].range[1]]),zt=this.performAction.apply(ot,[Se,Ee,Ae,Je.yy,qt[1],Y,q].concat(Ve)),typeof zt<"u")return zt;Ar&&(xe=xe.slice(0,-1*Ar*2),Y=Y.slice(0,-1*Ar),q=q.slice(0,-1*Ar)),xe.push(this.productions_[qt[1]][0]),Y.push(ot.$),q.push(ot._$),ie=ve[xe[xe.length-2]][xe[xe.length-1]],xe.push(ie);break;case 3:return!0}}return!0},"parse")},J=(function(){var W={EOF:1,parseError:a(function(X,xe){if(this.yy.parser)this.yy.parser.parseError(X,xe);else throw new Error(X)},"parseError"),setInput:a(function(ae,X){return this.yy=X||this.yy||{},this._input=ae,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var ae=this._input[0];this.yytext+=ae,this.yyleng++,this.offset++,this.match+=ae,this.matched+=ae;var X=ae.match(/(?:\r\n?|\n).*/g);return X?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ae},"input"),unput:a(function(ae){var X=ae.length,xe=ae.split(/(?:\r\n?|\n)/g);this._input=ae+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-X),this.offset-=X;var ee=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),xe.length-1&&(this.yylineno-=xe.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:xe?(xe.length===ee.length?this.yylloc.first_column:0)+ee[ee.length-xe.length].length-xe[0].length:this.yylloc.first_column-X},this.options.ranges&&(this.yylloc.range=[Y[0],Y[0]+this.yyleng-X]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(ae){this.unput(this.match.slice(ae))},"less"),pastInput:a(function(){var ae=this.matched.substr(0,this.matched.length-this.match.length);return(ae.length>20?"...":"")+ae.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var ae=this.match;return ae.length<20&&(ae+=this._input.substr(0,20-ae.length)),(ae.substr(0,20)+(ae.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var ae=this.pastInput(),X=new Array(ae.length+1).join("-");return ae+this.upcomingInput()+` +`+X+"^"},"showPosition"),test_match:a(function(ae,X){var xe,ee,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))),ee=ae[0].match(/(?:\r\n?|\n).*/g),ee&&(this.yylineno+=ee.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ee?ee[ee.length-1].length-ee[ee.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ae[0].length},this.yytext+=ae[0],this.match+=ae[0],this.matches=ae,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(ae[0].length),this.matched+=ae[0],xe=this.performAction.call(this,this.yy,this,X,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xe)return xe;if(this._backtrack){for(var q in Y)this[q]=Y[q];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ae,X,xe,ee;this._more||(this.yytext="",this.match="");for(var Y=this._currentRules(),q=0;qX[0].length)){if(X=xe,ee=q,this.options.backtrack_lexer){if(ae=this.test_match(xe,Y[q]),ae!==!1)return ae;if(this._backtrack){X=!1;continue}else return!1}else if(!this.options.flex)break}return X?(ae=this.test_match(X,Y[ee]),ae!==!1?ae:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var X=this.next();return X||this.lex()},"lex"),begin:a(function(X){this.conditionStack.push(X)},"begin"),popState:a(function(){var X=this.conditionStack.length-1;return X>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(X){return X=this.conditionStack.length-1-Math.abs(X||0),X>=0?this.conditionStack[X]:"INITIAL"},"topState"),pushState:a(function(X){this.begin(X)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(X,xe,ee,Y){var q=Y;switch(ee){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 xe.yytext=xe.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 W})();fe.lexer=J;function L(){this.yy={}}return a(L,"Parser"),L.prototype=fe,fe.Parser=L,new L})();E7.parser=E7;pCe=E7});var z_,gCe=w(()=>{"use strict";Gt();bt();fn();z_=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=hr;this.getAccTitle=gr;this.setAccDescription=fr;this.getAccDescription=yr;this.setDiagramTitle=Cr;this.getDiagramTitle=xr;this.getConfig=a(()=>_e().requirement,"getConfig");this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{a(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,r){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=t)}setNewReqText(t){this.latestRequirement!==void 0&&(this.latestRequirement.text=t)}setNewReqRisk(t){this.latestRequirement!==void 0&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),H.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){this.latestElement!==void 0&&(this.latestElement.type=t)}setNewElementDocRef(t){this.latestElement!==void 0&&(this.latestElement.docRef=t)}addRelationship(t,r,n){this.relations.push({type:t,src:r,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,or()}setCssStyle(t,r){for(let n of t){let i=this.requirements.get(n)??this.elements.get(n);if(!r||!i)return;for(let s of r)s.includes(",")?i.cssStyles.push(...s.split(",")):i.cssStyles.push(s)}}setClass(t,r){for(let n of t){let i=this.requirements.get(n)??this.elements.get(n);if(i)for(let s of r){i.classes.push(s);let o=this.classes.get(s)?.styles;o&&i.cssStyles.push(...o)}}}defineClass(t,r){for(let n of t){let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(s){if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)}),this.requirements.forEach(s=>{s.classes.includes(n)&&s.cssStyles.push(...r.flatMap(o=>o.split(",")))}),this.elements.forEach(s=>{s.classes.includes(n)&&s.cssStyles.push(...r.flatMap(o=>o.split(",")))})}}getClasses(){return this.classes}getData(){let t=_e(),r=[],n=[];for(let s of this.requirements.values()){let o=s;o.id=s.name,o.cssStyles=s.cssStyles,o.cssClasses=s.classes.join(" "),o.shape="requirementBox",o.look=t.look,o.colorIndex=r.length,r.push(o)}for(let s of this.elements.values()){let o=s;o.shape="requirementBox",o.look=t.look,o.id=s.name,o.cssStyles=s.cssStyles,o.cssClasses=s.classes.join(" "),o.colorIndex=r.length,r.push(o)}let i=0;for(let s of this.relations){let o=s.type===this.Relationships.CONTAINS,l={id:`${s.src}-${s.dst}-${i++}`,start:this.requirements.get(s.src)?.name??this.elements.get(s.src)?.name,end:this.requirements.get(s.dst)?.name??this.elements.get(s.dst)?.name,label:`<<${s.type}>>`,classes:"relationshipLine",style:["fill:none",o?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:o?"normal":"dashed",arrowTypeStart:o?"requirement_contains":"",arrowTypeEnd:o?"":"requirement_arrow",look:t.look,labelType:"markdown"};n.push(l)}return{nodes:r,edges:n,other:{},config:t,direction:this.getDirection()}}}});var Urt,Wrt,yCe,xCe=w(()=>{"use strict";Tr();Wi();Urt=a(()=>{let e=Ct(),{theme:t,themeVariables:r}=e,{bkgColorArray:n,borderColorArray:i}=r;if(!Ui(t,i))return"";let s=Di(e.look),o="",l=zi(n);for(let u=0;u{let t=Ct(),{look:r,themeVariables:n}=t,{requirementEdgeLabelBackground:i}=n;return` + ${Urt()} + 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: ${r==="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: ${i??e.edgeLabelBackground}; + } + +`},"getStyles"),yCe=Wrt});var v7={};ir(v7,{draw:()=>jrt});var jrt,bCe=w(()=>{"use strict";Gt();bt();rh();Yc();Kc();jt();jrt=a(async function(e,t,r,n){H.info("REF0:"),H.info("Drawing requirement diagram (unified)",t);let{securityLevel:i,state:s,layout:o,look:l}=_e(),u=n.db.getData(),h=ca(t,i);u.type=n.type,u.layoutAlgorithm=Ta(o),u.nodeSpacing=s?.nodeSpacing??50,u.rankSpacing=s?.rankSpacing??50,u.markers=l==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],u.diagramId=t,await ba(u,h);let d=8;Xt.insertTitle(h,"requirementDiagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Is(h,d,"requirementDiagram",s?.useMaxWidth??!0)},"draw")});var TCe={};ir(TCe,{diagram:()=>qrt});var qrt,CCe=w(()=>{"use strict";mCe();gCe();xCe();bCe();qrt={parser:pCe,get db(){return new z_},renderer:v7,styles:yCe}});var w7,ECe,vCe=w(()=>{"use strict";w7=(function(){var e=a(function(lt,Ve,Ye,Je){for(Ye=Ye||{},Je=lt.length;Je--;Ye[lt[Je]]=Ve);return Ye},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],s=[1,9],o=[1,11],l=[1,12],u=[1,14],h=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],g=[1,26],y=[1,27],x=[1,28],b=[1,29],T=[1,30],C=[1,31],v=[1,32],E=[1,33],S=[1,34],_=[1,35],A=[1,36],B=[1,37],$=[1,38],O=[1,39],G=[1,40],I=[1,42],F=[1,43],N=[1,44],D=[1,45],M=[1,46],R=[1,47],P=[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],V=[1,56],U=[1,75],z=[1,81],j=[1,82],K=[1,83],Z=[1,84],ce=[1,85],te=[1,86],me=[1,87],he=[1,88],we=[1,89],ye=[1,90],ke=[1,91],Fe=[1,92],Ge=[1,93],Me=[1,94],at=[1,95],ht=[1,96],ge=[1,97],De=[1,98],Le=[1,99],Ie=[1,100],Q=[1,101],ne=[1,102],re=[1,103],se=[1,104],fe=[1,105],J=[1,106],L=[2,79],W=[2,78],ae=[4,5,17,51,53,54],X=[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],xe=[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],ee=[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],Y=[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],q=[5,52],ve=[62,70,71,72,73],Se=[62,73],Ae=[1,152],Ee={trace:a(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],[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:a(function(Ve,Ye,Je,Oe,Vt,Ce,Ut){var Re=Ce.length-1;switch(Vt){case 3:return Oe.apply(Ce[Re]),Ce[Re];break;case 4:case 10:this.$=[];break;case 5:case 11:Ce[Re-1].push(Ce[Re]),this.$=Ce[Re-1];break;case 6:case 7:case 12:case 13:this.$=Ce[Re];break;case 8:case 9:case 14:this.$=[];break;case 16:Ce[Re].type="createParticipant",this.$=Ce[Re];break;case 17:Ce[Re-1].unshift({type:"boxStart",boxData:Oe.parseBoxData(Ce[Re-2])}),Ce[Re-1].push({type:"boxEnd",boxText:Ce[Re-2]}),this.$=Ce[Re-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(Ce[Re-2]),sequenceIndexStep:Number(Ce[Re-1]),sequenceVisible:!0,signalType:Oe.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(Ce[Re-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:Oe.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:Oe.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:Oe.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:Oe.LINETYPE.ACTIVE_START,actor:Ce[Re-1].actor};break;case 24:this.$={type:"activeEnd",signalType:Oe.LINETYPE.ACTIVE_END,actor:Ce[Re-1].actor};break;case 30:Oe.setDiagramTitle(Ce[Re].substring(6)),this.$=Ce[Re].substring(6);break;case 31:Oe.setDiagramTitle(Ce[Re].substring(7)),this.$=Ce[Re].substring(7);break;case 32:this.$=Ce[Re].trim(),Oe.setAccTitle(this.$);break;case 33:case 34:this.$=Ce[Re].trim(),Oe.setAccDescription(this.$);break;case 35:Ce[Re-1].unshift({type:"loopStart",loopText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.LOOP_START}),Ce[Re-1].push({type:"loopEnd",loopText:Ce[Re-2],signalType:Oe.LINETYPE.LOOP_END}),this.$=Ce[Re-1];break;case 36:Ce[Re-1].unshift({type:"rectStart",color:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.RECT_START}),Ce[Re-1].push({type:"rectEnd",color:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.RECT_END}),this.$=Ce[Re-1];break;case 37:Ce[Re-1].unshift({type:"optStart",optText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.OPT_START}),Ce[Re-1].push({type:"optEnd",optText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.OPT_END}),this.$=Ce[Re-1];break;case 38:Ce[Re-1].unshift({type:"altStart",altText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.ALT_START}),Ce[Re-1].push({type:"altEnd",signalType:Oe.LINETYPE.ALT_END}),this.$=Ce[Re-1];break;case 39:Ce[Re-1].unshift({type:"parStart",parText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.PAR_START}),Ce[Re-1].push({type:"parEnd",signalType:Oe.LINETYPE.PAR_END}),this.$=Ce[Re-1];break;case 40:Ce[Re-1].unshift({type:"parStart",parText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.PAR_OVER_START}),Ce[Re-1].push({type:"parEnd",signalType:Oe.LINETYPE.PAR_END}),this.$=Ce[Re-1];break;case 41:Ce[Re-1].unshift({type:"criticalStart",criticalText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.CRITICAL_START}),Ce[Re-1].push({type:"criticalEnd",signalType:Oe.LINETYPE.CRITICAL_END}),this.$=Ce[Re-1];break;case 42:Ce[Re-1].unshift({type:"breakStart",breakText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.BREAK_START}),Ce[Re-1].push({type:"breakEnd",optText:Oe.parseMessage(Ce[Re-2]),signalType:Oe.LINETYPE.BREAK_END}),this.$=Ce[Re-1];break;case 44:this.$=Ce[Re-3].concat([{type:"option",optionText:Oe.parseMessage(Ce[Re-1]),signalType:Oe.LINETYPE.CRITICAL_OPTION},Ce[Re]]);break;case 46:this.$=Ce[Re-3].concat([{type:"and",parText:Oe.parseMessage(Ce[Re-1]),signalType:Oe.LINETYPE.PAR_AND},Ce[Re]]);break;case 48:this.$=Ce[Re-3].concat([{type:"else",altText:Oe.parseMessage(Ce[Re-1]),signalType:Oe.LINETYPE.ALT_ELSE},Ce[Re]]);break;case 49:Ce[Re-3].draw="participant",Ce[Re-3].type="addParticipant",Ce[Re-3].description=Oe.parseMessage(Ce[Re-1]),this.$=Ce[Re-3];break;case 50:Ce[Re-1].draw="participant",Ce[Re-1].type="addParticipant",this.$=Ce[Re-1];break;case 51:Ce[Re-3].draw="actor",Ce[Re-3].type="addParticipant",Ce[Re-3].description=Oe.parseMessage(Ce[Re-1]),this.$=Ce[Re-3];break;case 52:case 57:Ce[Re-1].draw="actor",Ce[Re-1].type="addParticipant",this.$=Ce[Re-1];break;case 53:Ce[Re-1].type="destroyParticipant",this.$=Ce[Re-1];break;case 54:Ce[Re-3].draw="participant",Ce[Re-3].type="addParticipant",Ce[Re-3].description=Oe.parseMessage(Ce[Re-1]),this.$=Ce[Re-3];break;case 55:Ce[Re-1].draw="participant",Ce[Re-1].type="addParticipant",this.$=Ce[Re-1];break;case 56:Ce[Re-3].draw="actor",Ce[Re-3].type="addParticipant",Ce[Re-3].description=Oe.parseMessage(Ce[Re-1]),this.$=Ce[Re-3];break;case 58:this.$=[Ce[Re-1],{type:"addNote",placement:Ce[Re-2],actor:Ce[Re-1].actor,text:Ce[Re]}];break;case 59:Ce[Re-2]=[].concat(Ce[Re-1],Ce[Re-1]).slice(0,2),Ce[Re-2][0]=Ce[Re-2][0].actor,Ce[Re-2][1]=Ce[Re-2][1].actor,this.$=[Ce[Re-1],{type:"addNote",placement:Oe.PLACEMENT.OVER,actor:Ce[Re-2].slice(0,2),text:Ce[Re]}];break;case 60:this.$=[Ce[Re-1],{type:"addLinks",actor:Ce[Re-1].actor,text:Ce[Re]}];break;case 61:this.$=[Ce[Re-1],{type:"addALink",actor:Ce[Re-1].actor,text:Ce[Re]}];break;case 62:this.$=[Ce[Re-1],{type:"addProperties",actor:Ce[Re-1].actor,text:Ce[Re]}];break;case 63:this.$=[Ce[Re-1],{type:"addDetails",actor:Ce[Re-1].actor,text:Ce[Re]}];break;case 66:this.$=[Ce[Re-2],Ce[Re]];break;case 67:this.$=Ce[Re];break;case 68:this.$=Oe.PLACEMENT.LEFTOF;break;case 69:this.$=Oe.PLACEMENT.RIGHTOF;break;case 70:this.$=[Ce[Re-4],Ce[Re-1],{type:"addMessage",from:Ce[Re-4].actor,to:Ce[Re-1].actor,signalType:Ce[Re-3],msg:Ce[Re],activate:!0},{type:"activeStart",signalType:Oe.LINETYPE.ACTIVE_START,actor:Ce[Re-1].actor}];break;case 71:this.$=[Ce[Re-4],Ce[Re-1],{type:"addMessage",from:Ce[Re-4].actor,to:Ce[Re-1].actor,signalType:Ce[Re-3],msg:Ce[Re]},{type:"activeEnd",signalType:Oe.LINETYPE.ACTIVE_END,actor:Ce[Re-4].actor}];break;case 72:this.$=[Ce[Re-4],Ce[Re-1],{type:"addMessage",from:Ce[Re-4].actor,to:Ce[Re-1].actor,signalType:Ce[Re-3],msg:Ce[Re],activate:!0,centralConnection:Oe.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:Oe.LINETYPE.CENTRAL_CONNECTION,actor:Ce[Re-1].actor}];break;case 73:this.$=[Ce[Re-4],Ce[Re-1],{type:"addMessage",from:Ce[Re-4].actor,to:Ce[Re-1].actor,signalType:Ce[Re-2],msg:Ce[Re],activate:!1,centralConnection:Oe.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:Oe.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:Ce[Re-4].actor}];break;case 74:this.$=[Ce[Re-5],Ce[Re-1],{type:"addMessage",from:Ce[Re-5].actor,to:Ce[Re-1].actor,signalType:Ce[Re-3],msg:Ce[Re],activate:!0,centralConnection:Oe.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:Oe.LINETYPE.CENTRAL_CONNECTION,actor:Ce[Re-1].actor},{type:"centralConnectionReverse",signalType:Oe.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:Ce[Re-5].actor}];break;case 75:this.$=[Ce[Re-3],Ce[Re-1],{type:"addMessage",from:Ce[Re-3].actor,to:Ce[Re-1].actor,signalType:Ce[Re-2],msg:Ce[Re]}];break;case 76:this.$={type:"addParticipant",actor:Ce[Re-1],config:Ce[Re]};break;case 77:this.$=Ce[Re-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:Ce[Re]};break;case 80:this.$=Oe.LINETYPE.SOLID_OPEN;break;case 81:this.$=Oe.LINETYPE.DOTTED_OPEN;break;case 82:this.$=Oe.LINETYPE.SOLID;break;case 83:this.$=Oe.LINETYPE.SOLID_TOP;break;case 84:this.$=Oe.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=Oe.LINETYPE.STICK_TOP;break;case 86:this.$=Oe.LINETYPE.STICK_BOTTOM;break;case 87:this.$=Oe.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=Oe.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=Oe.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=Oe.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=Oe.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=Oe.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=Oe.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=Oe.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=Oe.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=Oe.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=Oe.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=Oe.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=Oe.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=Oe.LINETYPE.DOTTED;break;case 101:this.$=Oe.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=Oe.LINETYPE.SOLID_CROSS;break;case 103:this.$=Oe.LINETYPE.DOTTED_CROSS;break;case 104:this.$=Oe.LINETYPE.SOLID_POINT;break;case 105:this.$=Oe.LINETYPE.DOTTED_POINT;break;case 106:this.$=Oe.parseMessage(Ce[Re].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([1,4,5,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],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},e(P,[2,5]),{9:48,13:13,14:u,15:h,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},e(P,[2,7]),e(P,[2,8]),e(P,[2,9]),e(P,[2,15]),{13:49,51:$,53:O,54:G},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:V,73:R},{23:57,62:V,73:R},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(P,[2,30]),e(P,[2,31]),{33:[1,63]},{35:[1,64]},e(P,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:V,73:U},{23:76,55:77,62:V,73:U},{23:78,62:V,73:R},{69:79,72:[1,80],78:z,79:j,80:K,81:Z,82:ce,83:te,84:me,85:he,86:we,87:ye,88:ke,89:Fe,90:Ge,91:Me,92:at,93:ht,94:ge,95:De,96:Le,97:Ie,98:Q,99:ne,100:re,101:se,102:fe,103:J},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:V,73:R},e([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],L,{23:112,62:V,73:R}),{23:113,62:V,73:R},{23:114,62:V,73:R},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],W),e(P,[2,6]),e(P,[2,16]),e(ae,[2,10],{11:115}),e(P,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(P,[2,22]),{5:[1,119]},e([5,52,66,104],L),{5:[1,120]},e(P,[2,25]),e(P,[2,26]),e(P,[2,27]),e(P,[2,28]),e(P,[2,29]),e(P,[2,32]),e(P,[2,33]),e(X,i,{7:121}),e(X,i,{7:122}),e(X,i,{7:123}),e(xe,i,{41:124,7:125}),e(ee,i,{43:126,7:127}),e(ee,i,{7:127,43:128}),e(Y,i,{46:129,7:130}),e(X,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(q,W,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:V,70:[1,143],71:[1,144],72:[1,145],73:R},{69:147,78:z,79:j,80:K,81:Z,82:ce,83:te,84:me,85:he,86:we,87:ye,88:ke,89:Fe,90:Ge,91:Me,92:at,93:ht,94:ge,95:De,96:Le,97:Ie,98:Q,99:ne,100:re,101:se,102:fe,103:J},e(ve,[2,80]),e(ve,[2,81]),e(ve,[2,82]),e(ve,[2,83]),e(ve,[2,84]),e(ve,[2,85]),e(ve,[2,86]),e(ve,[2,87]),e(ve,[2,88]),e(ve,[2,89]),e(ve,[2,90]),e(ve,[2,91]),e(ve,[2,92]),e(ve,[2,93]),e(ve,[2,94]),e(ve,[2,95]),e(ve,[2,96]),e(ve,[2,97]),e(ve,[2,98]),e(ve,[2,99]),e(ve,[2,100]),e(ve,[2,101]),e(ve,[2,102]),e(ve,[2,103]),e(ve,[2,104]),e(ve,[2,105]),{23:148,62:V,73:R},{23:150,60:149,62:V,73:R},e(Se,[2,68]),e(Se,[2,69]),{58:151,104:Ae},{58:153,104:Ae},{58:154,104:Ae},{58:155,104:Ae},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:$,53:O,54:G},{5:[1,161]},e(P,[2,20]),e(P,[2,21]),e(P,[2,23]),e(P,[2,24]),{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,164],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{17:[1,165]},{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,50:[1,166],51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{17:[1,167]},{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,49:[1,168],51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{17:[1,169]},{17:[1,170]},{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,48:[1,171],51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{4:s,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,172],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:x,36:b,37:T,38:C,39:v,40:E,42:S,44:_,45:A,47:B,51:$,53:O,54:G,56:I,61:F,62:N,63:D,64:M,73:R},{16:[1,173]},e(P,[2,50]),{16:[1,174]},e(P,[2,55]),e(q,[2,76]),{76:[1,175]},{16:[1,176]},e(P,[2,52]),{16:[1,177]},e(P,[2,57]),e(P,[2,53]),{23:178,62:V,73:R},{23:179,62:V,73:R},{23:180,62:V,73:R},{58:181,104:Ae},{23:182,62:V,72:[1,183],73:R},{58:184,104:Ae},{58:185,104:Ae},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(P,[2,17]),e(ae,[2,11]),{13:187,51:$,53:O,54:G},e(ae,[2,13]),e(ae,[2,14]),e(P,[2,19]),e(P,[2,35]),e(P,[2,36]),e(P,[2,37]),e(P,[2,38]),{16:[1,188]},e(P,[2,39]),{16:[1,189]},e(P,[2,40]),e(P,[2,41]),{16:[1,190]},e(P,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:Ae},{58:197,104:Ae},{58:198,104:Ae},{5:[2,75]},{58:199,104:Ae},{23:200,62:V,73:R},{5:[2,58]},{5:[2,59]},{23:201,62:V,73:R},e(ae,[2,12]),e(xe,i,{7:125,41:202}),e(ee,i,{7:127,43:203}),e(Y,i,{7:130,46:204}),e(P,[2,49]),e(P,[2,54]),e(q,[2,77]),e(P,[2,51]),e(P,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:Ae},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:a(function(Ve,Ye){if(Ye.recoverable)this.trace(Ve);else{var Je=new Error(Ve);throw Je.hash=Ye,Je}},"parseError"),parse:a(function(Ve){var Ye=this,Je=[0],Oe=[],Vt=[null],Ce=[],Ut=this.table,Re="",vt=0,Zt=0,_t=0,qt=2,At=1,zt=Ce.slice.call(arguments,1),ot=Object.create(this.lexer),Rt={yy:{}};for(var Ar in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ar)&&(Rt.yy[Ar]=this.yy[Ar]);ot.setInput(Ve,Rt.yy),Rt.yy.lexer=ot,Rt.yy.parser=this,typeof ot.yylloc>"u"&&(ot.yylloc={});var ie=ot.yylloc;Ce.push(ie);var xt=ot.options&&ot.options.ranges;typeof Rt.yy.parseError=="function"?this.parseError=Rt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function kt(ar){Je.length=Je.length-2*ar,Vt.length=Vt.length-ar,Ce.length=Ce.length-ar}a(kt,"popStack");function de(){var ar;return ar=Oe.pop()||ot.lex()||At,typeof ar!="number"&&(ar instanceof Array&&(Oe=ar,ar=Oe.pop()),ar=Ye.symbols_[ar]||ar),ar}a(de,"lex");for(var Ne,nt,ft,dt,cr,$e,it={},mt,wt,Dt,Jt;;){if(ft=Je[Je.length-1],this.defaultActions[ft]?dt=this.defaultActions[ft]:((Ne===null||typeof Ne>"u")&&(Ne=de()),dt=Ut[ft]&&Ut[ft][Ne]),typeof dt>"u"||!dt.length||!dt[0]){var mr="";Jt=[];for(mt in Ut[ft])this.terminals_[mt]&&mt>qt&&Jt.push("'"+this.terminals_[mt]+"'");ot.showPosition?mr="Parse error on line "+(vt+1)+`: +`+ot.showPosition()+` +Expecting `+Jt.join(", ")+", got '"+(this.terminals_[Ne]||Ne)+"'":mr="Parse error on line "+(vt+1)+": Unexpected "+(Ne==At?"end of input":"'"+(this.terminals_[Ne]||Ne)+"'"),this.parseError(mr,{text:ot.match,token:this.terminals_[Ne]||Ne,line:ot.yylineno,loc:ie,expected:Jt})}if(dt[0]instanceof Array&&dt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ft+", token: "+Ne);switch(dt[0]){case 1:Je.push(Ne),Vt.push(ot.yytext),Ce.push(ot.yylloc),Je.push(dt[1]),Ne=null,nt?(Ne=nt,nt=null):(Zt=ot.yyleng,Re=ot.yytext,vt=ot.yylineno,ie=ot.yylloc,_t>0&&_t--);break;case 2:if(wt=this.productions_[dt[1]][1],it.$=Vt[Vt.length-wt],it._$={first_line:Ce[Ce.length-(wt||1)].first_line,last_line:Ce[Ce.length-1].last_line,first_column:Ce[Ce.length-(wt||1)].first_column,last_column:Ce[Ce.length-1].last_column},xt&&(it._$.range=[Ce[Ce.length-(wt||1)].range[0],Ce[Ce.length-1].range[1]]),$e=this.performAction.apply(it,[Re,Zt,vt,Rt.yy,dt[1],Vt,Ce].concat(zt)),typeof $e<"u")return $e;wt&&(Je=Je.slice(0,-1*wt*2),Vt=Vt.slice(0,-1*wt),Ce=Ce.slice(0,-1*wt)),Je.push(this.productions_[dt[1]][0]),Vt.push(it.$),Ce.push(it._$),Dt=Ut[Je[Je.length-2]][Je[Je.length-1]],Je.push(Dt);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var lt={EOF:1,parseError:a(function(Ye,Je){if(this.yy.parser)this.yy.parser.parseError(Ye,Je);else throw new Error(Ye)},"parseError"),setInput:a(function(Ve,Ye){return this.yy=Ye||this.yy||{},this._input=Ve,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var Ve=this._input[0];this.yytext+=Ve,this.yyleng++,this.offset++,this.match+=Ve,this.matched+=Ve;var Ye=Ve.match(/(?:\r\n?|\n).*/g);return Ye?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ve},"input"),unput:a(function(Ve){var Ye=Ve.length,Je=Ve.split(/(?:\r\n?|\n)/g);this._input=Ve+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ye),this.offset-=Ye;var Oe=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),Je.length-1&&(this.yylineno-=Je.length-1);var Vt=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:Je?(Je.length===Oe.length?this.yylloc.first_column:0)+Oe[Oe.length-Je.length].length-Je[0].length:this.yylloc.first_column-Ye},this.options.ranges&&(this.yylloc.range=[Vt[0],Vt[0]+this.yyleng-Ye]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(Ve){this.unput(this.match.slice(Ve))},"less"),pastInput:a(function(){var Ve=this.matched.substr(0,this.matched.length-this.match.length);return(Ve.length>20?"...":"")+Ve.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var Ve=this.match;return Ve.length<20&&(Ve+=this._input.substr(0,20-Ve.length)),(Ve.substr(0,20)+(Ve.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var Ve=this.pastInput(),Ye=new Array(Ve.length+1).join("-");return Ve+this.upcomingInput()+` +`+Ye+"^"},"showPosition"),test_match:a(function(Ve,Ye){var Je,Oe,Vt;if(this.options.backtrack_lexer&&(Vt={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&&(Vt.yylloc.range=this.yylloc.range.slice(0))),Oe=Ve[0].match(/(?:\r\n?|\n).*/g),Oe&&(this.yylineno+=Oe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Oe?Oe[Oe.length-1].length-Oe[Oe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ve[0].length},this.yytext+=Ve[0],this.match+=Ve[0],this.matches=Ve,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(Ve[0].length),this.matched+=Ve[0],Je=this.performAction.call(this,this.yy,this,Ye,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Je)return Je;if(this._backtrack){for(var Ce in Vt)this[Ce]=Vt[Ce];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ve,Ye,Je,Oe;this._more||(this.yytext="",this.match="");for(var Vt=this._currentRules(),Ce=0;CeYe[0].length)){if(Ye=Je,Oe=Ce,this.options.backtrack_lexer){if(Ve=this.test_match(Je,Vt[Ce]),Ve!==!1)return Ve;if(this._backtrack){Ye=!1;continue}else return!1}else if(!this.options.flex)break}return Ye?(Ve=this.test_match(Ye,Vt[Oe]),Ve!==!1?Ve:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var Ye=this.next();return Ye||this.lex()},"lex"),begin:a(function(Ye){this.conditionStack.push(Ye)},"begin"),popState:a(function(){var Ye=this.conditionStack.length-1;return Ye>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(Ye){return Ye=this.conditionStack.length-1-Math.abs(Ye||0),Ye>=0?this.conditionStack[Ye]:"INITIAL"},"topState"),pushState:a(function(Ye){this.begin(Ye)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(Ye,Je,Oe,Vt){var Ce=Vt;switch(Oe){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 Je.yytext=Je.yytext.trim(),73;break;case 12:return Je.yytext=Je.yytext.trim(),this.begin("ALIAS"),73;break;case 13:return Je.yytext=Je.yytext.trim(),this.popState(),73;break;case 14:return this.popState(),10;break;case 15:return Je.yytext=Je.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 Je.yytext=Je.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]+(?=\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(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:link(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:properties(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,/^(?:details(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/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 lt})();Ee.lexer=Qe;function qe(){this.yy={}}return a(qe,"Parser"),qe.prototype=Ee,Ee.Parser=qe,new qe})();w7.parser=w7;ECe=w7});var Xrt,Qrt,Zrt,cT,U_,_7=w(()=>{"use strict";Gt();Im();bt();k_();Ir();fn();Xrt={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},Qrt={FILLED:0,OPEN:1},Zrt={LEFTOF:0,RIGHTOF:1,OVER:2},cT={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},U_=class{constructor(){this.state=new Kh(()=>({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=hr;this.setAccDescription=fr;this.setDiagramTitle=Cr;this.getAccTitle=gr;this.getAccDescription=yr;this.getDiagramTitle=xr;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(_e().wrap),this.LINETYPE=Xrt,this.ARROWTYPE=Qrt,this.PLACEMENT=Zrt}static{a(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,r,n,i,s){let o=this.state.records.currentBox,l;if(s!==void 0){let h;s.includes(` +`)?h=s+` +`:h=`{ +`+s+` +}`,l=Qo(h,{schema:Xo})}i=l?.type??i,l?.alias&&(!n||n.text===r)&&(n={text:l.alias,wrap:n?.wrap,type:i});let u=this.state.records.actors.get(t);if(u){if(this.state.records.currentBox&&u.box&&this.state.records.currentBox!==u.box)throw new Error(`A same participant should only be defined in one Box: ${u.name} can't be in '${u.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=u.box?u.box:this.state.records.currentBox,u.box=o,u&&r===u.name&&n==null)return}if(n?.text==null&&(n={text:r,type:i}),(i==null||n.text==null)&&(n={text:r,type:i}),this.state.records.actors.set(t,{box:o,name:r,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let 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 r,n=0;if(!t)return 0;for(r=0;r>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},u}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:r,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:i,activate:s,centralConnection:o??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 r=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(r===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:_e().sequence?.wrap??!1}clear(){this.state.reset(),or()}parseMessage(t){let r=t.trim(),{wrap:n,cleanedText:i}=this.extractWrap(r),s={text:i,wrap:n};return H.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),n=r?.[1]?r[1].trim():"transparent",i=r?.[2]?r[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",i=t.trim());else{let l=new Option().style;l.color=n,l.color!==n&&(n="transparent",i=t.trim())}let{wrap:s,cleanedText:o}=this.extractWrap(i);return{text:o?vr(o,_e()):void 0,color:n,wrap:s}}addNote(t,r,n){let i={actor:t,placement:r,message:n.text,wrap:n.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(t,r){let n=this.getActor(t);try{let i=vr(r.text,_e());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let s=JSON.parse(i);this.insertLinks(n,s)}catch(i){H.error("error while parsing actor link text",i)}}addALink(t,r){let n=this.getActor(t);try{let i={},s=vr(r.text,_e()),o=s.indexOf("@");s=s.replace(/=/g,"="),s=s.replace(/&/g,"&");let l=s.slice(0,o-1).trim(),u=s.slice(o+1).trim();i[l]=u,this.insertLinks(n,i)}catch(i){H.error("error while parsing actor link text",i)}}insertLinks(t,r){if(t.links==null)t.links=r;else for(let n in r)t.links[n]=r[n]}addProperties(t,r){let n=this.getActor(t);try{let i=vr(r.text,_e()),s=JSON.parse(i);this.insertProperties(n,s)}catch(i){H.error("error while parsing actor properties text",i)}}insertProperties(t,r){if(t.properties==null)t.properties=r;else for(let n in r)t.properties[n]=r[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,r){let n=this.getActor(t),i=document.getElementById(r.text);try{let s=i.innerHTML,o=JSON.parse(s);o.properties&&this.insertProperties(n,o.properties),o.links&&this.insertLinks(n,o.links)}catch(s){H.error("error while parsing actor details text",s)}}getActorProperty(t,r){if(t?.properties!==void 0)return t.properties[r]}apply(t){if(Array.isArray(t))t.forEach(r=>{this.apply(r)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,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":hr(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 _e().sequence}}});var Jrt,wCe,_Ce=w(()=>{"use strict";Gt();Jrt=a(e=>{let t=e.dropShadow??"none",{look:r}=_e();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: ${r==="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}; + } + + /* + * No font-weight here, deliberately. Note text renders inside tspan elements, and a weight emitted at + * tspan level outranks the inline style drawText puts on the parent text element from the + * sequence.noteFontWeight config key -- so that documented key would never reach the glyphs. + * The theme variable formerly emitted here is a different value from that config key, and + * git/styles.js reads it as its own bold-label weight under redux and neo, so it cannot be + * lowered there either. + */ + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man circle, line { + fill: ${e.actorBkg}; + stroke-width: 2px; + } + + g rect.rect { + filter: ${t}; + stroke: ${e.nodeBorder}; + } +`},"getStyles"),wCe=Jrt});var uT,A7,W_,ACe,R7,RCe,LCe,L7=w(()=>{"use strict";jt();uT=44,A7=6,W_=6,ACe=a((e,t)=>e.actorTextHeight??Xt.calculateTextDimensions(e.description??"",{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}).height,"actorLabelHeight"),R7=a(e=>uT+A7+e+W_,"actorStackHeight"),RCe=a((e,t,r)=>{let n=e+t,i=n-W_-r/2;return{lifelineStartY:n,glyphBottomY:n-W_-r-A7,labelCenterY:i}},"headerBands"),LCe=a((e,t)=>{let r=e+W_,n=r+uT;return{glyphTopY:r,glyphBottomY:n,labelCenterY:n+A7+t/2,stackHeight:R7(t)}},"footerBands")});var I7,Jh,ent,DCe,ICe,fT,ed,td,j_,up,pu,gi,hT,tnt,q_,dT,hp,NCe,qr,D7,rnt,nnt,int,snt,ant,ont,lnt,cnt,unt,hnt,dnt,fnt,pnt,MCe,mnt,gnt,ynt,xnt,bnt,Tnt,Cnt,rd,knt,OCe,Snt,mu,Ent,vnt,wnt,_nt,Ant,_n,PCe=w(()=>{"use strict";I7=Io(I1(),1);Tr();jt();Ir();Mc();L7();Jh=36,ent=-5,DCe=60,ICe=DCe-ent,fT=a((e,t,r,n)=>{if(t.look!=="neo")return null;let i=ACe(e,t);return r?LCe(n,i):RCe(n,e.height,i)},"neoBands"),ed="actor-top",td="actor-bottom",j_="actor-box",up="actor-man",pu=new Set(["redux-color","redux-dark-color"]),gi=a((e,t)=>e?.length?e[t%e.length]:void 0,"paletteColor"),hT=a(function(e,t){let r=Vd(e,t);return Ct().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),tnt=a(function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let s=t.links,o=t.actorCnt,l=t.rectData;var u="none";i&&(u="block !important");let h=e.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var d="";l.class!==void 0&&(d=" "+l.class);let f=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",f),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),s!=null){var m=20;for(let x in s){var g=h.append("a"),y=(0,I7.sanitizeUrl)(s[x]);g.attr("xlink:href",y),g.attr("target","_blank"),Ent(n)(x,g,l.x+10,l.height+m,f,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:f}},"drawPopup"),q_=a(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),dT=a(async function(e,t,r=null){let n=e.append("foreignObject"),i=await Yp(t.text,Ct()),o=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",o.height+2*t.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let d=l;l=u,u=d}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),t.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),hp=a(function(e,t){let r=0,n=0,i=t.text.split(gt.lineBreakRegex),[s,o]=sa(t.fontSize),l=[],u=0,h=a(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=a(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=a(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=a(()=>Math.round(t.y+(r+n+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[d,f]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&s!==void 0&&(u=d*s);let p=e.append("text");p.attr("x",t.x),p.attr("y",h()),t.anchor!==void 0&&p.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&p.style("font-family",t.fontFamily),o!==void 0&&p.style("font-size",o),t.fontWeight!==void 0&&p.style("font-weight",t.fontWeight),t.fill!==void 0&&p.attr("fill",t.fill),t.class!==void 0&&p.attr("class",t.class),t.dy!==void 0?p.attr("dy",t.dy):u!==0&&p.attr("dy",u);let m=f||DN;if(t.tspan){let g=p.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(m)}else p.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),NCe=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,hp(e,t),n},"drawLabel"),qr=-1,D7=a((e,t,r,n)=>{e.select&&r.forEach(i=>{let s=t.get(i),o=e.select("#actor"+s.actorCnt);!n.mirrorActors&&s.stopy?o.attr("y2",s.stopy+s.height/2):n.mirrorActors&&o.attr("y2",s.stopy)})},"fixLifeLineHeights"),rnt=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=o+t.height,{look:h,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m}=f,g=e.append("g").lower();var y=g;n||(qr++,Object.keys(t.links||{}).length&&!r.forceMenus&&y.attr("onclick",q_(`actor${qr}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",u).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),y=g.append("g"),t.actorCnt=qr,t.links!=null&&y.attr("id","root-"+qr),h==="neo"&&y.attr("data-look","neo"));let x=Us();var b="actor";t.properties?.class?b=t.properties.class:x.fill="#eaeaea",n?b+=` ${td}`:b+=` ${ed}`,x.x=t.x,x.y=o,x.width=t.width,x.height=t.height,x.class=b,x.rx=3,x.ry=3,x.name=t.name,h==="neo"&&(x.rx=6,x.ry=6);let T=hT(y,x),C=s.get(t.name)??0;if(pu.has(d)&&(T.style("stroke",gi(m,C)),T.style("fill",gi(p,C))),h==="neo"&&T.attr("filter",`url(#${rd(i)})`),t.rectData=x,t.properties?.icon){let E=t.properties.icon.trim();E.charAt(0)==="@"?l2(y,x.x+x.width-20,x.y+10,E.substr(1)):o2(y,x.x+x.width-20,x.y+10,E)}n||(y.attr("data-et","participant"),y.attr("data-type","participant"),y.attr("data-id",t.name)),mu(r,Un(t.description))(t.description,y,x.x,x.y,x.width,x.height,{class:`actor ${j_}`},r);let v=t.height;if(T.node){let E=T.node().getBBox();r.look!=="neo"&&(t.height=E.height,v=E.height)}return v},"drawActorTypeParticipant"),nnt=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=o+t.height,{look:h,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m}=f,g=e.append("g").lower();var y=g;n||(qr++,Object.keys(t.links||{}).length&&!r.forceMenus&&y.attr("onclick",q_(`actor${qr}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",u).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),y=g.append("g"),t.actorCnt=qr,t.links!=null&&y.attr("id","root-"+qr),h==="neo"&&y.attr("data-look","neo"));let x=Us();var b="actor";t.properties?.class?b=t.properties.class:x.fill="#eaeaea",n?b+=` ${td}`:b+=` ${ed}`,x.x=t.x,x.y=o,x.width=t.width,x.height=t.height,x.class=b,x.name=t.name;let T=6;r.look==="neo"&&(x.height=t.height-T);let C={...x,x:x.x+-T,y:x.y+ +T,class:"actor"},v=hT(y,x),E=hT(y,C);t.rectData=x,h==="neo"&&y.attr("filter",`url(#${rd(i)})`);let S=s.get(t.name)??0;if(pu.has(d)&&(v.style("stroke",gi(m,S)),v.style("fill",gi(p,S)),E.style("stroke",gi(m,S)),E.style("fill",gi(p,S))),t.properties?.icon){let A=t.properties.icon.trim();A.charAt(0)==="@"?l2(y,x.x+x.width-20,x.y+10,A.substr(1)):o2(y,x.x+x.width-20,x.y+10,A)}mu(r,Un(t.description))(t.description,y,x.x-T,x.y+T,x.width,x.height,{class:`actor ${j_}`},r);let _=t.height;if(v.node){let A=v.node().getBBox();r.look!=="neo"&&(t.height=A.height,_=A.height)}return n||(y.attr("data-et","participant"),y.attr("data-type","collections"),y.attr("data-id",t.name)),_},"drawActorTypeCollections"),int=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=o+t.height,{look:h,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m}=f,g=e.append("g").lower(),y=g;n||(qr++,Object.keys(t.links||{}).length&&!r.forceMenus&&y.attr("onclick",q_(`actor${qr}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",u).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),y=g.append("g"),t.actorCnt=qr,t.links!=null&&y.attr("id","root-"+qr),h==="neo"&&y.attr("data-look","neo"));let x=Us(),b="actor";t.properties?.class?b=t.properties.class:x.fill="#eaeaea",n?b+=` ${td}`:b+=` ${ed}`,y.attr("class",b),x.x=t.x,x.y=o,x.width=t.width,x.height=t.height,x.name=t.name;let T=x.height/2,C=T/(2.5+x.height/50),v=y.append("g"),E=y.append("g"),S=`M ${x.x},${x.y+T} + a ${C},${T} 0 0 0 0,${x.height} + h ${x.width-2*C} + a ${C},${T} 0 0 0 0,-${x.height} + Z + `;v.append("path").attr("d",S),E.append("path").attr("d",`M ${x.x},${x.y+T} + a ${C},${T} 0 0 0 0,${x.height}`),v.attr("transform",`translate(${C}, ${-(x.height/2)})`),E.attr("transform",`translate(${x.width-C}, ${-x.height/2})`),t.rectData=x,h==="neo"&&v.attr("filter",`url(#${rd(i)})`);let _=s.get(t.name)??0;if(pu.has(d)&&(v.style("stroke",gi(m,_)),v.style("fill",gi(p,_)),E.style("stroke",gi(m,_)),E.style("fill",gi(p,_))),t.properties?.icon){let $=t.properties.icon.trim(),O=x.x+x.width-20,G=x.y+10;$.charAt(0)==="@"?l2(y,O,G,$.substr(1)):o2(y,O,G,$)}mu(r,Un(t.description))(t.description,y,x.x,x.y,x.width,x.height,{class:`actor ${j_}`},r);let A=t.height,B=v.select("path:last-child");if(B.node()){let $=B.node().getBBox();r.look!=="neo"&&(t.height=$.height,A=$.height)}return n||(y.attr("data-et","participant"),y.attr("data-type","queue"),y.attr("data-id",t.name)),A},"drawActorTypeQueue"),snt=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=fT(t,r,n,o),h=u?u.lifelineStartY:o+75,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:g,actorBorder:y,actorBkg:x}=p,b=e.append("g").lower();n||(qr++,b.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",h).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=qr);let T=e.append("g"),C=up;n?C+=` ${td}`:C+=` ${ed}`,T.attr("class",C),T.attr("name",t.name);let v=Us();v.x=t.x,v.y=o,v.fill="#eaeaea",v.width=t.width,v.height=t.height,v.class="actor";let E=t.x+t.width/2,S=u?u.glyphBottomY-22:o+32,_=22;T.append("defs").append("marker").attr("id",i+"-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"),T.append("circle").attr("cx",E).attr("cy",S).attr("r",_).attr("filter",`${d==="neo"?`url(#${rd(i)})`:""}`),T.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${E}, ${S-_})`);let A=s.get(t.name)??0;if(pu.has(f)?(T.style("stroke",gi(g,A)),T.style("fill",gi(m,A))):(T.style("stroke",y),T.style("fill",x)),!u){let B=T.node().getBBox();t.height=B.height+2*(r?.sequence?.labelBoxHeight??0)}return mu(r,Un(t.description))(t.description,T,v.x,u?u.labelCenterY-v.height/2:v.y+_+(n?5:12),v.width,v.height,{class:`actor ${up}`},r),n||(T.attr("data-et","participant"),T.attr("data-type","control"),T.attr("data-id",t.name)),t.height},"drawActorTypeControl"),ant=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=fT(t,r,n,o),h=u?u.lifelineStartY:o+75,{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:g}=p,y=e.append("g").lower(),x=e.append("g"),b="actor";n?b+=` ${td}`:b+=` ${ed}`,x.attr("class",b),x.attr("name",t.name);let T=Us();T.x=t.x,T.y=o,T.fill="#eaeaea",T.width=t.width,T.height=t.height,T.class="actor";let C=t.x+t.width/2,v=u?u.glyphBottomY-22:o+(n?10:25),E=22;x.append("circle").attr("cx",C).attr("cy",v).attr("r",E).attr("width",t.width).attr("height",t.height),x.append("line").attr("x1",C-E).attr("x2",C+E).attr("y1",v+E).attr("y2",v+E).attr("stroke-width",2),d==="neo"&&x.attr("filter",`url(#${rd(i)})`);let S=s.get(t.name)??0;if(pu.has(f)&&(x.style("stroke",gi(g,S)),x.style("fill",gi(m,S))),!u){let _=x.node().getBBox();t.height=_.height+(r?.sequence?.labelBoxHeight??0)}return n||(qr++,y.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",h).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=qr),mu(r,Un(t.description))(t.description,x,T.x,u?u.labelCenterY-T.height/2:T.y+(n?15:30),T.width,T.height,{class:`actor ${up}`},r),u||x.attr("transform",`translate(0, ${n?E:E/2-5})`),n||(x.attr("data-et","participant"),x.attr("data-type","entity"),x.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),ont=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=fT(t,r,n,o),h=u?u.lifelineStartY:o+t.height+2*r.boxTextMargin,{theme:d,themeVariables:f,look:p}=r,{bkgColorArray:m,borderColorArray:g,actorBorder:y}=f,x=e.append("g").lower(),b=x;n||(qr++,Object.keys(t.links||{}).length&&!r.forceMenus&&b.attr("onclick",q_(`actor${qr}_popup`)).attr("cursor","pointer"),b.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",h).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),b=x.append("g"),t.actorCnt=qr,t.links!=null&&b.attr("id","root-"+qr),p==="neo"&&b.attr("data-look","neo"));let T=Us(),C="actor";t.properties?.class?C=t.properties.class:T.fill="#eaeaea",n?C+=` ${td}`:C+=` ${ed}`,T.x=t.x,T.y=o,T.width=t.width,T.height=t.height,T.class=C,T.name=t.name,T.x=t.x,T.y=o;let v=T.width/3,E=v/2,S=E/(2.5+v/50),_=u?uT:T.width/3,A=u?u.glyphBottomY-_-S:T.y,B=b.append("g");B.attr("class",C);let $=` + M ${T.x},${A+S} + a ${E},${S} 0 0 0 ${v},0 + a ${E},${S} 0 0 0 -${v},0 + l 0,${_-2*S} + a ${E},${S} 0 0 0 ${v},0 + l 0,-${_-2*S} +`;B.append("path").attr("d",$),p==="neo"&&B.attr("filter",`url(#${rd(i)})`);let O=s.get(t.name)??0;if(pu.has(d)?(B.style("stroke",gi(g,O)),B.style("fill",gi(m,O))):B.style("stroke",y),B.attr("transform",`translate(${v}, ${S})`),t.rectData=T,mu(r,Un(t.description))(t.description,b,T.x,u?u.labelCenterY-T.height/2:T.y+35,T.width,T.height,{class:`actor ${j_}`},r),!u){let G=B.select("path:last-child");if(G.node()){let I=G.node().getBBox();t.height=I.height+(r.sequence.labelBoxHeight??0)}}return n||(b.attr("data-et","participant"),b.attr("data-type","database"),b.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),lnt=a(function(e,t,r,n,i,s){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=fT(t,r,n,o),h=u?u.lifelineStartY:o+80,d=22,f=u?u.glyphBottomY-d:o+12,p=e.append("g").lower(),{look:m,theme:g,themeVariables:y}=r,{bkgColorArray:x,borderColorArray:b,actorBorder:T}=y;n||(qr++,p.append("line").attr("id","actor"+qr).attr("x1",l).attr("y1",h).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=qr);let C=e.append("g"),v=up;n?v+=` ${td}`:v+=` ${ed}`,C.attr("class",v),C.attr("name",t.name);let E=Us();E.x=t.x,E.y=o,E.fill="#eaeaea",E.width=t.width,E.height=t.height,E.class="actor",C.append("line").attr("id","actor-man-torso"+qr).attr("x1",t.x+t.width/2-d*2.5).attr("y1",f).attr("x2",t.x+t.width/2-15).attr("y2",f),C.append("line").attr("id","actor-man-arms"+qr).attr("x1",t.x+t.width/2-d*2.5).attr("y1",f-10).attr("x2",t.x+t.width/2-d*2.5).attr("y2",f+10),C.append("circle").attr("cx",t.x+t.width/2).attr("cy",f).attr("r",d),m==="neo"&&C.attr("filter",`url(#${rd(i)})`);let S=s.get(t.name)??0;if(pu.has(g)?(C.style("stroke",gi(b,S)),C.style("fill",gi(x,S))):C.style("stroke",T),!u){let _=C.node().getBBox();t.height=_.height+(r.sequence.labelBoxHeight??0)}return mu(r,Un(t.description))(t.description,C,E.x,u?u.labelCenterY-E.height/2:E.y+15,E.width,E.height,{class:`actor ${up}`},r),u||C.attr("transform",`translate(0,${d/2+10})`),n||(C.attr("data-et","participant"),C.attr("data-type","boundary"),C.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),cnt=a(function(e,t,r,n,i){let s=n?t.stopy:t.starty,o=t.x+t.width/2,l=fT(t,r,n,s),u=l?l.lifelineStartY:s+80,{theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,g=e.append("g").lower();n||(qr++,g.append("line").attr("id","actor"+qr).attr("x1",o).attr("y1",u).attr("x2",o).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=qr);let y=e.append("g"),x=up;n?x+=` ${td}`:x+=` ${ed}`,y.attr("class",x),y.attr("name",t.name),n||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let b=l?uT/ICe:1,T=a(_=>l?l.glyphBottomY-(DCe-_)*b:s+_,"gy"),C=a(_=>o+_*b,"gx");y.append("line").attr("id","actor-man-torso"+qr).attr("x1",o).attr("y1",T(25)).attr("x2",o).attr("y2",T(45)),y.append("line").attr("id","actor-man-arms"+qr).attr("x1",C(-Jh/2)).attr("y1",T(33)).attr("x2",C(Jh/2)).attr("y2",T(33)),y.append("line").attr("x1",C(-Jh/2)).attr("y1",T(60)).attr("x2",o).attr("y2",T(45)),y.append("line").attr("x1",o).attr("y1",T(45)).attr("x2",C(Jh/2-2)).attr("y2",T(60));let v=y.append("circle");v.attr("cx",t.x+t.width/2),v.attr("cy",T(10)),v.attr("r",15*b),v.attr("width",t.width),v.attr("height",t.height),l||(t.height=ICe);let E=Us();E.x=t.x,E.y=s,E.fill="#eaeaea",E.width=t.width,E.height=t.height,E.class="actor",E.rx=3,E.ry=3;let S=i.get(t.name)??0;return pu.has(h)?(y.style("stroke",gi(p,S)),y.style("fill",gi(f,S))):y.style("stroke",m),mu(r,Un(t.description))(t.description,y,E.x,l?l.labelCenterY-E.height/2:s+35,E.width,E.height,{class:`actor ${up}`},r),t.height},"drawActorTypeActor"),unt=a(async function(e,t,r,n,i,s,o){let l=o??new Map([...s.db.getActors().values()].map((u,h)=>[u.name,h]));switch(t.type){case"actor":return await cnt(e,t,r,n,l);case"participant":return await rnt(e,t,r,n,i,l);case"boundary":return await lnt(e,t,r,n,i,l);case"control":return await snt(e,t,r,n,i,l);case"entity":return await ant(e,t,r,n,i,l);case"database":return await ont(e,t,r,n,i,l);case"collections":return await nnt(e,t,r,n,i,l);case"queue":return await int(e,t,r,n,i,l)}},"drawActor"),hnt=a(function(e,t,r){let i=e.append("g");MCe(i,t),t.name&&mu(r)(t.name,i,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),dnt=a(function(e){return e.append("g")},"anchorElement"),fnt=a(function(e,t,r,n,i,s,o){let{theme:l,themeVariables:u}=n,{bkgColorArray:h,borderColorArray:d,mainBkg:f}=u,p=Us(),m=t.anchored,g=t.actor;p.x=t.startx,p.y=t.starty,p.class="activation"+i%3,p.width=t.stopx-t.startx,p.height=r-t.starty;let y=hT(m,p),b=(o??new Map([...s.db.getActors().values()].map((T,C)=>[T.name,C]))).get(g)??0;pu.has(l)&&(y.style("stroke",gi(d,b)),y.style("fill",gi(h,b)??f))},"drawActivation"),pnt=a(async function(e,t,r,n,i){let{boxMargin:s,boxTextMargin:o,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:h,messageFontSize:d,messageFontWeight:f}=n,p=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),m=a(function(x,b,T,C){return p.append("line").attr("x1",x).attr("y1",b).attr("x2",T).attr("y2",C).attr("class","loopLine")},"drawLoopLine");m(t.startx,t.starty,t.stopx,t.starty),m(t.stopx,t.starty,t.stopx,t.stopy),m(t.startx,t.stopy,t.stopx,t.stopy),m(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(x){m(t.startx,x.y,t.stopx,x.y).style("stroke-dasharray","3, 3")});let g=v0();g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(n.look==="neo"?15:0)||20,g.textMargin=o,g.class="labelText",NCe(p,g),g=OCe(),g.text=t.title,g.x=t.startx+u/2+(t.stopx-t.startx)/2,g.y=t.starty+s+o,g.anchor="middle",g.valign="middle",g.textMargin=o,g.class="loopText",g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.wrap=!0;let y=Un(g.text)?await dT(p,g,t):hp(p,g);if(t.sectionTitles!==void 0){for(let[x,b]of Object.entries(t.sectionTitles))if(b.message){g.text=b.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[x].y+s+o,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.wrap=t.wrap,Un(g.text)?(t.starty=t.sections[x].y,await dT(p,g,t)):hp(p,g);let T=Math.round(y.map(C=>(C._groups||C)[0][0].getBBox().height).reduce((C,v)=>C+v));t.sections[x].height+=T-(s+o)}}return t.height=Math.round(t.stopy-t.starty),p},"drawLoop"),MCe=a(function(e,t){a2(e,t)},"drawBackgroundRect"),mnt=a(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"),gnt=a(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"),ynt=a(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"),xnt=a(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"),bnt=a(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"),Tnt=a(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"),Cnt=a(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"),rd=a(e=>e?`${e}-drop-shadow`:"drop-shadow","dropShadowId"),knt=a(function(e,t,r){let{theme:n}=t;e.append("defs").append("filter").attr("id",rd(r)).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",`${n==="redux"||n==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),OCe=a(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Snt=a(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mu=(function(){function e(s,o,l,u,h,d,f){let p=o.append("text").attr("x",l+h/2).attr("y",u+d/2+5).style("text-anchor","middle").text(s);i(p,f)}a(e,"byText");function t(s,o,l,u,h,d,f,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[x,b]=sa(m),T=s.split(gt.lineBreakRegex);for(let C=0;C{let o=dp(Be),l=s.actorKeys.reduce((f,p)=>f+=e.get(p).width+(e.get(p).margin||0),0),u=Be.boxMargin*8;l+=u,l-=2*Be.boxTextMargin,s.wrap&&(s.name=Xt.wrapLabel(s.name,l-2*Be.wrapPadding,o));let h=Xt.calculateTextDimensions(s.name,o);i=gt.getMax(h.height,i);let d=gt.getMax(l,h.width+2*Be.wrapPadding);if(s.margin=Be.boxTextMargin,ls.textMaxHeight=i),gt.getMax(n,Be.height)}var Be,Tt,Rnt,BCe,dp,xy,M7,Int,Dnt,O7,FCe,GCe,H_,$Ce,Mnt,Pnt,$nt,Fnt,Gnt,N7,Vnt,VCe,znt,Unt,Wnt,zCe,UCe=w(()=>{"use strict";Lr();PCe();bt();Ir();Ir();Mc();Gt();L7();Gp();jt();Rn();_7();Be={},Tt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:a(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:a(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:a(function(e){this.boxes.push(e)},"addBox"),addActor:a(function(e){this.actors.push(e)},"addActor"),addLoop:a(function(e){this.loops.push(e)},"addLoop"),addMessage:a(function(e){this.messages.push(e)},"addMessage"),addNote:a(function(e){this.notes.push(e)},"addNote"),lastActor:a(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:a(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:a(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:a(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:a(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,GCe(_e())},"init"),updateVal:a(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:a(function(e,t,r,n){let i=this,s=0;function o(l){return a(function(h){s++;let d=i.sequenceItems.length-s+1;i.updateVal(h,"starty",t-d*Be.boxMargin,Math.min),i.updateVal(h,"stopy",n+d*Be.boxMargin,Math.max),i.updateVal(Tt.data,"startx",e-d*Be.boxMargin,Math.min),i.updateVal(Tt.data,"stopx",r+d*Be.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",e-d*Be.boxMargin,Math.min),i.updateVal(h,"stopx",r+d*Be.boxMargin,Math.max),i.updateVal(Tt.data,"starty",t-d*Be.boxMargin,Math.min),i.updateVal(Tt.data,"stopy",n+d*Be.boxMargin,Math.max))},"updateItemBounds")}a(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:a(function(e,t,r,n){let i=gt.getMin(e,r),s=gt.getMax(e,r),o=gt.getMin(t,n),l=gt.getMax(t,n);this.updateVal(Tt.data,"startx",i,Math.min),this.updateVal(Tt.data,"starty",o,Math.min),this.updateVal(Tt.data,"stopx",s,Math.max),this.updateVal(Tt.data,"stopy",l,Math.max),this.updateBounds(i,o,s,l)},"insert"),newActivation:a(function(e,t,r){let n=r.get(e.from),i=H_(e.from).length||0,s=n.x+n.width/2+(i-1)*Be.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+Be.activationWidth,stopy:void 0,actor:e.from,anchored:_n.anchorElement(t)})},"newActivation"),endActivation:a(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:a(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:a(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:a(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:a(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Tt.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:a(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:a(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:a(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=gt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:a(function(){return this.verticalPos},"getVerticalPos"),getBounds:a(function(){return{bounds:this.data,models:this.models}},"getBounds")},Rnt=a(async function(e,t,r){Tt.bumpVerticalPos(Be.boxMargin),t.height=Be.boxMargin,t.starty=Tt.getVerticalPos();let n=Us();n.x=t.startx,n.y=t.starty,n.width=t.width||Be.width,n.class="note";let i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+r);let s=_n.drawRect(i,n),o=v0();o.x=t.startx,o.y=t.starty,o.width=n.width,o.dy="1em",o.text=t.message,o.class="noteText",o.fontFamily=Be.noteFontFamily,o.fontSize=Be.noteFontSize,o.fontWeight=Be.noteFontWeight,o.anchor=Be.noteAlign,o.textMargin=Be.noteMargin,o.valign="center";let l=Un(o.text)?await dT(i,o):hp(i,o),u=Math.round(l.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,d)=>h+d));s.attr("height",u+2*Be.noteMargin),t.height+=u+2*Be.noteMargin,Tt.bumpVerticalPos(u+2*Be.noteMargin),t.stopy=t.starty+u+2*Be.noteMargin,t.stopx=t.startx+n.width,Tt.insert(t.startx,t.starty,t.stopx,t.stopy),Tt.models.addNote(t)},"drawNote"),BCe=a(function(e,t,r,n,i,s,o){let l=n.db.getActors(),u=l.get(t.from),h=l.get(t.to),d=r.sequenceVisible,f=u.x+u.width/2,p=h.x+h.width/2,m=f<=p,g=VCe(t,n),y=e.append("g"),x=16.5,b=a((S,_)=>{let A=S?x:-x;return _?-A:A},"getCircleOffset"),T=a(S=>{y.append("circle").attr("cx",S).attr("cy",o).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:C,CENTRAL_CONNECTION_REVERSE:v,CENTRAL_CONNECTION_DUAL:E}=n.db.LINETYPE;if(d)switch(t.centralConnection){case C:g&&(p+=b(m,!0));break;case v:g||(f+=b(m,!1));break;case E:g?p+=b(m,!0):f+=b(m,!1);break}switch(t.centralConnection){case C:T(p);break;case v:T(f);break;case E:T(f),T(p);break}},"drawCentralConnection"),dp=a(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),xy=a(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),M7=a(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");a(Lnt,"boundMessage");Int=a(async function(e,t,r,n,i,s){let{startx:o,stopx:l,starty:u,message:h,type:d,sequenceIndex:f,sequenceVisible:p}=t,m=Xt.calculateTextDimensions(h,dp(Be)),g=v0();g.x=Math.min(o,l),g.y=u+10,g.width=Math.abs(l-o),g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=Be.messageFontFamily,g.fontSize=Be.messageFontSize,g.fontWeight=Be.messageFontWeight,g.anchor=Be.messageAlign,g.valign="center",g.textMargin=Be.wrapPadding,g.tspan=!1,Un(g.text)?await dT(e,g,{startx:o,stopx:l,starty:r}):hp(e,g);let y=m.width,x;if(o===l){let T=p||Be.showSequenceNumbers,C=VCe(i,n),v=znt(i,n),E=o+(T&&(C||v)?10:0);Be.rightAngles?x=e.append("path").attr("d",`M ${E},${r} H ${o+gt.getMax(Be.width/2,y/2)} V ${r+25} H ${o}`):x=e.append("path").attr("d","M "+E+","+r+" C "+(E+60)+","+(r-10)+" "+(o+60)+","+(r+30)+" "+o+","+(r+20)),N7(i,n)&&BCe(e,i,t,n,o,l,r)}else x=e.append("line"),x.attr("x1",o),x.attr("y1",r),x.attr("x2",l),x.attr("y2",r),N7(i,n)&&BCe(e,i,t,n,o,l,r);d===n.db.LINETYPE.DOTTED||d===n.db.LINETYPE.DOTTED_CROSS||d===n.db.LINETYPE.DOTTED_POINT||d===n.db.LINETYPE.DOTTED_OPEN||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===n.db.LINETYPE.SOLID_TOP_DOTTED||d===n.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===n.db.LINETYPE.STICK_TOP_DOTTED||d===n.db.LINETYPE.STICK_BOTTOM_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0"),x.attr("data-et","message"),x.attr("data-id","i"+t.id),x.attr("data-from",t.from),x.attr("data-to",t.to);let b="";if(Be.arrowMarkerAbsolute&&(b=ML(!0)),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),(d===n.db.LINETYPE.SOLID_TOP||d===n.db.LINETYPE.SOLID_TOP_DOTTED)&&x.attr("marker-end","url("+b+"#"+s+"-solidTopArrowHead)"),(d===n.db.LINETYPE.SOLID_BOTTOM||d===n.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&x.attr("marker-end","url("+b+"#"+s+"-solidBottomArrowHead)"),(d===n.db.LINETYPE.STICK_TOP||d===n.db.LINETYPE.STICK_TOP_DOTTED)&&x.attr("marker-end","url("+b+"#"+s+"-stickTopArrowHead)"),(d===n.db.LINETYPE.STICK_BOTTOM||d===n.db.LINETYPE.STICK_BOTTOM_DOTTED)&&x.attr("marker-end","url("+b+"#"+s+"-stickBottomArrowHead)"),(d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&x.attr("marker-start","url("+b+"#"+s+"-solidBottomArrowHead)"),(d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&x.attr("marker-start","url("+b+"#"+s+"-solidTopArrowHead)"),(d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&x.attr("marker-start","url("+b+"#"+s+"-stickBottomArrowHead)"),(d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&x.attr("marker-start","url("+b+"#"+s+"-stickTopArrowHead)"),(d===n.db.LINETYPE.SOLID||d===n.db.LINETYPE.DOTTED)&&x.attr("marker-end","url("+b+"#"+s+"-arrowhead)"),(d===n.db.LINETYPE.BIDIRECTIONAL_SOLID||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(x.attr("marker-start","url("+b+"#"+s+"-arrowhead)"),x.attr("marker-end","url("+b+"#"+s+"-arrowhead)")),(d===n.db.LINETYPE.SOLID_POINT||d===n.db.LINETYPE.DOTTED_POINT)&&x.attr("marker-end","url("+b+"#"+s+"-filled-head)"),(d===n.db.LINETYPE.SOLID_CROSS||d===n.db.LINETYPE.DOTTED_CROSS)&&x.attr("marker-end","url("+b+"#"+s+"-crosshead)"),p||Be.showSequenceNumbers){let T=d===n.db.LINETYPE.BIDIRECTIONAL_SOLID||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED,C=d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,v=6,E=N7(i,n),S=o,_=l;T?(oo?_=l-2*v:(_=l-v,S+=i?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),_+=E?15:0,x.attr("x2",_),x.attr("x1",S)):x.attr("x1",o+v);let A=0,B=o===l,$=o<=l;B?A=t.fromBounds+1:C?A=$?t.toBounds-1:t.fromBounds+1:A=$?t.fromBounds+1:t.toBounds-1;let O="12px",G=f.toString().length;G>5?O="7px":G>3&&(O="9px"),e.append("line").attr("x1",A).attr("y1",r).attr("x2",A).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+b+"#"+s+"-sequencenumber)"),e.append("text").attr("x",A).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",O).attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}},"drawMessage"),Dnt=a(function(e,t,r,n,i,s,o){let l=0,u=0,h,d=0;for(let f of n){let p=t.get(f),m=p.box;h&&h!=m&&(o||Tt.models.addBox(h),u+=Be.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=gt.getMax(p.width||Be.width,Be.width),p.height=gt.getMax(p.height||Be.height,Be.height),p.margin=p.margin||Be.actorMargin,d=gt.getMax(d,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Tt.getVerticalPos(),Tt.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Tt.models.addActor(p)}h&&!o&&Tt.models.addBox(h),Tt.bumpVerticalPos(d)},"addActorRenderingData"),O7=a(async function(e,t,r,n,i,s,o){if(n){let l=0;Tt.bumpVerticalPos(Be.boxMargin*2);for(let u of r){let h=t.get(u);h.stopy||(h.stopy=Tt.getVerticalPos());let d=await _n.drawActor(e,h,Be,!0,i,s,o);l=gt.getMax(l,d)}Tt.bumpVerticalPos(l+Be.boxMargin)}else for(let l of r){let u=t.get(l);await _n.drawActor(e,u,Be,!1,i,s,o)}},"drawActors"),FCe=a(function(e,t,r,n){let i=0,s=0;for(let o of r){let l=t.get(o),u=Pnt(l),h=_n.drawPopup(e,l,u,Be,Be.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>s&&(s=h.width+l.x)}return{maxHeight:i,maxWidth:s}},"drawActorsPopup"),GCe=a(function(e){Pn(Be,e),e.fontFamily&&(Be.actorFontFamily=Be.noteFontFamily=Be.messageFontFamily=e.fontFamily),e.fontSize&&(Be.actorFontSize=Be.noteFontSize=Be.messageFontSize=e.fontSize),e.fontWeight&&(Be.actorFontWeight=Be.noteFontWeight=Be.messageFontWeight=e.fontWeight)},"setConf"),H_=a(function(e){return Tt.activations.filter(function(t){return t.actor===e})},"actorActivations"),$Ce=a(function(e,t){let r=t.get(e),n=H_(e),i=n.reduce(function(o,l){return gt.getMin(o,l.startx)},r.x+r.width/2-1),s=n.reduce(function(o,l){return gt.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,s]},"activationBounds");a(uc,"adjustLoopHeightForWrap");a(Nnt,"adjustCreatedDestroyedData");Mnt=a(async function(e,t,r,n){let{securityLevel:i,sequence:s,look:o,themeVariables:l}=_e();Be=s;let u;i==="sandbox"&&(u=st("#i"+t));let h=i==="sandbox"?st(u.nodes()[0].contentDocument.body):st("body"),d=i==="sandbox"?u.nodes()[0].contentDocument:document;Tt.init(),H.debug(n.db);let f=i==="sandbox"?h.select(`[id="${t}"]`):st(`[id="${t}"]`),p=n.db.getActors(),m=n.db.getCreatedActors(),g=n.db.getDestroyedActors(),y=n.db.getBoxes(),x=n.db.getActorKeys(),b=n.db.getMessages(),T=n.db.getDiagramTitle(),C=n.db.hasAtLeastOneBox(),v=n.db.hasAtLeastOneBoxWithTitle(),E=await Ont(p,b,n);if(Be.height=await Bnt(p,E,y),_n.insertComputerIcon(f,t),_n.insertDatabaseIcon(f,t),_n.insertClockIcon(f,t),C&&(Tt.bumpVerticalPos(Be.boxMargin),v&&Tt.bumpVerticalPos(y[0].textMaxHeight)),Be.hideUnusedParticipants===!0){let z=new Set;b.forEach(j=>{z.add(j.from),z.add(j.to)}),x=x.filter(j=>z.has(j))}let S=new Map(x.map((z,j)=>[p.get(z)?.name??z,j]));Dnt(f,p,m,x,0,b,!1);let _=await Wnt(b,p,E,n);_n.insertArrowHead(f,t),_n.insertArrowCrossHead(f,t),_n.insertArrowFilledHead(f,t),_n.insertSequenceNumber(f,t),_n.insertSolidTopArrowHead(f,t),_n.insertSolidBottomArrowHead(f,t),_n.insertStickTopArrowHead(f,t),_n.insertStickBottomArrowHead(f,t),o==="neo"&&_n.insertDropShadow(f,Be,t);function A(z,j){let K=Tt.endActivation(z);K.starty+18>j&&(K.starty=j-6,j+=12),_n.drawActivation(f,K,j,Be,H_(z.from).length,n,S),Tt.insert(K.startx,j-10,K.stopx,j)}a(A,"activeEnd");let B=1,$=1,O=[],G=[],I=0;for(let z of b){let j,K,Z;switch(z.type){case n.db.LINETYPE.NOTE:Tt.resetVerticalPos(),K=z.noteModel,await Rnt(f,K,z.id);break;case n.db.LINETYPE.ACTIVE_START:Tt.newActivation(z,f,p);break;case n.db.LINETYPE.CENTRAL_CONNECTION:Tt.newActivation(z,f,p);break;case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Tt.newActivation(z,f,p);break;case n.db.LINETYPE.ACTIVE_END:A(z,Tt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:uc(_,z,Be.boxMargin,Be.boxMargin+Be.boxTextMargin,ce=>Tt.newLoop(ce));break;case n.db.LINETYPE.LOOP_END:j=Tt.endLoop(),await _n.drawLoop(f,j,"loop",Be,z),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos()),Tt.models.addLoop(j);break;case n.db.LINETYPE.RECT_START:uc(_,z,Be.boxMargin,Be.boxMargin,ce=>{let te=ce.message;te||(te=l?.rectBkgColor||l?.actorBkg||"rgba(128, 128, 128, 0.5)"),Tt.newLoop(void 0,te)});break;case n.db.LINETYPE.RECT_END:j=Tt.endLoop(),G.push(j),Tt.models.addLoop(j),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:uc(_,z,Be.boxMargin,Be.boxMargin+Be.boxTextMargin,ce=>Tt.newLoop(ce));break;case n.db.LINETYPE.OPT_END:j=Tt.endLoop(),await _n.drawLoop(f,j,"opt",Be,z),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos()),Tt.models.addLoop(j);break;case n.db.LINETYPE.ALT_START:uc(_,z,Be.boxMargin,Be.boxMargin+Be.boxTextMargin,ce=>Tt.newLoop(ce));break;case n.db.LINETYPE.ALT_ELSE:uc(_,z,Be.boxMargin+Be.boxTextMargin,Be.boxMargin,ce=>Tt.addSectionToLoop(ce));break;case n.db.LINETYPE.ALT_END:j=Tt.endLoop(),await _n.drawLoop(f,j,"alt",Be,z),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos()),Tt.models.addLoop(j);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:uc(_,z,Be.boxMargin,Be.boxMargin+Be.boxTextMargin,ce=>Tt.newLoop(ce)),Tt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:uc(_,z,Be.boxMargin+Be.boxTextMargin,Be.boxMargin,ce=>Tt.addSectionToLoop(ce));break;case n.db.LINETYPE.PAR_END:j=Tt.endLoop(),await _n.drawLoop(f,j,"par",Be,z),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos()),Tt.models.addLoop(j);break;case n.db.LINETYPE.AUTONUMBER:B=z.message.start||B,$=z.message.step||$,z.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:uc(_,z,Be.boxMargin,Be.boxMargin+Be.boxTextMargin,ce=>Tt.newLoop(ce));break;case n.db.LINETYPE.CRITICAL_OPTION:uc(_,z,Be.boxMargin+Be.boxTextMargin,Be.boxMargin,ce=>Tt.addSectionToLoop(ce));break;case n.db.LINETYPE.CRITICAL_END:j=Tt.endLoop(),await _n.drawLoop(f,j,"critical",Be,z),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos()),Tt.models.addLoop(j);break;case n.db.LINETYPE.BREAK_START:uc(_,z,Be.boxMargin,Be.boxMargin+Be.boxTextMargin,ce=>Tt.newLoop(ce));break;case n.db.LINETYPE.BREAK_END:j=Tt.endLoop(),await _n.drawLoop(f,j,"break",Be,z),Tt.bumpVerticalPos(j.stopy-Tt.getVerticalPos()),Tt.models.addLoop(j);break;default:try{Z=z.msgModel,Z.starty=Tt.getVerticalPos(),Z.sequenceIndex=B,Z.sequenceVisible=n.db.showSequenceNumbers(),Z.id=z.id,Z.from=z.from,Z.to=z.to;let ce=await Lnt(f,Z);Nnt(z,Z,ce,I,p,m,g),O.push({messageModel:Z,lineStartY:ce,msg:z}),Tt.models.addMessage(Z)}catch(ce){H.error("error while drawing message",ce)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(z.type)&&(B=Math.round((B+$)*100)/100),I++}H.debug("createdActors",m),H.debug("destroyedActors",g),await O7(f,p,x,!1,t,n,S);for(let z of O)await Int(f,z.messageModel,z.lineStartY,n,z.msg,t);Be.mirrorActors&&await O7(f,p,x,!0,t,n,S),G.forEach(z=>_n.drawBackgroundRect(f,z)),D7(f,p,x,Be);for(let z of Tt.models.boxes){z.height=Tt.getVerticalPos()-z.y,Tt.insert(z.x,z.y,z.x+z.width,z.height);let j=Be.boxMargin*2;z.startx=z.x-j,z.starty=z.y-j*.25,z.stopx=z.startx+z.width+2*j,z.stopy=z.starty+z.height+j*.75,z.stroke="rgb(0,0,0, 0.5)",_n.drawBox(f,z,Be)}C&&Tt.bumpVerticalPos(Be.boxMargin);let F=FCe(f,p,x,d),{bounds:N}=Tt.getBounds();N.startx===void 0&&(N.startx=0),N.starty===void 0&&(N.starty=0),N.stopx===void 0&&(N.stopx=0),N.stopy===void 0&&(N.stopy=0);let D=N.stopy-N.starty;D2,p=a(x=>u?-x:x,"adjustValue");e.from===e.to?d=h:(e.activate&&!f&&(d+=p(Be.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=p(3)));let m=[i,s,o,l],g=Math.abs(h-d);e.wrap&&e.message&&(e.message=Xt.wrapLabel(e.message,gt.getMax(g+2*Be.wrapPadding,Be.width),dp(Be)));let y=Xt.calculateTextDimensions(e.message,dp(Be));return{width:gt.getMax(e.wrap?0:y.width+2*Be.wrapPadding,g+2*Be.wrapPadding,Be.width),height:0,startx:h,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},"buildMessageModel"),Wnt=a(async function(e,t,r,n){let i={},s=[],o,l,u;for(let h of e){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(o=s.pop(),i[o.id]=o,i[h.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let f=t.get(h.from?h.from:h.to.actor),p=H_(h.from?h.from:h.to.actor).length,m=f.x+f.width/2+(p-1)*Be.activationWidth/2,g={startx:m,stopx:m+Be.activationWidth,actor:h.from,enabled:!0};Tt.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let f=Tt.activations.map(p=>p.actor).lastIndexOf(h.from);Tt.activations.splice(f,1).splice(0,1)}break}h.placement!==void 0?(l=await $nt(h,t,n),h.noteModel=l,s.forEach(f=>{o=f,o.from=gt.getMin(o.from,l.startx),o.to=gt.getMax(o.to,l.startx+l.width),o.width=gt.getMax(o.width,Math.abs(o.from-o.to))-Be.labelBoxWidth})):(u=Unt(h,t,n),h.msgModel=u,u.startx&&u.stopx&&s.length>0&&s.forEach(f=>{if(o=f,u.startx===u.stopx){let p=t.get(h.from),m=t.get(h.to);o.from=gt.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=gt.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=gt.getMax(o.width,Math.abs(o.to-o.from))-Be.labelBoxWidth}else o.from=gt.getMin(u.startx,o.from),o.to=gt.getMax(u.stopx,o.to),o.width=gt.getMax(o.width,u.width)-Be.labelBoxWidth}))}return Tt.activations=[],H.debug("Loop type widths:",i),i},"calculateLoopBounds"),zCe={bounds:Tt,drawActors:O7,drawActorsPopup:FCe,setConf:GCe,draw:Mnt}});var WCe={};ir(WCe,{diagram:()=>jnt});var jnt,jCe=w(()=>{"use strict";vCe();_7();_Ce();Gt();UCe();jnt={parser:ECe,get db(){return new U_},renderer:zCe,styles:wCe,init:a(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,xd({sequence:{wrap:e.wrap}}))},"init")}});var P7,YCe,KCe=w(()=>{"use strict";P7=(function(){var e=a(function(J,L,W,ae){for(W=W||{},ae=J.length;ae--;W[J[ae]]=L);return W},"o"),t=[1,18],r=[1,19],n=[1,20],i=[1,41],s=[1,26],o=[1,42],l=[1,24],u=[1,25],h=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],x=[1,38],b=[1,27],T=[1,28],C=[1,29],v=[1,30],E=[1,31],S=[1,44],_=[1,46],A=[1,43],B=[1,47],$=[1,9],O=[1,8,9],G=[1,58],I=[1,59],F=[1,60],N=[1,61],D=[1,62],M=[1,63],R=[1,64],P=[1,8,9,41],V=[1,77],U=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],z=[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],j=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Z=[13,60,68,69,70,71,72,86,100,102,103],ce=[1,103],te=[1,121],me=[1,117],he=[1,113],we=[1,119],ye=[1,114],ke=[1,115],Fe=[1,116],Ge=[1,118],Me=[1,120],at=[22,50,60,61,82,86,87,88,89,90],ht=[1,128],ge=[12,39],De=[1,8,9,39,41,44,46],Le=[1,8,9,22],Ie=[1,153],Q=[1,8,9,61],ne=[1,8,9,22,50,60,61,82,86,87,88,89,90],re={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,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:a(function(L,W,ae,X,xe,ee,Y){var q=ee.length-1;switch(xe){case 8:this.$=ee[q-1];break;case 9:case 10:case 13:case 15:this.$=ee[q];break;case 11:case 14:this.$=ee[q-2]+"."+ee[q];break;case 12:case 16:this.$=ee[q-1]+ee[q];break;case 17:case 18:this.$=ee[q-1]+"~"+ee[q]+"~";break;case 19:X.addRelation(ee[q]);break;case 20:ee[q-1].title=X.cleanupLabel(ee[q]),X.addRelation(ee[q-1]);break;case 31:this.$=ee[q].trim(),X.setAccTitle(this.$);break;case 32:case 33:this.$=ee[q].trim(),X.setAccDescription(this.$);break;case 34:X.addClassesToNamespace(ee[q-3],ee[q-1][0],ee[q-1][1]),X.popNamespace();break;case 35:X.addClassesToNamespace(ee[q-4],ee[q-1][0],ee[q-1][1]),X.popNamespace();break;case 36:this.$=X.addNamespace(ee[q]);break;case 37:this.$=X.addNamespace(ee[q-1],ee[q]);break;case 38:this.$=[[ee[q]],[]];break;case 39:this.$=[[ee[q-1]],[]];break;case 40:ee[q][0].unshift(ee[q-2]),this.$=ee[q];break;case 41:this.$=[[],[ee[q]]];break;case 42:this.$=[[],[ee[q-1]]];break;case 43:ee[q][1].unshift(ee[q-2]),this.$=ee[q];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=ee[q];break;case 48:X.setCssClass(ee[q-2],ee[q]);break;case 49:X.addMembers(ee[q-3],ee[q-1]);break;case 51:X.setCssClass(ee[q-5],ee[q-3]),X.addMembers(ee[q-5],ee[q-1]);break;case 52:X.addAnnotation(ee[q-3],ee[q-1]);break;case 53:X.addAnnotation(ee[q-6],ee[q-4]),X.addMembers(ee[q-6],ee[q-1]);break;case 54:X.addAnnotation(ee[q-5],ee[q-3]);break;case 55:this.$=ee[q],X.addClass(ee[q]);break;case 56:this.$=ee[q-1],X.addClass(ee[q-1]),X.setClassLabel(ee[q-1],ee[q]);break;case 60:X.addAnnotation(ee[q],ee[q-2]);break;case 61:case 74:this.$=[ee[q]];break;case 62:ee[q].push(ee[q-1]),this.$=ee[q];break;case 63:break;case 64:X.addMember(ee[q-1],X.cleanupLabel(ee[q]));break;case 65:break;case 66:break;case 67:this.$={id1:ee[q-2],id2:ee[q],relation:ee[q-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:ee[q-3],id2:ee[q],relation:ee[q-1],relationTitle1:ee[q-2],relationTitle2:"none"};break;case 69:this.$={id1:ee[q-3],id2:ee[q],relation:ee[q-2],relationTitle1:"none",relationTitle2:ee[q-1]};break;case 70:this.$={id1:ee[q-4],id2:ee[q],relation:ee[q-2],relationTitle1:ee[q-3],relationTitle2:ee[q-1]};break;case 71:this.$=X.addNote(ee[q],ee[q-1]);break;case 72:this.$=X.addNote(ee[q]);break;case 73:this.$=ee[q-2],X.defineClass(ee[q-1],ee[q]);break;case 75:this.$=ee[q-2].concat([ee[q]]);break;case 76:X.setDirection("TB");break;case 77:X.setDirection("BT");break;case 78:X.setDirection("RL");break;case 79:X.setDirection("LR");break;case 80:this.$={type1:ee[q-2],type2:ee[q],lineType:ee[q-1]};break;case 81:this.$={type1:"none",type2:ee[q],lineType:ee[q-1]};break;case 82:this.$={type1:ee[q-1],type2:"none",lineType:ee[q]};break;case 83:this.$={type1:"none",type2:"none",lineType:ee[q]};break;case 84:this.$=X.relationType.AGGREGATION;break;case 85:this.$=X.relationType.EXTENSION;break;case 86:this.$=X.relationType.COMPOSITION;break;case 87:this.$=X.relationType.DEPENDENCY;break;case 88:this.$=X.relationType.LOLLIPOP;break;case 89:this.$=X.lineType.LINE;break;case 90:this.$=X.lineType.DOTTED_LINE;break;case 91:case 97:this.$=ee[q-2],X.setClickEvent(ee[q-1],ee[q]);break;case 92:case 98:this.$=ee[q-3],X.setClickEvent(ee[q-2],ee[q-1]),X.setTooltip(ee[q-2],ee[q]);break;case 93:this.$=ee[q-2],X.setLink(ee[q-1],ee[q]);break;case 94:this.$=ee[q-3],X.setLink(ee[q-2],ee[q-1],ee[q]);break;case 95:this.$=ee[q-3],X.setLink(ee[q-2],ee[q-1]),X.setTooltip(ee[q-2],ee[q]);break;case 96:this.$=ee[q-4],X.setLink(ee[q-3],ee[q-2],ee[q]),X.setTooltip(ee[q-3],ee[q-1]);break;case 99:this.$=ee[q-3],X.setClickEvent(ee[q-2],ee[q-1],ee[q]);break;case 100:this.$=ee[q-4],X.setClickEvent(ee[q-3],ee[q-2],ee[q-1]),X.setTooltip(ee[q-3],ee[q]);break;case 101:this.$=ee[q-3],X.setLink(ee[q-2],ee[q]);break;case 102:this.$=ee[q-4],X.setLink(ee[q-3],ee[q-1],ee[q]);break;case 103:this.$=ee[q-4],X.setLink(ee[q-3],ee[q-1]),X.setTooltip(ee[q-3],ee[q]);break;case 104:this.$=ee[q-5],X.setLink(ee[q-4],ee[q-2],ee[q]),X.setTooltip(ee[q-4],ee[q-1]);break;case 105:this.$=ee[q-2],X.setCssStyle(ee[q-1],ee[q]);break;case 106:X.setCssClass(ee[q-1],ee[q]);break;case 107:this.$=[ee[q]];break;case 108:ee[q-2].push(ee[q]),this.$=ee[q-2];break;case 110:this.$=ee[q-1]+ee[q];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:t,35:r,37:n,38:22,42:i,43:23,46:s,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:x,75:b,76:T,78:C,82:v,83:E,86:S,100:_,102:A,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e($,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:G,69:I,70:F,71:N,72:D,73:M,74:R}),{39:[1,65]},e(P,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(O,[2,65]),e(O,[2,66]),{16:69,60:p,86:S,100:_,102:A},{16:39,17:40,19:70,60:p,86:S,100:_,102:A,103:B},{16:39,17:40,19:71,60:p,86:S,100:_,102:A,103:B},{16:39,17:40,19:72,60:p,86:S,100:_,102:A,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:S,100:_,102:A,103:B},{13:V,55:76},{58:78,60:[1,79]},e(O,[2,76]),e(O,[2,77]),e(O,[2,78]),e(O,[2,79]),e(U,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:S,100:_,102:A,103:B}),e(U,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:S,100:_,102:A,103:B},{16:39,17:40,19:87,60:p,86:S,100:_,102:A,103:B},e(z,[2,133]),e(z,[2,134]),e(z,[2,135]),e(z,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e($,[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:t,35:r,37:n,42:i,46:s,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:x,75:b,76:T,78:C,82:v,83:E,86:S,100:_,102:A,103:B}),{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:t,35:r,37:n,38:22,42:i,43:23,46:s,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:x,75:b,76:T,78:C,82:v,83:E,86:S,100:_,102:A,103:B},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:S,100:_,102:A,103:B},{53:92,66:56,67:57,68:G,69:I,70:F,71:N,72:D,73:M,74:R},e(O,[2,64]),{67:93,73:M,74:R},e(j,[2,83],{66:94,68:G,69:I,70:F,71:N,72:D}),e(K,[2,84]),e(K,[2,85]),e(K,[2,86]),e(K,[2,87]),e(K,[2,88]),e(Z,[2,89]),e(Z,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:o,54:h,56:d},{16:100,60:p,86:S,100:_,102:A},{41:[1,102],45:101,51:ce},{16:104,60:p,86:S,100:_,102:A},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:te,50:me,59:110,60:he,82:we,84:111,85:112,86:ye,87:ke,88:Fe,89:Ge,90:Me},{60:[1,122]},{13:V,55:123},e(P,[2,72]),e(P,[2,138]),{22:te,50:me,59:124,60:he,61:[1,125],82:we,84:111,85:112,86:ye,87:ke,88:Fe,89:Ge,90:Me},e(at,[2,74]),{16:39,17:40,19:126,60:p,86:S,100:_,102:A,103:B},e(U,[2,16]),e(U,[2,17]),e(U,[2,18]),{11:127,12:ht,39:[2,36]},e(ge,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:S,100:_,102:A,103:B}),e(ge,[2,10]),e(De,[2,55],{11:131,12:ht}),e($,[2,7]),{9:[1,132]},e(Le,[2,67]),{16:39,17:40,19:133,60:p,86:S,100:_,102:A,103:B},{13:[1,135],16:39,17:40,19:134,60:p,86:S,100:_,102:A,103:B},e(j,[2,82],{66:136,68:G,69:I,70:F,71:N,72:D}),e(j,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:o,54:h,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(P,[2,48],{39:[1,142]}),{41:[1,143]},e(P,[2,50]),{41:[2,61],45:144,51:ce},{47:[1,145]},{16:39,17:40,19:146,60:p,86:S,100:_,102:A,103:B},e(O,[2,91],{13:[1,147]}),e(O,[2,93],{13:[1,149],77:[1,148]}),e(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(O,[2,105],{61:Ie}),e(Q,[2,107],{85:154,22:te,50:me,60:he,82:we,86:ye,87:ke,88:Fe,89:Ge,90:Me}),e(ne,[2,109]),e(ne,[2,111]),e(ne,[2,112]),e(ne,[2,113]),e(ne,[2,114]),e(ne,[2,115]),e(ne,[2,116]),e(ne,[2,117]),e(ne,[2,118]),e(ne,[2,119]),e(O,[2,106]),e(P,[2,71]),e(O,[2,73],{61:Ie}),{60:[1,155]},e(U,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:S,100:_,102:A,103:B},e(ge,[2,12]),e(De,[2,56]),{1:[2,4]},e(Le,[2,69]),e(Le,[2,68]),{16:39,17:40,19:158,60:p,86:S,100:_,102:A,103:B},e(j,[2,80]),e(P,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:o,54:h,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:o,54:h,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:o,54:h,56:d},{45:163,51:ce},e(P,[2,49]),{41:[2,62]},e(P,[2,52],{39:[1,164]}),e(O,[2,60]),e(O,[2,92]),e(O,[2,94]),e(O,[2,95],{77:[1,165]}),e(O,[2,98]),e(O,[2,99],{13:[1,166]}),e(O,[2,101],{13:[1,168],77:[1,167]}),{22:te,50:me,60:he,82:we,84:169,85:112,86:ye,87:ke,88:Fe,89:Ge,90:Me},e(ne,[2,110]),e(at,[2,75]),{14:[1,170]},e(ge,[2,11]),e(Le,[2,70]),e(P,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ce},e(O,[2,96]),e(O,[2,100]),e(O,[2,102]),e(O,[2,103],{77:[1,174]}),e(Q,[2,108],{85:154,22:te,50:me,60:he,82:we,86:ye,87:ke,88:Fe,89:Ge,90:Me}),e(De,[2,8]),e(P,[2,51]),{41:[1,175]},e(P,[2,54]),e(O,[2,104]),e(P,[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:a(function(L,W){if(W.recoverable)this.trace(L);else{var ae=new Error(L);throw ae.hash=W,ae}},"parseError"),parse:a(function(L){var W=this,ae=[0],X=[],xe=[null],ee=[],Y=this.table,q="",ve=0,Se=0,Ae=0,Ee=2,Qe=1,qe=ee.slice.call(arguments,1),lt=Object.create(this.lexer),Ve={yy:{}};for(var Ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ye)&&(Ve.yy[Ye]=this.yy[Ye]);lt.setInput(L,Ve.yy),Ve.yy.lexer=lt,Ve.yy.parser=this,typeof lt.yylloc>"u"&&(lt.yylloc={});var Je=lt.yylloc;ee.push(Je);var Oe=lt.options&<.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(xt){ae.length=ae.length-2*xt,xe.length=xe.length-xt,ee.length=ee.length-xt}a(Vt,"popStack");function Ce(){var xt;return xt=X.pop()||lt.lex()||Qe,typeof xt!="number"&&(xt instanceof Array&&(X=xt,xt=X.pop()),xt=W.symbols_[xt]||xt),xt}a(Ce,"lex");for(var Ut,Re,vt,Zt,_t,qt,At={},zt,ot,Rt,Ar;;){if(vt=ae[ae.length-1],this.defaultActions[vt]?Zt=this.defaultActions[vt]:((Ut===null||typeof Ut>"u")&&(Ut=Ce()),Zt=Y[vt]&&Y[vt][Ut]),typeof Zt>"u"||!Zt.length||!Zt[0]){var ie="";Ar=[];for(zt in Y[vt])this.terminals_[zt]&&zt>Ee&&Ar.push("'"+this.terminals_[zt]+"'");lt.showPosition?ie="Parse error on line "+(ve+1)+`: +`+lt.showPosition()+` +Expecting `+Ar.join(", ")+", got '"+(this.terminals_[Ut]||Ut)+"'":ie="Parse error on line "+(ve+1)+": Unexpected "+(Ut==Qe?"end of input":"'"+(this.terminals_[Ut]||Ut)+"'"),this.parseError(ie,{text:lt.match,token:this.terminals_[Ut]||Ut,line:lt.yylineno,loc:Je,expected:Ar})}if(Zt[0]instanceof Array&&Zt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+vt+", token: "+Ut);switch(Zt[0]){case 1:ae.push(Ut),xe.push(lt.yytext),ee.push(lt.yylloc),ae.push(Zt[1]),Ut=null,Re?(Ut=Re,Re=null):(Se=lt.yyleng,q=lt.yytext,ve=lt.yylineno,Je=lt.yylloc,Ae>0&&Ae--);break;case 2:if(ot=this.productions_[Zt[1]][1],At.$=xe[xe.length-ot],At._$={first_line:ee[ee.length-(ot||1)].first_line,last_line:ee[ee.length-1].last_line,first_column:ee[ee.length-(ot||1)].first_column,last_column:ee[ee.length-1].last_column},Oe&&(At._$.range=[ee[ee.length-(ot||1)].range[0],ee[ee.length-1].range[1]]),qt=this.performAction.apply(At,[q,Se,ve,Ve.yy,Zt[1],xe,ee].concat(qe)),typeof qt<"u")return qt;ot&&(ae=ae.slice(0,-1*ot*2),xe=xe.slice(0,-1*ot),ee=ee.slice(0,-1*ot)),ae.push(this.productions_[Zt[1]][0]),xe.push(At.$),ee.push(At._$),Rt=Y[ae[ae.length-2]][ae[ae.length-1]],ae.push(Rt);break;case 3:return!0}}return!0},"parse")},se=(function(){var J={EOF:1,parseError:a(function(W,ae){if(this.yy.parser)this.yy.parser.parseError(W,ae);else throw new Error(W)},"parseError"),setInput:a(function(L,W){return this.yy=W||this.yy||{},this._input=L,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var W=L.match(/(?:\r\n?|\n).*/g);return W?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),L},"input"),unput:a(function(L){var W=L.length,ae=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-W),this.offset-=W;var X=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),ae.length-1&&(this.yylineno-=ae.length-1);var xe=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:ae?(ae.length===X.length?this.yylloc.first_column:0)+X[X.length-ae.length].length-ae[0].length:this.yylloc.first_column-W},this.options.ranges&&(this.yylloc.range=[xe[0],xe[0]+this.yyleng-W]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(L){this.unput(this.match.slice(L))},"less"),pastInput:a(function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var L=this.pastInput(),W=new Array(L.length+1).join("-");return L+this.upcomingInput()+` +`+W+"^"},"showPosition"),test_match:a(function(L,W){var ae,X,xe;if(this.options.backtrack_lexer&&(xe={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&&(xe.yylloc.range=this.yylloc.range.slice(0))),X=L[0].match(/(?:\r\n?|\n).*/g),X&&(this.yylineno+=X.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:X?X[X.length-1].length-X[X.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+L[0].length},this.yytext+=L[0],this.match+=L[0],this.matches=L,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(L[0].length),this.matched+=L[0],ae=this.performAction.call(this,this.yy,this,W,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ae)return ae;if(this._backtrack){for(var ee in xe)this[ee]=xe[ee];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var L,W,ae,X;this._more||(this.yytext="",this.match="");for(var xe=this._currentRules(),ee=0;eeW[0].length)){if(W=ae,X=ee,this.options.backtrack_lexer){if(L=this.test_match(ae,xe[ee]),L!==!1)return L;if(this._backtrack){W=!1;continue}else return!1}else if(!this.options.flex)break}return W?(L=this.test_match(W,xe[X]),L!==!1?L:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var W=this.next();return W||this.lex()},"lex"),begin:a(function(W){this.conditionStack.push(W)},"begin"),popState:a(function(){var W=this.conditionStack.length-1;return W>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(W){return W=this.conditionStack.length-1-Math.abs(W||0),W>=0?this.conditionStack[W]:"INITIAL"},"topState"),pushState:a(function(W){this.begin(W)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(W,ae,X,xe){var ee=xe;switch(X){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 J})();re.lexer=se;function fe(){this.yy={}}return a(fe,"Parser"),fe.prototype=re,re.Parser=fe,new fe})();P7.parser=P7;YCe=P7});var XCe,pT,QCe=w(()=>{"use strict";Gt();Ir();XCe=["#","+","~","-",""],pT=class{static{a(this,"ClassMember")}constructor(t,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let n=vr(t,_e());this.parseMember(n)}getDisplayDetails(){let t=this.visibility+Cl(this.id);this.memberType==="method"&&(t+=`(${Cl(this.parameters.trim())})`,this.returnType&&(t+=" : "+Cl(this.returnType))),t=t.trim();let r=this.parseClassifier();return{displayText:t,cssStyle:r}}parseMember(t){let r="";if(this.memberType==="method"){let s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){let o=s[1]?s[1].trim():"";if(XCe.includes(o)&&(this.visibility=o),this.id=s[2],this.parameters=s[3]?s[3].trim():"",r=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",r===""){let l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(r=l,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let i=t.length,s=t.substring(0,1),o=t.substring(i-1);XCe.includes(s)&&(this.visibility=s),/[$*]/.exec(o)&&(r=o),this.id=t.substring(this.visibility===""?0:1,r===""?i:i-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let n=`${this.visibility?"\\"+this.visibility:""}${Cl(this.id)}${this.memberType==="method"?`(${Cl(this.parameters)})${this.returnType?" : "+Cl(this.returnType):""}`:""}`;this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}});var Y_,ZCe,fp,K_,JCe=w(()=>{"use strict";Lr();bt();Gt();Ir();jt();fn();Mc();QCe();md();Y_="classId-",ZCe=0,fp=a(e=>gt.sanitizeText(e,_e()),"sanitizeText"),K_=class e{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=a(t=>{let r=Yu();st(t).select("svg").selectAll("g").filter(function(){return st(this).attr("title")!==null}).on("mouseover",s=>{let o=st(s.currentTarget),l=o.attr("title");if(!l)return;let u=s.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(Es.sanitize(l)).style("left",`${window.scrollX+u.left+u.width/2}px`).style("top",`${window.scrollY+u.bottom+4}px`),o.classed("hover",!0)}).on("mouseout",s=>{r.transition().duration(500).style("opacity",0),st(s.currentTarget).classed("hover",!1)})},"setupToolTips");this.direction="TB";this.setAccTitle=hr;this.getAccTitle=gr;this.setAccDescription=fr;this.getAccDescription=yr;this.setDiagramTitle=Cr;this.getDiagramTitle=xr;this.getConfig=a(()=>_e().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{a(this,"ClassDB")}splitClassNameAndType(t){let r=gt.sanitizeText(t,_e()),n="",i=r;if(r.indexOf("~")>0){let s=r.split("~");i=fp(s[0]),n=fp(s[1])}return{className:i,type:n}}setClassLabel(t,r){let n=gt.sanitizeText(t,_e());r&&(r=fp(r));let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=r,this.classes.get(i).text=`${r}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){let r=gt.sanitizeText(t,_e()),{className:n,type:i}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let s=gt.sanitizeText(n,_e());this.classes.set(s,{id:s,type:i,label:s,text:`${s}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Y_+s+"-"+ZCe}),ZCe++}addInterface(t,r){let n={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(n)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){let r=gt.sanitizeText(t,_e());if(this.classes.has(r)){let n=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${n}`:n}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",or()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){let r=typeof t=="number"?`note${t}`:t;return this.notes.get(r)}getNotes(){return this.notes}addRelation(t){H.debug("Adding relation: "+JSON.stringify(t));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!r.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!r.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=gt.sanitizeText(t.relationTitle1.trim(),_e()),t.relationTitle2=gt.sanitizeText(t.relationTitle2.trim(),_e()),this.relations.push(t)}addAnnotation(t,r){let n=this.splitClassNameAndType(t).className;this.classes.get(n).annotations.push(r)}addMember(t,r){this.addClass(t);let n=this.splitClassNameAndType(t).className,i=this.classes.get(n);if(typeof r=="string"){let s=r.trim();s.startsWith("<<")&&s.endsWith(">>")?i.annotations.push(fp(s.substring(2,s.length-2))):s.indexOf(")")>0?i.methods.push(new pT(s,"method")):s&&i.members.push(new pT(s,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(t,n)))}addNote(t,r){let n=this.notes.size,i={id:`note${n}`,class:r,text:t,index:n};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),fp(t.trim())}setCssClass(t,r){t.split(",").forEach(n=>{let i=n;/\d/.exec(n[0])&&(i=Y_+i),i=this.splitClassNameAndType(i).className;let s=this.classes.get(i);s&&(s.cssClasses+=" "+r)})}defineClass(t,r){for(let n of t){let i=this.styleClasses.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,i)),r&&r.forEach(s=>{if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)}),this.classes.forEach(s=>{s.cssClasses.includes(n)&&s.styles.push(...r.flatMap(o=>o.split(",")))})}}setTooltip(t,r){t.split(",").forEach(n=>{if(r!==void 0){let i=this.splitClassNameAndType(n).className,s=this.classes.get(i);s&&(s.tooltip=fp(r))}})}getTooltip(t,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,r,n){let i=_e();t.split(",").forEach(s=>{let o=s;/\d/.exec(s[0])&&(o=Y_+o),o=this.splitClassNameAndType(o).className;let l=this.classes.get(o);l&&(l.link=Xt.formatUrl(r,i),i.securityLevel==="sandbox"?l.linkTarget="_top":typeof n=="string"?l.linkTarget=fp(n):l.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFunc(i,r,n);let s=this.splitClassNameAndType(i).className,o=this.classes.get(s);o&&(o.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,r,n){let i=gt.sanitizeText(t,_e());if(_e().securityLevel!=="loose"||r===void 0)return;let o=this.splitClassNameAndType(i).className;if(this.classes.has(o)){let l=[];if(typeof n=="string"){l=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u{let u=this.lookUpDomId(o),h=document.querySelector(`[id="${u}"]`);h!==null&&h.addEventListener("click",()=>{Xt.runFunc(r,...l)},!1)})}}bindFunctions(t){this.functions.forEach(r=>{r(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,r){let n=r.at(-1);return n?`${n}.${t}`:t}static getAncestorIds(t){let r=t.split("."),n=new Array(r.length);n[0]=r[0];for(let i=1;i0?s[o-1]:void 0,h=o===s.length-1,d=h&&r?r:i[o];this.namespaces.has(l)?h&&(this.namespaces.get(l).explicit=!0):this.namespaces.set(l,this.createNamespaceNode(l,d,u,h)),u&&this.linkParentChild(u,l)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r,n){if(this.namespaces.has(t)){for(let i of r){let{className:s}=this.splitClassNameAndType(i),o=this.getClass(s);o.parent=t,this.namespaces.get(t).classes.set(s,o)}for(let i of n){let s=this.getNote(i);s.parent=t,this.namespaces.get(t).notes.set(i,s)}}}setCssStyle(t,r){let n=this.classes.get(t);if(!(!r||!n))for(let i of r)i.includes(",")?n.styles.push(...i.split(",")):n.styles.push(i)}getArrowMarker(t){let r;switch(t){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(t){let r=t;for(;r;){let n=this.namespaces.get(r);if(!n)return;if(n.explicit)return r;r=n.parent}}getData(){let t=[],r=[],n=_e(),i=n.class?.hierarchicalNamespaces??!0;for(let l of this.namespaces.values()){if(!i&&!l.explicit)continue;let u={id:l.id,label:i?l.label:l.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look,parentId:i?l.parent:void 0};t.push(u)}let s=0;for(let l of this.classes.values()){let u=i?l.parent:this.resolveExplicitAncestor(l.parent),h={...l,type:void 0,isGroup:!1,parentId:u,look:n.look,colorIndex:s++};t.push(h)}for(let l of this.notes.values()){let u=i?l.parent:this.resolveExplicitAncestor(l.parent),h={id:l.id,label:l.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:u,labelType:"markdown"};t.push(h);let d=this.classes.get(l.class)?.id;if(d){let f={id:`edgeNote${l.index}`,start:l.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(f)}}for(let l of this.interfaces){let u={id:l.id,label:l.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};t.push(u)}let o=0;for(let l of this.relations){o++;let u={id:oo(l.id1,l.id2,{prefix:"id",counter:o}),start:l.id1,end:l.id2,type:"normal",label:l.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(l.relation.type1),arrowTypeEnd:this.getArrowMarker(l.relation.type2),startLabelRight:l.relationTitle1==="none"?"":l.relationTitle1,endLabelLeft:l.relationTitle2==="none"?"":l.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:l.style||"",pattern:l.relation.lineType==1?"dashed":"solid",look:n.look,labelType:"markdown"};r.push(u)}return{nodes:t,edges:r,other:{},config:n,direction:this.getDirection()}}}});var Knt,Xnt,eke,tke=w(()=>{"use strict";Tf();Wi();Knt=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Di(e.look),s=zi(r),o="";for(let l=0;l`${Knt(e)} + g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${e.noteTextColor}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: ${e.strokeWidth}; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopEnd"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} + ${Co()} +`,"getStyles"),eke=Xnt});var Qnt,Znt,Jnt,rke,nke=w(()=>{"use strict";Gt();bt();rh();Yc();Kc();jt();Qnt=a((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Znt=a(function(e,t){return t.db.getClasses()},"getClasses"),Jnt=a(async function(e,t,r,n){H.info("REF0:"),H.info("Drawing class diagram (v3)",t);let{securityLevel:i,state:s,layout:o}=_e();n.db.setDiagramId(t);let l=n.db.getData(),u=ca(t,i);l.type=n.type,l.layoutAlgorithm=Ta(o),l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=["aggregation","extension","composition","dependency","lollipop"],l.diagramId=t,await ba(l,u);let h=8;Xt.insertTitle(u,"classDiagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Is(u,h,"classDiagram",s?.useMaxWidth??!0)},"draw"),rke={getClasses:Znt,draw:Jnt,getDir:Qnt}});var ike={};ir(ike,{diagram:()=>eit});var eit,ske=w(()=>{"use strict";KCe();JCe();tke();nke();eit={parser:YCe,get db(){return new K_},renderer:rke,styles:eke,init:a(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var B7,lke,cke=w(()=>{"use strict";B7=(function(){var e=a(function(P,V,U,z){for(U=U||{},z=P.length;z--;U[P[z]]=V);return U},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],s=[1,9],o=[1,11],l=[1,16],u=[1,17],h=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],g=[1,22],y=[1,23],x=[1,24],b=[1,26],T=[1,27],C=[1,28],v=[1,29],E=[1,30],S=[1,31],_=[1,32],A=[1,35],B=[1,36],$=[1,37],O=[1,38],G=[1,34],I=[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],F=[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],N=[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],D={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,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:a(function(V,U,z,j,K,Z,ce){var te=Z.length-1;switch(K){case 3:return j.setRootDoc(Z[te]),Z[te];break;case 4:this.$=[];break;case 5:Z[te]!="nl"&&(Z[te-1].push(Z[te]),this.$=Z[te-1]);break;case 6:case 7:this.$=Z[te];break;case 8:this.$="nl";break;case 12:this.$=Z[te];break;case 13:let ye=Z[te-1];ye.description=j.trimColon(Z[te]),this.$=ye;break;case 14:this.$={stmt:"relation",state1:Z[te-2],state2:Z[te]};break;case 15:let ke=j.trimColon(Z[te]);this.$={stmt:"relation",state1:Z[te-3],state2:Z[te-1],description:ke};break;case 19:this.$={stmt:"state",id:Z[te-3],type:"default",description:"",doc:Z[te-1]};break;case 20:var me=Z[te],he=Z[te-2].trim();if(Z[te].match(":")){var we=Z[te].split(":");me=we[0],he=[he,we[1]]}this.$={stmt:"state",id:me,type:"default",description:he};break;case 21:this.$={stmt:"state",id:Z[te-3],type:"default",description:Z[te-5],doc:Z[te-1]};break;case 22:this.$={stmt:"state",id:Z[te],type:"fork"};break;case 23:this.$={stmt:"state",id:Z[te],type:"join"};break;case 24:this.$={stmt:"state",id:Z[te],type:"choice"};break;case 25:this.$={stmt:"state",id:j.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:Z[te-1].trim(),note:{position:Z[te-2].trim(),text:Z[te].trim()}};break;case 29:this.$=Z[te].trim(),j.setAccTitle(this.$);break;case 30:case 31:this.$=Z[te].trim(),j.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:Z[te-3],url:Z[te-2],tooltip:Z[te-1]};break;case 33:this.$={stmt:"click",id:Z[te-3],url:Z[te-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:Z[te-1].trim(),classes:Z[te].trim()};break;case 36:this.$={stmt:"style",id:Z[te-1].trim(),styleClass:Z[te].trim()};break;case 37:this.$={stmt:"applyClass",id:Z[te-1].trim(),styleClass:Z[te].trim()};break;case 38:j.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:j.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:j.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:j.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:Z[te].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:Z[te-2].trim(),classes:[Z[te].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:Z[te-2].trim(),classes:[Z[te].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:b,35:T,37:C,38:v,41:E,45:S,48:_,51:A,52:B,53:$,54:O,57:G},e(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:b,35:T,37:C,38:v,41:E,45:S,48:_,51:A,52:B,53:$,54:O,57:G},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,10]),e(I,[2,11]),e(I,[2,12],{14:[1,40],15:[1,41]}),e(I,[2,16]),{18:[1,42]},e(I,[2,18],{20:[1,43]}),{23:[1,44]},e(I,[2,22]),e(I,[2,23]),e(I,[2,24]),e(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(I,[2,28]),{34:[1,49]},{36:[1,50]},e(I,[2,31]),{13:51,24:f,57:G},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(F,[2,44],{58:[1,56]}),e(F,[2,45],{58:[1,57]}),e(I,[2,38]),e(I,[2,39]),e(I,[2,40]),e(I,[2,41]),e(I,[2,6]),e(I,[2,13]),{13:58,24:f,57:G},e(I,[2,17]),e(N,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(I,[2,29]),e(I,[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]},e(I,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,72],22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:b,35:T,37:C,38:v,41:E,45:S,48:_,51:A,52:B,53:$,54:O,57:G},e(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(I,[2,34]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(F,[2,46]),e(F,[2,47]),e(I,[2,15]),e(I,[2,19]),e(N,i,{7:78}),e(I,[2,26]),e(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,81],22:d,24:f,25:p,26:m,27:g,28:y,29:x,32:25,33:b,35:T,37:C,38:v,41:E,45:S,48:_,51:A,52:B,53:$,54:O,57:G},e(I,[2,32]),e(I,[2,33]),e(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:a(function(V,U){if(U.recoverable)this.trace(V);else{var z=new Error(V);throw z.hash=U,z}},"parseError"),parse:a(function(V){var U=this,z=[0],j=[],K=[null],Z=[],ce=this.table,te="",me=0,he=0,we=0,ye=2,ke=1,Fe=Z.slice.call(arguments,1),Ge=Object.create(this.lexer),Me={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(Me.yy[at]=this.yy[at]);Ge.setInput(V,Me.yy),Me.yy.lexer=Ge,Me.yy.parser=this,typeof Ge.yylloc>"u"&&(Ge.yylloc={});var ht=Ge.yylloc;Z.push(ht);var ge=Ge.options&&Ge.options.ranges;typeof Me.yy.parseError=="function"?this.parseError=Me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(ee){z.length=z.length-2*ee,K.length=K.length-ee,Z.length=Z.length-ee}a(De,"popStack");function Le(){var ee;return ee=j.pop()||Ge.lex()||ke,typeof ee!="number"&&(ee instanceof Array&&(j=ee,ee=j.pop()),ee=U.symbols_[ee]||ee),ee}a(Le,"lex");for(var Ie,Q,ne,re,se,fe,J={},L,W,ae,X;;){if(ne=z[z.length-1],this.defaultActions[ne]?re=this.defaultActions[ne]:((Ie===null||typeof Ie>"u")&&(Ie=Le()),re=ce[ne]&&ce[ne][Ie]),typeof re>"u"||!re.length||!re[0]){var xe="";X=[];for(L in ce[ne])this.terminals_[L]&&L>ye&&X.push("'"+this.terminals_[L]+"'");Ge.showPosition?xe="Parse error on line "+(me+1)+`: +`+Ge.showPosition()+` +Expecting `+X.join(", ")+", got '"+(this.terminals_[Ie]||Ie)+"'":xe="Parse error on line "+(me+1)+": Unexpected "+(Ie==ke?"end of input":"'"+(this.terminals_[Ie]||Ie)+"'"),this.parseError(xe,{text:Ge.match,token:this.terminals_[Ie]||Ie,line:Ge.yylineno,loc:ht,expected:X})}if(re[0]instanceof Array&&re.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+Ie);switch(re[0]){case 1:z.push(Ie),K.push(Ge.yytext),Z.push(Ge.yylloc),z.push(re[1]),Ie=null,Q?(Ie=Q,Q=null):(he=Ge.yyleng,te=Ge.yytext,me=Ge.yylineno,ht=Ge.yylloc,we>0&&we--);break;case 2:if(W=this.productions_[re[1]][1],J.$=K[K.length-W],J._$={first_line:Z[Z.length-(W||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(W||1)].first_column,last_column:Z[Z.length-1].last_column},ge&&(J._$.range=[Z[Z.length-(W||1)].range[0],Z[Z.length-1].range[1]]),fe=this.performAction.apply(J,[te,he,me,Me.yy,re[1],K,Z].concat(Fe)),typeof fe<"u")return fe;W&&(z=z.slice(0,-1*W*2),K=K.slice(0,-1*W),Z=Z.slice(0,-1*W)),z.push(this.productions_[re[1]][0]),K.push(J.$),Z.push(J._$),ae=ce[z[z.length-2]][z[z.length-1]],z.push(ae);break;case 3:return!0}}return!0},"parse")},M=(function(){var P={EOF:1,parseError:a(function(U,z){if(this.yy.parser)this.yy.parser.parseError(U,z);else throw new Error(U)},"parseError"),setInput:a(function(V,U){return this.yy=U||this.yy||{},this._input=V,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var V=this._input[0];this.yytext+=V,this.yyleng++,this.offset++,this.match+=V,this.matched+=V;var U=V.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),V},"input"),unput:a(function(V){var U=V.length,z=V.split(/(?:\r\n?|\n)/g);this._input=V+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var j=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.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:z?(z.length===j.length?this.yylloc.first_column:0)+j[j.length-z.length].length-z[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[K[0],K[0]+this.yyleng-U]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(V){this.unput(this.match.slice(V))},"less"),pastInput:a(function(){var V=this.matched.substr(0,this.matched.length-this.match.length);return(V.length>20?"...":"")+V.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var V=this.match;return V.length<20&&(V+=this._input.substr(0,20-V.length)),(V.substr(0,20)+(V.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var V=this.pastInput(),U=new Array(V.length+1).join("-");return V+this.upcomingInput()+` +`+U+"^"},"showPosition"),test_match:a(function(V,U){var z,j,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))),j=V[0].match(/(?:\r\n?|\n).*/g),j&&(this.yylineno+=j.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:j?j[j.length-1].length-j[j.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+V[0].length},this.yytext+=V[0],this.match+=V[0],this.matches=V,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(V[0].length),this.matched+=V[0],z=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var Z in K)this[Z]=K[Z];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var V,U,z,j;this._more||(this.yytext="",this.match="");for(var K=this._currentRules(),Z=0;ZU[0].length)){if(U=z,j=Z,this.options.backtrack_lexer){if(V=this.test_match(z,K[Z]),V!==!1)return V;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(V=this.test_match(U,K[j]),V!==!1?V:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var U=this.next();return U||this.lex()},"lex"),begin:a(function(U){this.conditionStack.push(U)},"begin"),popState:a(function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},"topState"),pushState:a(function(U){this.begin(U)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(U,z,j,K){function Z(){let te=z.yytext.indexOf("%%");if(te===0)return!1;if(te>0){let me=z.yytext.slice(0,te),he=z.yytext.slice(te);he&&U.lexer.unput(he),z.yytext=me}return!0}a(Z,"processId");var ce=K;switch(j){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(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),z.yytext=z.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(!Z())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+z.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!Z())return;return this.popState(),"ID";break;case 66:if(!Z())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 68:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return Z()?24:void 0;case 74:return z.yytext=z.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79: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,/^(?:\w+\s+\w+.*?\{)/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,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],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,55],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,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return P})();D.lexer=M;function R(){this.yy={}}return a(R,"Parser"),R.prototype=D,D.Parser=R,new R})();B7.parser=B7;lke=B7});var nd,pp,mT,uke,hke,dke,mp,X_,$7,F7,G7,V7,Q_,Z_,fke,pke,J_,z7,mke,gke,by,iit,yke,U7,sit,ait,xke,bke,oit,Tke,lit,Cke,W7,j7,kke,eA,Ske,q7,tA=w(()=>{"use strict";nd="state",pp="root",mT="relation",uke="classDef",hke="style",dke="applyClass",mp="default",X_="divider",$7="fill:none",F7="fill: #333",G7="markdown",V7="normal",Q_="rect",Z_="rectWithTitle",fke="stateStart",pke="stateEnd",J_="divider",z7="roundedWithTitle",mke="note",gke="noteGroup",by="statediagram",iit="state",yke=`${by}-${iit}`,U7="transition",sit="note",ait="note-edge",xke=`${U7} ${ait}`,bke=`${by}-${sit}`,oit="cluster",Tke=`${by}-${oit}`,lit="cluster-alt",Cke=`${by}-${lit}`,W7="parent",j7="note",kke="state",eA="----",Ske=`${eA}${j7}`,q7=`${eA}${W7}`});function H7(e="",t=0,r="",n=eA){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${kke}-${e}${i}-${t}`}function rA(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{let s=r.get(i);s&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...s.styles])}));let n=e.find(i=>i.id===t.id);n?Object.assign(n,t):e.push(t)}function hit(e){return e?.classes?.join(" ")??""}function dit(e){return e?.styles??[]}var nA,id,wke,gT,cit,uit,Eke,Ty,_ke,Ake=w(()=>{"use strict";Gt();bt();Ir();tA();nA=new Map,id=0,wke=0,gT=new Map,cit=a((e,t,r,n)=>{if(e===J_&&r?.id!==void 0&&gT.has(r.id)){let o=gT.get(r.id);return gT.set(t,o),o}let i=wke++,s=n?void 0:i;return gT.set(t,s),s},"colorSlotFor");a(H7,"stateDomId");uit=a((e,t,r,n,i,s,o,l)=>{H.trace("items",t),t.forEach(u=>{switch(u.stmt){case nd:Ty(e,u,r,n,i,s,o,l);break;case mp:Ty(e,u,r,n,i,s,o,l);break;case mT:{Ty(e,u.state1,r,n,i,s,o,l),Ty(e,u.state2,r,n,i,s,o,l);let h=o==="neo",d={id:"edge"+id,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:h?"arrow_barb_neo":"arrow_barb",style:$7,labelStyle:"",label:gt.sanitizeText(u.description??"",_e()),arrowheadStyle:F7,labelpos:"c",labelType:G7,thickness:V7,classes:U7,look:o};i.push(d),id++}break}})},"setupDoc"),Eke=a((e,t="TB")=>{let r=t;if(e.doc)for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");a(rA,"insertOrUpdateNode");a(hit,"getClassesFromDbInfo");a(dit,"getStylesFromDbInfo");Ty=a((e,t,r,n,i,s,o,l)=>{let u=t.id,h=r.get(u),d=hit(h),f=dit(h),p=_e(),m=d.trim()!==""||f.length>0;if(H.info("dataFetcher parsedItem",t,h,f),u!=="root"){let g=Q_;t.start===!0?g=fke:t.start===!1&&(g=pke),t.type!==mp&&(g=t.type),nA.get(u)||nA.set(u,{id:u,shape:g,description:gt.sanitizeText(u,p),cssClasses:`${d} ${yke}`,cssStyles:f});let y=nA.get(u);t.description&&(Array.isArray(y.description)?(y.shape=Z_,y.description.push(t.description)):y.description?.length&&y.description.length>0?(y.shape=Z_,y.description===u?y.description=[t.description]:y.description=[y.description,t.description]):(y.shape=Q_,y.description=t.description),y.description=gt.sanitizeTextOrArray(y.description,p)),y.description?.length===1&&y.shape===Z_&&(y.type==="group"?y.shape=z7:y.shape=Q_),!y.type&&t.doc&&(H.info("Setting cluster for XCX",u,Eke(t)),y.type="group",y.isGroup=!0,y.dir=Eke(t),y.shape=t.type===X_?J_:z7,y.colorIndex=cit(y.shape,u,e,m),y.cssClasses=`${y.cssClasses} ${Tke} ${s?Cke:""}`);let x={labelStyle:"",shape:y.shape,label:y.description,cssClasses:y.cssClasses,cssCompiledStyles:[],cssStyles:y.cssStyles,id:u,dir:y.dir,domId:H7(u,id),type:y.type,isGroup:y.type==="group",colorIndex:y.colorIndex,padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(x.shape===J_&&(x.label=""),e&&e.id!=="root"&&(H.trace("Setting node ",u," to be child of its parent ",e.id),x.parentId=e.id),x.centerLabel=!0,t.note){let b={labelStyle:"",shape:mke,label:t.note.text,labelType:"markdown",cssClasses:bke,cssStyles:[],cssCompiledStyles:[],id:u+Ske+"-"+id,domId:H7(u,id,j7),type:"node",isGroup:!1,padding:p.flowchart?.padding,look:o,position:t.note.position},T=u+q7,C={labelStyle:"",shape:gke,label:t.note.text,cssClasses:y.cssClasses,cssStyles:[],id:u+q7,domId:H7(u,id,W7),type:"group",isGroup:!0,padding:16,look:o,position:t.note.position};id++,C.id=T,b.parentId=T,rA(n,C,l),rA(n,b,l),rA(n,x,l);let v=u,E=b.id;t.note.position==="left of"&&(v=b.id,E=u),i.push({id:v+"-"+E,start:v,end:E,arrowhead:"none",arrowTypeEnd:"",style:$7,labelStyle:"",classes:xke,pattern:"dashed",arrowheadStyle:F7,labelpos:"c",labelType:G7,thickness:V7,look:o})}else rA(n,x,l)}t.doc&&(H.trace("Adding nodes children "),uit(t,t.doc,r,n,i,!s,o,l))},"dataFetcher"),_ke=a(()=>{nA.clear(),id=0,wke=0,gT.clear()},"reset")});var K7,fit,pit,Rke,X7=w(()=>{"use strict";Gt();bt();rh();Yc();Kc();jt();tA();K7=a((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),fit=a(function(e,t){return t.db.getClasses()},"getClasses"),pit=a(async function(e,t,r,n){H.info("REF0:"),H.info("Drawing state diagram (v2)",t);let{securityLevel:i,state:s,layout:o}=_e();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=ca(t,i);l.type=n.type,l.layoutAlgorithm=Ta(o),l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,_e().look==="neo"?l.markers=["barbNeo"]:l.markers=["barb"],l.diagramId=t,await ba(l,u);let d=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((p,m)=>{let g=typeof m=="string"?m:typeof m?.id=="string"?m.id:"",y=l.nodes.find(E=>E.id===g);if(!g){H.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(m));return}let x=u.node()?.querySelectorAll("g.node, g.rough-node"),b;if(x?.forEach(E=>{let S=E.textContent?.trim();(E.id===y?.domId||S===g)&&(b=E)}),!b){H.warn("\u26A0\uFE0F Could not find node matching text:",g);return}let T=b.parentNode;if(!T){H.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",g);return}let C=document.createElementNS("http://www.w3.org/2000/svg","a"),v=p.url.replace(/^"+|"+$/g,"");if(C.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",v),C.setAttribute("target","_blank"),p.tooltip){let E=p.tooltip.replace(/^"+|"+$/g,"");C.setAttribute("title",E),b.setAttribute("title",E)}T.replaceChild(C,b),C.appendChild(b),H.info("\u{1F517} Wrapped node in
    tag for:",g,p.url)})}catch(f){H.error("\u274C Error injecting clickable links:",f)}Xt.insertTitle(u,"statediagramTitleText",s?.titleTopMargin??25,n.db.getDiagramTitle()),Is(u,d,by,s?.useMaxWidth??!0)},"draw"),Rke={getClasses:fit,draw:pit,getDir:K7}});var Zs,Ike,Dke,iA,sA,Nke=w(()=>{"use strict";Lr();md();Gt();bt();jt();Ir();fn();Mc();Ake();X7();tA();Zs={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Ike=a(()=>new Map,"newClassesList"),Dke=a(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),iA=a(e=>JSON.parse(JSON.stringify(e)),"clone"),sA=class{constructor(t){this.version=t;this.nodes=[];this.edges=[];this.rootDoc=[];this.classes=Ike();this.documents={root:Dke()};this.currentDocument=this.documents.root;this.startEndCount=0;this.dividerCnt=0;this.links=new Map;this.funs=[];this.getAccTitle=gr;this.setAccTitle=hr;this.getAccDescription=yr;this.setAccDescription=fr;this.setDiagramTitle=Cr;this.getDiagramTitle=xr;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),this.bindFunctions=this.bindFunctions.bind(this)}static{a(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let i of Array.isArray(t)?t:t.doc)switch(i.stmt){case nd:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case mT:this.addRelation(i.state1,i.state2,i.description);break;case uke:this.addStyleClass(i.id.trim(),i.classes);break;case hke:this.handleStyleDef(i);break;case dke:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}let r=this.getStates(),n=_e();_ke(),Ty(void 0,this.getRootDocV2(),r,this.nodes,this.edges,!0,n.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){let r=t.id.trim().split(","),n=t.styleClass.split(",");for(let i of r){let s=this.getState(i);if(!s){let o=i.trim();this.addState(o),s=this.getState(o)}s&&(s.styles=n.map(o=>o.replace(/;/g,"")?.trim()))}}setRootDoc(t){H.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,r,n){if(r.stmt===mT){this.docTranslator(t,r.state1,!0),this.docTranslator(t,r.state2,!1);return}if(r.stmt===nd&&(r.id===Zs.START_NODE?(r.id=t.id+(n?"_start":"_end"),r.start=n):r.id=r.id.trim()),r.stmt!==pp&&r.stmt!==nd||!r.doc)return;let i=[],s=[];for(let o of r.doc)if(o.type===X_){let l=iA(o);l.doc=iA(s),i.push(l),s=[]}else s.push(o);if(i.length>0&&s.length>0){let o={stmt:nd,id:PN(),type:"divider",doc:iA(s)};i.push(iA(o)),r.doc=i}r.doc.forEach(o=>this.docTranslator(r,o,!0))}getRootDocV2(){return this.docTranslator({id:pp,stmt:pp},{id:pp,stmt:pp,doc:this.rootDoc},!0),{id:pp,doc:this.rootDoc}}addState(t,r=mp,n=void 0,i=void 0,s=void 0,o=void 0,l=void 0,u=void 0){let h=t?.trim();if(!this.currentDocument.states.has(h))H.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:nd,id:h,descriptions:[],type:r,doc:n,note:s,classes:[],styles:[],textStyles:[]});else{let d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.doc||(d.doc=n),d.type||(d.type=r)}if(i&&(H.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(f=>this.addDescription(h,f.trim()))),s){let d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.note=s,d.note.text=gt.sanitizeText(d.note.text,_e())}o&&(H.info("Setting state classes",h,o),(Array.isArray(o)?o:[o]).forEach(f=>this.setCssClass(h,f.trim()))),l&&(H.info("Setting state styles",h,l),(Array.isArray(l)?l:[l]).forEach(f=>this.setStyle(h,f.trim()))),u&&(H.info("Setting state styles",h,l),(Array.isArray(u)?u:[u]).forEach(f=>this.setTextStyle(h,f.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Dke()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Ike(),t||(this.links=new Map,or())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){H.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,r,n){this.links.set(t,{url:r,tooltip:n}),H.warn("Adding link",t,r,n)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Zs.START_NODE?(this.startEndCount++,`${Zs.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",r=mp){return t===Zs.START_NODE?Zs.START_TYPE:r}endIdIfNeeded(t=""){return t===Zs.END_NODE?(this.startEndCount++,`${Zs.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",r=mp){return t===Zs.END_NODE?Zs.END_TYPE:r}addRelationObjs(t,r,n=""){let i=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(r.id.trim()),l=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(i,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,l,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:gt.sanitizeText(n,_e())})}addRelation(t,r,n){if(typeof t=="object"&&typeof r=="object")this.addRelationObjs(t,r,n);else if(typeof t=="string"&&typeof r=="string"){let i=this.startIdIfNeeded(t.trim()),s=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(r.trim()),l=this.endTypeIfNeeded(r);this.addState(i,s),this.addState(o,l),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:n?gt.sanitizeText(n,_e()):void 0})}}addDescription(t,r){let n=this.currentDocument.states.get(t),i=r.startsWith(":")?r.replace(":","").trim():r;n?.descriptions?.push(gt.sanitizeText(i,_e()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,r=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let n=this.classes.get(t);r&&n&&r.split(Zs.STYLECLASS_SEP).forEach(i=>{let s=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Zs.COLOR_KEYWORD).exec(i)){let l=s.replace(Zs.FILL_KEYWORD,Zs.BG_FILL).replace(Zs.COLOR_KEYWORD,Zs.FILL_KEYWORD);n.textStyles.push(l)}n.styles.push(s)})}getClasses(){return this.classes}setupToolTips(t){let r=Yu();st(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",s=>{let o=st(s.currentTarget),l=o.attr("title");if(l===null)return;let u=s.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Es.sanitize(l)),o.classed("hover",!0)}).on("mouseout",s=>{r.transition().duration(500).style("opacity",0),st(s.currentTarget).classed("hover",!1)})}setCssClass(t,r){t.split(",").forEach(n=>{let i=this.getState(n);if(!i){let s=n.trim();this.addState(s),i=this.getState(s)}i?.classes?.push(r)})}setStyle(t,r){this.getState(t)?.styles?.push(r)}setTextStyle(t,r){this.getState(t)?.textStyles?.push(r)}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt==="dir")}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let r=this.getDirectionStatement();r?r.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=_e();for(let r of this.nodes)r.wrappingWidth??=t.state?.wrappingWidth,r.isGroup||(r.minWidth??=t.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:K7(this.getRootDocV2())}}getConfig(){return _e().state}}});var git,yit,Mke,Oke=w(()=>{"use strict";Wi();git=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Di(e.look),s=zi(r),o="";for(let l=0;l` +${git(e)} +defs [id$="-barbEnd"] { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: ${e.strokeWidth||1}; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: ${e.strokeWidth||1}px; +} +[id$="-barbEnd"] { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +[id$="-dependencyStart"], [id$="-dependencyEnd"] { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +[data-look="neo"].statediagram-cluster rect { + fill: ${e.mainBkg}; + stroke: ${e.useGradient?"url("+e.svgId+"-gradient)":e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}; +} +[data-look="neo"].statediagram-cluster rect.outer { + rx: ${e.radius}px; + ry: ${e.radius}px; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${e.svgId}-drop-shadow)`):"none"} +} +`,"getStyles"),Mke=yit});var Pke={};ir(Pke,{diagram:()=>xit});var xit,Bke=w(()=>{"use strict";cke();Nke();Oke();X7();xit={parser:lke,get db(){return new sA(2)},renderer:Rke,styles:Mke,init:a(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var Q7,Gke,Vke=w(()=>{"use strict";Q7=(function(){var e=a(function(f,p,m,g){for(m=m||{},g=f.length;g--;m[f[g]]=p);return m},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],s=[1,12],o=[1,13],l=[1,14],u={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:a(function(p,m,g,y,x,b,T){var C=b.length-1;switch(x){case 1:return b[C-1];case 2:this.$=[];break;case 3:b[C-1].push(b[C]),this.$=b[C-1];break;case 4:case 5:this.$=b[C];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(b[C].substr(6)),this.$=b[C].substr(6);break;case 9:this.$=b[C].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=b[C].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(b[C].substr(8)),this.$=b[C].substr(8);break;case 13:y.addTask(b[C-1],b[C]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:s,17:o,18:l},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:n,14:i,16:s,17:o,18:l},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:a(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:a(function(p){var m=this,g=[0],y=[],x=[null],b=[],T=this.table,C="",v=0,E=0,S=0,_=2,A=1,B=b.slice.call(arguments,1),$=Object.create(this.lexer),O={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(O.yy[G]=this.yy[G]);$.setInput(p,O.yy),O.yy.lexer=$,O.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var I=$.yylloc;b.push(I);var F=$.options&&$.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(he){g.length=g.length-2*he,x.length=x.length-he,b.length=b.length-he}a(N,"popStack");function D(){var he;return he=y.pop()||$.lex()||A,typeof he!="number"&&(he instanceof Array&&(y=he,he=y.pop()),he=m.symbols_[he]||he),he}a(D,"lex");for(var M,R,P,V,U,z,j={},K,Z,ce,te;;){if(P=g[g.length-1],this.defaultActions[P]?V=this.defaultActions[P]:((M===null||typeof M>"u")&&(M=D()),V=T[P]&&T[P][M]),typeof V>"u"||!V.length||!V[0]){var me="";te=[];for(K in T[P])this.terminals_[K]&&K>_&&te.push("'"+this.terminals_[K]+"'");$.showPosition?me="Parse error on line "+(v+1)+`: +`+$.showPosition()+` +Expecting `+te.join(", ")+", got '"+(this.terminals_[M]||M)+"'":me="Parse error on line "+(v+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(me,{text:$.match,token:this.terminals_[M]||M,line:$.yylineno,loc:I,expected:te})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+M);switch(V[0]){case 1:g.push(M),x.push($.yytext),b.push($.yylloc),g.push(V[1]),M=null,R?(M=R,R=null):(E=$.yyleng,C=$.yytext,v=$.yylineno,I=$.yylloc,S>0&&S--);break;case 2:if(Z=this.productions_[V[1]][1],j.$=x[x.length-Z],j._$={first_line:b[b.length-(Z||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(Z||1)].first_column,last_column:b[b.length-1].last_column},F&&(j._$.range=[b[b.length-(Z||1)].range[0],b[b.length-1].range[1]]),z=this.performAction.apply(j,[C,E,v,O.yy,V[1],x,b].concat(B)),typeof z<"u")return z;Z&&(g=g.slice(0,-1*Z*2),x=x.slice(0,-1*Z),b=b.slice(0,-1*Z)),g.push(this.productions_[V[1]][0]),x.push(j.$),b.push(j._$),ce=T[g[g.length-2]][g[g.length-1]],g.push(ce);break;case 3:return!0}}return!0},"parse")},h=(function(){var f={EOF:1,parseError:a(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:a(function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:a(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var 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:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(p){this.unput(this.match.slice(p))},"less"),pastInput:a(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:a(function(p,m){var g,y,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))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var b in x)this[b]=x[b];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),b=0;bm[0].length)){if(m=g,y=b,this.options.backtrack_lexer){if(p=this.test_match(g,x[b]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,x[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var m=this.next();return m||this.lex()},"lex"),begin:a(function(m){this.conditionStack.push(m)},"begin"),popState:a(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:a(function(m){this.begin(m)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(m,g,y,x){var b=x;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 f})();u.lexer=h;function d(){this.yy={}}return a(d,"Parser"),d.prototype=u,u.Parser=d,new d})();Q7.parser=Q7;Gke=Q7});var Cy,Z7,yT,xT,kit,Sit,Eit,vit,wit,_it,Ait,zke,Rit,J7,Uke=w(()=>{"use strict";Gt();fn();Cy="",Z7=[],yT=[],xT=[],kit=a(function(){Z7.length=0,yT.length=0,Cy="",xT.length=0,or()},"clear"),Sit=a(function(e){Cy=e,Z7.push(e)},"addSection"),Eit=a(function(){return Z7},"getSections"),vit=a(function(){let e=zke(),t=100,r=0;for(;!e&&r{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},"updateActors"),_it=a(function(e,t){let r=t.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let s=i.map(l=>l.trim()),o={section:Cy,type:Cy,people:s,task:e,score:n};xT.push(o)},"addTask"),Ait=a(function(e){let t={section:Cy,type:Cy,description:e,task:e,classes:[]};yT.push(t)},"addTaskOrg"),zke=a(function(){let e=a(function(r){return xT[r].processed},"compileTask"),t=!0;for(let[r,n]of xT.entries())e(r),t=t&&n.processed;return t},"compileTasks"),Rit=a(function(){return wit()},"getActors"),J7={getConfig:a(()=>_e().journey,"getConfig"),clear:kit,setDiagramTitle:Cr,getDiagramTitle:xr,setAccTitle:hr,getAccTitle:gr,setAccDescription:fr,getAccDescription:yr,addSection:Sit,getSections:Eit,getTasks:vit,addTask:_it,addTaskOrg:Ait,getActors:Rit}});var Lit,Wke,jke=w(()=>{"use strict";Tf();Lit=a(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${e.textColor} + } + + .legend { + fill: ${e.textColor}; + font-family: ${e.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${e.textColor} + } + + .face { + ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePaths .path { + stroke: ${e.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${e.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${e.fillType0?`fill: ${e.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${e.fillType0?`fill: ${e.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${e.fillType0?`fill: ${e.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${e.fillType0?`fill: ${e.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${e.fillType0?`fill: ${e.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${e.fillType0?`fill: ${e.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${e.fillType0?`fill: ${e.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${e.fillType0?`fill: ${e.fillType7}`:""}; + } + + .actor-0 { + ${e.actor0?`fill: ${e.actor0}`:""}; + } + .actor-1 { + ${e.actor1?`fill: ${e.actor1}`:""}; + } + .actor-2 { + ${e.actor2?`fill: ${e.actor2}`:""}; + } + .actor-3 { + ${e.actor3?`fill: ${e.actor3}`:""}; + } + .actor-4 { + ${e.actor4?`fill: ${e.actor4}`:""}; + } + .actor-5 { + ${e.actor5?`fill: ${e.actor5}`:""}; + } + ${Co()} +`,"getStyles"),Wke=Lit});var tF,Iit,qke,Hke,Dit,Nit,eF,Mit,Oit,Yke,Pit,ky,Kke=w(()=>{"use strict";Lr();Mc();tF=a(function(e,t){return Vd(e,t)},"drawRect"),Iit=a(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(u){let h=jo().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}a(s,"smile");function o(u){let h=jo().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}a(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a(l,"ambivalent"),t.score>3?s(i):t.score<3?o(i):l(i),n},"drawFace"),qke=a(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),Hke=a(function(e,t){return SY(e,t)},"drawText"),Dit=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,Hke(e,t)},"drawLabel"),Nit=a(function(e,t,r){let n=e.append("g"),i=Us();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,tF(n,i),Yke(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),eF=-1,Mit=a(function(e,t,r,n){let i=t.x+r.width/2,s=e.append("g");eF++,s.append("line").attr("id",n+"-task"+eF).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Iit(s,{cx:i,cy:300+(5-t.score)*30,score:t.score});let l=Us();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,tF(s,l);let u=t.x+14;t.people.forEach(h=>{let d=t.actors[h].color,f={cx:u,cy:t.y,r:7,fill:d,stroke:"#000",title:h,pos:t.actors[h].position};qke(s,f),u+=10}),Yke(r)(t.task,s,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},"drawTask"),Oit=a(function(e,t){a2(e,t)},"drawBackgroundRect"),Yke=(function(){function e(i,s,o,l,u,h,d,f){let p=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(p,d)}a(e,"byText");function t(i,s,o,l,u,h,d,f,p){let{taskFontSize:m,taskFontFamily:g}=f,y=i.split(//gi);for(let x=0;x{let s=gu[i].color,o={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:gu[i].position};ky.drawCircle(e,o);let l=e.append("text").attr("visibility","hidden").text(i),u=l.node().getBoundingClientRect().width;l.remove();let h=[];if(u<=r)h=[i];else{let d=i.split(" "),f="";l=e.append("text").attr("visibility","hidden"),d.forEach(p=>{let m=f?`${f} ${p}`:p;if(l.text(m),l.node().getBoundingClientRect().width>r){if(f&&h.push(f),f=p,l.text(p),l.node().getBoundingClientRect().width>r){let y="";for(let x of p)y+=x,l.text(y+"-"),l.node().getBoundingClientRect().width>r&&(h.push(y.slice(0,-1)+"-"),y=x);f=y}}else f=m}),f&&h.push(f),l.remove()}h.forEach((d,f)=>{let p={x:40,y:n+7+f*20,fill:"#666",text:d,textMargin:t.boxTextMargin??5},g=ky.drawText(e,p).node().getBoundingClientRect().width;g>aA&&g>t.leftMargin-g&&(aA=g)}),n+=Math.max(20,h.length*20)})}var Bit,gu,aA,fl,sd,Fit,vo,rF,Xke,Git,nF,Qke=w(()=>{"use strict";Lr();Kke();Gt();Rn();Bit=a(function(e){Object.keys(e).forEach(function(r){fl[r]=e[r]})},"setConf"),gu={},aA=0;a($it,"drawActorLegend");fl=_e().journey,sd=0,Fit=a(function(e,t,r,n){let i=_e(),s=i.journey.titleColor,o=i.journey.titleFontSize,l=i.journey.titleFontFamily,u=i.securityLevel,h;u==="sandbox"&&(h=st("#i"+t));let d=u==="sandbox"?st(h.nodes()[0].contentDocument.body):st("body");vo.init();let f=d.select("#"+t);ky.initGraphics(f,t);let p=n.db.getTasks(),m=n.db.getDiagramTitle(),g=n.db.getActors();for(let v in gu)delete gu[v];let y=0;g.forEach(v=>{gu[v]={color:fl.actorColours[y%fl.actorColours.length],position:y},y++}),$it(f),sd=fl.leftMargin+aA,vo.insert(0,0,sd,Object.keys(gu).length*50),Git(f,p,0,t);let x=vo.getBounds();m&&f.append("text").text(m).attr("x",sd).attr("font-size",o).attr("font-weight","bold").attr("y",25).attr("fill",s).attr("font-family",l);let b=x.stopy-x.starty+2*fl.diagramMarginY,T=sd+x.stopx+2*fl.diagramMarginX;Dr(f,b,T,fl.useMaxWidth),f.append("line").attr("x1",sd).attr("y1",fl.height*4).attr("x2",T-sd-4).attr("y2",fl.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)");let C=m?70:0;f.attr("viewBox",`${x.startx} -25 ${T} ${b+C}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",b+C+25)},"draw"),vo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:a(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:a(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:a(function(e,t,r,n){let i=_e().journey,s=this,o=0;function l(u){return a(function(d){o++;let f=s.sequenceItems.length-o+1;s.updateVal(d,"starty",t-f*i.boxMargin,Math.min),s.updateVal(d,"stopy",n+f*i.boxMargin,Math.max),s.updateVal(vo.data,"startx",e-f*i.boxMargin,Math.min),s.updateVal(vo.data,"stopx",r+f*i.boxMargin,Math.max),u!=="activation"&&(s.updateVal(d,"startx",e-f*i.boxMargin,Math.min),s.updateVal(d,"stopx",r+f*i.boxMargin,Math.max),s.updateVal(vo.data,"starty",t-f*i.boxMargin,Math.min),s.updateVal(vo.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}a(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:a(function(e,t,r,n){let i=Math.min(e,r),s=Math.max(e,r),o=Math.min(t,n),l=Math.max(t,n);this.updateVal(vo.data,"startx",i,Math.min),this.updateVal(vo.data,"starty",o,Math.min),this.updateVal(vo.data,"stopx",s,Math.max),this.updateVal(vo.data,"stopy",l,Math.max),this.updateBounds(i,o,s,l)},"insert"),bumpVerticalPos:a(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:a(function(){return this.verticalPos},"getVerticalPos"),getBounds:a(function(){return this.data},"getBounds")},rF=fl.sectionFills,Xke=fl.sectionColours,Git=a(function(e,t,r,n){let i=_e().journey,s="",o=i.height*2+i.diagramMarginY,l=r+o,u=0,h="#CCC",d="black",f=0;for(let[p,m]of t.entries()){if(s!==m.section){h=rF[u%rF.length],f=u%rF.length,d=Xke[u%Xke.length];let y=0,x=m.section;for(let T=p;T(gu[x]&&(y[x]=gu[x]),y),{});m.x=p*i.taskMargin+p*i.width+sd,m.y=l,m.width=i.diagramMarginX,m.height=i.diagramMarginY,m.colour=d,m.fill=h,m.num=f,m.actors=g,ky.drawTask(e,m,i,n),vo.insert(m.x,m.y,m.x+m.width+i.taskMargin,450)}},"drawTasks"),nF={setConf:Bit,draw:Fit}});var Zke={};ir(Zke,{diagram:()=>Vit});var Vit,Jke=w(()=>{"use strict";Vke();Uke();jke();Qke();Vit={parser:Gke,db:J7,renderer:nF,styles:Wke,init:a(e=>{nF.setConf(e.journey),J7.clear()},"init")}});var aF,i2e,s2e=w(()=>{"use strict";aF=(function(){var e=a(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g},"o"),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],n=[1,13],i=[1,14],s=[1,15],o=[1,16],l=[1,19],u=[1,20],h={trace:a(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:a(function(m,g,y,x,b,T,C){var v=T.length-1;switch(b){case 1:return T[v-1];case 3:x.setDirection("LR");break;case 4:x.setDirection("TD");break;case 5:this.$=[];break;case 6:T[v-1].push(T[v]),this.$=T[v-1];break;case 7:case 8:this.$=T[v];break;case 9:case 10:this.$=[];break;case 11:x.getCommonDb().setDiagramTitle(T[v].substr(6)),this.$=T[v].substr(6);break;case 12:this.$=T[v].trim(),x.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=T[v].trim(),x.getCommonDb().setAccDescription(this.$);break;case 15:x.addSection(T[v].substr(8)),this.$=T[v].substr(8);break;case 18:x.addTask(T[v],0,""),this.$=T[v];break;case 19:x.addEvent(T[v].substr(2)),this.$=T[v];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:r,15:n,17:i,19:s,20:o,21:17,22:18,23:l,24:u},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:n,17:i,19:s,20:o,21:17,22:18,23:l,24:u},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:a(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:a(function(m){var g=this,y=[0],x=[],b=[null],T=[],C=this.table,v="",E=0,S=0,_=0,A=2,B=1,$=T.slice.call(arguments,1),O=Object.create(this.lexer),G={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(G.yy[I]=this.yy[I]);O.setInput(m,G.yy),G.yy.lexer=O,G.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var F=O.yylloc;T.push(F);var N=O.options&&O.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(we){y.length=y.length-2*we,b.length=b.length-we,T.length=T.length-we}a(D,"popStack");function M(){var we;return we=x.pop()||O.lex()||B,typeof we!="number"&&(we instanceof Array&&(x=we,we=x.pop()),we=g.symbols_[we]||we),we}a(M,"lex");for(var R,P,V,U,z,j,K={},Z,ce,te,me;;){if(V=y[y.length-1],this.defaultActions[V]?U=this.defaultActions[V]:((R===null||typeof R>"u")&&(R=M()),U=C[V]&&C[V][R]),typeof U>"u"||!U.length||!U[0]){var he="";me=[];for(Z in C[V])this.terminals_[Z]&&Z>A&&me.push("'"+this.terminals_[Z]+"'");O.showPosition?he="Parse error on line "+(E+1)+`: +`+O.showPosition()+` +Expecting `+me.join(", ")+", got '"+(this.terminals_[R]||R)+"'":he="Parse error on line "+(E+1)+": Unexpected "+(R==B?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(he,{text:O.match,token:this.terminals_[R]||R,line:O.yylineno,loc:F,expected:me})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+R);switch(U[0]){case 1:y.push(R),b.push(O.yytext),T.push(O.yylloc),y.push(U[1]),R=null,P?(R=P,P=null):(S=O.yyleng,v=O.yytext,E=O.yylineno,F=O.yylloc,_>0&&_--);break;case 2:if(ce=this.productions_[U[1]][1],K.$=b[b.length-ce],K._$={first_line:T[T.length-(ce||1)].first_line,last_line:T[T.length-1].last_line,first_column:T[T.length-(ce||1)].first_column,last_column:T[T.length-1].last_column},N&&(K._$.range=[T[T.length-(ce||1)].range[0],T[T.length-1].range[1]]),j=this.performAction.apply(K,[v,S,E,G.yy,U[1],b,T].concat($)),typeof j<"u")return j;ce&&(y=y.slice(0,-1*ce*2),b=b.slice(0,-1*ce),T=T.slice(0,-1*ce)),y.push(this.productions_[U[1]][0]),b.push(K.$),T.push(K._$),te=C[y[y.length-2]][y[y.length-1]],y.push(te);break;case 3:return!0}}return!0},"parse")},d=(function(){var p={EOF:1,parseError:a(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g)},"parseError"),setInput:a(function(m,g){return this.yy=g||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:a(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var 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:y?(y.length===x.length?this.yylloc.first_column:0)+x[x.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(m){this.unput(this.match.slice(m))},"less"),pastInput:a(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:a(function(m,g){var y,x,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))),x=m[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var T in b)this[T]=b[T];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,x;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),T=0;Tg[0].length)){if(g=y,x=T,this.options.backtrack_lexer){if(m=this.test_match(y,b[T]),m!==!1)return m;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(m=this.test_match(g,b[x]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var g=this.next();return g||this.lex()},"lex"),begin:a(function(g){this.conditionStack.push(g)},"begin"),popState:a(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:a(function(g){this.begin(g)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(g,y,x,b){var T=b;switch(x){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 p})();h.lexer=d;function f(){this.yy={}}return a(f,"Parser"),f.prototype=h,h.Parser=f,new f})();aF.parser=aF;i2e=aF});var cF={};ir(cF,{addEvent:()=>g2e,addSection:()=>d2e,addTask:()=>m2e,addTaskOrg:()=>y2e,clear:()=>c2e,default:()=>Kit,getCommonDb:()=>l2e,getDirection:()=>h2e,getSections:()=>f2e,getTasks:()=>p2e,setDirection:()=>u2e});var Sy,o2e,oF,lF,lA,Ey,l2e,c2e,u2e,h2e,d2e,f2e,p2e,m2e,g2e,y2e,a2e,Kit,x2e=w(()=>{"use strict";fn();Sy="",o2e=0,oF="LR",lF=[],lA=[],Ey=[],l2e=a(()=>v1,"getCommonDb"),c2e=a(function(){lF.length=0,lA.length=0,Sy="",Ey.length=0,oF="LR",or()},"clear"),u2e=a(function(e){oF=e},"setDirection"),h2e=a(function(){return oF},"getDirection"),d2e=a(function(e){Sy=e,lF.push(e)},"addSection"),f2e=a(function(){return lF},"getSections"),p2e=a(function(){let e=a2e(),t=100,r=0;for(;!e&&rr.id===o2e-1).events.push(e)},"addEvent"),y2e=a(function(e){let t={section:Sy,type:Sy,description:e,task:e,classes:[]};lA.push(t)},"addTaskOrg"),a2e=a(function(){let e=a(function(r){return Ey[r].processed},"compileTask"),t=!0;for(let[r,n]of Ey.entries())e(r),t=t&&n.processed;return t},"compileTasks"),Kit={clear:c2e,getCommonDb:l2e,getDirection:h2e,setDirection:u2e,addSection:d2e,getSections:f2e,getTasks:p2e,addTask:m2e,addTaskOrg:y2e,addEvent:g2e}});function k2e(e,t){e.each(function(){var r=st(this),n=r.text().split(/(\s+|
    )/).reverse(),i,s=[],o=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let d=0;dt||i==="
    ")&&(s.pop(),h.text(s.join(" ").trim()),i==="
    "?s=[""]:s=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",o+"em").text(i))})}var b2e,cA,Xit,Qit,T2e,Zit,Jit,uF,est,tst,rst,hF,C2e,nst,ist,sst,ast,Ps,dF=w(()=>{"use strict";Lr();b2e=0,cA=a(function(e,t){let r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.class!==void 0&&r.attr("class",t.class),r},"drawRect"),Xit=a(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(u){let h=jo().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}a(s,"smile");function o(u){let h=jo().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}a(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a(l,"ambivalent"),t.score>3?s(i):t.score<3?o(i):l(i),n},"drawFace"),Qit=a(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),T2e=a(function(e,t){let r=t.text.replace(//gi," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class!==void 0&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),Zit=a(function(e,t){function r(i,s,o,l,u){return i+","+s+" "+(i+o)+","+s+" "+(i+o)+","+(s+l-u)+" "+(i+o-u*1.2)+","+(s+l)+" "+i+","+(s+l)}a(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,T2e(e,t)},"drawLabel"),Jit=a(function(e,t,r){let n=e.append("g"),i=hF();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,cA(n,i),C2e(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),uF=-1,est=a(function(e,t,r,n){let i=t.x+r.width/2,s=e.append("g");uF++,s.append("line").attr("id",n+"-task"+uF).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Xit(s,{cx:i,cy:300+(5-t.score)*30,score:t.score});let l=hF();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,cA(s,l),C2e(r)(t.task,s,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},"drawTask"),tst=a(function(e,t){cA(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),rst=a(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),hF=a(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),C2e=(function(){function e(i,s,o,l,u,h,d,f){let p=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(p,d)}a(e,"byText");function t(i,s,o,l,u,h,d,f,p){let{taskFontSize:m,taskFontFamily:g}=f,y=i.split(//gi);for(let x=0;x0?`M0 ${t.height-l} v${-t.height+2*l} q0,-${o},${o},-${o} h${t.width-2*l} q${o},0,${o},${o} v${t.height-l} H0 Z`:`M0 ${t.height-l} v${-(t.height-l)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",n+"-node-"+b2e++).attr("class","node-bkg node-"+t.type).attr("d",u),s?.includes("redux")||e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),Ps={drawRect:cA,drawCircle:Qit,drawSection:Jit,drawText:T2e,drawLabel:Zit,drawTask:est,drawBackgroundRect:tst,getTextObj:rst,getNoteRect:hF,initGraphics:nst,drawNode:ist,getVirtualNodeHeight:sst}});var ost,S2e,lst,E2e,v2e=w(()=>{"use strict";Lr();dF();bt();Gt();Rn();ost=a(function(e,t,r,n){let i=_e(),{look:s,theme:o,themeVariables:l}=i,{useGradient:u,gradientStart:h,gradientStop:d}=l,f=i.timeline?.leftMargin??50;H.debug("timeline",n.db);let p=i.securityLevel,m;p==="sandbox"&&(m=st("#i"+t));let y=(p==="sandbox"?st(m.nodes()[0].contentDocument.body):st("body")).select("#"+t);y.append("g");let x=n.db.getTasks(),b=n.db.getCommonDb().getDiagramTitle();H.debug("task",x),Ps.initGraphics(y,t);let T=n.db.getSections();H.debug("sections",T);let C=0,v=0,E=0,S=0,_=50+f,A=50;S=50;let B=0,$=!0;T.forEach(function(N){let D={number:B,descr:N,section:B,width:150,padding:20,maxHeight:C},M=Ps.getVirtualNodeHeight(y,D,i);H.debug("sectionHeight before draw",M),C=Math.max(C,M+20)});let O=0,G=0;H.debug("tasks.length",x.length);for(let[N,D]of x.entries()){let M={number:N,descr:D,section:D.section,width:150,padding:20,maxHeight:v},R=Ps.getVirtualNodeHeight(y,M,i);H.debug("taskHeight before draw",R),v=Math.max(v,R+20),O=Math.max(O,D.events.length);let P=0;for(let V of D.events){let U={descr:V,section:D.section,number:D.section,width:150,padding:20,maxHeight:50};P+=Ps.getVirtualNodeHeight(y,U,i)}D.events.length>0&&(P+=(D.events.length-1)*10),G=Math.max(G,P)}H.debug("maxSectionHeight before draw",C),H.debug("maxTaskHeight before draw",v),T&&T.length>0?T.forEach(N=>{let D=x.filter(V=>V.section===N),M={number:B,descr:N,section:B,width:200*Math.max(D.length,1)-50,padding:20,maxHeight:C};H.debug("sectionNode",M);let R=y.append("g"),P=Ps.drawNode(R,M,B,i,t);H.debug("sectionNode output",P),R.attr("transform",`translate(${_}, ${S})`),A+=C+50,D.length>0&&S2e(y,D,B,_,A,v,i,O,G,C,!1,t),_+=200*Math.max(D.length,1),A=S,B++}):($=!1,S2e(y,x,B,_,A,v,i,O,G,C,!0,t));let I=y.node().getBBox();if(H.debug("bounds",I),b&&y.append("text").text(b).attr("x",s==="neo"?I.x*2+f:I.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),E=$?C+v+150:v+100,y.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",E).attr("x2",I.width+3*f).attr("y2",E).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),s==="neo"&&u&&o!=="neutral"){let N=y.select("defs"),M=(N.empty()?y.append("defs"):N).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");M.append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),M.append("stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}kl(void 0,y,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),S2e=a(function(e,t,r,n,i,s,o,l,u,h,d,f){for(let p of t){let m={descr:p.task,section:r,number:r,width:150,padding:20,maxHeight:s};H.debug("taskNode",m);let g=e.append("g").attr("class","taskWrapper"),x=Ps.drawNode(g,m,r,o,f).height;if(H.debug("taskHeight after draw",x),g.attr("transform",`translate(${n}, ${i})`),s=Math.max(s,x),p.events){let b=e.append("g").attr("class","lineWrapper"),T=s;i+=100,T=T+lst(e,p.events,r,n,i,o,f),i-=100,b.append("line").attr("x1",n+190/2).attr("y1",i+s).attr("x2",n+190/2).attr("y2",i+s+100+u+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}n=n+200,d&&!o.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),lst=a(function(e,t,r,n,i,s,o){let l=0,u=i;i=i+100;for(let h of t){let d={descr:h,section:r,number:r,width:150,padding:20,maxHeight:50};H.debug("eventNode",d);let f=e.append("g").attr("class","eventWrapper"),m=Ps.drawNode(f,d,r,s,o,!0).height;l=l+m,f.attr("transform",`translate(${n}, ${i})`),i=i+10+m}return i=u,l},"drawEvents"),E2e={setConf:a(()=>{},"setConf"),draw:ost}});var uA,yu,cst,fF,ust,R2e,hst,w2e,L2e,_2e,I2e,dst,A2e,fst,D2e,N2e=w(()=>{"use strict";dF();bt();Gt();Rn();Os();jt();uA=200,yu=5,cst=uA+yu*2,fF=uA+100,ust=fF+yu*2,R2e=10,hst=0,w2e=20,L2e=20,_2e=30,I2e=50,dst=a(function(e,t,r,n){let i=_e(),s=i.timeline?.leftMargin??50;H.debug("timeline",n.db);let o=gn(t);o.append("g");let l=n.db.getTasks(),u=n.db.getCommonDb().getDiagramTitle();H.debug("task",l),Ps.initGraphics(o);let h=n.db.getSections();H.debug("sections",h);let d=0,f=0,p=50+s,m=50,g=m,y=p,x=cst+L2e,b=ust+I2e,T=y+x,C=0,v=h&&h.length>0,E=v?T:p+x,S=Math.max(50,x+b-yu*2);h.forEach(function(N){let D={number:C,descr:N,section:C,width:S,padding:yu,maxHeight:d},M=Ps.getVirtualNodeHeight(o,D,i);H.debug("sectionHeight before draw",M),d=Math.max(d,M)});let _=0;H.debug("tasks.length",l.length);for(let[N,D]of l.entries()){let M={number:N,descr:D,section:D.section,width:uA,padding:yu,maxHeight:f},R=Ps.getVirtualNodeHeight(o,M,i);H.debug("taskHeight before draw",R),f=Math.max(f,R);let P=0;for(let V of D.events){let U={descr:V,section:D.section,number:D.section,width:fF,padding:yu,maxHeight:50};P+=Ps.getVirtualNodeHeight(o,U,i)}D.events.length>0&&(P+=(D.events.length-1)*R2e),_=Math.max(_,P)+hst}H.debug("maxSectionHeight before draw",d),H.debug("maxTaskHeight before draw",f);let B=Math.max(f,_)+_2e;v?h.forEach(N=>{let D=l.filter(K=>K.section===N),M={number:C,descr:N,section:C,width:S,padding:yu,maxHeight:d};H.debug("sectionNode",M);let R=o.append("g"),P=Ps.drawNode(R,M,C,i);H.debug("sectionNode output",P);let V=E-x;R.attr("transform",`translate(${V}, ${m})`);let U=m+P.height+w2e;D.length>0&&A2e(o,D,C,E,U,f,i,B,!1);let z=D.length,j=P.height+w2e+B*Math.max(z,1)-(z>0?_2e*2:0);m+=j,C++}):A2e(o,l,C,E,m,f,i,B,!0);let $=o.node()?.getBBox();if(!$)throw new Error("bbox not found");if(H.debug("bounds",$),u){if(o.append("text").text(u).attr("x",$.width/2-s).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),$=o.node()?.getBBox(),!$)throw new Error("bbox not found");H.debug("bounds after title",$)}let[O]=sa(i.fontSize),G=(O??16)*2,I=(O??16)*.5+20,F=o.append("g").attr("class","lineWrapper");F.append("line").attr("x1",E).attr("y1",g-G).attr("x2",E).attr("y2",$.y+$.height+I).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),F.lower(),kl(void 0,o,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),A2e=a(function(e,t,r,n,i,s,o,l,u){for(let h of t){let d={descr:h.task,section:r,number:r,width:uA,padding:yu,maxHeight:s};H.debug("taskNode",d);let f=e.append("g").attr("class","taskWrapper"),p=Ps.drawNode(f,d,r,o),m=p.height;H.debug("taskHeight after draw",m);let g=n-L2e-p.width;if(f.attr("transform",`translate(${g}, ${i})`),s=Math.max(s,m),h.events&&h.events.length>0){let y=i,x=n+I2e;fst(e,h.events,r,n,x,y,o)}i=i+l,u&&!o.timeline?.disableMulticolor&&r++}},"drawTasks"),fst=a(function(e,t,r,n,i,s,o){let l=s;for(let u of t){let h={descr:u,section:r,number:r,width:fF,padding:yu,maxHeight:0};H.debug("eventNode",h);let d=e.append("g").attr("class","eventWrapper"),p=Ps.drawNode(d,h,r,o).height;d.attr("transform",`translate(${i}, ${l})`);let m=e.append("g").attr("class","lineWrapper"),g=l+p/2;m.append("line").attr("x1",n).attr("y1",g).attr("x2",i).attr("y2",g).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),l=l+p+R2e}return l-s},"drawEvents"),D2e={setConf:a(()=>{},"setConf"),draw:dst}});var pst,mst,gst,M2e,O2e=w(()=>{"use strict";Ai();Tr();Wi();pst=a(e=>{let{theme:t}=Ct(),r=t?.includes("dark"),n=Ui(t,e.borderColorArray),i=e.svgId?.replace(/^#/,"")??"",s=i?`url(#${i}-drop-shadow)`:e.dropShadow??"none",o="";for(let l=0;l{let t="",r=uo(e.THEME_COLOR_LIMIT);for(let n=0;n{let{theme:t}=Ct(),r=t?.includes("redux"),n=t==="neutral",i=e.svgId?.replace(/^#/,"")??"",s="";if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!n){let o=uo(e.THEME_COLOR_LIMIT);for(let l=0;lxst});var yst,xst,B2e=w(()=>{"use strict";s2e();x2e();v2e();N2e();O2e();yst={setConf:a(()=>{},"setConf"),draw:a((e,t,r,n)=>(n?.db?.getDirection?.()??"LR")==="TD"?D2e.draw(e,t,r,n):E2e.draw(e,t,r,n),"draw")},xst={db:cF,renderer:yst,parser:i2e,styles:M2e}});var pF,G2e,V2e=w(()=>{"use strict";pF=(function(){var e=a(function(_,A,B,$){for(B=B||{},$=_.length;$--;B[_[$]]=A);return B},"o"),t=[1,4],r=[1,13],n=[1,12],i=[1,15],s=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],g=[6,7,11,24],y=[1,6,13,16,17,20,23],x=[1,35],b=[1,36],T=[1,6,7,11,13,16,17,20,23],C=[1,38],v={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:a(function(A,B,$,O,G,I,F){var N=I.length-1;switch(G){case 6:case 7:return O;case 8:O.getLogger().trace("Stop NL ");break;case 9:O.getLogger().trace("Stop EOF ");break;case 11:O.getLogger().trace("Stop NL2 ");break;case 12:O.getLogger().trace("Stop EOF2 ");break;case 15:O.getLogger().info("Node: ",I[N-1].id),O.addNode(I[N-2].length,I[N-1].id,I[N-1].descr,I[N-1].type,I[N]);break;case 16:O.getLogger().info("Node: ",I[N].id),O.addNode(I[N-1].length,I[N].id,I[N].descr,I[N].type);break;case 17:O.getLogger().trace("Icon: ",I[N]),O.decorateNode({icon:I[N]});break;case 18:case 23:O.decorateNode({class:I[N]});break;case 19:O.getLogger().trace("SPACELIST");break;case 20:O.getLogger().trace("Node: ",I[N-1].id),O.addNode(0,I[N-1].id,I[N-1].descr,I[N-1].type,I[N]);break;case 21:O.getLogger().trace("Node: ",I[N].id),O.addNode(0,I[N].id,I[N].descr,I[N].type);break;case 22:O.decorateNode({icon:I[N]});break;case 27:O.getLogger().trace("node found ..",I[N-2]),this.$={id:I[N-1],descr:I[N-1],type:O.getType(I[N-2],I[N])};break;case 28:this.$={id:I[N],descr:I[N],type:0};break;case 29:O.getLogger().trace("node found ..",I[N-3]),this.$={id:I[N-3],descr:I[N-1],type:O.getType(I[N-2],I[N])};break;case 30:this.$=I[N-1]+I[N];break;case 31:this.$=I[N];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},{6:r,9:22,12:11,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},{6:h,7:d,10:23,11:f},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:s,18:17,19:18,20:o,23:l},e(y,[2,14],{7:x,11:b}),e(T,[2,8]),e(T,[2,9]),e(T,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:C}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(y,[2,13],{7:x,11:b}),e(T,[2,11]),e(T,[2,12]),e(p,[2,15],{24:C}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(A,B){if(B.recoverable)this.trace(A);else{var $=new Error(A);throw $.hash=B,$}},"parseError"),parse:a(function(A){var B=this,$=[0],O=[],G=[null],I=[],F=this.table,N="",D=0,M=0,R=0,P=2,V=1,U=I.slice.call(arguments,1),z=Object.create(this.lexer),j={yy:{}};for(var K in this.yy)Object.prototype.hasOwnProperty.call(this.yy,K)&&(j.yy[K]=this.yy[K]);z.setInput(A,j.yy),j.yy.lexer=z,j.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var Z=z.yylloc;I.push(Z);var ce=z.options&&z.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(Ie){$.length=$.length-2*Ie,G.length=G.length-Ie,I.length=I.length-Ie}a(te,"popStack");function me(){var Ie;return Ie=O.pop()||z.lex()||V,typeof Ie!="number"&&(Ie instanceof Array&&(O=Ie,Ie=O.pop()),Ie=B.symbols_[Ie]||Ie),Ie}a(me,"lex");for(var he,we,ye,ke,Fe,Ge,Me={},at,ht,ge,De;;){if(ye=$[$.length-1],this.defaultActions[ye]?ke=this.defaultActions[ye]:((he===null||typeof he>"u")&&(he=me()),ke=F[ye]&&F[ye][he]),typeof ke>"u"||!ke.length||!ke[0]){var Le="";De=[];for(at in F[ye])this.terminals_[at]&&at>P&&De.push("'"+this.terminals_[at]+"'");z.showPosition?Le="Parse error on line "+(D+1)+`: +`+z.showPosition()+` +Expecting `+De.join(", ")+", got '"+(this.terminals_[he]||he)+"'":Le="Parse error on line "+(D+1)+": Unexpected "+(he==V?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(Le,{text:z.match,token:this.terminals_[he]||he,line:z.yylineno,loc:Z,expected:De})}if(ke[0]instanceof Array&&ke.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ye+", token: "+he);switch(ke[0]){case 1:$.push(he),G.push(z.yytext),I.push(z.yylloc),$.push(ke[1]),he=null,we?(he=we,we=null):(M=z.yyleng,N=z.yytext,D=z.yylineno,Z=z.yylloc,R>0&&R--);break;case 2:if(ht=this.productions_[ke[1]][1],Me.$=G[G.length-ht],Me._$={first_line:I[I.length-(ht||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(ht||1)].first_column,last_column:I[I.length-1].last_column},ce&&(Me._$.range=[I[I.length-(ht||1)].range[0],I[I.length-1].range[1]]),Ge=this.performAction.apply(Me,[N,M,D,j.yy,ke[1],G,I].concat(U)),typeof Ge<"u")return Ge;ht&&($=$.slice(0,-1*ht*2),G=G.slice(0,-1*ht),I=I.slice(0,-1*ht)),$.push(this.productions_[ke[1]][0]),G.push(Me.$),I.push(Me._$),ge=F[$[$.length-2]][$[$.length-1]],$.push(ge);break;case 3:return!0}}return!0},"parse")},E=(function(){var _={EOF:1,parseError:a(function(B,$){if(this.yy.parser)this.yy.parser.parseError(B,$);else throw new Error(B)},"parseError"),setInput:a(function(A,B){return this.yy=B||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var B=A.match(/(?:\r\n?|\n).*/g);return B?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},"input"),unput:a(function(A){var B=A.length,$=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-B),this.offset-=B;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var G=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:$?($.length===O.length?this.yylloc.first_column:0)+O[O.length-$.length].length-$[0].length:this.yylloc.first_column-B},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-B]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(A){this.unput(this.match.slice(A))},"less"),pastInput:a(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var A=this.pastInput(),B=new Array(A.length+1).join("-");return A+this.upcomingInput()+` +`+B+"^"},"showPosition"),test_match:a(function(A,B){var $,O,G;if(this.options.backtrack_lexer&&(G={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&&(G.yylloc.range=this.yylloc.range.slice(0))),O=A[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,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(A[0].length),this.matched+=A[0],$=this.performAction.call(this,this.yy,this,B,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var I in G)this[I]=G[I];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,B,$,O;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),I=0;IB[0].length)){if(B=$,O=I,this.options.backtrack_lexer){if(A=this.test_match($,G[I]),A!==!1)return A;if(this._backtrack){B=!1;continue}else return!1}else if(!this.options.flex)break}return B?(A=this.test_match(B,G[O]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var B=this.next();return B||this.lex()},"lex"),begin:a(function(B){this.conditionStack.push(B)},"begin"),popState:a(function(){var B=this.conditionStack.length-1;return B>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(B){return B=this.conditionStack.length-1-Math.abs(B||0),B>=0?this.conditionStack[B]:"INITIAL"},"topState"),pushState:a(function(B){this.begin(B)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(B,$,O,G){var I=G;switch(O){case 0:return this.pushState("shapeData"),$.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let F=/\n\s*/g;return $.yytext=$.yytext.replace(F,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return B.getLogger().trace("Found comment",$.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:B.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return B.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:B.getLogger().trace("end icon"),this.popState();break;case 16:return B.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return B.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return B.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return B.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:B.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return B.getLogger().trace("description:",$.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),B.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),B.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),B.getLogger().trace("node end ...",$.yytext),"NODE_DEND";break;case 36:return this.popState(),B.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),B.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),B.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),B.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),B.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return B.getLogger().trace("Long description:",$.yytext),21;break;case 42:return B.getLogger().trace("Long description:",$.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _})();v.lexer=E;function S(){this.yy={}}return a(S,"Parser"),S.prototype=v,v.Parser=S,new S})();pF.parser=pF;G2e=pF});var wo,gF,mF,yF,kst,Sst,z2e,Est,vst,Yi,wst,_st,Ast,Rst,Lst,Ist,Dst,U2e,W2e=w(()=>{"use strict";Gt();Ir();bt();Gi();Im();wo=[],gF=[],mF=0,yF={},kst=a(()=>{wo=[],gF=[],mF=0,yF={}},"clear"),Sst=a(e=>{if(wo.length===0)return null;let t=wo[0].level,r=null;for(let n=wo.length-1;n>=0;n--)if(wo[n].level===t&&!r&&(r=wo[n]),wo[n].levell.parentId===i.id);for(let l of o){let u={id:l.id,parentId:i.id,label:vr(l.label??"",n),labelType:"markdown",isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(u)}}return{nodes:t,edges:e,other:{},config:_e()}},"getData"),vst=a((e,t,r,n,i)=>{let s=_e(),o=s.mindmap?.padding??dr.mindmap.padding;switch(n){case Yi.ROUNDED_RECT:case Yi.RECT:case Yi.HEXAGON:o*=2}let l={id:vr(t,s)||"kbn"+mF++,level:e,label:vr(r,s),width:s.mindmap?.maxNodeWidth??dr.mindmap.maxNodeWidth,padding:o,isGroup:!1};if(i!==void 0){let h;i.includes(` +`)?h=i+` +`:h=`{ +`+i+` +}`;let d=Qo(h,{schema:Xo});if(d.shape&&(d.shape!==d.shape.toLowerCase()||d.shape.includes("_")))throw new Error(`No such shape: ${d.shape}. Shape names should be lowercase.`);d?.shape&&d.shape==="kanbanItem"&&(l.shape=d?.shape),d?.label&&(l.label=d?.label),d?.icon&&(l.icon=d?.icon.toString()),d?.assigned&&(l.assigned=d?.assigned.toString()),d?.ticket&&(l.ticket=d?.ticket.toString()),d?.priority&&(l.priority=d?.priority)}let u=Sst(e);u?l.parentId=u.id||"kbn"+mF++:gF.push(l),wo.push(l)},"addNode"),Yi={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},wst=a((e,t)=>{switch(H.debug("In get type",e,t),e){case"[":return Yi.RECT;case"(":return t===")"?Yi.ROUNDED_RECT:Yi.CLOUD;case"((":return Yi.CIRCLE;case")":return Yi.CLOUD;case"))":return Yi.BANG;case"{{":return Yi.HEXAGON;default:return Yi.DEFAULT}},"getType"),_st=a((e,t)=>{yF[e]=t},"setElementForId"),Ast=a(e=>{if(!e)return;let t=_e(),r=wo[wo.length-1];e.icon&&(r.icon=vr(e.icon,t)),e.class&&(r.cssClasses=vr(e.class,t))},"decorateNode"),Rst=a(e=>{switch(e){case Yi.DEFAULT:return"no-border";case Yi.RECT:return"rect";case Yi.ROUNDED_RECT:return"rounded-rect";case Yi.CIRCLE:return"circle";case Yi.CLOUD:return"cloud";case Yi.BANG:return"bang";case Yi.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Lst=a(()=>H,"getLogger"),Ist=a(e=>yF[e],"getElementById"),Dst={clear:kst,addNode:vst,getSections:z2e,getData:Est,nodeType:Yi,getType:wst,setElementForId:_st,decorateNode:Ast,type2Str:Rst,getLogger:Lst,getElementById:Ist},U2e=Dst});var Nst,j2e,q2e=w(()=>{"use strict";Gt();bt();Os();Rn();Gi();lx();tf();Nst=a(async(e,t,r,n)=>{H.debug(`Rendering kanban diagram +`+e);let s=n.db.getData(),o=_e();o.htmlLabels=!1;let l=gn(t);for(let x of s.nodes)x.domId=`${t}-${x.id}`;let u=l.append("g");u.attr("class","sections");let h=l.append("g");h.attr("class","items");let d=s.nodes.filter(x=>x.isGroup),f=0,p=10,m=[],g=25;for(let x of d){let b=o?.kanban?.sectionWidth||200;f=f+1,x.x=b*f+(f-1)*p/2,x.width=b,x.y=0,x.height=b*3,x.rx=5,x.ry=5,x.cssClasses=x.cssClasses+" section-"+f;let T=await nh(u,x);g=Math.max(g,T?.labelBBox?.height),m.push(T)}let y=0;for(let x of d){let b=m[y];y=y+1;let T=o?.kanban?.sectionWidth||200,C=-T*3/2+g,v=C,E=s.nodes.filter(A=>A.parentId===x.id);for(let A of E){if(A.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");A.x=x.x,A.width=T-1.5*p;let $=(await Fc(h,A,{config:o})).node().getBBox();A.y=v+$.height/2,await Pl(A),v=A.y+$.height/2+p/2}let S=b.cluster.select("rect"),_=Math.max(v-C+3*p,50)+(g-25);S.attr("height",_)}kl(void 0,l,o.mindmap?.padding??dr.kanban.padding,o.mindmap?.useMaxWidth??dr.kanban.useMaxWidth)},"draw"),j2e={draw:Nst}});var Mst,Ost,H2e,Y2e=w(()=>{"use strict";Ai();Tf();Mst=a(e=>{let t="";for(let n=0;ne.darkMode?je(n,i):Ue(n,i),"adjuster");for(let n=0;n` + .edge { + stroke-width: 3; + } + ${Mst(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${e.textColor}; + fill: ${e.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + ${Co()} +`,"getStyles"),H2e=Ost});var K2e={};ir(K2e,{diagram:()=>Pst});var Pst,X2e=w(()=>{"use strict";V2e();W2e();q2e();Y2e();Pst={db:U2e,renderer:j2e,parser:G2e,styles:H2e}});var xF,TT,J2e=w(()=>{"use strict";xF=(function(){var e=a(function(l,u,h,d){for(h=h||{},d=l.length;d--;h[l[d]]=u);return h},"o"),t=[1,9],r=[1,10],n=[1,5,10,12],i={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:a(function(u,h,d,f,p,m,g){var y=m.length-1;switch(p){case 7:let x=f.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),b=f.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),T=parseFloat(m[y].trim());f.addLink(x,b,T);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(n,[2,8]),e(n,[2,9]),{19:[1,16]},e(n,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:r},{15:18,16:7,17:8,18:t,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(n,[2,10]),{15:21,16:7,17:8,18:t,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:a(function(u,h){if(h.recoverable)this.trace(u);else{var d=new Error(u);throw d.hash=h,d}},"parseError"),parse:a(function(u){var h=this,d=[0],f=[],p=[null],m=[],g=this.table,y="",x=0,b=0,T=0,C=2,v=1,E=m.slice.call(arguments,1),S=Object.create(this.lexer),_={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(_.yy[A]=this.yy[A]);S.setInput(u,_.yy),_.yy.lexer=S,_.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var B=S.yylloc;m.push(B);var $=S.options&&S.options.ranges;typeof _.yy.parseError=="function"?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(Z){d.length=d.length-2*Z,p.length=p.length-Z,m.length=m.length-Z}a(O,"popStack");function G(){var Z;return Z=f.pop()||S.lex()||v,typeof Z!="number"&&(Z instanceof Array&&(f=Z,Z=f.pop()),Z=h.symbols_[Z]||Z),Z}a(G,"lex");for(var I,F,N,D,M,R,P={},V,U,z,j;;){if(N=d[d.length-1],this.defaultActions[N]?D=this.defaultActions[N]:((I===null||typeof I>"u")&&(I=G()),D=g[N]&&g[N][I]),typeof D>"u"||!D.length||!D[0]){var K="";j=[];for(V in g[N])this.terminals_[V]&&V>C&&j.push("'"+this.terminals_[V]+"'");S.showPosition?K="Parse error on line "+(x+1)+`: +`+S.showPosition()+` +Expecting `+j.join(", ")+", got '"+(this.terminals_[I]||I)+"'":K="Parse error on line "+(x+1)+": Unexpected "+(I==v?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(K,{text:S.match,token:this.terminals_[I]||I,line:S.yylineno,loc:B,expected:j})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+I);switch(D[0]){case 1:d.push(I),p.push(S.yytext),m.push(S.yylloc),d.push(D[1]),I=null,F?(I=F,F=null):(b=S.yyleng,y=S.yytext,x=S.yylineno,B=S.yylloc,T>0&&T--);break;case 2:if(U=this.productions_[D[1]][1],P.$=p[p.length-U],P._$={first_line:m[m.length-(U||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(U||1)].first_column,last_column:m[m.length-1].last_column},$&&(P._$.range=[m[m.length-(U||1)].range[0],m[m.length-1].range[1]]),R=this.performAction.apply(P,[y,b,x,_.yy,D[1],p,m].concat(E)),typeof R<"u")return R;U&&(d=d.slice(0,-1*U*2),p=p.slice(0,-1*U),m=m.slice(0,-1*U)),d.push(this.productions_[D[1]][0]),p.push(P.$),m.push(P._$),z=g[d[d.length-2]][d[d.length-1]],d.push(z);break;case 3:return!0}}return!0},"parse")},s=(function(){var l={EOF:1,parseError:a(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:a(function(u,h){return this.yy=h||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:a(function(u){var h=u.length,d=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var f=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 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:d?(d.length===f.length?this.yylloc.first_column:0)+f[f.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(u){this.unput(this.match.slice(u))},"less"),pastInput:a(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:a(function(u,h){var d,f,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))),f=u[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],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 m in p)this[m]=p[m];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,d,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;mh[0].length)){if(h=d,f=m,this.options.backtrack_lexer){if(u=this.test_match(d,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[f]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var h=this.next();return h||this.lex()},"lex"),begin:a(function(h){this.conditionStack.push(h)},"begin"),popState:a(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:a(function(h){this.begin(h)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(h,d,f,p){var m=p;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return l})();i.lexer=s;function o(){this.yy={}}return a(o,"Parser"),o.prototype=i,i.Parser=o,new o})();xF.parser=xF;TT=xF});var dA,fA,hA,Gst,bF,Vst,TF,zst,Ust,Wst,jst,eSe,tSe=w(()=>{"use strict";Gt();Ir();fn();dA=[],fA=[],hA=new Map,Gst=a(()=>{dA=[],fA=[],hA=new Map,or()},"clear"),bF=class{constructor(t,r,n=0){this.source=t;this.target=r;this.value=n}static{a(this,"SankeyLink")}},Vst=a((e,t,r)=>{dA.push(new bF(e,t,r))},"addLink"),TF=class{constructor(t){this.ID=t}static{a(this,"SankeyNode")}},zst=a(e=>{e=gt.sanitizeText(e,_e());let t=hA.get(e);return t===void 0&&(t=new TF(e),hA.set(e,t),fA.push(t)),t},"findOrCreateNode"),Ust=a(()=>fA,"getNodes"),Wst=a(()=>dA,"getLinks"),jst=a(()=>({nodes:fA.map(e=>({id:e.ID})),links:dA.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),eSe={nodesMap:hA,getConfig:a(()=>_e().sankey,"getConfig"),getNodes:Ust,getLinks:Wst,getGraph:jst,addLink:Vst,findOrCreateNode:zst,getAccTitle:gr,setAccTitle:hr,getAccDescription:yr,setAccDescription:fr,getDiagramTitle:xr,setDiagramTitle:Cr,clear:Gst}});function CT(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var rSe=w(()=>{"use strict";a(CT,"max")});function vy(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var nSe=w(()=>{"use strict";a(vy,"min")});function wy(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}var iSe=w(()=>{"use strict";a(wy,"sum")});var CF=w(()=>{"use strict";rSe();nSe();iSe()});function qst(e){return e.target.depth}function kF(e){return e.depth}function SF(e,t){return t-1-e.height}function kT(e,t){return e.sourceLinks.length?e.depth:t-1}function EF(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?vy(e.sourceLinks,qst)-1:0}var vF=w(()=>{"use strict";CF();a(qst,"targetDepth");a(kF,"left");a(SF,"right");a(kT,"justify");a(EF,"center")});function _y(e){return function(){return e}}var sSe=w(()=>{"use strict";a(_y,"constant")});function aSe(e,t){return pA(e.source,t.source)||e.index-t.index}function oSe(e,t){return pA(e.target,t.target)||e.index-t.index}function pA(e,t){return e.y0-t.y0}function wF(e){return e.value}function Hst(e){return e.index}function Yst(e){return e.nodes}function Kst(e){return e.links}function lSe(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function cSe({nodes:e}){for(let t of e){let r=t.y0,n=r;for(let i of t.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of t.targetLinks)i.y1=n+i.width/2,n+=i.width}}function mA(){let e=0,t=0,r=1,n=1,i=24,s=8,o,l=Hst,u=kT,h,d,f=Yst,p=Kst,m=6;function g(){let N={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return y(N),x(N),b(N),T(N),E(N),cSe(N),N}a(g,"sankey"),g.update=function(N){return cSe(N),N},g.nodeId=function(N){return arguments.length?(l=typeof N=="function"?N:_y(N),g):l},g.nodeAlign=function(N){return arguments.length?(u=typeof N=="function"?N:_y(N),g):u},g.nodeSort=function(N){return arguments.length?(h=N,g):h},g.nodeWidth=function(N){return arguments.length?(i=+N,g):i},g.nodePadding=function(N){return arguments.length?(s=o=+N,g):s},g.nodes=function(N){return arguments.length?(f=typeof N=="function"?N:_y(N),g):f},g.links=function(N){return arguments.length?(p=typeof N=="function"?N:_y(N),g):p},g.linkSort=function(N){return arguments.length?(d=N,g):d},g.size=function(N){return arguments.length?(e=t=0,r=+N[0],n=+N[1],g):[r-e,n-t]},g.extent=function(N){return arguments.length?(e=+N[0][0],r=+N[1][0],t=+N[0][1],n=+N[1][1],g):[[e,t],[r,n]]},g.iterations=function(N){return arguments.length?(m=+N,g):m};function y({nodes:N,links:D}){for(let[R,P]of N.entries())P.index=R,P.sourceLinks=[],P.targetLinks=[];let M=new Map(N.map((R,P)=>[l(R,P,N),R]));for(let[R,P]of D.entries()){P.index=R;let{source:V,target:U}=P;typeof V!="object"&&(V=P.source=lSe(M,V)),typeof U!="object"&&(U=P.target=lSe(M,U)),V.sourceLinks.push(P),U.targetLinks.push(P)}if(d!=null)for(let{sourceLinks:R,targetLinks:P}of N)R.sort(d),P.sort(d)}a(y,"computeNodeLinks");function x({nodes:N}){for(let D of N)D.value=D.fixedValue===void 0?Math.max(wy(D.sourceLinks,wF),wy(D.targetLinks,wF)):D.fixedValue}a(x,"computeNodeValues");function b({nodes:N}){let D=N.length,M=new Set(N),R=new Set,P=0;for(;M.size;){for(let V of M){V.depth=P;for(let{target:U}of V.sourceLinks)R.add(U)}if(++P>D)throw new Error("circular link");M=R,R=new Set}}a(b,"computeNodeDepths");function T({nodes:N}){let D=N.length,M=new Set(N),R=new Set,P=0;for(;M.size;){for(let V of M){V.height=P;for(let{source:U}of V.targetLinks)R.add(U)}if(++P>D)throw new Error("circular link");M=R,R=new Set}}a(T,"computeNodeHeights");function C({nodes:N}){let D=CT(N,P=>P.depth)+1,M=(r-e-i)/(D-1),R=new Array(D);for(let P of N){let V=Math.max(0,Math.min(D-1,Math.floor(u.call(null,P,D))));P.layer=V,P.x0=e+V*M,P.x1=P.x0+i,R[V]?R[V].push(P):R[V]=[P]}if(h)for(let P of R)P.sort(h);return R}a(C,"computeNodeLayers");function v(N){let D=vy(N,M=>(n-t-(M.length-1)*o)/wy(M,wF));for(let M of N){let R=t;for(let P of M){P.y0=R,P.y1=R+P.value*D,R=P.y1+o;for(let V of P.sourceLinks)V.width=V.value*D}R=(n-R+o)/(M.length+1);for(let P=0;PM.length)-1)),v(D);for(let M=0;M0))continue;let K=(z/j-U.y0)*D;U.y0+=K,U.y1+=K,O(U)}h===void 0&&V.sort(pA),A(V,M)}}a(S,"relaxLeftToRight");function _(N,D,M){for(let R=N.length,P=R-2;P>=0;--P){let V=N[P];for(let U of V){let z=0,j=0;for(let{target:Z,value:ce}of U.sourceLinks){let te=ce*(Z.layer-U.layer);z+=F(U,Z)*te,j+=te}if(!(j>0))continue;let K=(z/j-U.y0)*D;U.y0+=K,U.y1+=K,O(U)}h===void 0&&V.sort(pA),A(V,M)}}a(_,"relaxRightToLeft");function A(N,D){let M=N.length>>1,R=N[M];$(N,R.y0-o,M-1,D),B(N,R.y1+o,M+1,D),$(N,n,N.length-1,D),B(N,t,0,D)}a(A,"resolveCollisions");function B(N,D,M,R){for(;M1e-6&&(P.y0+=V,P.y1+=V),D=P.y1+o}}a(B,"resolveCollisionsTopToBottom");function $(N,D,M,R){for(;M>=0;--M){let P=N[M],V=(P.y1-D)*R;V>1e-6&&(P.y0-=V,P.y1-=V),D=P.y0-o}}a($,"resolveCollisionsBottomToTop");function O({sourceLinks:N,targetLinks:D}){if(d===void 0){for(let{source:{sourceLinks:M}}of D)M.sort(oSe);for(let{target:{targetLinks:M}}of N)M.sort(aSe)}}a(O,"reorderNodeLinks");function G(N){if(d===void 0)for(let{sourceLinks:D,targetLinks:M}of N)D.sort(oSe),M.sort(aSe)}a(G,"reorderLinks");function I(N,D){let M=N.y0-(N.sourceLinks.length-1)*o/2;for(let{target:R,width:P}of N.sourceLinks){if(R===D)break;M+=P+o}for(let{source:R,width:P}of D.targetLinks){if(R===N)break;M-=P}return M}a(I,"targetTop");function F(N,D){let M=D.y0-(D.targetLinks.length-1)*o/2;for(let{source:R,width:P}of D.targetLinks){if(R===N)break;M+=P+o}for(let{target:R,width:P}of N.sourceLinks){if(R===D)break;M-=P}return M}return a(F,"sourceTop"),g}var uSe=w(()=>{"use strict";CF();vF();sSe();a(aSe,"ascendingSourceBreadth");a(oSe,"ascendingTargetBreadth");a(pA,"ascendingBreadth");a(wF,"value");a(Hst,"defaultId");a(Yst,"defaultNodes");a(Kst,"defaultLinks");a(lSe,"find");a(cSe,"computeLinkBreadths");a(mA,"Sankey")});function RF(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hSe(){return new RF}var _F,AF,gp,Xst,LF,dSe=w(()=>{"use strict";_F=Math.PI,AF=2*_F,gp=1e-6,Xst=AF-gp;a(RF,"Path");a(hSe,"path");RF.prototype=hSe.prototype={constructor:RF,moveTo:a(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:a(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:a(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:a(function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:a(function(e,t,r,n,i,s){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+s)},"bezierCurveTo"),arcTo:a(function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var s=this._x1,o=this._y1,l=r-e,u=n-t,h=s-e,d=o-t,f=h*h+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>gp)if(!(Math.abs(d*l-u*h)>gp)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-s,m=n-o,g=l*l+u*u,y=p*p+m*m,x=Math.sqrt(g),b=Math.sqrt(f),T=i*Math.tan((_F-Math.acos((g+f-y)/(2*x*b)))/2),C=T/b,v=T/x;Math.abs(C-1)>gp&&(this._+="L"+(e+C*h)+","+(t+C*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>h*m)+","+(this._x1=e+v*l)+","+(this._y1=t+v*u)}},"arcTo"),arc:a(function(e,t,r,n,i,s){e=+e,t=+t,r=+r,s=!!s;var o=r*Math.cos(n),l=r*Math.sin(n),u=e+o,h=t+l,d=1^s,f=s?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>gp||Math.abs(this._y1-h)>gp)&&(this._+="L"+u+","+h),r&&(f<0&&(f=f%AF+AF),f>Xst?this._+="A"+r+","+r+",0,1,"+d+","+(e-o)+","+(t-l)+"A"+r+","+r+",0,1,"+d+","+(this._x1=u)+","+(this._y1=h):f>gp&&(this._+="A"+r+","+r+",0,"+ +(f>=_F)+","+d+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},"arc"),rect:a(function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:a(function(){return this._},"toString")};LF=hSe});var fSe=w(()=>{"use strict";dSe()});function gA(e){return a(function(){return e},"constant")}var pSe=w(()=>{"use strict";a(gA,"default")});function mSe(e){return e[0]}function gSe(e){return e[1]}var ySe=w(()=>{"use strict";a(mSe,"x");a(gSe,"y")});var xSe,bSe=w(()=>{"use strict";xSe=Array.prototype.slice});function Qst(e){return e.source}function Zst(e){return e.target}function Jst(e){var t=Qst,r=Zst,n=mSe,i=gSe,s=null;function o(){var l,u=xSe.call(arguments),h=t.apply(this,u),d=r.apply(this,u);if(s||(s=l=LF()),e(s,+n.apply(this,(u[0]=h,u)),+i.apply(this,u),+n.apply(this,(u[0]=d,u)),+i.apply(this,u)),l)return s=null,l+""||null}return a(o,"link"),o.source=function(l){return arguments.length?(t=l,o):t},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:gA(+l),o):n},o.y=function(l){return arguments.length?(i=typeof l=="function"?l:gA(+l),o):i},o.context=function(l){return arguments.length?(s=l??null,o):s},o}function eat(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function IF(){return Jst(eat)}var TSe=w(()=>{"use strict";fSe();bSe();pSe();ySe();a(Qst,"linkSource");a(Zst,"linkTarget");a(Jst,"link");a(eat,"curveHorizontal");a(IF,"linkHorizontal")});var CSe=w(()=>{"use strict";TSe()});function tat(e){return[e.source.x1,e.y0]}function rat(e){return[e.target.x0,e.y1]}function yA(){return IF().source(tat).target(rat)}var kSe=w(()=>{"use strict";CSe();a(tat,"horizontalSource");a(rat,"horizontalTarget");a(yA,"default")});var SSe=w(()=>{"use strict";uSe();vF();kSe()});var ST,ESe=w(()=>{"use strict";ST=class e{static{a(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}}});var nat,iat,sat,vSe,wSe=w(()=>{"use strict";Gt();Lr();SSe();Rn();ESe();nat={left:kF,right:SF,center:EF,justify:kT},iat=a(e=>{let t=0,r=0;for(let n of e){let i=n.value??0;i>t&&(t=i,r=n.layer??0)}return r},"findCentralNodeLayer"),sat=a(function(e,t,r,n){let{securityLevel:i,sankey:s}=_e(),o=Xp.sankey,l;i==="sandbox"&&(l=st("#i"+t));let u=i==="sandbox"?st(l.nodes()[0].contentDocument.body):st("body"),h=i==="sandbox"?u.select(`[id="${t}"]`):st(`[id="${t}"]`),d=s?.width??o.width,f=s?.height??o.width,p=s?.useMaxWidth??o.useMaxWidth,m=s?.nodeAlignment??o.nodeAlignment,g=s?.prefix??o.prefix,y=s?.suffix??o.suffix,x=s?.showValues??o.showValues,b=s?.nodeWidth??o.nodeWidth??10,T=s?.nodePadding??o.nodePadding??12,C=s?.labelStyle??o.labelStyle??"legacy",v=s?.nodeColors??{},E=n.db.getGraph(),S=nat[m];mA().nodeId(R=>R.id).nodeWidth(b).nodePadding(T+(x?15:0)).nodeAlign(S).extent([[0,0],[d,f]])(E);let A=iat(E.nodes),B=Pa(nN),$=a(R=>v[R]??B(R),"getNodeColor");h.append("g").attr("class","nodes").selectAll(".node").data(E.nodes).join("g").attr("class","node").attr("id",R=>(R.uid=ST.next("node-")).id).attr("transform",function(R){return"translate("+R.x0+","+R.y0+")"}).attr("x",R=>R.x0).attr("y",R=>R.y0).append("rect").attr("height",R=>R.y1-R.y0).attr("width",R=>R.x1-R.x0).attr("fill",R=>$(R.id));let O=a(({id:R,value:P})=>x?`${R} +${g}${Math.round(P*100)/100}${y}`:R,"getText"),G=a(R=>C==="outlined"?(R.layer??0)I.selectAll(R?`.${R}`:"text").data(E.nodes).join("text").attr("class",R??null).attr("x",P=>G(P).x).attr("y",P=>(P.y1+P.y0)/2).attr("dy",`${x?"0":"0.35"}em`).attr("text-anchor",P=>G(P).anchor).text(O),"appendLabel");C==="outlined"?(F("sankey-label-bg"),F("sankey-label-fg")):F();let N=h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(E.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),D=s?.linkColor??"gradient";if(D==="gradient"){let R=N.append("linearGradient").attr("id",P=>(P.uid=ST.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",P=>P.source.x1).attr("x2",P=>P.target.x0);R.append("stop").attr("offset","0%").attr("stop-color",P=>$(P.source.id)),R.append("stop").attr("offset","100%").attr("stop-color",P=>$(P.target.id))}let M;switch(D){case"gradient":M=a(R=>R.uid,"coloring");break;case"source":M=a(R=>$(R.source.id),"coloring");break;case"target":M=a(R=>$(R.target.id),"coloring");break;default:M=D}N.append("path").attr("d",yA()).attr("stroke",M).attr("stroke-width",R=>Math.max(1,R.width)),kl(void 0,h,0,p)},"draw"),vSe={draw:sat}});var _Se,ASe=w(()=>{"use strict";_Se=a(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")});var aat,RSe,LSe=w(()=>{"use strict";aat=a(e=>`.label { + font-family: ${e.fontFamily}; + } + + .node-labels { + font-family: ${e.fontFamily}; + } + + /* Outlined label style - background stroke for better readability */ + .sankey-label-bg { + stroke: ${e.mainBkg||e.background||"#fff"}; + stroke-width: 4px; + stroke-linejoin: round; + paint-order: stroke; + } + + /* Foreground label text */ + .sankey-label-fg { + fill: ${e.textColor}; + } + + /* Node styling */ + .node rect { + shape-rendering: crispEdges; + } + + /* Link styling */ + .link { + fill: none; + stroke-opacity: 0.5; + mix-blend-mode: multiply; + } +`,"getStyles"),RSe=aat});var ISe={};ir(ISe,{diagram:()=>lat});var oat,lat,DSe=w(()=>{"use strict";J2e();tSe();wSe();ASe();LSe();oat=TT.parse.bind(TT);TT.parse=e=>oat(_Se(e));lat={styles:RSe,parser:TT,db:eSe,renderer:vSe}});var dat,Ay,DF=w(()=>{"use strict";Tr();Gi();jt();fn();dat=dr.packet,Ay=class{constructor(){this.packet=[];this.setAccTitle=hr;this.getAccTitle=gr;this.setDiagramTitle=Cr;this.getDiagramTitle=xr;this.getAccDescription=yr;this.setAccDescription=fr}static{a(this,"PacketDB")}getConfig(){let t=Nr({...dat,...Ct().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){or(),this.packet=[]}}});var fat,pat,mat,NF,OSe=w(()=>{"use strict";Ms();bt();va();DF();fat=1e4,pat=a((e,t)=>{Dn(e,t);let r=-1,n=[],i=1,{bitsPerRow:s}=t.getConfig();for(let{start:o,end:l,bits:u,label:h}of e.blocks){if(o!==void 0&&l!==void 0&&l{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];let n=t*r-1,i=t*r;return[{start:e.start,end:n,label:e.label,bits:n-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),NF={parser:{yy:void 0},parse:a(async e=>{let t=await ki("packet",e),r=NF.parser?.yy;if(!(r instanceof Ay))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");H.debug(t),pat(t,r)},"parse")}});var gat,yat,PSe,BSe=w(()=>{"use strict";Os();Rn();gat=a((e,t,r,n)=>{let i=n.db,s=i.getConfig(),{rowHeight:o,paddingY:l,bitWidth:u,bitsPerRow:h}=s,d=i.getPacket(),f=i.getDiagramTitle(),p=o+l,m=p*(d.length+1)-(f?0:o),g=u*h+2,y=gn(t);y.attr("viewBox",`0 0 ${g} ${m}`),Dr(y,m,g,s.useMaxWidth);for(let[x,b]of d.entries())yat(y,b,x,s);y.append("text").text(f).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),yat=a((e,t,r,{rowHeight:n,paddingX:i,paddingY:s,bitWidth:o,bitsPerRow:l,showBits:u,bitOrder:h})=>{let d=e.append("g"),f=r*(n+s)+s,p=h==="descending";for(let m of t){let g=m.end-m.start+1,y=m.start%l,b=(p?l-y-g:y)*o+1,T=g*o-i;if(d.append("rect").attr("x",b).attr("y",f).attr("width",T).attr("height",n).attr("class","packetBlock"),d.append("text").attr("x",b+T/2).attr("y",f+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(m.label),!u)continue;let[C,v]=p?[m.end,m.start]:[m.start,m.end],E=g===1,S=f-2;d.append("text").attr("x",b+(E?T/2:0)).attr("y",S).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",E?"middle":"start").text(C),E||d.append("text").attr("x",b+T).attr("y",S).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(v)}},"drawWord"),PSe={draw:gat}});var xat,$Se,FSe=w(()=>{"use strict";jt();xat={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},$Se=a(({packet:e}={})=>{let t=Nr(xat,e);return` + .packetByte { + font-size: ${t.byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `},"styles")});var GSe={};ir(GSe,{diagram:()=>bat});var bat,VSe=w(()=>{"use strict";DF();OSe();BSe();FSe();bat={parser:NF,get db(){return new Ay},renderer:PSe,styles:$Se}});var Ry,xA,WSe,hc,kat,Sat,jSe,Eat,vat,wat,_at,Aat,Rat,Lat,yp,MF=w(()=>{"use strict";Tr();Gi();jt();fn();bt();Ry={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},xA=32,WSe={axes:[],curves:[],options:Ry},hc=structuredClone(WSe),kat=dr.radar,Sat=a(()=>Nr({...kat,...Ct().radar}),"getConfig"),jSe=a(()=>hc.axes,"getAxes"),Eat=a(()=>hc.curves,"getCurves"),vat=a(()=>hc.options,"getOptions"),wat=a(e=>{hc.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),_at=a(e=>{hc.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:Aat(t.entries)}))},"setCurves"),Aat=a(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=jSe();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let n=e.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),Rat=a(e=>{let t=e.reduce((r,n)=>(r[n.name]=n,r),{});hc.options={showLegend:t.showLegend?.value??Ry.showLegend,ticks:t.ticks?.value??Ry.ticks,max:t.max?.value??Ry.max,min:t.min?.value??Ry.min,graticule:t.graticule?.value??Ry.graticule},hc.options.ticks>xA&&(H.warn(`Radar diagram ticks (${hc.options.ticks}) exceeds maximum allowed (${xA}). Using ${xA} instead.`),hc.options.ticks=xA)},"setOptions"),Lat=a(()=>{or(),hc=structuredClone(WSe)},"clear"),yp={getAxes:jSe,getCurves:Eat,getOptions:vat,setAxes:wat,setCurves:_at,setOptions:Rat,getConfig:Sat,clear:Lat,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,getAccDescription:yr,setAccDescription:fr}});var Iat,qSe,HSe=w(()=>{"use strict";Ms();bt();va();MF();Iat=a(e=>{Dn(e,yp);let{axes:t,curves:r,options:n}=e;yp.setAxes(t),yp.setCurves(r),yp.setOptions(n)},"populate"),qSe={parse:a(async e=>{let t=await ki("radar",e);H.debug(t),Iat(t)},"parse")}});function Pat(e,t,r,n,i,s,o){let l=t.length,u=Math.min(o.width,o.height)/2;r.forEach((h,d)=>{if(h.entries.length!==l)return;let f=h.entries.map((p,m)=>{let g=2*Math.PI*m/l-Math.PI/2,y=Bat(p,n,i,u),x=y*Math.cos(g),b=y*Math.sin(g);return{x,y:b}});s==="circle"?e.append("path").attr("d",$at(f,o.curveTension)).attr("class",`radarCurve-${d}`):s==="polygon"&&e.append("polygon").attr("points",f.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}function Bat(e,t,r,n){let i=Math.min(Math.max(e,t),r);return n*(i-t)/(r-t)}function $at(e,t){let r=e.length,n=`M${e[0].x},${e[0].y}`;for(let i=0;i{let h=e.append("g").attr("transform",`translate(${i}, ${s+u*o})`);h.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${u}`),h.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}var Dat,Nat,Mat,Oat,YSe,KSe=w(()=>{"use strict";Os();Rn();Dat=a((e,t,r,n)=>{let i=n.db,s=i.getAxes(),o=i.getCurves(),l=i.getOptions(),u=i.getConfig(),h=i.getDiagramTitle(),d=gn(t),f=Nat(d,u),p=l.max??Math.max(...o.map(y=>Math.max(...y.entries))),m=l.min,g=Math.min(u.width,u.height)/2;Mat(f,s,g,l.ticks,l.graticule),Oat(f,s,g,u),Pat(f,s,o,m,p,l.graticule,u),Fat(f,o,l.showLegend,u),f.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-u.height/2-u.marginTop)},"draw"),Nat=a((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return Dr(e,n,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} ${n}`).attr("overflow","visible"),e.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),Mat=a((e,t,r,n,i)=>{if(i==="circle")for(let s=0;s{let f=2*d*Math.PI/s-Math.PI/2,p=l*Math.cos(f),m=l*Math.sin(f);return`${p},${m}`}).join(" ");e.append("polygon").attr("points",u).attr("class","radarGraticule")}}},"drawGraticule"),Oat=a((e,t,r,n)=>{let i=t.length;for(let s=0;s.01?"start":u<-.01?"end":"middle",f=h>.01?"hanging":h<-.01?"auto":"central",p=4;e.append("text").text(o).attr("x",r*n.axisLabelFactor*u+p*u).attr("y",r*n.axisLabelFactor*h+p*h).attr("text-anchor",d).attr("dominant-baseline",f).attr("class","radarAxisLabel")}},"drawAxes");a(Pat,"drawCurves");a(Bat,"relativeRadius");a($at,"closedRoundCurve");a(Fat,"drawLegend");YSe={draw:Dat}});var Gat,Vat,XSe,QSe=w(()=>{"use strict";jt();yl();Tr();Gat=a((e,t)=>{let r="";for(let n=0;n{let t=Zi(),r=Ct(),n=Nr(t,r.themeVariables),i=Nr(n.radar,e);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),XSe=a(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=Vat(e);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${r.axisColor}; + stroke-width: ${r.axisStrokeWidth}; + } + .radarAxisLabel { + font-size: ${r.axisLabelFontSize}px; + color: ${r.axisColor}; + } + .radarGraticule { + fill: ${r.graticuleColor}; + fill-opacity: ${r.graticuleOpacity}; + stroke: ${r.graticuleColor}; + stroke-width: ${r.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${r.legendFontSize}px; + dominant-baseline: hanging; + } + ${Gat(t,r)} + `},"styles")});var ZSe={};ir(ZSe,{diagram:()=>zat});var zat,JSe=w(()=>{"use strict";MF();HSe();KSe();QSe();zat={parser:qSe,db:yp,renderer:YSe,styles:XSe}});var OF,rEe,nEe=w(()=>{"use strict";OF=(function(){var e=a(function(C,v,E,S){for(E=E||{},S=C.length;S--;E[C[S]]=v);return E},"o"),t=[1,15],r=[1,7],n=[1,13],i=[1,14],s=[1,19],o=[1,16],l=[1,17],u=[1,18],h=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],x={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:a(function(v,E,S,_,A,B,$){var O=B.length-1;switch(A){case 4:_.getLogger().debug("Rule: separator (NL) ");break;case 5:_.getLogger().debug("Rule: separator (Space) ");break;case 6:_.getLogger().debug("Rule: separator (EOF) ");break;case 7:_.getLogger().debug("Rule: hierarchy: ",B[O-1]),_.setHierarchy(B[O-1]);break;case 8:_.getLogger().debug("Stop NL ");break;case 9:_.getLogger().debug("Stop EOF ");break;case 10:_.getLogger().debug("Stop NL2 ");break;case 11:_.getLogger().debug("Stop EOF2 ");break;case 12:_.getLogger().debug("Rule: statement: ",B[O]),typeof B[O].length=="number"?this.$=B[O]:this.$=[B[O]];break;case 13:_.getLogger().debug("Rule: statement #2: ",B[O-1]),this.$=[B[O-1]].concat(B[O]);break;case 14:_.getLogger().debug("Rule: link: ",B[O],v),this.$={edgeTypeStr:B[O],label:""};break;case 15:_.getLogger().debug("Rule: LABEL link: ",B[O-3],B[O-1],B[O]),this.$={edgeTypeStr:B[O],label:B[O-1]};break;case 18:let G=parseInt(B[O]),I=_.generateId();this.$={id:I,type:"space",label:"",width:G,children:[]};break;case 23:_.getLogger().debug("Rule: (nodeStatement link node) ",B[O-2],B[O-1],B[O]," typestr: ",B[O-1].edgeTypeStr);let F=_.edgeStrToEdgeData(B[O-1].edgeTypeStr),N=_.edgeStrToEdgeStartData(B[O-1].edgeTypeStr),D=_.edgeStrToThickness(B[O-1].edgeTypeStr),M=_.edgeStrToPattern(B[O-1].edgeTypeStr);this.$=[{id:B[O-2].id,label:B[O-2].label,type:B[O-2].type,directions:B[O-2].directions},{id:B[O-2].id+"-"+B[O].id,start:B[O-2].id,end:B[O].id,label:B[O-1].label,type:"edge",thickness:D,pattern:M,directions:B[O].directions,arrowTypeEnd:F,arrowTypeStart:N},{id:B[O].id,label:B[O].label,type:_.typeStr2Type(B[O].typeStr),directions:B[O].directions}];break;case 24:_.getLogger().debug("Rule: nodeStatement (abc88 node size) ",B[O-1],B[O]),this.$={id:B[O-1].id,label:B[O-1].label,type:_.typeStr2Type(B[O-1].typeStr),directions:B[O-1].directions,widthInColumns:parseInt(B[O],10)};break;case 25:_.getLogger().debug("Rule: nodeStatement (node) ",B[O]),this.$={id:B[O].id,label:B[O].label,type:_.typeStr2Type(B[O].typeStr),directions:B[O].directions,widthInColumns:1};break;case 26:_.getLogger().debug("APA123",this?this:"na"),_.getLogger().debug("COLUMNS: ",B[O]),this.$={type:"column-setting",columns:B[O]==="auto"?-1:parseInt(B[O])};break;case 27:_.getLogger().debug("Rule: id-block statement : ",B[O-2],B[O-1]);let R=_.generateId();this.$={...B[O-2],type:"composite",children:B[O-1]};break;case 28:_.getLogger().debug("Rule: blockStatement : ",B[O-2],B[O-1],B[O]);let P=_.generateId();this.$={id:P,type:"composite",label:"",children:B[O-1]};break;case 29:_.getLogger().debug("Rule: node (NODE_ID separator): ",B[O]),this.$={id:B[O]};break;case 30:_.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",B[O-1],B[O]),this.$={id:B[O-1],label:B[O].label,typeStr:B[O].typeStr,directions:B[O].directions};break;case 31:_.getLogger().debug("Rule: dirList: ",B[O]),this.$=[B[O]];break;case 32:_.getLogger().debug("Rule: dirList: ",B[O-1],B[O]),this.$=[B[O-1]].concat(B[O]);break;case 33:_.getLogger().debug("Rule: nodeShapeNLabel: ",B[O-2],B[O-1],B[O]),this.$={typeStr:B[O-2]+B[O],label:B[O-1]};break;case 34:_.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",B[O-3],B[O-2]," #3:",B[O-1],B[O]),this.$={typeStr:B[O-3]+B[O],label:B[O-2],directions:B[O-1]};break;case 35:case 36:this.$={type:"classDef",id:B[O-1].trim(),css:B[O].trim()};break;case 37:this.$={type:"applyClass",id:B[O-1].trim(),styleClass:B[O].trim()};break;case 38:this.$={type:"applyStyles",id:B[O-1].trim(),stylesStr:B[O].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:u},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:n,29:i,31:s,39:o,43:l,46:u}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:u},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:s,39:o,43:l,46:u},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(g,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:y},{15:[1,50]},e(d,[2,27]),e(g,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},e(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:a(function(v,E){if(E.recoverable)this.trace(v);else{var S=new Error(v);throw S.hash=E,S}},"parseError"),parse:a(function(v){var E=this,S=[0],_=[],A=[null],B=[],$=this.table,O="",G=0,I=0,F=0,N=2,D=1,M=B.slice.call(arguments,1),R=Object.create(this.lexer),P={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(P.yy[V]=this.yy[V]);R.setInput(v,P.yy),P.yy.lexer=R,P.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var U=R.yylloc;B.push(U);var z=R.options&&R.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(ht){S.length=S.length-2*ht,A.length=A.length-ht,B.length=B.length-ht}a(j,"popStack");function K(){var ht;return ht=_.pop()||R.lex()||D,typeof ht!="number"&&(ht instanceof Array&&(_=ht,ht=_.pop()),ht=E.symbols_[ht]||ht),ht}a(K,"lex");for(var Z,ce,te,me,he,we,ye={},ke,Fe,Ge,Me;;){if(te=S[S.length-1],this.defaultActions[te]?me=this.defaultActions[te]:((Z===null||typeof Z>"u")&&(Z=K()),me=$[te]&&$[te][Z]),typeof me>"u"||!me.length||!me[0]){var at="";Me=[];for(ke in $[te])this.terminals_[ke]&&ke>N&&Me.push("'"+this.terminals_[ke]+"'");R.showPosition?at="Parse error on line "+(G+1)+`: +`+R.showPosition()+` +Expecting `+Me.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":at="Parse error on line "+(G+1)+": Unexpected "+(Z==D?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(at,{text:R.match,token:this.terminals_[Z]||Z,line:R.yylineno,loc:U,expected:Me})}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+te+", token: "+Z);switch(me[0]){case 1:S.push(Z),A.push(R.yytext),B.push(R.yylloc),S.push(me[1]),Z=null,ce?(Z=ce,ce=null):(I=R.yyleng,O=R.yytext,G=R.yylineno,U=R.yylloc,F>0&&F--);break;case 2:if(Fe=this.productions_[me[1]][1],ye.$=A[A.length-Fe],ye._$={first_line:B[B.length-(Fe||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(Fe||1)].first_column,last_column:B[B.length-1].last_column},z&&(ye._$.range=[B[B.length-(Fe||1)].range[0],B[B.length-1].range[1]]),we=this.performAction.apply(ye,[O,I,G,P.yy,me[1],A,B].concat(M)),typeof we<"u")return we;Fe&&(S=S.slice(0,-1*Fe*2),A=A.slice(0,-1*Fe),B=B.slice(0,-1*Fe)),S.push(this.productions_[me[1]][0]),A.push(ye.$),B.push(ye._$),Ge=$[S[S.length-2]][S[S.length-1]],S.push(Ge);break;case 3:return!0}}return!0},"parse")},b=(function(){var C={EOF:1,parseError:a(function(E,S){if(this.yy.parser)this.yy.parser.parseError(E,S);else throw new Error(E)},"parseError"),setInput:a(function(v,E){return this.yy=E||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var E=v.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},"input"),unput:a(function(v){var E=v.length,S=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.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:S?(S.length===_.length?this.yylloc.first_column:0)+_[_.length-S.length].length-S[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(v){this.unput(this.match.slice(v))},"less"),pastInput:a(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var v=this.pastInput(),E=new Array(v.length+1).join("-");return v+this.upcomingInput()+` +`+E+"^"},"showPosition"),test_match:a(function(v,E){var S,_,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))),_=v[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,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(v[0].length),this.matched+=v[0],S=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var B in A)this[B]=A[B];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,E,S,_;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),B=0;BE[0].length)){if(E=S,_=B,this.options.backtrack_lexer){if(v=this.test_match(S,A[B]),v!==!1)return v;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(v=this.test_match(E,A[_]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var E=this.next();return E||this.lex()},"lex"),begin:a(function(E){this.conditionStack.push(E)},"begin"),popState:a(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:a(function(E){this.begin(E)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(E,S,_,A){var B=A;switch(_){case 0:return E.getLogger().debug("Found block-beta"),10;break;case 1:return E.getLogger().debug("Found id-block"),29;break;case 2:return E.getLogger().debug("Found block"),10;break;case 3:E.getLogger().debug(".",S.yytext);break;case 4:E.getLogger().debug("_",S.yytext);break;case 5:return 5;case 6:return S.yytext=-1,28;break;case 7:return S.yytext=S.yytext.replace(/columns\s+/,""),E.getLogger().debug("COLUMNS (LEX)",S.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:E.getLogger().debug("LEX: POPPING STR:",S.yytext),this.popState();break;case 13:return E.getLogger().debug("LEX: STR end:",S.yytext),"STR";break;case 14:return S.yytext=S.yytext.replace(/space\:/,""),E.getLogger().debug("SPACE NUM (LEX)",S.yytext),21;break;case 15:return S.yytext="1",E.getLogger().debug("COLUMNS (LEX)",S.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),E.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),E.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),E.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),E.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),E.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),E.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),E.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),E.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),E.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),E.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),E.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),E.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),E.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),E.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),E.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),E.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),E.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return E.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return E.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return E.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return E.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return E.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return E.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return E.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return E.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return E.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return E.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return E.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return E.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),E.getLogger().debug("LEX ARR START"),37;break;case 74:return E.getLogger().debug("Lex: NODE_ID",S.yytext),31;break;case 75:return E.getLogger().debug("Lex: EOF",S.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:E.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:E.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return E.getLogger().debug("LEX: NODE_DESCR:",S.yytext),"NODE_DESCR";break;case 83:E.getLogger().debug("LEX POPPING"),this.popState();break;case 84:E.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return S.yytext=S.yytext.replace(/^,\s*/,""),E.getLogger().debug("Lex (right): dir:",S.yytext),"DIR";break;case 86:return S.yytext=S.yytext.replace(/^,\s*/,""),E.getLogger().debug("Lex (left):",S.yytext),"DIR";break;case 87:return S.yytext=S.yytext.replace(/^,\s*/,""),E.getLogger().debug("Lex (x):",S.yytext),"DIR";break;case 88:return S.yytext=S.yytext.replace(/^,\s*/,""),E.getLogger().debug("Lex (y):",S.yytext),"DIR";break;case 89:return S.yytext=S.yytext.replace(/^,\s*/,""),E.getLogger().debug("Lex (up):",S.yytext),"DIR";break;case 90:return S.yytext=S.yytext.replace(/^,\s*/,""),E.getLogger().debug("Lex (down):",S.yytext),"DIR";break;case 91:return S.yytext="]>",E.getLogger().debug("Lex (ARROW_DIR end):",S.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return E.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;break;case 93:return E.getLogger().debug("Lex: LINK",S.yytext),15;break;case 94:return E.getLogger().debug("Lex: LINK",S.yytext),15;break;case 95:return E.getLogger().debug("Lex: LINK",S.yytext),15;break;case 96:return E.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 97:return E.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 98:return E.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return E.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),E.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;break;case 102:return this.popState(),E.getLogger().debug("Lex: LINK",S.yytext),15;break;case 103:return this.popState(),E.getLogger().debug("Lex: LINK",S.yytext),15;break;case 104:return E.getLogger().debug("Lex: COLON",S.yytext),S.yytext=S.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return C})();x.lexer=b;function T(){this.yy={}}return a(T,"Parser"),T.prototype=x,x.Parser=T,new T})();OF.parser=OF;rEe=OF});function Qat(e){switch(H.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return H.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Zat(e){switch(H.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function Jat(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function eot(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function tot(e){return e.includes("==")?"thick":"normal"}function rot(e){return e.includes(".-")?"dotted":"solid"}var pl,BF,PF,iEe,sEe,jat,oEe,bA,$F,qat,Hat,Yat,Kat,lEe,cEe,FF,ET,Xat,aEe,not,iot,sot,aot,oot,lot,cot,uot,hot,dot,fot,pot,mot,uEe,hEe=w(()=>{"use strict";A2();Tr();Gt();bt();Ir();fn();pl=new Map,BF=[],PF=new Map,iEe="color",sEe="fill",jat="bgFill",oEe=",",bA=new Map,$F="",qat=a(e=>gt.sanitizeText(e,_e()),"sanitizeText"),Hat=a(function(e,t=""){let r=bA.get(e);r||(r={id:e,styles:[],textStyles:[]},bA.set(e,r)),t?.split(oEe).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(iEe).exec(n)){let o=i.replace(sEe,jat).replace(iEe,sEe);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),Yat=a(function(e,t=""){let r=pl.get(e);t!=null&&(r.styles=t.split(oEe))},"addStyle2Node"),Kat=a(function(e,t){e.split(",").forEach(function(r){let n=pl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},pl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),lEe=0,cEe=a((e,t)=>{let r=e.flat(),n=[],s=r.find(o=>o?.type==="column-setting")?.columns??-1;for(let o of r){if(typeof s=="number"&&s>0&&o.type!=="column-setting"&&typeof o.widthInColumns=="number"&&o.widthInColumns>s&&H.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${s}`),o.label&&(o.label=qat(o.label)),o.type==="classDef"){Hat(o.id,o.css);continue}if(o.type==="applyClass"){Kat(o.id,o?.styleClass??"");continue}if(o.type==="applyStyles"){o?.stylesStr&&Yat(o.id,o?.stylesStr);continue}if(o.type==="column-setting")t.columns=o.columns??-1;else if(o.type==="edge"){let l=(PF.get(o.id)??0)+1;PF.set(o.id,l),o.id=l+"-"+o.id,BF.push(o)}else{o.label||(o.type==="composite"?o.label="":o.label=o.id);let l=pl.get(o.id);if(l===void 0?(o.type==="composite"&&(o.colorIndex=lEe++),pl.set(o.id,o)):(o.type!=="na"&&(l.type=o.type),o.label!==o.id&&(l.label=o.label)),o.children&&cEe(o.children,o),o.type==="space"){let u=o.width??1;for(let h=0;h{H.debug("Clear called"),or(),ET={id:"root",type:"composite",children:[],columns:-1},pl=new Map([["root",ET]]),FF=[],bA=new Map,BF=[],PF=new Map,$F="",lEe=0},"clear");a(Qat,"typeStr2Type");a(Zat,"edgeTypeStr2Type");a(Jat,"edgeStrToEdgeData");a(eot,"edgeStrToEdgeStartData");a(tot,"edgeStrToThickness");a(rot,"edgeStrToPattern");aEe=0,not=a(()=>(aEe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+aEe),"generateId"),iot=a(e=>{ET.children=e,cEe(e,ET),FF=ET.children},"setHierarchy"),sot=a(e=>{let t=pl.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),aot=a(()=>[...pl.values()],"getBlocksFlat"),oot=a(()=>FF||[],"getBlocks"),lot=a(()=>BF,"getEdges"),cot=a(e=>pl.get(e),"getBlock"),uot=a(e=>{pl.set(e.id,e)},"setBlock"),hot=a(e=>{$F=e},"setDiagramId"),dot=a(()=>$F,"getDiagramId"),fot=a(()=>H,"getLogger"),pot=a(function(){return bA},"getClasses"),mot={getConfig:a(()=>Ct().block,"getConfig"),typeStr2Type:Qat,edgeTypeStr2Type:Zat,edgeStrToEdgeData:Jat,edgeStrToEdgeStartData:eot,edgeStrToThickness:tot,edgeStrToPattern:rot,getLogger:fot,getBlocksFlat:aot,getBlocks:oot,getEdges:lot,setHierarchy:iot,getBlock:cot,setBlock:uot,getColumns:sot,getClasses:pot,clear:Xat,generateId:not,setDiagramId:hot,getDiagramId:dot},uEe=mot});var got,GF,yot,dEe,fEe=w(()=>{"use strict";Ai();Tf();Wi();got=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Di(e.look),s=zi(r),o="";for(let l=0;l{let r=kc,n=r(e,"r"),i=r(e,"g"),s=r(e,"b");return Qn(n,i,s,t)},"fade"),yot=a(e=>`${got(e)} + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + + + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + /* From the theme, as every other diagram does. Pinned at 1px here, so block drew a + thinner border than an identical flowchart node under any theme asking for more -- + the neo theme asks for 2. Nothing downstream corrected it: the neo rules set stroke + and filter, never stroke-width. */ + stroke-width: ${e.strokeWidth??1}px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePaths .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + /* + * This is for backward compatibility with existing code that didn't + * add a \`

    \` around edge labels. + * + * TODO: We should probably remove this in a future release. + */ + p { + margin: 0; + padding: 0; + display: inline; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + + .node .cluster { + // fill: ${GF(e.mainBkg,.5)}; + fill: ${GF(e.clusterBkg,.5)}; + stroke: ${GF(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${Co()} +`,"getStyles"),dEe=yot});function pEe(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let r=t%e,n=Math.floor(t/e);return{px:r,py:n}}function VF(e,t,r=0,n=0,i=8){H.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:n,x:0,y:0});let s=0,o=0;if(e.children?.length>0){for(let g of e.children)VF(g,t,0,0,i);let l=xot(e);s=l.width,o=l.height,H.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",s,o);for(let g of e.children)g.size&&(H.debug(`abc95 Setting size of children of ${e.id} id=${g.id} ${s} ${o} ${JSON.stringify(g.size)}`),g.size.width=s*(g.widthInColumns??1)+i*((g.widthInColumns??1)-1),g.size.height=o,g.size.x=0,g.size.y=0,H.debug(`abc95 updating size of ${e.id} children child:${g.id} maxWidth:${s} maxHeight:${o}`));for(let g of e.children)VF(g,t,s,o,i);let u=e.columns??-1,h=0;for(let g of e.children)h+=g.widthInColumns??1;let d=e.children.length;u>0&&u0?Math.min(e.children.length,u):e.children.length;if(g>0){let y=(p-g*i-i)/g;H.debug("abc95 (growing to fit) width",e.id,p,e.size?.width,y);for(let x of e.children)x.size&&(x.size.width=y)}}e.size={width:p,height:m,x:0,y:0}}H.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function mEe(e,t,r=8){H.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let n=e.columns??-1;if(H.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,s=e.children.length*i+(e.children.length-1)*r;H.debug("widthOfChildren 88",s,"posX");let o=new Map;{let f=0;for(let p of e.children){if(!p.size)continue;let{py:m}=pEe(n,f),g=o.get(m)??0;p.size.height>g&&o.set(m,p.size.height);let y=p?.widthInColumns??1;n>0&&(y=Math.min(y,n-f%n)),f+=y}}let l=new Map;{let f=0,p=[...o.keys()].sort((m,g)=>m-g);for(let m of p)l.set(m,f),f+=(o.get(m)??0)+r}let u=0;H.debug("abc91 block?.size?.x",e.id,e?.size?.x);let h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let f of e.children){let p=e;if(!f.size)continue;let{width:m,height:g}=f.size,{px:y,py:x}=pEe(n,u);if(x!=d&&(d=x,h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,H.debug("New row in layout for block",e.id," and child ",f.id,d)),H.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${u} (px, py) ${y},${x} (${p?.size?.x},${p?.size?.y}) parent: ${p.id} width: ${m}${r}`),p.size){let T=m/2;f.size.x=h+r+T,H.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${h} new startingPosX${f.size.x} ${T} padding=${r} width=${m} halfWidth=${T} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${m*(f?.widthInColumns??1)/2}`),h=f.size.x+T;let C=l.get(x)??0,v=o.get(x)??g;f.size.y=p.size.y-p.size.height/2+C+v/2+r,H.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${h}${r}${T}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${m*(f?.widthInColumns??1)/2}`)}f.children&&mEe(f,t,r);let b=f?.widthInColumns??1;n>0&&(b=Math.min(b,n-u%n)),u+=b,H.debug("abc88 columnsPos",f,u)}}H.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function gEe(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:s,y:o,width:l,height:u}=e.size;s-l/2n&&(n=s+l/2),o+u/2>i&&(i=o+u/2)}if(e.children)for(let s of e.children)({minX:t,minY:r,maxX:n,maxY:i}=gEe(s,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}function yEe(e){let t=e.getBlock("root");if(!t)return;let r=_e()?.block?.padding??8;VF(t,e,0,0,r),mEe(t,e,r),H.debug("getBlocks",JSON.stringify(t,null,2));let{minX:n,minY:i,maxX:s,maxY:o}=gEe(t),l=o-i,u=s-n;return{x:n,y:i,width:u,height:l}}var xot,xEe=w(()=>{"use strict";bt();Gt();a(pEe,"calculateBlockPosition");xot=a(e=>{let t=0,r=0;for(let n of e.children){let{width:i,height:s,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};if(H.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",s,"x:",o,"y:",l,n.type),n.type==="space")continue;let u=i/(n.widthInColumns??1);u>t&&(t=u),s>r&&(r=s)}return{width:t,height:r}},"getMaxChildSize");a(VF,"setBlockSizes");a(mEe,"layoutBlocks");a(gEe,"findBounds");a(yEe,"layout")});function bEe(e,t,r=!1){let n=e,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let s=(n?.classes??[]).flatMap(g=>t.getClasses().get(g)?.styles??[]),o=0,l="rect",u;switch(n.type){case"round":o=5,l="rect";break;case"composite":o=0,l="composite",u=0;break;case"square":l="rect";break;case"diamond":l="question";break;case"hexagon":l="hexagon";break;case"block_arrow":l="block_arrow";break;case"odd":l="rect_left_inv_arrow";break;case"lean_right":l="lean_right";break;case"lean_left":l="lean_left";break;case"trapezoid":l="trapezoid";break;case"inv_trapezoid":l="inv_trapezoid";break;case"rect_left_inv_arrow":l="rect_left_inv_arrow";break;case"circle":l="circle";break;case"ellipse":l="ellipse";break;case"stadium":l="stadium";break;case"subroutine":l="subroutine";break;case"cylinder":l="cylinder";break;case"group":l="rect";break;case"doublecircle":l="doublecircle";break;default:l="rect"}let h=ON(n?.styles??[]),d=n.label,f=n.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:h.labelStyle,shape:l,label:d,labelText:d,rx:o,ry:o,class:i,cssClasses:i,cssStyles:n?.styles??[],cssCompiledStyles:s,style:h.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:f.width||void 0,height:f.height||void 0,wrappingWidth:f.width||Number.POSITIVE_INFINITY,x:f.x,y:f.y,positioned:r,intersect:void 0,padding:u??Ct()?.block?.padding??0,widthInColumns:n.widthInColumns??1,colorIndex:n.colorIndex,look:Ct().look}}async function bot(e,t,r){let n=bEe(t,r,!1);if(t.type==="group")return;let i=Ct(),s=await Fc(e,n,{config:i}),o=s.node()?.getBBox()??{width:0,height:0},l=r.getBlock(n.id);l.size={width:o.width,height:o.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}async function Tot(e,t,r){let n=bEe(t,r,!0);if(r.getBlock(n.id).type!=="space"){let s=Ct(),o=await Fc(e,n,{config:s});n.colorIndex!==void 0&&ci(o,n.colorIndex,s.theme,s.themeVariables?.borderColorArray),t.intersect=n?.intersect,Pl(n)}}async function zF(e,t,r,n){for(let i of t)await n(e,i,r),i.children&&await zF(e,i.children,r,n)}async function TEe(e,t,r){await zF(e,t,r,bot)}async function CEe(e,t,r){await zF(e,t,r,Tot)}async function kEe(e,t,r,n,i){let s=new Tn({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let o of r)o.size&&s.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(let o of t)if(o.start&&o.end){let l=n.getBlock(o.start),u=n.getBlock(o.end);if(l?.size&&u?.size){let h=l.size,d=u.size,f=[{x:h.x,y:h.y},{x:h.x+(d.x-h.x)/2,y:h.y+(d.y-h.y)/2},{x:d.x,y:d.y}],p=i?`${i}-${o.id}`:o.id,m=o.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",g=o.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",y=`${m} ${g} flowchart-link LS-a1 LE-b1`;ih(e,{...o,id:p,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:f,classes:y},{},"block",s.node(o.start),s.node(o.end),i),o.label&&(await Jo(e,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:f,classes:y}),Nm({...o,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var SEe=w(()=>{"use strict";xo();Tr();Mm();tf();Wi();jt();a(bEe,"getNodeFromBlock");a(bot,"calculateBlockSize");a(Tot,"insertBlockPositioned");a(zF,"performOperations");a(TEe,"calculateBlockSizes");a(CEe,"insertBlocks");a(kEe,"insertEdges")});var Cot,kot,EEe,vEe=w(()=>{"use strict";Lr();Tr();bt();uS();dM();Rn();xEe();SEe();Cot=a(function(e,t){return t.db.getClasses()},"getClasses"),kot=a(async function(e,t,r,n){let{securityLevel:i,block:s}=Ct(),o=n.db;o.setDiagramId(t);let l;i==="sandbox"&&(l=st("#i"+t));let u=i==="sandbox"?st(l.nodes()[0].contentDocument.body):st("body"),h=i==="sandbox"?u.select(`[id="${t}"]`):st(`[id="${t}"]`);dS(h,Ct()),Om(h,["point","circle","cross"],n.type,t);let f=o.getBlocks(),p=o.getBlocksFlat(),m=o.getEdges(),g=h.insert("g").attr("class","block");await TEe(g,f,o);let y=yEe(o);await CEe(g,f,o),await kEe(g,m,p,o,t);let x=g.node()?.getBBox(),b=x&&Number.isFinite(x.width)&&Number.isFinite(x.height)?x:y;if(b){let T=Math.max(1,Math.round(.125*(b.width/b.height))),C=b.height+T+10,v=b.width+10,{useMaxWidth:E}=s;Dr(h,C,v,!!E),H.debug("Here Bounds",y,b),h.attr("viewBox",`${b.x-5} ${b.y-5} ${b.width+10} ${b.height+10}`)}},"draw"),EEe={draw:kot,getClasses:Cot}});var wEe={};ir(wEe,{diagram:()=>Sot});var Sot,_Ee=w(()=>{"use strict";nEe();hEe();fEe();vEe();Sot={parser:rEe,db:uEe,renderer:EEe,styles:dEe}});function Rot(e){return e.some(t=>NEe.test(t))}function Lot(e){for(let t of e){let r=MEe.exec(t);if(r?.index&&r.index>0)return r.index}return 4}function OEe(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(r,n)=>{let i=parseInt(n,10),s=t.get(i);return s?`line ${s}`:r})}function PEe(e){let t=e.split(` +`),r=new Map,n=-1;for(let[u,h]of t.entries())if(h.trim()==="treeView-beta"){n=u;break}if(n===-1)return{text:e,lineMap:r};let i=[];for(let u=n+1;u{"use strict";NEe=/[─━│┃└┗├┣]/,MEe=/[└┗├┣]/,_ot=/[─━]/,LEe=/^[\s│┃]+$/,IEe=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,DEe=/^\s*%%/,Aot=" ";a(Rot,"isBoxDrawingFormat");a(Lot,"inferSegmentWidth");a(OEe,"remapErrorLines");a(PEe,"preprocessBoxDrawing")});var dc,Iot,Dot,Not,Mot,Oot,Pot,Bot,vT,UF=w(()=>{"use strict";Tr();Gi();jt();k_();fn();dc=new Kh(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),Iot=a(()=>{dc.reset(),or()},"clear"),Dot=a(()=>dc.records.stack[0],"getRoot"),Not=a(()=>dc.records.cnt,"getCount"),Mot=dr.treeView,Oot=a(()=>Nr(Mot,Ct().treeView),"getConfig"),Pot=a((e,t,r,n,i,s)=>{for(;e<=dc.records.stack[dc.records.stack.length-1].level;)dc.records.stack.pop();let o={id:dc.records.cnt++,level:e,name:t,nodeType:r,icon:i,cssClass:n,description:s,children:[]};dc.records.stack[dc.records.stack.length-1].children.push(o),dc.records.stack.push(o)},"addNode"),Bot={clear:Iot,addNode:Pot,getRoot:Dot,getCount:Not,getConfig:Oot,getAccTitle:gr,getAccDescription:yr,getDiagramTitle:xr,setAccDescription:fr,setAccTitle:hr,setDiagramTitle:Cr},vT=Bot});var $ot,$Ee,FEe=w(()=>{"use strict";Ms();Tr();bt();Ir();va();BEe();UF();$ot=a(e=>{Dn(e,vT);for(let t of e.nodes){let r=typeof t.indent=="number"?t.indent:0,n=t.name,i=n.endsWith("/");i&&(n=n.slice(0,-1));let s=i?"directory":"file",o=t.classAnnotation||void 0,l=t.iconAnnotation,u=l!==void 0?l||"none":void 0,h=t.descAnnotation||void 0,d=h?vr(h,Ct()):void 0;vT.addNode(r,n,s,o,u,d)}},"populate"),$Ee={parse:a(async e=>{let{text:t,lineMap:r}=PEe(e);try{let n=await ki("treeView",t);H.debug(n),$ot(n)}catch(n){throw r.size>0&&n instanceof Error&&(n.message=OEe(n.message,r)),n}},"parse")}});function Fot(e,t){let r=t?.filenameIcons?.[e];if(r)return r;let n=e.lastIndexOf(".");if(n>0){let i=e.substring(n).toLowerCase(),s=t?.extensionIcons;return s?.[i]??s?.[i.slice(1)]}}function GEe(e,t){return e.includes(":")?e:e in Ly.icons||!t?`${Ly.prefix}:${e}`:`${t}:${e}`}function WF(e,t){if(e.icon!=="none"){if(e.icon)return GEe(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType==="file"){let r=Fot(e.name,t);if(r==="none")return;if(r)return GEe(r,t.defaultIconPack)}return`${Ly.prefix}:${e.nodeType==="directory"?"folder":"file"}`}}}var Ly,VEe=w(()=>{"use strict";Ly={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};a(Fot,"detectIcon");a(GEe,"qualifyIcon");a(WF,"getNodeIcon")});var jF,Got,Vot,zot,Uot,zEe,Wot,jot,qot,UEe,WEe=w(()=>{"use strict";bt();Sc();Os();Rn();VEe();DC([{name:Ly.prefix,icons:Ly}]);jF=14,Got=4,Vot=16,zot=a(async(e,t)=>{let r=[],n=a(s=>{let o=WF(s,t);o&&r.push({icon:o,node:s}),s.children.forEach(n)},"collect");n(e);let i=await Promise.all(r.map(async({icon:s,node:o})=>({id:o.id,svg:await na(s,{height:jF,width:jF})})));return new Map(i.map(({id:s,svg:o})=>[s,o]))},"resolveNodeIcons"),Uot=a((e,t,r,n,i,s)=>{let o=n.append("g"),l="treeView-node-label";r.nodeType==="directory"&&(l+=" treeView-node-dir"),r.cssClass&&(l+=` ${r.cssClass}`);let u=jF+Got,h=WF(r,i),d=h!==void 0;h&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(s.get(r.id)??"");let f=o.append("text").text(r.name).attr("dominant-baseline","middle").attr("class",l),{height:p,width:m}=f.node().getBBox(),g=p+i.paddingY*2,y=e+i.paddingX+(d?u:0);f.attr("x",y),f.attr("y",t+g/2);let x=y+m,b=m+i.paddingX*2+(d?u:0);return r.BBox={x:e,y:t,width:b,height:g},r.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:r,nodeGroup:o,labelRightEdge:x,centerY:t+g/2}},"positionLabel"),zEe=a((e,t,r,n,i,s)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width",s).attr("class","treeView-node-line"),"positionLine"),Wot=a((e,t,r,n)=>{let i=0,s=0,o=[],l=a((d,f,p,m)=>{let g=m*(p.rowIndent+p.paddingX),y=Uot(g,i,f,d,p,n);o.push(y);let{height:x,width:b}=f.BBox;zEe(d,g-p.rowIndent,i+x/2,g,i+x/2,p.lineThickness),s=Math.max(s,g+b),i+=x},"drawNode"),u=a((d,f=0)=>{l(e,d,r,f),d.children.forEach(y=>{u(y,f+1)});let{x:p,y:m,height:g}=d.BBox;if(d.children.length){let{y,height:x}=d.children[d.children.length-1].BBox;zEe(e,p+r.paddingX,m+g,p+r.paddingX,y+x/2+r.lineThickness/2,r.lineThickness)}},"processNode");u(t);let h=o.filter(d=>d.node.description);if(h.length>0){let f=Math.max(...o.map(p=>p.labelRightEdge))+Vot;for(let p of h){let g=p.nodeGroup.append("text").text(p.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",p.centerY).node().getBBox();s=Math.max(s,f+g.width+r.paddingX)}}for(let d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){let f=d.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let p=s-d.node.BBox.x+8;f.attr("width",p),s=Math.max(s,d.node.BBox.x+p+2)}}return{totalHeight:i,totalWidth:s}},"drawTree"),jot=a(async(e,t,r,n)=>{H.debug(`Rendering treeView diagram +`+e);let i=n.db,s=i.getRoot(),o=i.getConfig(),l=gn(t),u=l.append("g");u.attr("class","tree-view");let h=await zot(s,o),{totalHeight:d,totalWidth:f}=Wot(u,s,o,h);l.attr("viewBox",`-${o.lineThickness/2} 0 ${f} ${d}`),Dr(l,d,f,o.useMaxWidth)},"draw"),qot={draw:jot},UEe=qot});var Hot,Yot,jEe,qEe=w(()=>{"use strict";jt();Hot={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Yot=a(({treeView:e})=>{let{labelFontSize:t,labelColor:r,lineColor:n,iconColor:i,descriptionColor:s,highlightBg:o,highlightStroke:l}=Nr(Hot,e);return` + .treeView-node-label { + font-size: ${t}; + fill: ${r}; + white-space: pre; + } + .treeView-node-dir { + font-weight: bold; + } + .treeView-node-line { + stroke: ${n}; + } + .treeView-node-icon { + color: ${i}; + } + .treeView-node-description { + font-size: ${t}; + fill: ${s}; + font-style: italic; + white-space: pre; + } + .treeView-highlight-bg { + fill: ${o}; + stroke: ${l}; + stroke-width: 1; + } + `},"styles"),jEe=Yot});var HEe={};ir(HEe,{diagram:()=>Kot});var Kot,YEe=w(()=>{"use strict";FEe();UF();WEe();qEe();Kot={db:vT,renderer:UEe,parser:$Ee,styles:jEe}});var qF,HF,TA,YF,QEe=w(()=>{"use strict";qF="position frame",HF="frame positioned",TA="position relation",YF="relation positioned"});function rlt(){CA={}}function slt(){let e=olt,{ast:t}=CA,r=JEe();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((n,i)=>{let s=flt(n,t.dataEntities,r);e=XF(e,{$kind:qF,index:i,frame:n,textProps:s});let o;blt(n)?(H.debug("source frame",n.sourceFrames),o=t.frames.filter(l=>n.sourceFrames.some(u=>u.$refText===l.name)),o.forEach(l=>{e=XF(e,{$kind:TA,index:i,frame:n,sourceFrame:l})})):e=XF(e,{$kind:TA,index:i,frame:n})}),e={...e,sortedSwimlanesArray:eve(e.swimlanes)},e}function alt(e){CA.ast=void 0;let t=new Set;for(let r of e.frames){if(t.has(r.name)){let n=r.$cstNode?.range.start.line,i=n===void 0?"":` on line ${n+1}`;throw new Error(`Duplicate event modeling frame ID "${r.name}"${i}`)}t.add(r.name)}CA.ast=e}function JEe(){return ln}function llt(e){let t=e.split(".");if(t.length===2)return t[0]}function clt(e){let t=e.split(".");return t.length===2?t[1]:e}function ult(e,t){if(!(!t||t.length===0))return Object.values(e).find(r=>r.namespace===t)}function KF(e,t,r){return Math.max(t,...Object.keys(e).filter(n=>{let i=Number.parseInt(n);return i>t&&iNumber.parseInt(n)))+1}function hlt(e,t){let r=llt(e.entityIdentifier),n=ult(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return n?{index:n.index,label:n.namespace||ln.labelUiAutomation}:r?{index:KF(t,0,100),label:ln.labelUiAutomationPrefix+r}:{index:0,label:ln.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return n?{index:n.index,label:n.namespace||ln.labelCommandReadModel}:r?{index:KF(t,100,200),label:ln.labelCommandReadModelPrefix+r}:{index:100,label:ln.labelCommandReadModel};case"evt":case"event":default:return n?{index:n.index,label:n.namespace||ln.labelEvents}:r?{index:KF(t,200,300),label:ln.labelEventsPrefix+r}:{index:200,label:ln.labelEvents}}}function dlt(e){let{themeVariables:t}=Ct();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function flt(e,t,r){let n=Ct(),i=vr(clt(e.entityIdentifier)??"",n),s,o={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
    "},u=`${qd(i,r.textMaxWidth,o)}`;if(e.dataInlineValue&&(s=e.dataInlineValue,s=s.substring(s.indexOf("{")+1),s=s.substring(0,s.lastIndexOf("}")-1),s=vr(s,n),s=qd(s,r.textMaxWidth,o),s=s.replaceAll(" "," ")),e.dataReference){let g=t.find(y=>y.name===e.dataReference?.$refText);g&&(s=g.dataBlockValue,s=s.substring(s.indexOf(`{ +`)+2),s=s.substring(0,s.lastIndexOf("}")-1),s=vr(s,n),s=qd(s,r.textMaxWidth,o),s=s.replaceAll(" "," "),s+="
    ")}let h=s!==void 0;h&&(u+=`

    ${s}`);let d={fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily},f=$0(u,d),p=h?f.width/3:f.width,m={content:u,width:p,height:f.height};return H.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}function plt(e,t){let r=t,n=dlt(r.frame),i={width:r.textProps.width+2*ln.boxTextPadding,height:r.textProps.height+2*ln.boxTextPadding};return[{$kind:HF,frame:r.frame,index:r.index,visual:n,dimension:i,textProps:r.textProps}]}function mlt(e,t,r){return t===void 0?ln.contentStartX:t.index===e.index&&e.r?e.r+ln.boxPadding:r===void 0?ln.contentStartX:r.r-ln.boxOverlap+ln.boxPadding}function glt(e,t){let r=[...e.map(n=>n.r),t];return Math.max(...r)}function eve(e){return Object.values(e).sort((t,r)=>t.index-r.index)}function ylt(e,t){let r=t,n=hlt(r.frame,e.swimlanes),i;n.index in e.swimlanes?i=e.swimlanes[n.index]:i={index:n.index,label:n.label,r:0,y:n.index*ln.swimlaneMinHeight+ln.swimlaneGap,height:ln.swimlaneMinHeight,maxHeight:ln.swimlaneMinHeight};let s=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(ln.boxMinWidth,Math.min(ln.boxMaxWidth,r.dimension.width))+2*ln.boxPadding,height:Math.max(ln.boxMinHeight,Math.min(ln.boxMaxHeight,r.dimension.height))+2*ln.boxPadding},u=mlt(i,o,s),h=u+l.width+ln.boxPadding,d=glt(Object.values(e.swimlanes),h);i.r=u+l.width,i.maxHeight=Math.max(i.maxHeight,l.height),i.height=Math.max(ln.swimlaneMinHeight,i.maxHeight)+2*ln.swimlanePadding;let f={x:u,y:ln.swimlanePadding+i.y,r:h,dimension:l,leftSibling:!1,swimlane:i,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},p={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:n.index,previousFrame:r.frame,maxR:d},m=eve(p.swimlanes);m.length>0&&(m[0].y=0);for(let g=1;g0}function ZEe(e,t){if(t!=null)return e.find(r=>r.frame.name===t.name)}function Tlt(e,t,r){if(!(r<0))for(let n=r;n>=0;n--){let i=e[n];if(i.swimlane.index!==t)return i}}function Clt(e,t){let r=t;if(xlt(r.index,r.frame))return[];let n=ZEe(e.boxes,r.frame);if(n===void 0)throw new Error(`Target box not found for frame ${r.frame.name}`);let i;if(r.sourceFrame)i=ZEe(e.boxes,r.sourceFrame);else{if(Hw(r.frame))return[];i=Tlt(e.boxes,n.swimlane.index,r.index-1)}return i===void 0?[]:[{$kind:YF,frame:r.frame,index:r.index,sourceBox:i,targetBox:n}]}function klt(e,t){let r=t,n={visual:{fill:"none",stroke:"#000"},source:{x:r.sourceBox.x,y:r.sourceBox.y},target:{x:r.targetBox.x,y:r.targetBox.y},sourceBox:r.sourceBox,targetBox:r.targetBox};return{...e,relations:[...e.relations,n]}}function vlt(e,t){let r=Slt[t.$kind];if(r==null)return[];let n=r(e,t);return H.debug("decided events",n),n}function wlt(e,t){let r=t.reduce((n,i)=>{let s=Elt[i.$kind];return s==null?n:s(n,i)},e);return H.debug("evolve events",{state:e,newState:r,events:t}),r}function XF(e,t){let r=vlt(e,t);return wlt(e,r)}var Jot,elt,tlt,nlt,ilt,CA,ln,olt,Slt,Elt,wT,QF=w(()=>{"use strict";bt();jt();jt();Tr();fn();Ir();Gi();Ms();QEe();Jot=a(function(e){H.debug("options str",e)},"setOptions"),elt=a(function(){return{}},"getOptions"),tlt=a(function(){rlt(),or()},"clear");a(rlt,"reset");nlt=dr.eventmodeling,ilt=a(()=>Nr({...nlt,...Ct().eventmodeling}),"getConfig"),CA={};a(slt,"getState");a(alt,"setAst");ln={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};a(JEe,"getDiagramProps");olt={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};a(llt,"extractNamespace");a(clt,"extractName");a(ult,"findSwimlaneByNamespace");a(KF,"findNextAvailableIndex");a(hlt,"calculateSwimlaneProps");a(dlt,"calculateEntityVisualProps");a(flt,"calculateTextProps");a(plt,"decidePositionFrame");a(mlt,"calculateX");a(glt,"calculateMaxRight");a(eve,"sortedSwimlanesArray");a(ylt,"evolveFramePositioned");a(xlt,"isFirstFrame");a(blt,"hasSourceFrame");a(ZEe,"findBoxByFrame");a(Tlt,"findBoxByLineIndex");a(Clt,"decidePositionRelation");a(klt,"evolveRelationPositioned");Slt={[qF]:plt,[TA]:Clt},Elt={[HF]:ylt,[YF]:klt};a(vlt,"decide");a(wlt,"evolve");a(XF,"dispatch");wT={getConfig:ilt,preserveCommentsWhenParsing:!0,setOptions:Jot,getOptions:elt,clear:tlt,setAccTitle:hr,getAccTitle:gr,getAccDescription:yr,setAccDescription:fr,setDiagramTitle:Cr,getDiagramTitle:xr,setAst:alt,getDiagramProps:JEe,getState:slt}});var tve,rve=w(()=>{"use strict";Ms();bt();va();QF();tve={parse:a(async e=>{let t=await ki("eventmodeling",e);H.debug(t),wT.setAst(t),Dn(t,wT)},"parse")}});function Rlt(e,t){return r=>{let n=r.swimlane.y+t.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",r.x).attr("y",n).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill),i.append("foreignObject").attr("x",r.x+t.boxPadding).attr("y",n+10).attr("width",r.dimension.width-2*t.boxPadding).attr("height",r.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(r.text)}}function Llt(e,t){return e>t}function Ilt(e,t,r,n){return i=>{let s=i.sourceBox.swimlane.y+t.swimlanePadding,o=i.targetBox.swimlane.y+t.swimlanePadding,l=Llt(s,o),u=i.sourceBox.x+i.sourceBox.dimension.width*2/3,h=i.targetBox.x+i.targetBox.dimension.width/3,d,f;H.debug(`rendering relation up=${l} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),l?(d=s,f=o+i.targetBox.dimension.height):(d=s+i.sourceBox.dimension.height,f=o);let p=n.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${u} ${d} L${h} ${f}`)}}function Dlt(e,t,r,n){return i=>{let s=e.append("g").attr("class","em-swimlane"),o=n.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=n.emSwimlaneBackgroundStroke??"rgb(240,240,240)";s.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",t+r.swimlanePadding).attr("height",i.height).attr("fill",o).attr("stroke",l),s.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}var _lt,Alt,Nlt,nve,ive=w(()=>{"use strict";Lr();Gt();bt();_lt=_e(),Alt=_lt?.eventmodeling;a(Rlt,"renderD3Box");a(Llt,"dirUpwards");a(Ilt,"renderD3Relation");a(Dlt,"renderD3Swimlane");Nlt=a(function(e,t,r,n){if(H.debug("in eventmodeling renderer",e+` +`,"id:",t,r),!Alt)throw new Error("EventModeling config not found");let i=n.db,{themeVariables:s,eventmodeling:o}=_e(),l=st(`[id="${t}"]`),u=i.getDiagramProps(),h=i.getState(),d=`em-arrowhead-${t}`,f=s.emArrowhead??"#000000";h.sortedSwimlanesArray.forEach(Dlt(l,h.maxR,u,s)),h.boxes.forEach(Rlt(l,u)),h.relations.forEach(Ilt(l,u,d,s)),l.append("defs").append("marker").attr("id",d).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),_1(void 0,l,o?.padding??30,o?.useMaxWidth)},"draw"),nve={draw:Nlt}});var Mlt,sve,ave=w(()=>{"use strict";Mlt=a(e=>"","getStyles"),sve=Mlt});var ove={};ir(ove,{diagram:()=>Olt});var Olt,lve=w(()=>{"use strict";rve();QF();ive();ave();Olt={parser:tve,db:wT,renderer:nve,styles:sve}});var ZF,hve,dve=w(()=>{"use strict";ZF=(function(){var e=a(function(b,T,C,v){for(C=C||{},v=b.length;v--;C[b[v]]=T);return C},"o"),t=[1,4],r=[1,14],n=[1,12],i=[1,13],s=[6,7,8],o=[1,20],l=[1,18],u=[1,19],h=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],g={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:a(function(T,C,v,E,S,_,A){var B=_.length-1;switch(S){case 6:case 7:return E;case 15:E.addNode(_[B-1].length,_[B].trim());break;case 16:E.addNode(0,_[B].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:i},e(s,[2,3]),{1:[2,2]},e(s,[2,4]),e(s,[2,5]),{1:[2,6],6:r,12:15,13:n,14:i},{6:r,9:16,12:11,13:n,14:i},{6:o,7:l,10:17,11:u},e(h,[2,18],{14:[1,21]}),e(h,[2,16]),e(h,[2,17]),{6:o,7:l,10:22,11:u},{1:[2,7],6:r,12:15,13:n,14:i},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(h,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:a(function(T,C){if(C.recoverable)this.trace(T);else{var v=new Error(T);throw v.hash=C,v}},"parseError"),parse:a(function(T){var C=this,v=[0],E=[],S=[null],_=[],A=this.table,B="",$=0,O=0,G=0,I=2,F=1,N=_.slice.call(arguments,1),D=Object.create(this.lexer),M={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(M.yy[R]=this.yy[R]);D.setInput(T,M.yy),M.yy.lexer=D,M.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var P=D.yylloc;_.push(P);var V=D.options&&D.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(Me){v.length=v.length-2*Me,S.length=S.length-Me,_.length=_.length-Me}a(U,"popStack");function z(){var Me;return Me=E.pop()||D.lex()||F,typeof Me!="number"&&(Me instanceof Array&&(E=Me,Me=E.pop()),Me=C.symbols_[Me]||Me),Me}a(z,"lex");for(var j,K,Z,ce,te,me,he={},we,ye,ke,Fe;;){if(Z=v[v.length-1],this.defaultActions[Z]?ce=this.defaultActions[Z]:((j===null||typeof j>"u")&&(j=z()),ce=A[Z]&&A[Z][j]),typeof ce>"u"||!ce.length||!ce[0]){var Ge="";Fe=[];for(we in A[Z])this.terminals_[we]&&we>I&&Fe.push("'"+this.terminals_[we]+"'");D.showPosition?Ge="Parse error on line "+($+1)+`: +`+D.showPosition()+` +Expecting `+Fe.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Ge="Parse error on line "+($+1)+": Unexpected "+(j==F?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(Ge,{text:D.match,token:this.terminals_[j]||j,line:D.yylineno,loc:P,expected:Fe})}if(ce[0]instanceof Array&&ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+j);switch(ce[0]){case 1:v.push(j),S.push(D.yytext),_.push(D.yylloc),v.push(ce[1]),j=null,K?(j=K,K=null):(O=D.yyleng,B=D.yytext,$=D.yylineno,P=D.yylloc,G>0&&G--);break;case 2:if(ye=this.productions_[ce[1]][1],he.$=S[S.length-ye],he._$={first_line:_[_.length-(ye||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(ye||1)].first_column,last_column:_[_.length-1].last_column},V&&(he._$.range=[_[_.length-(ye||1)].range[0],_[_.length-1].range[1]]),me=this.performAction.apply(he,[B,O,$,M.yy,ce[1],S,_].concat(N)),typeof me<"u")return me;ye&&(v=v.slice(0,-1*ye*2),S=S.slice(0,-1*ye),_=_.slice(0,-1*ye)),v.push(this.productions_[ce[1]][0]),S.push(he.$),_.push(he._$),ke=A[v[v.length-2]][v[v.length-1]],v.push(ke);break;case 3:return!0}}return!0},"parse")},y=(function(){var b={EOF:1,parseError:a(function(C,v){if(this.yy.parser)this.yy.parser.parseError(C,v);else throw new Error(C)},"parseError"),setInput:a(function(T,C){return this.yy=C||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var C=T.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),T},"input"),unput:a(function(T){var C=T.length,v=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var S=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:v?(v.length===E.length?this.yylloc.first_column:0)+E[E.length-v.length].length-v[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(T){this.unput(this.match.slice(T))},"less"),pastInput:a(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var T=this.pastInput(),C=new Array(T.length+1).join("-");return T+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:a(function(T,C){var v,E,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),E=T[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,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(T[0].length),this.matched+=T[0],v=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var _ in S)this[_]=S[_];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,C,v,E;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),_=0;_C[0].length)){if(C=v,E=_,this.options.backtrack_lexer){if(T=this.test_match(v,S[_]),T!==!1)return T;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(T=this.test_match(C,S[E]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var C=this.next();return C||this.lex()},"lex"),begin:a(function(C){this.conditionStack.push(C)},"begin"),popState:a(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:a(function(C){this.begin(C)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(C,v,E,S){var _=S;switch(E){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return b})();g.lexer=y;function x(){this.yy={}}return a(x,"Parser"),x.prototype=g,g.Parser=x,new x})();ZF.parser=ZF;hve=ZF});var kA,fve=w(()=>{"use strict";Gt();Ir();fn();kA=class{constructor(){this.stack=[];this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{a(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,or()}getRoot(){return this.root}addNode(t,r){let n=gt.sanitizeText(r,_e());if(!this.root){this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],Cr(n);return}this.baseLevel??=t;let i=t-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let s=this.stack[this.stack.length-1].node,o={text:n,children:[]};s.children.push(o),this.stack.push({level:i,node:o})}getAccTitle(){return gr()}setAccTitle(t){hr(t)}getAccDescription(){return yr()}setAccDescription(t){fr(t)}getDiagramTitle(){return xr()}setDiagramTitle(t){Cr(t)}}});var Flt,Iy,Glt,Vlt,zlt,bve,pve,mve,gve,Ult,yve,Wlt,jlt,qlt,JF,Hlt,Ylt,Tve,SA,xve,Dy,Cve,kve=w(()=>{"use strict";Gt();Os();Rn();jt();$t();Flt=14,Iy=250,Glt=30,Vlt=60,zlt=5,bve=82*Math.PI/180,pve=Math.cos(bve),mve=Math.sin(bve),gve=a((e,t,r)=>{let n=e.node().getBBox(),i=n.width+t*2,s=n.height+t*2;Dr(e,s,i,r),e.attr("viewBox",`${n.x-t} ${n.y-t} ${i} ${s}`)},"applyPaddedViewBox"),Ult=a((e,t,r,n)=>{let s=n.db.getRoot();if(!s)return;let o=_e(),{look:l,handDrawnSeed:u,themeVariables:h}=o,d=sa(o.fontSize)[0]??Flt,f=l==="handDrawn",p=s.children??[],m=o.ishikawa?.diagramPadding??20,g=o.ishikawa?.useMaxWidth??!1,y=gn(t),x=y.append("g").attr("class","ishikawa"),b=f?Xe.svg(y.node()):void 0,T=b?{roughSvg:b,seed:u??0,lineColor:h?.lineColor??"#333",fillColor:h?.mainBkg??"#fff"}:void 0,C=`ishikawa-arrow-${t}`;f||x.append("defs").append("marker").attr("id",C).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let v=0,E=Iy,S=f?void 0:Dy(x,v,E,v,E,"ishikawa-spine");if(Wlt(x,v,E,s.text,d,T),!p.length){f&&Dy(x,v,E,v,E,"ishikawa-spine",T),gve(y,m,g);return}v-=20;let _=p.filter((D,M)=>M%2===0),A=p.filter((D,M)=>M%2===1),B=yve(_),$=yve(A),O=B.total+$.total,G=Iy,I=Iy;if(O>0){let D=Iy*2,M=Iy*.3;G=Math.max(M,D*(B.total/O)),I=Math.max(M,D*($.total/O))}let F=d*2;G=Math.max(G,B.max*F),I=Math.max(I,$.max*F),E=Math.max(G,Iy),S&&S.attr("y1",E).attr("y2",E),x.select(".ishikawa-head-group").attr("transform",`translate(0,${E})`);let N=Math.ceil(p.length/2);for(let D=0;DMath.min(R,P.getBBox().x),1/0)}if(f)Dy(x,v,E,0,E,"ishikawa-spine",T);else{S.attr("x1",v);let D=`url(#${C})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",D)}gve(y,m,g)},"draw"),yve=a(e=>{let t=a(r=>r.children.reduce((n,i)=>n+1+t(i),0),"countDescendants");return e.reduce((r,n)=>{let i=t(n);return r.total+=i,r.max=Math.max(r.max,i),r},{total:0,max:0})},"sideStats"),Wlt=a((e,t,r,n,i,s)=>{let o=Math.max(6,Math.floor(110/(i*.6))),l=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${t},${r})`),u=SA(l,Tve(n,o),0,0,"ishikawa-head-label","start",i),h=u.node().getBBox(),d=Math.max(60,h.width+6),f=Math.max(40,h.height*2+40),p=`M 0 ${-f/2} L 0 ${f/2} Q ${d*2.4} 0 0 ${-f/2} Z`;if(s){let m=s.roughSvg.path(p,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});l.insert(()=>m,":first-child").attr("class","ishikawa-head")}else l.insert("path",":first-child").attr("class","ishikawa-head").attr("d",p);u.attr("transform",`translate(${(d-h.width)/2-h.x+3},${-h.y-h.height/2})`)},"drawHead"),jlt=a((e,t)=>{let r=[],n=[],i=a((s,o,l)=>{let u=t===-1?[...s].reverse():s;for(let h of u){let d=r.length,f=h.children??[];r.push({depth:l,text:Tve(h.text,15),parentIndex:o,childCount:f.length}),l%2===0?(n.push(d),f.length&&i(f,d,l+1)):(f.length&&i(f,d,l+1),n.push(d))}},"walk");return i(e,-1,2),{entries:r,yOrder:n}},"flattenTree"),qlt=a((e,t,r,n,i,s,o)=>{let l=e.append("g").attr("class","ishikawa-label-group"),h=SA(l,t,r,n+11*i,"ishikawa-label cause","middle",s).node().getBBox();if(o){let d=o.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});l.insert(()=>d,":first-child").attr("class","ishikawa-label-box")}else l.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),JF=a((e,t,r,n,i,s)=>{let o=Math.sqrt(n*n+i*i);if(o===0)return;let l=n/o,u=i/o,h=6,d=-u*h,f=l*h,p=t,m=r,g=`M ${p} ${m} L ${p-l*h*2+d} ${m-u*h*2+f} L ${p-l*h*2-d} ${m-u*h*2-f} Z`,y=s.roughSvg.path(g,{roughness:1,seed:s.seed,fill:s.lineColor,fillStyle:"solid",stroke:s.lineColor,strokeWidth:1});e.append(()=>y)},"drawArrowMarker"),Hlt=a((e,t,r,n,i,s,o,l)=>{let u=t.children??[],h=s*(u.length?1:.2),d=-pve*h,f=mve*h*i,p=r+d,m=n+f;if(Dy(e,r,n,p,m,"ishikawa-branch",l),l&&JF(e,r,n,r-p,n-m,l),qlt(e,t.text,p,m,i,o,l),!u.length)return;let{entries:g,yOrder:y}=jlt(u,i),x=g.length,b=new Array(x);for(let[S,_]of y.entries())b[_]=n+f*((S+1)/(x+1));let T=new Map;T.set(-1,{x0:r,y0:n,x1:p,y1:m,childCount:u.length,childrenDrawn:0});let C=-pve,v=mve*i,E=i<0?"ishikawa-label up":"ishikawa-label down";for(let[S,_]of g.entries()){let A=b[S],B=T.get(_.parentIndex),$=e.append("g").attr("class","ishikawa-sub-group"),O=0,G=0,I=0;if(_.depth%2===0){let F=B.y1-B.y0;O=xve(B.x0,B.x1,F?(A-B.y0)/F:.5),G=A,I=O-(_.childCount>0?Vlt+_.childCount*zlt:Glt),Dy($,O,A,I,A,"ishikawa-sub-branch",l),l&&JF($,O,A,1,0,l),SA($,_.text,I,A,"ishikawa-label align","end",o)}else{let F=B.childrenDrawn++;O=xve(B.x0,B.x1,(B.childCount-F)/(B.childCount+1)),G=B.y0,I=O+C*((A-G)/v),Dy($,O,G,I,A,"ishikawa-sub-branch",l),l&&JF($,O,G,O-I,G-A,l),SA($,_.text,I,A,E,"end",o)}_.childCount>0&&T.set(S,{x0:O,y0:G,x1:I,y1:A,childCount:_.childCount,childrenDrawn:0})}},"drawBranch"),Ylt=a(e=>e.split(/|\n/),"splitLines"),Tve=a((e,t)=>{if(e.length<=t)return e;let r=[];for(let n of e.split(/\s+/)){let i=r.length-1;i>=0&&r[i].length+1+n.length<=t?r[i]+=" "+n:r.push(n)}return r.join(` +`)},"wrapText"),SA=a((e,t,r,n,i,s,o)=>{let l=Ylt(t),u=o*1.05,h=e.append("text").attr("class",i).attr("text-anchor",s).attr("x",r).attr("y",n-(l.length-1)*u/2);for(let[d,f]of l.entries())h.append("tspan").attr("x",r).attr("dy",d===0?0:u).text(f);return h},"drawMultilineText"),xve=a((e,t,r)=>e+(t-e)*r,"lerp"),Dy=a((e,t,r,n,i,s,o)=>{if(o){let l=o.roughSvg.line(t,r,n,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>l).attr("class",s);return}return e.append("line").attr("class",s).attr("x1",t).attr("y1",r).attr("x2",n).attr("y2",i)},"drawLine"),Cve={draw:Ult}});var Klt,Sve,Eve=w(()=>{"use strict";Klt=a(e=>` +.ishikawa .ishikawa-spine, +.ishikawa .ishikawa-branch, +.ishikawa .ishikawa-sub-branch { + stroke: ${e.lineColor}; + stroke-width: 2; + fill: none; +} + +.ishikawa .ishikawa-sub-branch { + stroke-width: 1; +} + +.ishikawa .ishikawa-arrow { + fill: ${e.lineColor}; +} + +.ishikawa .ishikawa-head { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa .ishikawa-label-box { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa text { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + fill: ${e.textColor}; +} + +.ishikawa .ishikawa-head-label { + font-weight: 600; + text-anchor: middle; + dominant-baseline: middle; + font-size: 14px; +} + +.ishikawa .ishikawa-label { + text-anchor: end; +} + +.ishikawa .ishikawa-label.cause { + text-anchor: middle; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.align { + text-anchor: end; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.up { + dominant-baseline: baseline; +} + +.ishikawa .ishikawa-label.down { + dominant-baseline: hanging; +} +`,"getStyles"),Sve=Klt});var vve={};ir(vve,{diagram:()=>Xlt});var Xlt,wve=w(()=>{"use strict";dve();fve();kve();Eve();Xlt={parser:hve,get db(){return new kA},renderer:Cve,styles:Sve}});var e9,Rve,Lve=w(()=>{"use strict";e9=(function(){var e=a(function(T,C,v,E){for(v=v||{},E=T.length;E--;v[T[E]]=C);return v},"o"),t=[5,8],r=[7,8,11,12,17,19,22,24],n=[1,17],i=[1,18],s=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],u=[7,8,11,12,17,19,22,24,27],h=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],y={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:a(function(C,v,E,S,_,A,B){var $=A.length-1;switch(_){case 1:return A[$-1];case 2:case 3:case 4:this.$=[];break;case 5:A[$-1].push(A[$]),this.$=A[$-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=A[$];break;case 8:S.setDiagramTitle(A[$].substr(6)),this.$=A[$].substr(6);break;case 9:S.addSubsetData([A[$]],void 0,void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 10:S.addSubsetData([A[$-1]],A[$],void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 11:S.addSubsetData([A[$-2]],void 0,parseFloat(A[$])),S.setIndentMode&&S.setIndentMode(!0);break;case 12:S.addSubsetData([A[$-3]],A[$-2],parseFloat(A[$])),S.setIndentMode&&S.setIndentMode(!0);break;case 13:if(A[$].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(A[$]),S.addSubsetData(A[$],void 0,void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 14:if(A[$-1].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(A[$-1]),S.addSubsetData(A[$-1],A[$],void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 15:if(A[$-2].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(A[$-2]),S.addSubsetData(A[$-2],void 0,parseFloat(A[$])),S.setIndentMode&&S.setIndentMode(!0);break;case 16:if(A[$-3].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(A[$-3]),S.addSubsetData(A[$-3],A[$-2],parseFloat(A[$])),S.setIndentMode&&S.setIndentMode(!0);break;case 17:case 18:case 19:S.addTextData(A[$-1],A[$],void 0);break;case 20:case 21:S.addTextData(A[$-2],A[$-1],A[$]);break;case 23:S.addStyleData(A[$-1],A[$]);break;case 24:case 25:case 26:var O=S.getCurrentSets();if(!O)throw new Error("text requires set");S.addTextData(O,A[$],void 0);break;case 27:case 28:var O=S.getCurrentSets();if(!O)throw new Error("text requires set");S.addTextData(O,A[$-1],A[$]);break;case 29:case 41:this.$=[A[$]];break;case 30:case 42:this.$=[...A[$-2],A[$]];break;case 31:this.$=[A[$-2],A[$]];break;case 33:this.$=A[$].join(" ");break;case 34:this.$=[A[$]];break;case 35:A[$-1].push(A[$]),this.$=A[$-1];break;case 43:case 44:this.$=A[$];break}},"anonymous"),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(r,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),e(r,[2,8]),{13:16,20:n,21:i},{13:20,18:19,20:n,21:i},{13:20,18:21,20:n,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:i},e(r,[2,9],{14:[1,27],15:[1,28]}),e(s,[2,43]),e(s,[2,44]),e(r,[2,13],{14:[1,29],15:[1,30],27:o}),e(s,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},e(r,[2,22]),e(r,[2,24],{14:[1,35]}),e(r,[2,25],{14:[1,36]}),e(r,[2,26]),{20:l,25:37,26:38,27:o},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:i},e(r,[2,17],{14:[1,45]}),e(r,[2,18],{14:[1,46]}),e(r,[2,19]),e(r,[2,27]),e(r,[2,28]),e(r,[2,23],{27:[1,47]}),e(u,[2,29]),{15:[1,48]},{16:[1,49]},e(r,[2,11]),{16:[1,50]},e(r,[2,15]),e(s,[2,42]),e(r,[2,20]),e(r,[2,21]),{20:l,26:51},{16:h,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},e(r,[2,12]),e(r,[2,16]),e(u,[2,30]),e(u,[2,31]),e(u,[2,32]),e(u,[2,33],{30:61,16:h,20:d,31:f,32:p,33:m}),e(g,[2,34]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),e(g,[2,39]),e(g,[2,40]),e(g,[2,35])],defaultActions:{6:[2,1]},parseError:a(function(C,v){if(v.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=v,E}},"parseError"),parse:a(function(C){var v=this,E=[0],S=[],_=[null],A=[],B=this.table,$="",O=0,G=0,I=0,F=2,N=1,D=A.slice.call(arguments,1),M=Object.create(this.lexer),R={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(R.yy[P]=this.yy[P]);M.setInput(C,R.yy),R.yy.lexer=M,R.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var V=M.yylloc;A.push(V);var U=M.options&&M.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(at){E.length=E.length-2*at,_.length=_.length-at,A.length=A.length-at}a(z,"popStack");function j(){var at;return at=S.pop()||M.lex()||N,typeof at!="number"&&(at instanceof Array&&(S=at,at=S.pop()),at=v.symbols_[at]||at),at}a(j,"lex");for(var K,Z,ce,te,me,he,we={},ye,ke,Fe,Ge;;){if(ce=E[E.length-1],this.defaultActions[ce]?te=this.defaultActions[ce]:((K===null||typeof K>"u")&&(K=j()),te=B[ce]&&B[ce][K]),typeof te>"u"||!te.length||!te[0]){var Me="";Ge=[];for(ye in B[ce])this.terminals_[ye]&&ye>F&&Ge.push("'"+this.terminals_[ye]+"'");M.showPosition?Me="Parse error on line "+(O+1)+`: +`+M.showPosition()+` +Expecting `+Ge.join(", ")+", got '"+(this.terminals_[K]||K)+"'":Me="Parse error on line "+(O+1)+": Unexpected "+(K==N?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(Me,{text:M.match,token:this.terminals_[K]||K,line:M.yylineno,loc:V,expected:Ge})}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ce+", token: "+K);switch(te[0]){case 1:E.push(K),_.push(M.yytext),A.push(M.yylloc),E.push(te[1]),K=null,Z?(K=Z,Z=null):(G=M.yyleng,$=M.yytext,O=M.yylineno,V=M.yylloc,I>0&&I--);break;case 2:if(ke=this.productions_[te[1]][1],we.$=_[_.length-ke],we._$={first_line:A[A.length-(ke||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(ke||1)].first_column,last_column:A[A.length-1].last_column},U&&(we._$.range=[A[A.length-(ke||1)].range[0],A[A.length-1].range[1]]),he=this.performAction.apply(we,[$,G,O,R.yy,te[1],_,A].concat(D)),typeof he<"u")return he;ke&&(E=E.slice(0,-1*ke*2),_=_.slice(0,-1*ke),A=A.slice(0,-1*ke)),E.push(this.productions_[te[1]][0]),_.push(we.$),A.push(we._$),Fe=B[E[E.length-2]][E[E.length-1]],E.push(Fe);break;case 3:return!0}}return!0},"parse")},x=(function(){var T={EOF:1,parseError:a(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:a(function(C,v){return this.yy=v||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:a(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var v=C.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:a(function(C){var v=C.length,E=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var _=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:E?(E.length===S.length?this.yylloc.first_column:0)+S[S.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(C){this.unput(this.match.slice(C))},"less"),pastInput:a(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:a(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:a(function(){var C=this.pastInput(),v=new Array(C.length+1).join("-");return C+this.upcomingInput()+` +`+v+"^"},"showPosition"),test_match:a(function(C,v){var E,S,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),S=C[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],E=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var A in _)this[A]=_[A];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,v,E,S;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),A=0;A<_.length;A++)if(E=this._input.match(this.rules[_[A]]),E&&(!v||E[0].length>v[0].length)){if(v=E,S=A,this.options.backtrack_lexer){if(C=this.test_match(E,_[A]),C!==!1)return C;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(C=this.test_match(v,_[S]),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:a(function(){var v=this.next();return v||this.lex()},"lex"),begin:a(function(v){this.conditionStack.push(v)},"begin"),popState:a(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:a(function(v){this.begin(v)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(v,E,S,_){var A=_;switch(S){case 0:break;case 1:break;case 2:break;case 3:if(v.getIndentMode&&v.getIndentMode())return v.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:v.setIndentMode&&v.setIndentMode(!1),this.begin("INITIAL"),this.unput(E.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(v.consumeIndentText)v.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return E.yytext=E.yytext.slice(2,-2),14;break;case 17:return E.yytext=E.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return T})();y.lexer=x;function b(){this.yy={}}return a(b,"Parser"),b.prototype=y,y.Parser=b,new b})();e9.parser=e9;Rve=e9});function hct(){return Nr(uct,Ct().venn)}var t9,r9,n9,i9,s9,a9,Jlt,ect,_T,tct,rct,nct,ict,EA,sct,act,oct,lct,cct,uct,dct,Ive,Dve=w(()=>{"use strict";jt();Tr();fn();Gi();t9=[],r9=[],n9=[],i9=new Set,a9=!1,Jlt=a((e,t,r)=>{let n=EA(e).sort(),i=r??10/Math.pow(e.length,2);s9=n,n.length===1&&i9.add(n[0]),t9.push({sets:n,size:i,label:t?_T(t):void 0})},"addSubsetData"),ect=a(()=>t9,"getSubsetData"),_T=a(e=>{let t=e.trim();return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t},"normalizeText"),tct=a(e=>e&&_T(e),"normalizeStyleValue"),rct=a((e,t,r)=>{let n=_T(t);r9.push({sets:EA(e).sort(),id:n,label:r?_T(r):void 0})},"addTextData"),nct=a((e,t)=>{let r=EA(e).sort(),n={};for(let[i,s]of t)n[i]=tct(s)??s;n9.push({targets:r,styles:n})},"addStyleData"),ict=a(()=>n9,"getStyleData"),EA=a(e=>e.map(t=>_T(t)),"normalizeIdentifierList"),sct=a(e=>{let r=EA(e).filter(n=>!i9.has(n));if(r.length>0)throw new Error(`unknown set identifier: ${r.join(", ")}`)},"validateUnionIdentifiers"),act=a(()=>r9,"getTextData"),oct=a(()=>s9,"getCurrentSets"),lct=a(()=>a9,"getIndentMode"),cct=a(e=>{a9=e},"setIndentMode"),uct=dr.venn;a(hct,"getConfig");dct=a(()=>{or(),t9.length=0,r9.length=0,n9.length=0,i9.clear(),s9=void 0,a9=!1},"customClear"),Ive={getConfig:hct,clear:dct,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,getAccDescription:yr,setAccDescription:fr,addSubsetData:Jlt,getSubsetData:ect,addTextData:rct,addStyleData:nct,validateUnionIdentifiers:sct,getTextData:act,getStyleData:ict,getCurrentSets:oct,getIndentMode:lct,setIndentMode:cct}});var fct,Nve,Mve=w(()=>{"use strict";fct=a(e=>` + .venn-title { + font-size: 32px; + fill: ${e.vennTitleTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-circle text { + font-size: 48px; + font-family: ${e.fontFamily}; + } + + .venn-intersection text { + font-size: 48px; + fill: ${e.vennSetTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-text-node { + font-family: ${e.fontFamily}; + color: ${e.vennSetTextColor}; + } +`,"getStyles"),Nve=fct});function vA(e,t){let r=mct(e),n=r.filter(l=>pct(l,e)),i=0,s=0,o=[];if(n.length>1){let l=$ve(n);for(let h=0;hd.angle-h.angle);let u=n[n.length-1];for(let h=0;hg.radius*2&&(C=g.radius*2),(p==null||p.width>C)&&(p={circle:g,width:C,p1:d,p2:u,large:C>g.radius,sweep:!0})}p!=null&&(o.push(p),i+=c9(p.circle.radius,p.width),u=d)}}else{let l=e[0];for(let h=1;hMath.abs(l.radius-e[h].radius)){u=!0;break}u?i=s=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-1e-10,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return s/=2,t&&(t.area=i+s,t.arcArea=i,t.polygonArea=s,t.arcs=o,t.innerPoints=n,t.intersectionPoints=r),i+s}function pct(e,t){return t.every(r=>Aa(e,r)=e+t)return 0;if(r<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let n=e-(r*r-t*t+e*e)/(2*r),i=t-(r*r-e*e+t*t)/(2*r);return c9(e,n)+c9(t,i)}function Bve(e,t){let r=Aa(e,t),n=e.radius,i=t.radius;if(r>=n+i||r<=Math.abs(n-i))return[];let s=(n*n-i*i+r*r)/(2*r),o=Math.sqrt(n*n-s*s),l=e.x+s*(t.x-e.x)/r,u=e.y+s*(t.y-e.y)/r,h=-(t.y-e.y)*(o/r),d=-(t.x-e.x)*(o/r);return[{x:l+h,y:u-d},{x:l-h,y:u+d}]}function $ve(e){let t={x:0,y:0};for(let r of e)t.x+=r.x,t.y+=r.y;return t.x/=e.length,t.y/=e.length,t}function gct(e,t,r,n){n=n||{};let i=n.maxIterations||100,s=n.tolerance||1e-10,o=e(t),l=e(r),u=r-t;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return t;if(l===0)return r;for(let h=0;h=0&&(t=d),Math.abs(u)u9(t))}function Ny(e,t){let r=0;for(let n=0;nE.fx-S.fx,"sortOrder"),b=t.slice(),T=t.slice(),C=t.slice(),v=t.slice();for(let E=0;E{let B=A.slice();return B.fx=A.fx,B.id=A.id,B});_.sort((A,B)=>A.id-B.id),r.history.push({x:g[0].slice(),fx:g[0].fx,simplex:_})}p=0;for(let _=0;_=g[m-1].fx){let _=!1;if(T.fx>S.fx?(xu(C,1+d,b,-d,S),C.fx=e(C),C.fx=1)break;for(let A=1;Al+s*i*u||h>=x)y=i;else{if(Math.abs(f)<=-o*u)return i;f*(y-g)>=0&&(y=g),g=i,x=h}return 0}a(m,"zoom");for(let g=0;g<10;++g){if(xu(n.x,1,r.x,i,t),h=n.fx=e(n.x,n.fxprime),f=Ny(n.fxprime,t),h>l+s*i*u||g&&h>=d)return m(p,i,d);if(Math.abs(f)<=-o*u)return i;if(f>=0)return m(i,p,h);d=h,p=i,i*=2}return i}function xct(e,t,r){let n={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},s=t.slice(),o,l,u=1,h;r=r||{},h=r.maxIterations||t.length*20,n.fx=e(n.x,n.fxprime),o=n.fxprime.slice(),d9(o,n.fxprime,-1);for(let d=0;d{let f={};for(let p=0;pm9(e,t,n)-r,0,e+t)}function bct(e,t={}){let r=t.distinct,n=e.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(a(i,"toKey"),r){let l=new Map;for(let u of n)for(let h=0;hl===u?0:ls.sets.length===2).forEach(s=>{let o=r[s.sets[0]],l=r[s.sets[1]],u=Math.sqrt(t[o].size/Math.PI),h=Math.sqrt(t[l].size/Math.PI),d=f9(u,h,s.size);n[o][l]=n[l][o]=d;let f=0;s.size+1e-10>=Math.min(t[o].size,t[l].size)?f=1:s.size<=1e-10&&(f=-1),i[o][l]=i[l][o]=f}),{distances:n,constraints:i}}function Cct(e,t,r,n){for(let s=0;s0&&g<=f||p<0&&g>=f||(i+=2*y*y,t[2*s]+=4*y*(o-h),t[2*s+1]+=4*y*(l-d),t[2*u]+=4*y*(h-o),t[2*u+1]+=4*y*(d-l))}}return i}function kct(e,t={}){let r=Ect(e,t),n=t.lossFunction||My;if(e.length>=8){let i=Sct(e,t),s=n(i,e),o=n(r,e);s+1e-8p.map(m=>m/l));let u=a((p,m)=>Cct(p,m,s,o),"obj"),h=null;for(let p=0;pf.sets.length===2);for(let f of e){let p=f.weight!=null?f.weight:1,m=f.sets[0],g=f.sets[1];f.size+Vve>=Math.min(n[m].size,n[g].size)&&(p=0),i[m].push({set:g,size:f.size,weight:p}),i[g].push({set:m,size:f.size,weight:p})}let s=[];Object.keys(i).forEach(f=>{let p=0;for(let m=0;me[o]));let s=n.weight!=null?n.weight:1;r+=s*(i-n.size)*(i-n.size)}return r}function zve(e,t){let r=0;for(let n of t){if(n.sets.length===1)continue;let i;if(n.sets.length===2){let l=e[n.sets[0]],u=e[n.sets[1]];i=m9(l.radius,u.radius,Aa(l,u))}else i=vA(n.sets.map(l=>e[l]));let s=n.weight!=null?n.weight:1,o=Math.log((i+1)/(n.size+1));r+=s*o*o}return r}function vct(e,t,r){if(r==null?e.sort((i,s)=>s.radius-i.radius):e.sort(r),e.length>0){let i=e[0].x,s=e[0].y;for(let o of e)o.x-=i,o.y-=s}if(e.length===2&&Aa(e[0],e[1])1){let i=Math.atan2(e[1].x,e[1].y)-t,s=Math.cos(i),o=Math.sin(i);for(let l of e){let u=l.x,h=l.y;l.x=s*u-o*h,l.y=o*u+s*h}}if(e.length>2){let i=Math.atan2(e[2].x,e[2].y)-t;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){let s=e[1].y/(1e-10+e[1].x);for(let o of e){var n=(o.x+s*o.y)/(1+s*s);o.x=2*n-o.x,o.y=2*n*s-o.y}}}}function wct(e){e.forEach(i=>{i.parent=i});function t(i){return i.parent!==i&&(i.parent=t(i.parent)),i.parent}a(t,"find");function r(i,s){let o=t(i),l=t(s);o.parent=l}a(r,"union");for(let i=0;i{delete i.parent}),Array.from(n.values())}function p9(e){let t=a(r=>{let n=e.reduce((s,o)=>Math.max(s,o[r]+o.radius),Number.NEGATIVE_INFINITY),i=e.reduce((s,o)=>Math.min(s,o[r]-o.radius),Number.POSITIVE_INFINITY);return{max:n,min:i}},"minMax");return{xRange:t("x"),yRange:t("y")}}function Uve(e,t,r){t==null&&(t=Math.PI/2);let n=qve(e).map(h=>Object.assign({},h)),i=wct(n);for(let h of i){vct(h,t,r);let d=p9(h);h.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),h.bounds=d}i.sort((h,d)=>d.size-h.size),n=i[0];let s=n.bounds,o=(s.xRange.max-s.xRange.min)/50;function l(h,d,f){if(!h)return;let p=h.bounds,m,g;if(d)m=s.xRange.max-p.xRange.min+o;else{m=s.xRange.max-p.xRange.max;let y=(p.xRange.max-p.xRange.min)/2-(s.xRange.max-s.xRange.min)/2;y<0&&(m+=y)}if(f)g=s.yRange.max-p.yRange.min+o;else{g=s.yRange.max-p.yRange.max;let y=(p.yRange.max-p.yRange.min)/2-(s.yRange.max-s.yRange.min)/2;y<0&&(g+=y)}for(let y of h)y.x+=m,y.y+=g,n.push(y)}a(l,"addCluster");let u=1;for(;u({radius:d*m.radius,x:n+f+(m.x-o.min)*d,y:n+p+(m.y-l.min)*d,setid:m.setid})))}function jve(e){let t={};for(let r of e)t[r.setid]=r;return t}function qve(e){return Object.keys(e).map(r=>Object.assign(e[r],{setid:r}))}function Hve(e={}){let t=!1,r=600,n=350,i=15,s=1e3,o=Math.PI/2,l=!0,u=null,h=!0,d=!0,f=null,p=null,m=!1,g=null,y=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,x={},b=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],T=0,C=a(function(_){if(_ in x)return x[_];var A=x[_]=b[T];return T+=1,T>=b.length&&(T=0),A},"colours"),v=Gve,E=My;function S(_){let A=_.datum(),B=new Set;A.forEach(te=>{te.size==0&&te.sets.length==1&&B.add(te.sets[0])}),A=A.filter(te=>!te.sets.some(me=>B.has(me)));let $={},O={};if(A.length>0){let te=v(A,{lossFunction:E,distinct:m});l&&(te=Uve(te,o,p)),$=Wve(te,r,n,i,u),O=Kve($,A,y)}let G={};A.forEach(te=>{te.label&&(G[te.sets]=te.label)});function I(te){if(te.sets in G)return G[te.sets];if(te.sets.length==1)return""+te.sets[0]}a(I,"label"),_.selectAll("svg").data([$]).enter().append("svg");let F=_.select("svg");t?F.attr("viewBox",`0 0 ${r} ${n}`):F.attr("width",r).attr("height",n);let N={},D=!1;F.selectAll(".venn-area path").each(function(te){let me=this.getAttribute("d");te.sets.length==1&&me&&!m&&(D=!0,N[te.sets[0]]=Rct(me))});function M(te){return me=>{let he=te.sets.map(we=>{let ye=N[we],ke=$[we];return ye||(ye={x:r/2,y:n/2,radius:1}),ke||(ke={x:r/2,y:n/2,radius:1}),{x:ye.x*(1-me)+ke.x*me,y:ye.y*(1-me)+ke.y*me,radius:ye.radius*(1-me)+ke.radius*me}});return Pve(he,g)}}a(M,"pathTween");let R=F.selectAll(".venn-area").data(A,te=>te.sets),P=R.enter().append("g").attr("class",te=>`venn-area venn-${te.sets.length==1?"circle":"intersection"}${te.colour||te.color?" venn-coloured":""}`).attr("data-venn-sets",te=>te.sets.join("_")),V=P.append("path"),U=P.append("text").attr("class","label").text(te=>I(te)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",n/2);d&&(V.style("fill-opacity","0").filter(te=>te.sets.length==1).style("fill",te=>te.colour?te.colour:te.color?te.color:C(te.sets)).style("fill-opacity",".25"),U.style("fill",te=>te.colour||te.color?"#FFF":e.textFill?e.textFill:te.sets.length==1?C(te.sets):"#444"));function z(te){return typeof te.transition=="function"?te.transition("venn").duration(s):te}a(z,"asTransition");let j=_;D&&typeof j.transition=="function"?(j=z(_),j.selectAll("path").attrTween("d",M)):j.selectAll("path").attr("d",te=>Pve(te.sets.map(me=>$[me])),g);let K=j.selectAll("text").filter(te=>te.sets in O).text(te=>I(te)).attr("x",te=>Math.floor(O[te.sets].x)).attr("y",te=>Math.floor(O[te.sets].y));h&&(D?"on"in K?K.on("end",o9($,I)):K.each("end",o9($,I)):K.each(o9($,I)));let Z=z(R.exit()).remove();typeof R.transition=="function"&&Z.selectAll("path").attrTween("d",M);let ce=Z.selectAll("text").attr("x",r/2).attr("y",n/2);return f!==null&&(U.style("font-size","0px"),K.style("font-size",f),ce.style("font-size","0px")),{circles:$,textCentres:O,nodes:R,enter:P,update:j,exit:Z}}return a(S,"chart"),S.wrap=function(_){return arguments.length?(h=_,S):h},S.useViewBox=function(){return t=!0,S},S.width=function(_){return arguments.length?(r=_,S):r},S.height=function(_){return arguments.length?(n=_,S):n},S.padding=function(_){return arguments.length?(i=_,S):i},S.distinct=function(_){return arguments.length?(m=_,S):m},S.colours=function(_){return arguments.length?(C=_,S):C},S.colors=function(_){return arguments.length?(C=_,S):C},S.fontSize=function(_){return arguments.length?(f=_,S):f},S.round=function(_){return arguments.length?(g=_,S):g},S.duration=function(_){return arguments.length?(s=_,S):s},S.layoutFunction=function(_){return arguments.length?(v=_,S):v},S.normalize=function(_){return arguments.length?(l=_,S):l},S.scaleToFit=function(_){return arguments.length?(u=_,S):u},S.styled=function(_){return arguments.length?(d=_,S):d},S.orientation=function(_){return arguments.length?(o=_,S):o},S.orientationOrder=function(_){return arguments.length?(p=_,S):p},S.lossFunction=function(_){return arguments.length?(E=_==="default"?My:_==="logRatio"?zve:_,S):E},S}function o9(e,t){return function(r){let n=this,i=e[r.sets[0]].radius||50,s=t(r)||"",o=s.split(/\s+/).reverse(),u=(s.length+o.length)/3,h=o.pop(),d=[h],f=0,p=1.1;n.textContent=null;let m=[];function g(C){let v=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return v.textContent=C,m.push(v),n.append(v),v}a(g,"append");let y=g(h);for(;h=o.pop(),!!h;){d.push(h);let C=d.join(" ");y.textContent=C,C.length>u&&y.getComputedTextLength()>i&&(d.pop(),y.textContent=d.join(" "),d=[h],y=g(h),f++)}let x=.35-f*p/2,b=n.getAttribute("x"),T=n.getAttribute("y");m.forEach((C,v)=>{C.setAttribute("x",b),C.setAttribute("y",T),C.setAttribute("dy",`${x+v*p}em`)})}}function l9(e,t,r){let n=t[0].radius-Aa(t[0],e);for(let i=1;i=s&&(i=n[d],s=f)}let o=Fve(d=>-1*l9({x:d[0],y:d[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:r?0:o[0],y:o[1]},u=!0;for(let d of e)if(Aa(l,d)>d.radius){u=!1;break}for(let d of t)if(Aa(l,d)d.p1))}function _ct(e){let t={},r=Object.keys(e);for(let n of r)t[n]=[];for(let n=0;n0&&console.log("WARNING: area "+o+" not represented on screen")}return n}function Act(e,t,r){let n=[];return n.push(` +M`,e,t),n.push(` +m`,-r,0),n.push(` +a`,r,r,0,1,0,r*2,0),n.push(` +a`,r,r,0,1,0,-r*2,0),n.join(" ")}function Rct(e){let t=e.split(" ");return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function Xve(e){if(e.length===0)return[];let t={};return vA(e,t),t.arcs}function Qve(e,t){if(e.length===0)return"M 0 0";let r=Math.pow(10,t||0),n=t!=null?s=>Math.round(s*r)/r:s=>s;if(e.length==1){let s=e[0].circle;return Act(n(s.x),n(s.y),n(s.radius))}let i=[` +M`,n(e[0].p2.x),n(e[0].p2.y)];for(let s of e){let o=n(s.circle.radius);i.push(` +A`,o,o,0,s.large?1:0,s.sweep?1:0,n(s.p1.x),n(s.p1.y))}return i.join(" ")}function Pve(e,t){return Qve(Xve(e),t)}function Zve(e,t={}){let{lossFunction:r,layoutFunction:n=Gve,normalize:i=!0,orientation:s=Math.PI/2,orientationOrder:o,width:l=600,height:u=350,padding:h=15,scaleToFit:d=!1,symmetricalTextCentre:f=!1,distinct:p,round:m=2}=t,g=n(e,{lossFunction:r==="default"||!r?My:r==="logRatio"?zve:r,distinct:p});i&&(g=Uve(g,s,o));let y=Wve(g,l,u,h,d),x=Kve(y,e,f),b=new Map(Object.keys(y).map(v=>[v,{set:v,x:y[v].x,y:y[v].y,radius:y[v].radius}])),T=e.map(v=>{let E=v.sets.map(A=>b.get(A)),S=Xve(E),_=Qve(S,m);return{circles:E,arcs:S,path:_,area:v,has:new Set(v.sets)}});function C(v){let E="";for(let S of T)S.has.size>v.length&&v.every(_=>S.has.has(_))&&(E+=" "+S.path);return E}return a(C,"genDistinctPath"),T.map(({circles:v,arcs:E,path:S,area:_})=>({data:_,text:x[_.sets],circles:v,arcs:E,path:S,distinctPath:S+C(_.sets)}))}var Vve,Jve=w(()=>{"use strict";a(vA,"intersectionArea");a(pct,"containedInCircles");a(mct,"getIntersectionPoints");a(c9,"circleArea");a(Aa,"distance");a(m9,"circleOverlap");a(Bve,"circleCircleIntersection");a($ve,"getCenter");a(gct,"bisect");a(u9,"zeros");a(Ove,"zerosM");a(Ny,"dot");a(h9,"norm2");a(d9,"scale");a(xu,"weightedSum");a(Fve,"nelderMead");a(yct,"wolfeLineSearch");a(xct,"conjugateGradient");a(Gve,"venn");Vve=1e-10;a(f9,"distanceFromIntersectArea");a(bct,"addMissingAreas");a(Tct,"getDistanceMatrices");a(Cct,"constrainedMDSGradient");a(kct,"bestInitialLayout");a(Sct,"constrainedMDSLayout");a(Ect,"greedyLayout");a(My,"lossFunction");a(zve,"logRatioLossFunction");a(vct,"orientateCircles");a(wct,"disjointCluster");a(p9,"getBoundingBox");a(Uve,"normalizeSolution");a(Wve,"scaleSolution");a(jve,"toObjectNotation");a(qve,"fromObjectNotation");a(Hve,"VennDiagram");a(o9,"wrapText");a(l9,"circleMargin");a(Yve,"computeTextCentre");a(_ct,"getOverlappingCircles");a(Kve,"computeTextCentres");a(Act,"circlePath");a(Rct,"circleFromPath");a(Xve,"intersectionAreaArcs");a(Qve,"arcsToPath");a(Pve,"intersectionAreaPath");a(Zve,"layout")});function Ict(e){let t=new Map;for(let r of e){let n=r.targets.join("|"),i=t.get(n);i?Object.assign(i,r.styles):t.set(n,{...r.styles})}return t}function xp(e){return e.join("|")}function Nct(e,t,r,n,i,s){let o=e?.useDebugLayout??!1,u=r.select("svg").append("g").attr("class","venn-text-nodes"),h=new Map;for(let d of n){let f=xp(d.sets),p=h.get(f);p?p.push(d):h.set(f,[d])}for(let[d,f]of h.entries()){let p=t.get(d);if(!p?.text)continue;let m=p.text.x,g=p.text.y,y=Math.min(...p.circles.map(F=>F.radius)),x=Math.min(...p.circles.map(F=>F.radius-Math.hypot(m-F.x,g-F.y))),b=Number.isFinite(x)?Math.max(0,x):0;b===0&&Number.isFinite(y)&&(b=y*.6);let T=u.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);o&&T.append("circle").attr("class","venn-text-debug-circle").attr("cx",m).attr("cy",g).attr("r",b).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let C=Math.max(80*i,b*2*.95),v=Math.max(60*i,b*2*.95),_=(p.data.label&&p.data.label.length>0?Math.min(32*i,b*.25):0)+(f.length<=2?30*i:0),A=m-C/2,B=g-v/2+_,$=Math.max(1,Math.ceil(Math.sqrt(f.length))),O=Math.max(1,Math.ceil(f.length/$)),G=C/$,I=v/O;for(let[F,N]of f.entries()){let D=F%$,M=Math.floor(F/$),R=A+G*(D+.5),P=B+I*(M+.5);o&&T.append("rect").attr("class","venn-text-debug-cell").attr("x",A+G*D).attr("y",B+I*M).attr("width",G).attr("height",I).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);let V=G*.9,U=I*.9,z=T.append("foreignObject").attr("class","venn-text-node-fo").attr("width",V).attr("height",U).attr("x",R-V/2).attr("y",P-U/2).attr("overflow","visible"),j=s.get(N.id)?.color,K=z.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(N.label??N.id);j&&K.style("color",j)}}}function Mct(e){let t=new Set(e.map(i=>[...i.sets].sort().join("|"))),r=new Map(e.filter(i=>i.sets.length===1&&i.size!==void 0).map(i=>[i.sets[0],i.size])),n=[];for(let i of e){if(i.sets.length<3)continue;let s=[...i.sets].sort();for(let o=0;o0?[...e,...n]:e}var Dct,ewe,twe=w(()=>{"use strict";Lr();Ai();Tr();Os();Jve();Rn();$t();a(Ict,"buildStyleByKey");Dct=a((e,t,r,n)=>{let i=n.db,s=i.getConfig?.(),{themeVariables:o,look:l,handDrawnSeed:u}=Ct(),h=l==="handDrawn",d=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),f=i.getDiagramTitle?.(),p=i.getSubsetData(),m=i.getTextData(),g=Ict(i.getStyleData()),y=Mct(p),x=s?.width??800,b=s?.height??450,C=x/1600,v=f?48*C:0,E=o.primaryTextColor??o.textColor,S=gn(t);S.attr("viewBox",`0 0 ${x} ${b}`),f&&S.append("text").text(f).attr("class","venn-title").attr("font-size",`${32*C}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*C).style("fill",o.vennTitleTextColor||o.titleColor);let _=st(document.createElement("div")),A=Hve().width(x).height(b-v);_.datum(y).call(A);let B=h?Xe.svg(_.select("svg").node()):void 0,$=Zve(y,{width:x,height:b-v,padding:s?.padding??15}),O=new Map;for(let N of $){let D=xp([...N.data.sets].sort());O.set(D,N)}m.length>0&&Nct(s,O,_,m,C,g);let G=tn(o.background||"#f4f4f4");_.selectAll(".venn-circle").each(function(N,D){let M=st(this),P=xp([...N.sets].sort()),V=g.get(P),U=d.length>0?d[D%d.length]:void 0,z=V?.fill||U||o.primaryColor;M.classed(`venn-set-${D%8}`,!0);let j=V?.["fill-opacity"]??.1,K=V?.stroke||z,Z=V?.["stroke-width"]||`${5*C}`;if(h&&B){let te=O.get(P);if(te&&te.circles.length>0){let me=te.circles[0],he=B.circle(me.x,me.y,me.radius*2,{roughness:.7,seed:u,fill:EC(z,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+D*60,stroke:K,strokeWidth:parseFloat(String(Z))});M.select("path").remove(),M.node()?.insertBefore(he,M.select("text").node())}}else M.select("path").style("fill",z).style("fill-opacity",j).style("stroke",K).style("stroke-width",Z).style("stroke-opacity",.95);let ce=V?.color||(G?Ue(z,30):je(z,30));M.select("text").style("font-size",`${48*C}px`).style("fill",ce)}),h&&B?_.selectAll(".venn-intersection").each(function(N){let D=st(this),R=xp([...N.sets].sort()),P=g.get(R),V=P?.fill;if(V){let U=D.select("path"),z=U.attr("d");if(z){let j=B.path(z,{roughness:.7,seed:u,fill:EC(V,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),K=U.node();K?.parentNode?.insertBefore(j,K),U.remove()}}else D.select("path").style("fill-opacity",0);D.select("text").style("font-size",`${48*C}px`).style("fill",P?.color??o.vennSetTextColor??E)}):(_.selectAll(".venn-intersection text").style("font-size",`${48*C}px`).style("fill",N=>{let M=xp([...N.sets].sort());return g.get(M)?.color??o.vennSetTextColor??E}),_.selectAll(".venn-intersection path").style("fill-opacity",N=>{let M=xp([...N.sets].sort());return g.get(M)?.fill?1:0}).style("fill",N=>{let M=xp([...N.sets].sort());return g.get(M)?.fill??"transparent"}));let I=S.append("g").attr("transform",`translate(0, ${v})`),F=_.select("svg").node();if(F&&"childNodes"in F)for(let N of[...F.childNodes])I.node()?.appendChild(N);Dr(S,b,x,s?.useMaxWidth??!0)},"draw");a(xp,"stableSetsKey");a(Nct,"renderTextNodes");a(Mct,"ensurePairwiseSubsets");ewe={draw:Dct}});var rwe={};ir(rwe,{diagram:()=>Oct});var Oct,nwe=w(()=>{"use strict";Lve();Dve();Mve();twe();Oct={parser:Rve,db:Ive,renderer:ewe,styles:Nve}});var Oy,g9=w(()=>{"use strict";Gi();Tr();jt();Ot();fn();Oy=class{constructor(){this.nodes=[];this.levels=new Map;this.outerNodes=[];this.classes=new Map;this.setAccTitle=hr;this.getAccTitle=gr;this.setDiagramTitle=Cr;this.getDiagramTitle=xr;this.getAccDescription=yr;this.setAccDescription=fr}static{a(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=dr,r=Ct();return Nr({...t.treemap,...r.treemap??{}})}addNode(t,r){this.nodes.push(t),this.levels.set(t,r),r===0&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,r){let n=this.classes.get(t)??{id:t,styles:[],textStyles:[]},i=r.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(s=>{W0(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(t,n)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){or(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function awe(e){if(!e.length)return[];let t=[],r=[];return e.forEach(n=>{let i={name:n.name,children:n.type==="Leaf"?void 0:[]};for(i.classSelector=n?.classSelector,n?.cssCompiledStyles&&(i.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(i.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)t.push(i);else{let s=r[r.length-1].node;s.children?s.children.push(i):s.children=[i]}n.type!=="Leaf"&&r.push({node:i,level:n.level})}),t}var owe=w(()=>{"use strict";a(awe,"buildHierarchy")});var Fct,Gct,y9,lwe=w(()=>{"use strict";Ms();bt();va();owe();g9();Fct=a((e,t)=>{Dn(e,t);let r=[];for(let s of e.TreemapRows??[])s.$type==="ClassDefStatement"&&t.addClass(s.className??"",s.styleText??"");for(let s of e.TreemapRows??[]){let o=s.item;if(!o)continue;let l=s.indent?parseInt(s.indent):0,u=Gct(o),h=o.classSelector?t.getStylesForClass(o.classSelector):[],d=h.length>0?h:void 0,f={level:l,name:u,type:o.$type,value:o.value,classSelector:o.classSelector,cssCompiledStyles:d};r.push(f)}let n=awe(r),i=a((s,o)=>{for(let l of s)t.addNode(l,o),l.children&&l.children.length>0&&i(l.children,o+1)},"addNodesRecursively");i(n,0)},"populate"),Gct=a(e=>e.name?String(e.name):"","getItemName"),y9={parser:{yy:void 0},parse:a(async e=>{try{let r=await ki("treemap",e);H.debug("Treemap AST:",r);let n=y9.parser?.yy;if(!(n instanceof Oy))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fct(r,n)}catch(t){throw H.error("Error parsing treemap:",t),t}},"parse")}});var Vct,Py,AT,zct,Uct,cwe,uwe=w(()=>{"use strict";Os();Kc();Rn();Lr();Ot();Tr();bt();Vct=10,Py=10,AT=25,zct=a((e,t,r,n)=>{let i=n.db,s=i.getConfig(),o=s.padding??Vct,l=i.getDiagramTitle(),u=i.getRoot(),{themeVariables:h}=Ct();if(!u)return;let d=l?30:0,f=gn(t),p=s.nodeWidth?s.nodeWidth*Py:960,m=s.nodeHeight?s.nodeHeight*Py:500,g=p,y=m+d;f.attr("viewBox",`0 0 ${g} ${y}`),Dr(f,y,g,s.useMaxWidth);let x;try{let z=s.valueFormat||",";if(z==="$0,0")x=a(j=>"$"+wl(",")(j),"valueFormat");else if(z.startsWith("$")&&z.includes(",")){let j=/\.\d+/.exec(z),K=j?j[0]:"";x=a(Z=>"$"+wl(","+K)(Z),"valueFormat")}else if(z.startsWith("$")){let j=z.substring(1);x=a(K=>"$"+wl(j||"")(K),"valueFormat")}else x=wl(z)}catch(z){H.error("Error creating format function:",z),x=wl(",")}let b=Pa().range(["transparent",h.cScale0,h.cScale1,h.cScale2,h.cScale3,h.cScale4,h.cScale5,h.cScale6,h.cScale7,h.cScale8,h.cScale9,h.cScale10,h.cScale11]),T=Pa().range(["transparent",h.cScalePeer0,h.cScalePeer1,h.cScalePeer2,h.cScalePeer3,h.cScalePeer4,h.cScalePeer5,h.cScalePeer6,h.cScalePeer7,h.cScalePeer8,h.cScalePeer9,h.cScalePeer10,h.cScalePeer11]),C=Pa().range([h.cScaleLabel0,h.cScaleLabel1,h.cScaleLabel2,h.cScaleLabel3,h.cScaleLabel4,h.cScaleLabel5,h.cScaleLabel6,h.cScaleLabel7,h.cScaleLabel8,h.cScaleLabel9,h.cScaleLabel10,h.cScaleLabel11]);l&&f.append("text").attr("x",g/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(l);let v=f.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),E=hm(u).sum(z=>z.value??0).sort((z,j)=>(j.value??0)-(z.value??0)),_=Dk().size([p,m]).paddingTop(z=>z.children&&z.children.length>0?AT+Py:0).paddingInner(o).paddingLeft(z=>z.children&&z.children.length>0?Py:0).paddingRight(z=>z.children&&z.children.length>0?Py:0).paddingBottom(z=>z.children&&z.children.length>0?Py:0).round(!0)(E),A=_.descendants().filter(z=>z.children&&z.children.length>0),B=v.selectAll(".treemapSection").data(A).enter().append("g").attr("class","treemapSection").attr("transform",z=>`translate(${z.x0},${z.y0})`);B.append("rect").attr("width",z=>z.x1-z.x0).attr("height",AT).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",z=>z.depth===0?"display: none;":""),B.append("clipPath").attr("id",(z,j)=>`clip-section-${t}-${j}`).append("rect").attr("width",z=>Math.max(0,z.x1-z.x0-12)).attr("height",AT),B.append("rect").attr("width",z=>z.x1-z.x0).attr("height",z=>z.y1-z.y0).attr("class",(z,j)=>`treemapSection section${j}`).attr("fill",z=>b(z.data.name)).attr("fill-opacity",.6).attr("stroke",z=>T(z.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",z=>{if(z.depth===0)return"display: none;";let j=Ze({cssCompiledStyles:z.data.cssCompiledStyles});return j.nodeStyles+";"+j.borderStyles.join(";")}),B.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",AT/2).attr("dominant-baseline","middle").text(z=>z.depth===0?"":z.data.name).attr("font-weight","bold").attr("clip-path",(z,j)=>`url(#clip-section-${t}-${j})`).attr("style",z=>{if(z.depth===0)return"display: none;";let j="dominant-baseline: middle; font-size: 12px; fill:"+C(z.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",K=Ze({cssCompiledStyles:z.data.cssCompiledStyles});return j+K.labelStyles.replace("color:","fill:")}).each(function(z){if(z.depth===0)return;let j=st(this),K=z.data.name;j.text(K);let Z=z.x1-z.x0,ce=6,te;s.showValues!==!1&&z.value?te=Z-10-30-10-ce:te=Z-ce-6;let he=Math.max(15,te),we=j.node();if(we.getComputedTextLength()>he){let Fe=K;for(;Fe.length>0;){if(Fe=K.substring(0,Fe.length-1),Fe.length===0){j.text("..."),we.getComputedTextLength()>he&&j.text("");break}if(j.text(Fe+"..."),we.getComputedTextLength()<=he)break}}}),s.showValues!==!1&&B.append("text").attr("class","treemapSectionValue").attr("x",z=>z.x1-z.x0-10).attr("y",AT/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(z=>z.value?x(z.value):"").attr("font-style","italic").attr("style",z=>{if(z.depth===0)return"display: none;";let j="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+C(z.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",K=Ze({cssCompiledStyles:z.data.cssCompiledStyles});return j+K.labelStyles.replace("color:","fill:")});let $=_.leaves(),O=$.length>20,G=O?16:38,I=O?14:28,F=O?4:8,N=O?4:6,D=O?2:4,M=O?8:10,R=O?1:2,P=v.selectAll(".treemapLeafGroup").data($).enter().append("g").attr("class",(z,j)=>`treemapNode treemapLeafGroup leaf${j}${z.data.classSelector?` ${z.data.classSelector}`:""}x`).attr("transform",z=>`translate(${z.x0},${z.y0})`);P.append("rect").attr("width",z=>z.x1-z.x0).attr("height",z=>z.y1-z.y0).attr("class","treemapLeaf").attr("fill",z=>z.parent?b(z.parent.data.name):b(z.data.name)).attr("style",z=>Ze({cssCompiledStyles:z.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",z=>z.parent?b(z.parent.data.name):b(z.data.name)).attr("stroke-width",3),P.append("clipPath").attr("id",(z,j)=>`clip-${t}-${j}`).append("rect").attr("width",z=>Math.max(0,z.x1-z.x0-4)).attr("height",z=>Math.max(0,z.y1-z.y0-4)),P.append("text").attr("class","treemapLabel").attr("x",z=>(z.x1-z.x0)/2).attr("y",z=>(z.y1-z.y0)/2).attr("style",z=>{let j=`text-anchor: middle; dominant-baseline: middle; font-size: ${G}px;fill:`+C(z.data.name)+";",K=Ze({cssCompiledStyles:z.data.cssCompiledStyles});return j+K.labelStyles.replace("color:","fill:")}).attr("clip-path",(z,j)=>`url(#clip-${t}-${j})`).text(z=>z.data.name).each(function(z){let j=st(this),K=z.x1-z.x0,Z=z.y1-z.y0,ce=j.node(),te=K-2*D,me=Z-2*D;if(tete&&he>F;)he--,j.style("font-size",`${he}px`);let ye=Math.max(N,Math.min(I,Math.round(he*we))),ke=he+R+ye;for(;ke>me&&he>F&&(he--,ye=Math.max(N,Math.min(I,Math.round(he*we))),!(yeme;j.style("font-size",`${he}px`),O?(hete||he(j.x1-j.x0)/2).attr("y",function(j){return(j.y1-j.y0)/2}).attr("style",j=>{let K=`text-anchor: middle; dominant-baseline: hanging; font-size: ${I}px;fill:`+C(j.data.name)+";",Z=Ze({cssCompiledStyles:j.data.cssCompiledStyles});return K+Z.labelStyles.replace("color:","fill:")}).attr("clip-path",(j,K)=>`url(#clip-${t}-${K})`).text(j=>j.value?x(j.value):"").each(function(j){let K=st(this),Z=this.parentNode;if(!Z){K.style("display","none");return}let ce=st(Z).select(".treemapLabel");if(ce.empty()||ce.style("display")==="none"){K.style("display","none");return}let te=parseFloat(ce.style("font-size")),he=Math.max(N,Math.min(I,Math.round(te*.6)));K.style("font-size",`${he}px`);let ye=(j.y1-j.y0)/2+te/2+R;K.attr("y",ye);let ke=j.x1-j.x0,Me=j.y1-j.y0-4,at=ke-2*D;K.node().getComputedTextLength()>at||ye+he>Me||he{"use strict";jt();yl();Tr();Wct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},jct=a(({treemap:e}={})=>{let t=Zi(),r=Ct(),n=Nr(t,r.themeVariables),i=Nr(Wct,e),s=i.titleColor??n.titleColor,o=i.labelColor??n.textColor,l=i.valueColor??n.textColor;return` + .treemapNode.section { + stroke: ${i.sectionStrokeColor}; + stroke-width: ${i.sectionStrokeWidth}; + fill: ${i.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${i.leafStrokeColor}; + stroke-width: ${i.leafStrokeWidth}; + fill: ${i.leafFillColor}; + } + .treemapLabel { + fill: ${o}; + font-size: ${i.labelFontSize}; + } + .treemapValue { + fill: ${l}; + font-size: ${i.valueFontSize}; + } + .treemapTitle { + fill: ${s}; + font-size: ${i.titleFontSize}; + } + `},"getStyles"),hwe=jct});var fwe={};ir(fwe,{diagram:()=>qct});var qct,pwe=w(()=>{"use strict";g9();lwe();uwe();dwe();qct={parser:y9,get db(){return new Oy},renderer:cwe,styles:hwe}});function ywe(e,t){let r=e.lexer.tokenize(t);if(r.errors.length>0){let i=r.errors[0],s=bp(i.offset)?i.offset:t.length,o=s+(bp(i.length)?i.length:0);throw new Error(`Error lexing ${e.diagramType} diagram: ${i.message} at line ${i.line??1}, column ${i.column??1} [${s},${o})`)}e.parser.input=r.tokens;let n=e.entry();if(e.parser.errors.length>0)throw new Error(`Error parsing ${e.diagramType} diagram: ${e.parser.errors[0].message}`);e.visit(n)}var bp,xwe=w(()=>{"use strict";bp=a(e=>e!==void 0&&e>=0,"isKnownLocation");a(ywe,"runChevrotainParse")});var Nn,bwe,wA=w(()=>{"use strict";Nn={SOLID_ARROW:0,BACK_ARROW:1,LINE_SOLID:2,CIRCLE_ARROW:3,CROSS_ARROW:4,CIRCLE_ARROW_REVERSED:5,CROSS_ARROW_REVERSED:6},bwe="LR"});var Kct,x9,Xct,Qr,Qct,Zct,Jct,eut,tut,rut,nut,iut,sut,aut,out,lut,cut,uut,hut,dut,fut,Cwe,Tp,put,Twe,mut,gut,yut,xut,but,Tut,RT,Cut,Cp,_A=w(()=>{"use strict";fn();wA();Gi();Gt();Ir();Kct=dr.usecase,x9=a(()=>({actors:new Map,useCases:new Map,systemBoundaries:new Map,relationships:[],notes:new Map,jsonNodes:new Map,classDefs:new Map,symbols:new Map,direction:bwe,relationshipCounter:0,noteCounter:0,accTitle:"",accDescription:"",ast:void 0,config:structuredClone(Kct)}),"createModel"),Xct=a(e=>{if(!(e.actors instanceof Map)||!(e.useCases instanceof Map)||!(e.systemBoundaries instanceof Map)||!Array.isArray(e.relationships)||!(e.notes instanceof Map)||!(e.jsonNodes instanceof Map)||!(e.classDefs instanceof Map)||!(e.symbols instanceof Map)||!["TB","TD","BT","RL","LR"].includes(e.direction)||!Number.isSafeInteger(e.relationshipCounter)||e.relationshipCounter<0||!Number.isSafeInteger(e.noteCounter)||e.noteCounter<0||typeof e.accTitle!="string"||typeof e.accDescription!="string"||!e.config)throw new Error("Cannot commit an incomplete usecase model")},"assertCompleteModel"),Qr=x9(),Qct=a(()=>structuredClone(Qr.config),"getConfig"),Zct=a(()=>Qr.ast,"getAST"),Jct=a(e=>{let t=structuredClone(e);Xct(t);let r=gr(),n=yr();try{hr(t.accTitle),fr(t.accDescription),Qr=t}catch(i){throw hr(r),fr(n),i}},"commit"),eut=a(()=>{Qr=x9(),or()},"clear"),tut=a(()=>Qr.actors,"getActors"),rut=a(e=>Qr.actors.get(e),"getActor"),nut=a(()=>Qr.useCases,"getUseCases"),iut=a(e=>Qr.useCases.get(e),"getUseCase"),sut=a(()=>Qr.systemBoundaries,"getSystemBoundaries"),aut=a(e=>Qr.systemBoundaries.get(e),"getSystemBoundary"),out=a(()=>Qr.relationships,"getRelationships"),lut=a(()=>Qr.notes,"getNotes"),cut=a(e=>Qr.notes.get(e),"getNote"),uut=a(()=>Qr.jsonNodes,"getJsonNodes"),hut=a(e=>Qr.jsonNodes.get(e),"getJsonNode"),dut=a(()=>Qr.classDefs,"getClassDefs"),fut=a(e=>Qr.classDefs.get(e),"getClassDef"),Cwe=a(()=>Qr.direction,"getDirection"),Tp=a(e=>{let t=new Map;for(let r of["default",...e]){let n=Qr.classDefs.get(r);if(n)for(let i of n.styles){let s=i.trim(),o=s.indexOf(":"),l=(o===-1?s:s.slice(0,o)).trim();l&&t.set(l,s)}}return[...t.values()]},"getCompiledStyles"),put=a(e=>e.replaceAll("~","~0").replaceAll("/","~1"),"escapeJsonPointerPart"),Twe=a(e=>typeof e=="string"?e:e===null?"null":String(e),"displayJsonScalar"),mut=a((e,t,r=n=>n)=>{let n=[],i=a((o,l,u)=>{n.push({key:r(o),accessibleKey:r(l),value:r(u)})},"append"),s=a((o,l,u)=>{if(Array.isArray(o)){if(o.length===0){i(l,l,"[]");return}if(o.every(d=>d===null||["string","number","boolean"].includes(typeof d))){for(let[d,f]of o.entries())i(d===0?l:"",l,Twe(f));return}for(let[d,f]of o.entries())s(f,`${l}[${d}]`,`${u}/${d}`);return}if(o!==null&&typeof o=="object"){let h=o,d=t[u]??Object.keys(h);if(d.length===0){i(l,l,"{}");return}for(let f of d){let p=l?`${l}.${f}`:f;s(h[f],p,`${u}/${put(f)}`)}return}i(l,l,Twe(o))},"visit");return s(e,"",""),n},"flattenJsonRows"),gut=a(e=>{switch(e.type){case"hollow":return"usecaseActorHollow";case"awesome":return"usecaseActorAwesome";case"icon":return"usecaseActorIcon";case"normal":return"usecaseActor"}},"actorShape"),yut=a(e=>e.shape==="ellipse"?e.business?"usecaseBusiness":"usecaseEllipse":e.shape,"useCaseShape"),xut=a(e=>{switch(e){case Nn.SOLID_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_point"};case Nn.BACK_ARROW:return{arrowTypeStart:"arrow_point",arrowTypeEnd:"none"};case Nn.CIRCLE_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_circle"};case Nn.CROSS_ARROW:return{arrowTypeStart:"none",arrowTypeEnd:"arrow_cross"};case Nn.CIRCLE_ARROW_REVERSED:return{arrowTypeStart:"arrow_circle",arrowTypeEnd:"none"};case Nn.CROSS_ARROW_REVERSED:return{arrowTypeStart:"arrow_cross",arrowTypeEnd:"none"};case Nn.LINE_SOLID:return{arrowTypeStart:"none",arrowTypeEnd:"none"}}},"associationMarkers"),but=a(e=>{switch(e.type){case"include":case"extend":return{arrowTypeStart:"none",arrowTypeEnd:"arrow_point",pattern:"dotted",label:e.type,labelType:"text"};case"generalization":return{arrowTypeStart:"none",arrowTypeEnd:"extension",pattern:"solid"};case"association":return{...xut(e.arrowType),pattern:"solid",...e.label?{label:e.label}:{},...e.labelType?{labelType:e.labelType}:{}}}},"relationshipVisuals"),Tut=a(e=>e.animate||e.animation?[`edge-animation-${e.animation??"fast"}`]:[],"animationClasses"),RT=a((...e)=>e.filter(t=>!!t).join(" "),"classNames"),Cut=a(()=>{let e=_e(),t={...Qr.config,...e.usecase},r=a(u=>vr(u,e),"sanitize"),n=a(u=>r(Qr.actors.get(u)?.label??Qr.useCases.get(u)?.label??Qr.jsonNodes.get(u)?.id??Qr.notes.get(u)?.label??u),"endpointLabel"),i=[],s=[],o=0,l=0;for(let u of Qr.actors.values())i.push({id:u.id,label:r(u.label),labelType:u.labelType,shape:gut(u),isGroup:!1,padding:10,look:e.look,colorIndex:o++,cssClasses:RT("default","usecase-actor",`usecase-actor-${u.type}`,u.business&&"usecase-business",...u.classes),cssStyles:[...u.styles],cssCompiledStyles:Tp(u.classes),actorType:u.type,business:u.business,...u.icon?{icon:u.icon}:{},...u.stereotype?{stereotype:r(u.stereotype)}:{},...u.parentId?{parentId:u.parentId}:{}});for(let u of Qr.useCases.values())i.push({id:u.id,label:r(u.label),labelType:u.labelType,shape:yut(u),isGroup:!1,padding:u.shape==="ellipse"?20:10,look:e.look,colorIndex:o++,cssClasses:RT("default","usecase-element",`usecase-${u.shape}`,u.business&&"usecase-business",...u.classes),cssStyles:[...u.styles],cssCompiledStyles:Tp(u.classes),business:u.business,...u.stereotype?{stereotype:r(u.stereotype)}:{},...u.parentId?{parentId:u.parentId}:{}});for(let u of Qr.notes.values())i.push({id:u.id,label:r(u.label),labelType:u.labelType,shape:"note",isGroup:!1,padding:10,look:e.look,cssClasses:"default usecase-note",cssStyles:[],cssCompiledStyles:Tp([]),noteTarget:u.target,noteTargetLabel:r(Qr.actors.get(u.target)?.label??Qr.useCases.get(u.target)?.label??Qr.jsonNodes.get(u.target)?.id??u.target)});for(let u of Qr.jsonNodes.values())i.push({id:u.id,label:r(u.id),labelType:"text",shape:"usecaseJsonTable",isGroup:!1,padding:10,look:e.look,cssClasses:RT("default","usecase-json-table",...u.classes),cssStyles:[...u.styles],cssCompiledStyles:Tp(u.classes),jsonRows:mut(u.value,u.propertyOrder,r)});for(let u of Qr.systemBoundaries.values())i.push({id:u.id,label:r(u.label),labelType:u.labelType,shape:"usecaseSystemBoundary",isGroup:!0,padding:20,look:e.look,colorIndex:l++,cssClasses:RT("default","system-boundary",`system-boundary-${u.type}`,...u.classes),cssStyles:[...u.styles],cssCompiledStyles:Tp(u.classes),boundaryType:u.type});for(let u of Qr.relationships){let{label:h,...d}=but(u);s.push({id:u.id,start:u.source,end:u.target,source:u.source,target:u.target,sourceLabel:n(u.source),targetLabel:n(u.target),type:"edge",relationshipType:u.type,internal:!1,...d,...h!==void 0?{label:r(h)}:{},labelpos:"c",classes:RT("default","relationship",`relationship-${u.type}`,...u.classes,...Tut(u)),style:[...u.styles],cssCompiledStyles:Tp(u.classes),animate:u.animate,...u.animation?{animation:u.animation}:{},look:e.look,thickness:"normal",minlen:u.minlen,isUserDefinedId:u.explicitId})}for(let u of Qr.notes.values())s.push({id:`${u.id}-edge`,start:u.id,end:u.target,source:u.id,target:u.target,type:"edge",relationshipType:"note",sourceLabel:n(u.id),targetLabel:n(u.target),internal:!0,pattern:"dotted",arrowTypeStart:"none",arrowTypeEnd:"none",labelpos:"c",classes:"default relationship relationship-note",style:[],cssCompiledStyles:Tp([]),animate:!1,look:e.look,thickness:"normal",minlen:1,isUserDefinedId:!1});for(let u of i)u.wrappingWidth??=t.wrappingWidth,!u.isGroup&&!u.shape.startsWith("usecaseActor")&&(u.minWidth??=t.minNodeWidth),(u.shape==="usecaseEllipse"||u.shape==="usecaseBusiness")&&(u.spreadPorts=!0);return{nodes:i,edges:s,config:e,type:"usecase",layoutAlgorithm:"dagre",direction:Cwe(),nodeSpacing:t.nodeSpacing,rankSpacing:t.rankSpacing,actorFontSize:t.actorFontSize,actorFontFamily:t.actorFontFamily,actorFontWeight:t.actorFontWeight,usecaseFontSize:t.usecaseFontSize,usecaseFontFamily:t.usecaseFontFamily,usecaseFontWeight:t.usecaseFontWeight,diagramPadding:t.diagramPadding,useMaxWidth:t.useMaxWidth,markers:["point","circle","cross","extension"]}},"getData"),Cp={getConfig:Qct,createModel:x9,commit:Jct,getAST:Zct,clear:eut,setDiagramTitle:Cr,getDiagramTitle:xr,setAccTitle:hr,getAccTitle:gr,setAccDescription:fr,getAccDescription:yr,getActors:tut,getActor:rut,getUseCases:nut,getUseCase:iut,getSystemBoundaries:sut,getSystemBoundary:aut,getRelationships:out,getNotes:lut,getNote:cut,getJsonNodes:uut,getJsonNode:hut,getClassDefs:dut,getClassDef:fut,getDirection:Cwe,getData:Cut}});var b9=w(()=>{"use strict"});function By(e){console&&console.error&&console.error(`Error: ${e}`)}function LT(e){console&&console.warn&&console.warn(`Warning: ${e}`)}var kwe=w(()=>{"use strict";a(By,"PRINT_ERROR");a(LT,"PRINT_WARNING")});function IT(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}var Swe=w(()=>{"use strict";a(IT,"timer")});function DT(e){function t(){}a(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return a(n,"fakeAccess"),n(),n(),e;(0,eval)(e)}var Ewe=w(()=>{"use strict";a(DT,"toFastProperties")});var $y=w(()=>{"use strict";kwe();Swe();Ewe()});function kut(e){return Sut(e)?e.LABEL:e.name}function Sut(e){return typeof e.LABEL=="string"&&e.LABEL!==""}function AA(e){return e.map(Fy)}function Fy(e){function t(r){return r.map(Fy)}if(a(t,"convertDefinition"),e instanceof Mn){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return typeof e.label=="string"&&(r.label=e.label),r}else{if(e instanceof On)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Vn)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Si)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Ei)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Fy(new Yr({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof yi)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Fy(new Yr({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof yn)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof xi)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Yr){let r={type:"Terminal",name:e.terminalType.name,label:kut(e.terminalType),idx:e.idx};typeof e.label=="string"&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=n instanceof RegExp?n.source:n),r}else{if(e instanceof Js)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}function fc(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var Za,Mn,Js,On,Vn,Si,Ei,yn,yi,xi,Yr,RA=w(()=>{"use strict";a(kut,"tokenLabel");a(Sut,"hasTokenLabel");Za=class{static{a(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),this.definition.forEach(r=>{r.accept(t)})}},Mn=class extends Za{static{a(this,"NonTerminal")}constructor(t){super([]),this.idx=1,Object.assign(this,fc(t))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Js=class extends Za{static{a(this,"Rule")}constructor(t){super(t.definition),this.orgText="",Object.assign(this,fc(t))}},On=class extends Za{static{a(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Object.assign(this,fc(t))}},Vn=class extends Za{static{a(this,"Option")}constructor(t){super(t.definition),this.idx=1,Object.assign(this,fc(t))}},Si=class extends Za{static{a(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,Object.assign(this,fc(t))}},Ei=class extends Za{static{a(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,Object.assign(this,fc(t))}},yn=class extends Za{static{a(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,Object.assign(this,fc(t))}},yi=class extends Za{static{a(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,Object.assign(this,fc(t))}},xi=class extends Za{static{a(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,fc(t))}},Yr=class{static{a(this,"Terminal")}constructor(t){this.idx=1,Object.assign(this,fc(t))}accept(t){t.visit(this)}};a(AA,"serializeGrammar");a(Fy,"serializeProduction");a(fc,"pickOnlyDefined")});var ea,vwe=w(()=>{"use strict";RA();ea=class{static{a(this,"GAstVisitor")}visit(t){let r=t;switch(r.constructor){case Mn:return this.visitNonTerminal(r);case On:return this.visitAlternative(r);case Vn:return this.visitOption(r);case Si:return this.visitRepetitionMandatory(r);case Ei:return this.visitRepetitionMandatoryWithSeparator(r);case yi:return this.visitRepetitionWithSeparator(r);case yn:return this.visitRepetition(r);case xi:return this.visitAlternation(r);case Yr:return this.visitTerminal(r);case Js:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function T9(e){return e instanceof On||e instanceof Vn||e instanceof yn||e instanceof Si||e instanceof Ei||e instanceof yi||e instanceof Yr||e instanceof Js}function kp(e,t=[]){return e instanceof Vn||e instanceof yn||e instanceof yi?!0:e instanceof xi?e.definition.some(n=>kp(n,t)):e instanceof Mn&&t.includes(e)?!1:e instanceof Za?(e instanceof Mn&&t.push(e),e.definition.every(n=>kp(n,t))):!1}function C9(e){return e instanceof xi}function Ra(e){if(e instanceof Mn)return"SUBRULE";if(e instanceof Vn)return"OPTION";if(e instanceof xi)return"OR";if(e instanceof Si)return"AT_LEAST_ONE";if(e instanceof Ei)return"AT_LEAST_ONE_SEP";if(e instanceof yi)return"MANY_SEP";if(e instanceof yn)return"MANY";if(e instanceof Yr)return"CONSUME";throw Error("non exhaustive match")}var wwe=w(()=>{"use strict";RA();a(T9,"isSequenceProd");a(kp,"isOptionalProd");a(C9,"isBranchingProd");a(Ra,"getProductionDslName")});var ta=w(()=>{"use strict";RA();vwe();wwe()});function _we(e,t,r){return[new Vn({definition:[new Yr({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var bu,LA=w(()=>{"use strict";ta();bu=class{static{a(this,"RestWalker")}walk(t,r=[]){t.definition.forEach((n,i)=>{let s=t.definition.slice(i+1);if(n instanceof Mn)this.walkProdRef(n,s,r);else if(n instanceof Yr)this.walkTerminal(n,s,r);else if(n instanceof On)this.walkFlat(n,s,r);else if(n instanceof Vn)this.walkOption(n,s,r);else if(n instanceof Si)this.walkAtLeastOne(n,s,r);else if(n instanceof Ei)this.walkAtLeastOneSep(n,s,r);else if(n instanceof yi)this.walkManySep(n,s,r);else if(n instanceof yn)this.walkMany(n,s,r);else if(n instanceof xi)this.walkOr(n,s,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let i=r.concat(n);this.walk(t,i)}walkOption(t,r,n){let i=r.concat(n);this.walk(t,i)}walkAtLeastOne(t,r,n){let i=[new Vn({definition:t.definition})].concat(r,n);this.walk(t,i)}walkAtLeastOneSep(t,r,n){let i=_we(t,r,n);this.walk(t,i)}walkMany(t,r,n){let i=[new Vn({definition:t.definition})].concat(r,n);this.walk(t,i)}walkManySep(t,r,n){let i=_we(t,r,n);this.walk(t,i)}walkOr(t,r,n){let i=r.concat(n);t.definition.forEach(s=>{let o=new On({definition:[s]});this.walk(o,i)})}};a(_we,"restForRepetitionWithSeparator")});function Sp(e){if(e instanceof Mn)return Sp(e.referencedRule);if(e instanceof Yr)return wut(e);if(T9(e))return Eut(e);if(C9(e))return vut(e);throw Error("non exhaustive match")}function Eut(e){let t=[],r=e.definition,n=0,i=r.length>n,s,o=!0;for(;i&&o;)s=r[n],o=kp(s),t=t.concat(Sp(s)),n=n+1,i=r.length>n;return[...new Set(t)]}function vut(e){let t=e.definition.map(r=>Sp(r));return[...new Set(t.flat())]}function wut(e){return[e.terminalType]}var k9=w(()=>{"use strict";ta();a(Sp,"first");a(Eut,"firstForSequence");a(vut,"firstForBranching");a(wut,"firstForTerminal")});var IA,S9=w(()=>{"use strict";IA="_~IN~_"});function Awe(e){let t={};return e.forEach(r=>{let n=new E9(r).startWalking();Object.assign(t,n)}),t}function _ut(e,t){return e.name+t+IA}var E9,Rwe=w(()=>{"use strict";LA();k9();S9();ta();E9=class extends bu{static{a(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let i=_ut(t.referencedRule,t.idx)+this.topProd.name,s=r.concat(n),o=new On({definition:s}),l=Sp(o);this.follows[i]=l}};a(Awe,"computeAllProdsFollows");a(_ut,"buildBetweenProdsFollowPrefix")});function Sr(e){return e.charCodeAt(0)}function DA(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function Gy(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function Ep(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function NT(){throw Error("Internal Error - Should never get here!")}function v9(e){return e.type==="Character"}var w9=w(()=>{"use strict";a(Sr,"cc");a(DA,"insertToSet");a(Gy,"addFlag");a(Ep,"ASSERT_EXISTS");a(NT,"ASSERT_NEVER_REACH_HERE");a(v9,"isCharacter")});var MT,OT,_9,Lwe=w(()=>{"use strict";w9();MT=[];for(let e=Sr("0");e<=Sr("9");e++)MT.push(e);OT=[Sr("_")].concat(MT);for(let e=Sr("a");e<=Sr("z");e++)OT.push(e);for(let e=Sr("A");e<=Sr("Z");e++)OT.push(e);_9=[Sr(" "),Sr("\f"),Sr(` +`),Sr("\r"),Sr(" "),Sr("\v"),Sr(" "),Sr("\xA0"),Sr("\u1680"),Sr("\u2000"),Sr("\u2001"),Sr("\u2002"),Sr("\u2003"),Sr("\u2004"),Sr("\u2005"),Sr("\u2006"),Sr("\u2007"),Sr("\u2008"),Sr("\u2009"),Sr("\u200A"),Sr("\u2028"),Sr("\u2029"),Sr("\u202F"),Sr("\u205F"),Sr("\u3000"),Sr("\uFEFF")]});var Aut,NA,Rut,PT,Iwe=w(()=>{"use strict";w9();Lwe();Aut=/[0-9a-fA-F]/,NA=/[0-9]/,Rut=/[1-9]/,PT=class{static{a(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Gy(n,"global");break;case"i":Gy(n,"ignoreCase");break;case"m":Gy(n,"multiLine");break;case"u":Gy(n,"unicode");break;case"y":Gy(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}Ep(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return NT()}quantifier(t=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),r={atLeast:i,atMost:s}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(t===!0&&r===void 0)return;Ep(r);break}if(!(t===!0&&r===void 0)&&Ep(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),Ep(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):NT()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Sr(` +`),Sr("\r"),Sr("\u2028"),Sr("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,r=!1;switch(this.popChar()){case"d":t=MT;break;case"D":t=MT,r=!0;break;case"s":t=_9;break;case"S":t=_9,r=!0;break;case"w":t=OT;break;case"W":t=OT,r=!0;break}return Ep(t)?{type:"Set",value:t,complement:r}:NT()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=Sr("\f");break;case"n":t=Sr(` +`);break;case"r":t=Sr("\r");break;case"t":t=Sr(" ");break;case"v":t=Sr("\v");break}return Ep(t)?{type:"Character",value:t}:NT()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Sr("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:Sr(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:Sr(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(v9(n)&&this.isRangeDash()){this.consumeChar("-");let s=this.classAtom(),o=s.type==="Character";if(v9(s)){if(s.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}});var ad,Dwe=w(()=>{"use strict";ad=class{static{a(this,"BaseRegExpVisitor")}visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Lookbehind":this.visitLookbehind(t);break;case"NegativeLookbehind":this.visitNegativeLookbehind(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitLookbehind(t){}visitNegativeLookbehind(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}});var MA=w(()=>{"use strict";Iwe();Dwe()});function vp(e){let t=e.toString();if(OA.hasOwnProperty(t))return OA[t];{let r=Lut.pattern(t);return OA[t]=r,r}}function Nwe(){OA={}}var OA,Lut,PA=w(()=>{"use strict";MA();OA={},Lut=new PT;a(vp,"getRegExpAst");a(Nwe,"clearRegExpParserCache")});function Pwe(e,t=!1){try{let r=vp(e);return A9(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Owe)t&<(`${BT} 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.`),By(`${BT} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function A9(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i{if(typeof u=="number")BA(u,t,r);else{let h=u;if(r===!0)for(let d=h.from;d<=h.to;d++)BA(d,t,r);else{for(let d=h.from;d<=h.to&&d=Vy){let d=h.from>=Vy?h.from:Vy,f=h.to,p=pc(d),m=pc(f);for(let g=p;g<=m;g++)t[g]=g}}}});break;case"Group":A9(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&R9(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Object.values(t)}function BA(e,t,r){let n=pc(e);t[n]=n,r===!0&&Iut(e,t)}function Iut(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=pc(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let s=pc(i.charCodeAt(0));t[s]=s}}}function Mwe(e,t){return e.value.find(r=>{if(typeof r=="number")return t.includes(r);{let n=r;return t.find(i=>n.from<=i&&i<=n.to)!==void 0}})}function R9(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Array.isArray(e.value)?e.value.every(R9):R9(e.value):!1}function $A(e,t){if(t instanceof RegExp){let r=vp(t),n=new L9(e);return n.visit(r),n.found}else{for(let r of t){let n=r.charCodeAt(0);if(e.includes(n))return!0}return!1}}var Owe,BT,L9,Bwe=w(()=>{"use strict";MA();$y();PA();I9();Owe="Complement Sets are not supported for first char optimization",BT=`Unable to use "first char" lexer optimizations: +`;a(Pwe,"getOptimizedStartCodesIndices");a(A9,"firstCharOptimizedIndices");a(BA,"addOptimizedIdxToResult");a(Iut,"handleIgnoreCase");a(Mwe,"findCode");a(R9,"isWholeOptional");L9=class extends ad{static{a(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return;case"Lookbehind":this.visitLookbehind(t);return;case"NegativeLookbehind":this.visitNegativeLookbehind(t);return}super.visitChildren(t)}}visitCharacter(t){this.targetCharCodes.includes(t.value)&&(this.found=!0)}visitSet(t){t.complement?Mwe(t,this.targetCharCodes)===void 0&&(this.found=!0):Mwe(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};a($A,"canMatchCharCode")});function Fwe(e,t){t=Object.assign({safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:a((T,C)=>C(),"tracer")},t);let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{Qut()});let n;r("Reject Lexer.NA",()=>{n=e.filter(T=>T[wp]!==Kn.NA)});let i=!1,s;r("Transform Patterns",()=>{i=!1,s=n.map(T=>{let C=T[wp];if(C instanceof RegExp){let v=C.source;return v.length===1&&v!=="^"&&v!=="$"&&v!=="."&&!C.ignoreCase?v:v.length===2&&v[0]==="\\"&&!["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"].includes(v[1])?v[1]:$we(C)}else{if(typeof C=="function")return i=!0,{exec:C};if(typeof C=="object")return i=!0,C;if(typeof C=="string"){if(C.length===1)return C;{let v=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),E=new RegExp(v);return $we(E)}}else throw Error("non exhaustive match")}})});let o,l,u,h,d;r("misc mapping",()=>{o=n.map(T=>T.tokenTypeIdx),l=n.map(T=>{let C=T.GROUP;if(C!==Kn.SKIPPED){if(typeof C=="string")return C;if(C===void 0)return!1;throw Error("non exhaustive match")}}),u=n.map(T=>{let C=T.LONGER_ALT;if(C)return Array.isArray(C)?C.map(E=>n.indexOf(E)):[n.indexOf(C)]}),h=n.map(T=>T.PUSH_MODE),d=n.map(T=>Object.hasOwn(T,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let T=qwe(t.lineTerminatorCharacters);f=n.map(C=>!1),t.positionTracking!=="onlyOffset"&&(f=n.map(C=>Object.hasOwn(C,"LINE_BREAKS")?!!C.LINE_BREAKS:jwe(C,T)===!1&&$A(T,C.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=n.map(Uwe),m=s.map(Kut),g=n.reduce((T,C)=>{let v=C.GROUP;return typeof v=="string"&&v!==Kn.SKIPPED&&(T[v]=[]),T},{}),y=s.map((T,C)=>{let v=l[C]===void 0&&u[C]===void 0?Dut(n[C].PATTERN):void 0;return{pattern:s[C],asciiClass:v,longerAlt:u[C],canLineTerminator:f[C],matchType:v!==void 0?UA:m[C]!==!1?VA:p[C]?$T:zA,short:m[C],group:l[C],push:h[C],pop:d[C],tokenTypeIdx:o[C],tokenType:n[C]}})});let x=!0,b=[];return t.safeMode||r("First Char Optimization",()=>{b=n.reduce((T,C,v)=>{if(typeof C.PATTERN=="string"){let E=C.PATTERN.charCodeAt(0),S=pc(E);D9(T,S,y[v])}else if(Array.isArray(C.START_CHARS_HINT)){let E;C.START_CHARS_HINT.forEach(S=>{let _=typeof S=="string"?S.charCodeAt(0):S,A=pc(_);E!==A&&(E=A,D9(T,A,y[v]))})}else if(C.PATTERN instanceof RegExp)if(C.PATTERN.unicode)x=!1,t.ensureOptimizations&&By(`${BT} Unable to analyze < ${C.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 E=Pwe(C.PATTERN,t.ensureOptimizations);E.length===0&&(x=!1),E.forEach(S=>{D9(T,S,y[v])})}else t.ensureOptimizations&&By(`${BT} TokenType: <${C.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`),x=!1;return T},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:i,canBeOptimized:x}}function Dut(e){var t,r;if(!(e instanceof RegExp)||e.flags!=="")return;let n;try{n=vp(e)}catch{return}if(n.value.value.length!==1||n.value.value[0].value.length!==1)return;let i=n.value.value[0].value[0],s;for(;i.type==="Group";){if(i.capturing||i.quantifier!==void 0&&s!==void 0||i.value.value.length!==1||i.value.value[0].value.length!==1)return;s=(t=i.quantifier)!==null&&t!==void 0?t:s,i=i.value.value[0].value[0]}if(i.type!=="Set"||i.complement||i.quantifier!==void 0&&s!==void 0||(s=(r=i.quantifier)!==null&&r!==void 0?r:s,s?.atLeast!==1||s.atMost!==1/0||!s.greedy))return;let o=new Uint8Array(128);for(let l of i.value){let u=typeof l=="number"?l:l.from,h=typeof l=="number"?l:l.to;if(u<0||h>=o.length)return;o.fill(1,u,h+1)}return o}function Gwe(e,t){let r=[],n=Mut(e);r=r.concat(n.errors);let i=Out(n.valid),s=i.valid;return r=r.concat(i.errors),r=r.concat(Nut(s)),r=r.concat(Uut(s)),r=r.concat(Wut(s,t)),r=r.concat(jut(s)),r}function Nut(e){let t=[],r=e.filter(n=>n[wp]instanceof RegExp);return t=t.concat(But(r)),t=t.concat(Gut(r)),t=t.concat(Vut(r)),t=t.concat(zut(r)),t=t.concat($ut(r)),t}function Mut(e){let t=e.filter(i=>!Object.hasOwn(i,wp)),r=t.map(i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Yn.MISSING_PATTERN,tokenTypes:[i]})),n=e.filter(i=>!t.includes(i));return{errors:r,valid:n}}function Out(e){let t=e.filter(i=>{let s=i[wp];return!(s instanceof RegExp)&&typeof s!="function"&&!Object.hasOwn(s,"exec")&&typeof s!="string"}),r=t.map(i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Yn.INVALID_PATTERN,tokenTypes:[i]})),n=e.filter(i=>!t.includes(i));return{errors:r,valid:n}}function But(e){class t extends ad{static{a(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}return e.filter(i=>{let s=i.PATTERN;try{let o=vp(s),l=new t;return l.visit(o),l.found}catch{return Put.test(s.source)}}).map(i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Yn.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function $ut(e){return e.filter(n=>n.PATTERN.test("")).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Yn.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function Gut(e){class t extends ad{static{a(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}return e.filter(i=>{let s=i.PATTERN;try{let o=vp(s),l=new t;return l.visit(o),l.found}catch{return Fut.test(s.source)}}).map(i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Yn.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Vut(e){return e.filter(n=>{let i=n[wp];return i instanceof RegExp&&(i.multiline||i.global)}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Yn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function zut(e){let t=[],r=e.map(s=>e.reduce((o,l)=>(s.PATTERN.source===l.PATTERN.source&&!t.includes(l)&&l.PATTERN!==Kn.NA&&(t.push(l),o.push(l)),o),[]));return r=r.filter(Boolean),r.filter(s=>s.length>1).map(s=>{let o=s.map(u=>u.name);return{message:`The same RegExp pattern ->${s[0].PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Yn.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function Uut(e){return e.filter(n=>{if(!Object.hasOwn(n,"GROUP"))return!1;let i=n.GROUP;return i!==Kn.SKIPPED&&i!==Kn.NA&&typeof i!="string"}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Yn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function Wut(e,t){return e.filter(i=>i.PUSH_MODE!==void 0&&!t.includes(i.PUSH_MODE)).map(i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Yn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function jut(e){let t=[],r=e.reduce((n,i,s)=>{let o=i.PATTERN;return o===Kn.NA||(typeof o=="string"?n.push({str:o,idx:s,tokenType:i}):o instanceof RegExp&&Hut(o)&&n.push({str:o.source,idx:s,tokenType:i})),n},[]);return e.forEach((n,i)=>{r.forEach(({str:s,idx:o,tokenType:l})=>{if(i${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Yn.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}function qut(e,t){if(t instanceof RegExp){if(Yut(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(typeof t=="function")return t(e,0,[],{});if(Object.hasOwn(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function Hut(e){return[".","\\","[","]","|","^","$","(",")","?","*","+","{"].find(r=>e.source.indexOf(r)!==-1)===void 0}function Yut(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:Yn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,FA)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+FA+`> property in its definition +`,type:Yn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,FA)&&Object.hasOwn(e,zy)&&!Object.hasOwn(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${zy}: <${e.defaultMode}>which does not exist +`,type:Yn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,FA)&&Object.keys(e.modes).forEach(i=>{let s=e.modes[i];s.forEach((o,l)=>{o===void 0?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${l}> +`,type:Yn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(o,"LONGER_ALT")&&(Array.isArray(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT]).forEach(h=>{h!==void 0&&!s.includes(h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${i}> +`,type:Yn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),n}function zwe(e,t,r){let n=[],i=!1,o=Object.values(e.modes||{}).flat().filter(Boolean).filter(u=>u[wp]!==Kn.NA),l=qwe(r);return t&&o.forEach(u=>{let h=jwe(u,l);if(h!==!1){let f={message:Xut(u,h),type:h.issue,tokenType:u};n.push(f)}else Object.hasOwn(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):$A(l,u.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:Yn.NO_LINE_BREAKS_FLAGS}),n}function Uwe(e){let t=e.PATTERN;if(t instanceof RegExp)return!1;if(typeof t=="function")return!0;if(Object.hasOwn(t,"exec"))return!0;if(typeof t=="string")return!1;throw Error("non exhaustive match")}function Kut(e){return typeof e=="string"&&e.length===1?e.charCodeAt(0):!1}function jwe(e,t){if(Object.hasOwn(e,"LINE_BREAKS"))return!1;if(e.PATTERN instanceof RegExp){try{$A(t,e.PATTERN)}catch(r){return{issue:Yn.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(typeof e.PATTERN=="string")return!1;if(Uwe(e))return{issue:Yn.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function Xut(e,t){if(t.issue===Yn.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${e.name}> Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Yn.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${e.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function qwe(e){return e.map(r=>typeof r=="string"?r.charCodeAt(0):r)}function D9(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function pc(e){return e255?255+~~(e/255):e}}var wp,zy,FA,VA,$T,zA,UA,Put,Fut,Wwe,Vy,GA,I9=w(()=>{"use strict";MA();FT();$y();Bwe();PA();wp="PATTERN",zy="defaultMode",FA="modes",VA=0,$T=1,zA=2,UA=3;a(Fwe,"analyzeTokenTypes");a(Dut,"getAsciiClass");a(Gwe,"validatePatterns");a(Nut,"validateRegExpPattern");a(Mut,"findMissingPatterns");a(Out,"findInvalidPatterns");Put=/[^\\][$]/;a(But,"findEndOfInputAnchor");a($ut,"findEmptyMatchRegExps");Fut=/[^\\[][\^]|^\^/;a(Gut,"findStartOfInputAnchor");a(Vut,"findUnsupportedFlags");a(zut,"findDuplicatePatterns");a(Uut,"findInvalidGroupType");a(Wut,"findModesThatDoNotExist");a(jut,"findUnreachablePatterns");a(qut,"tryToMatchStrToPattern");a(Hut,"noMetaChar");a(Yut,"usesLookAheadOrBehind");a($we,"addStickyFlag");a(Vwe,"performRuntimeChecks");a(zwe,"performWarningRuntimeChecks");a(Uwe,"isCustomPattern");a(Kut,"isShortPattern");Wwe={test:a(function(e){let t=e.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function Zut(e){let t=[...e],r=e,n=!0;for(;n;){r=r.map(s=>s.CATEGORIES).flat().filter(Boolean);let i=r.filter(s=>!t.includes(s));t=t.concat(i),i.length===0?n=!1:r=i}return t}function Jut(e){e.forEach(t=>{N9(t)||(Kwe[Hwe]=t,t.tokenTypeIdx=Hwe++),Ywe(t)&&!Array.isArray(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Ywe(t)||(t.CATEGORIES=[]),rht(t)||(t.categoryMatches=[]),nht(t)||(t.categoryMatchesMap={})})}function eht(e){e.forEach(t=>{t.categoryMatches=[],Object.keys(t.categoryMatchesMap).forEach(r=>{t.categoryMatches.push(Kwe[r].tokenTypeIdx)})})}function tht(e){e.forEach(t=>{Xwe([],t)})}function Xwe(e,t){e.forEach(r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(r=>{let n=e.concat(t);n.includes(r)||Xwe(n,r)})}function N9(e){return Object.hasOwn(e??{},"tokenTypeIdx")}function Ywe(e){return Object.hasOwn(e??{},"CATEGORIES")}function rht(e){return Object.hasOwn(e??{},"categoryMatches")}function nht(e){return Object.hasOwn(e??{},"categoryMatchesMap")}function Qwe(e){return Object.hasOwn(e??{},"tokenTypeIdx")}var Hwe,Kwe,_p=w(()=>{"use strict";a(Tu,"tokenStructuredMatcher");a(Uy,"tokenStructuredMatcherNoCategories");Hwe=1,Kwe={};a(Cu,"augmentTokenTypes");a(Zut,"expandCategories");a(Jut,"assignTokenDefaultProps");a(eht,"assignCategoriesTokensProp");a(tht,"assignCategoriesMapProp");a(Xwe,"singleAssignCategoriesToksMap");a(N9,"hasShortKeyProperty");a(Ywe,"hasCategoriesProperty");a(rht,"hasExtendingTokensTypesProperty");a(nht,"hasExtendingTokensTypesMapProperty");a(Qwe,"isTokenType")});var M9,O9=w(()=>{"use strict";M9={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}});var Yn,GT,Kn,FT=w(()=>{"use strict";I9();$y();_p();O9();PA();(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"})(Yn||(Yn={}));GT={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:M9,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(GT);Kn=class{static{a(this,"Lexer")}constructor(t,r=GT){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.cachedGroupKeys=[],this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:l,value:u}=IT(s),h=l>10?console.warn:console.log;return this.traceInitIndent time: ${l}ms`),this.traceInitIndent--,u}else return s()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=Object.assign({},GT,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===GT.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Wwe;else if(this.config.lineTerminatorCharacters===GT.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Array.isArray(t)?i={modes:{defaultMode:[...t]},defaultMode:zy}:(s=!1,i=Object.assign({},t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Vwe(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(zwe(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},Object.entries(i.modes).forEach(([l,u])=>{i.modes[l]=u.filter(h=>h!==void 0)});let o=Object.keys(i.modes);if(Object.entries(i.modes).forEach(([l,u])=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Gwe(u,o))}),this.lexerDefinitionErrors.length===0){Cu(u);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=Fwe(u,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=h.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=h.canBeOptimized}})}),this.defaultMode=i.defaultMode,this.cachedGroupKeys=Object.keys(this.emptyGroups),this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let u=this.lexerDefinitionErrors.map(h=>h.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+u)}this.lexerDefinitionWarning.forEach(l=>{LT(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(s&&(this.handleModes=()=>{}),this.trackStartLines===!1&&(this.computeNewColumn=l=>l),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=()=>{}),/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=Object.entries(this.canModeBeOptimized).reduce((u,[h,d])=>(d===!1&&u.push(h),u),[]);if(r.ensureOptimizations&&l.length>0)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",()=>{Nwe()}),this.TRACE_INIT("toFastProperties",()=>{DT(this)})})}tokenize(t,r=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let i=this.lexerDefinitionErrors.map(s=>s.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,i,s,o,l,u,h,d,f,p,m,g,y,x,b,T=t,C=T.length,v=0,E=0,S=this.hasCustom?0:Math.floor(t.length/10),_=new Array(S),A=[],B=this.trackStartLines?1:void 0,$=this.trackStartLines?1:void 0,O={};for(let K=0;K{if(M.length===1&&K.tokenType.PUSH_MODE===void 0){let Z=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(K);A.push({offset:K.startOffset,line:K.startLine,column:K.startColumn,length:K.image.length,message:Z})}else{M.pop();let Z=M.at(-1);N=this.patternIdxToConfig[Z],D=this.charCodeToPatternIdxToConfig[Z],F=N.length;let ce=this.canModeBeOptimized[Z]&&this.config.safeMode===!1;D&&ce?P=!0:P=!1}},"pop_mode");function U(K){M.push(K),D=this.charCodeToPatternIdxToConfig[K],N=this.patternIdxToConfig[K],F=N.length;let Z=this.canModeBeOptimized[K]&&this.config.safeMode===!1;D&&Z?P=!0:P=!1}a(U,"push_mode"),U.call(this,r);let z,j=this.config.recoveryEnabled;for(;vu.length){u=o,f=o.length,h=d,z=he;break}}}break}}if(f!==-1){if(p=z.group,p!==void 0&&(u=u!==null?u:t.substring(v,v+f),m=z.tokenTypeIdx,g=this.createTokenInstance(u,v,m,z.tokenType,B,$,f),this.handlePayload(g,h),p===!1?E=this.addToken(_,E,g):O[p].push(g)),G===!0&&z.canLineTerminator===!0){let te=0,me,he;I.lastIndex=0;do u=u!==null?u:t.substring(v,v+f),me=I.test(u),me===!0&&(he=I.lastIndex-1,te++);while(me===!0);te!==0?(B=B+te,$=f-he,this.updateTokenEndLineColumnLocation(g,p,he,te,B,$,f)):$=this.computeNewColumn($,f)}else $=this.computeNewColumn($,f);v=v+f,this.handleModes(z,V,U,g)}else{let te=v,me=B,he=$,we=j===!1;for(;we===!1&&v{"use strict";FT();_p();a(Ap,"tokenLabel");a(P9,"hasTokenLabel");iht="parent",Zwe="categories",Jwe="label",e_e="group",t_e="push_mode",r_e="pop_mode",n_e="longer_alt",i_e="line_breaks",s_e="start_chars_hint";a(lr,"createToken");a(sht,"createTokenInternal");La=lr({name:"EOF",pattern:Kn.NA});Cu([La]);a(Rp,"createTokenInstance");a(VT,"tokenMatcher")});var WA,a_e,ml,Wy=w(()=>{"use strict";Lp();ta();WA={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${P9(e)?`--> ${Ap(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let s="Expecting: ",l=` +but found: '`+t[0].image+"'";if(n)return s+n+l;{let f=`one of these possible Token sequences: +${e.reduce((p,m)=>p.concat(m),[]).map(p=>`[${p.map(m=>Ap(m)).join(", ")}]`).map((p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return s+f+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",o=` +but found: '`+t[0].image+"'";if(r)return i+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${e.map(h=>`[${h.map(d=>Ap(d)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(WA);a_e={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},ml={buildDuplicateFoundError(e,t){function r(d){return d instanceof Yr?d.terminalType.name:d instanceof Mn?d.nonTerminalName:""}a(r,"getExtraProductionArgument");let n=e.name,i=t[0],s=i.idx,o=Ra(i),l=r(i),u=s>0,h=`->${o}${u?s:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,` +`),h},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=e.prefixPath.map(i=>Ap(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?"":e.alternation.idx,r=e.prefixPath.length===0,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable. +Only the last alternative may be empty. +`;else{let i=e.prefixPath.map(s=>Ap(s)).join(", ");n+=`<${i}> may appears as a prefix path in all these alternatives. +`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(e){let t=Ra(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=e.leftRecursionPath.map(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 Js?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function o_e(e,t){let r=new B9(e,t);return r.resolveRefs(),r.errors}var B9,l_e=w(()=>{"use strict";Ia();ta();a(o_e,"resolveGrammar");B9=class extends ea{static{a(this,"GastRefResolverVisitor")}constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Ki.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}}});function YA(e,t,r=[]){r=[...r];let n=[],i=0;function s(l){return l.concat(e.slice(i+1))}a(s,"remainingPathWith");function o(l){let u=YA(s(l),t,r);return n.concat(u)}for(a(o,"getAlternativesForProd");r.length{u.definition.length!==0&&(n=o(u.definition))}),n;if(l instanceof Yr)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:e.slice(i)}),n}function c_e(e,t,r,n){let i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE",l=!1,u=t.length,h=u-n-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});f.length!==0;){let p=f.pop();if(p===o){l&&f.at(-1).idx<=h&&f.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,x=p.occurrenceStack;if(m.length===0)continue;let b=m[0];if(b===i){let T={idx:g,def:m.slice(1),ruleStack:y.slice(0,-1),occurrenceStack:x.slice(0,-1)};f.push(T)}else if(b instanceof Yr)if(g=0;T--){let C=b.definition[T],v={idx:g,def:C.definition.concat(m.slice(1)),ruleStack:y,occurrenceStack:x};f.push(v),f.push(o)}else if(b instanceof On)f.push({idx:g,def:b.definition.concat(m.slice(1)),ruleStack:y,occurrenceStack:x});else if(b instanceof Js)f.push(aht(b,g,y,x));else throw Error("non exhaustive match")}return d}function aht(e,t,r,n){let i=[...r];i.push(e.name);let s=[...n];return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var $9,jA,jy,qA,zT,HA,UT,WT=w(()=>{"use strict";k9();LA();ta();$9=class extends bu{static{a(this,"AbstractNextPossibleTokensWalker")}constructor(t,r){super(),this.topProd=t,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){this.ruleStack.length===0?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},jA=class extends $9{static{a(this,"NextAfterTokenWalker")}constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),s=new On({definition:i});this.possibleTokTypes=Sp(s),this.found=!0}}},jy=class extends bu{static{a(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},qA=class extends jy{static{a(this,"NextTerminalAfterManyWalker")}walkMany(t,r,n){if(t.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof Yr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(t,r,n)}},zT=class extends jy{static{a(this,"NextTerminalAfterManySepWalker")}walkManySep(t,r,n){if(t.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof Yr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(t,r,n)}},HA=class extends jy{static{a(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof Yr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(t,r,n)}},UT=class extends jy{static{a(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let i=r.concat(n)[0];this.result.isEndOfRule=i===void 0,i instanceof Yr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(t,r,n)}};a(YA,"possiblePathsFrom");a(c_e,"nextPossibleTokensAfter");a(aht,"expandTopLevelRule")});function XA(e){if(e instanceof Vn||e==="Option")return ni.OPTION;if(e instanceof yn||e==="Repetition")return ni.REPETITION;if(e instanceof Si||e==="RepetitionMandatory")return ni.REPETITION_MANDATORY;if(e instanceof Ei||e==="RepetitionMandatoryWithSeparator")return ni.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof yi||e==="RepetitionWithSeparator")return ni.REPETITION_WITH_SEPARATOR;if(e instanceof xi||e==="Alternation")return ni.ALTERNATION;throw Error("non exhaustive match")}function h_e(e,t,r,n,i,s){let o=jT(e,t,r),l=y_e(o)?Uy:Tu;return s(o,n,l,i)}function d_e(e,t,r,n,i,s){let o=qT(e,t,i,r),l=y_e(o)?Uy:Tu;return s(o[0],l,n)}function f_e(e,t,r,n){let i=e.length,s=e.every(o=>o.every(l=>l.length===1));if(t)return function(o){let l=o.map(u=>u.GATE);for(let u=0;uu.flat()).reduce((u,h,d)=>(h.forEach(f=>{f.tokenTypeIdx in u||(u[f.tokenTypeIdx]=d),f.categoryMatches.forEach(p=>{Object.hasOwn(u,p)||(u[p]=d)})}),u),{});return function(){let u=this.LA_FAST(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;os.length===1),i=e.length;if(n&&!r){let s=e.flat();if(s.length===1&&s[0].categoryMatches.length===0){let l=s[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===l}}else{let o=s.reduce((l,u,h)=>(l[u.tokenTypeIdx]=!0,u.categoryMatches.forEach(d=>{l[d]=!0}),l),[]);return function(){let l=this.LA_FAST(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sYA([o],1)),n=u_e(r.length),i=r.map(o=>{let l={};return o.forEach(u=>{F9(u.partialPath).forEach(d=>{l[d]=!0})}),l}),s=r;for(let o=1;o<=t;o++){let l=s;s=u_e(l.length);for(let u=0;u{F9(x.partialPath).forEach(T=>{i[u][T]=!0})})}}}}return n}function jT(e,t,r,n){let i=new KA(e,ni.ALTERNATION,n);return t.accept(i),m_e(i.result,r)}function qT(e,t,r,n){let i=new KA(e,r);t.accept(i);let s=i.result,l=new G9(t,e,r).startWalking(),u=new On({definition:s}),h=new On({definition:l});return m_e([u,h],n)}function QA(e,t){e:for(let r=0;r{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function y_e(e){return e.every(t=>t.every(r=>r.every(n=>n.categoryMatches.length===0)))}var ni,G9,KA,qy=w(()=>{"use strict";WT();LA();_p();ta();(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"})(ni||(ni={}));a(XA,"getProdType");a(h_e,"buildLookaheadFuncForOr");a(d_e,"buildLookaheadFuncForOptionalProd");a(f_e,"buildAlternativesLookAheadFunc");a(p_e,"buildSingleAlternativeLookaheadFunction");G9=class extends bu{static{a(this,"RestDefinitionFinderWalker")}constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,ni.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,ni.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,ni.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,ni.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,ni.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},KA=class extends ea{static{a(this,"InsideDefinitionFinderVisitor")}constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,ni.OPTION)}visitRepetition(t){this.checkIsTarget(t,ni.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,ni.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,ni.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,ni.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,ni.ALTERNATION)}};a(u_e,"initializeArrayOfArrays");a(F9,"pathToHashKeys");a(oht,"isUniquePrefixHash");a(m_e,"lookAheadSequenceFromAlternatives");a(jT,"getLookaheadPathsForOr");a(qT,"getLookaheadPathsForOptionalProd");a(QA,"containsPath");a(g_e,"isStrictPrefixOfPath");a(y_e,"areTokenCategoriesNotUsed")});function x_e(e){return e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(r=>Object.assign({type:Ki.CUSTOM_LOOKAHEAD_VALIDATION},r))}function b_e(e,t,r,n){let i=e.flatMap(u=>lht(u,r)),s=pht(e,t,r),o=e.flatMap(u=>hht(u,r)),l=e.flatMap(u=>uht(u,e,n,r));return i.concat(s,o,l)}function lht(e,t){let r=new V9;e.accept(r);let n=r.allProductions,i=Object.groupBy(n,cht),s=Object.fromEntries(Object.entries(i).filter(([l,u])=>u.length>1));return Object.values(s).map(l=>{let u=l[0],h=t.buildDuplicateFoundError(e,l),d=Ra(u),f={message:h,type:Ki.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:u.idx},p=T_e(u);return p&&(f.parameter=p),f})}function cht(e){return`${Ra(e)}_#_${e.idx}_#_${T_e(e)}`}function T_e(e){return e instanceof Yr?e.terminalType.name:e instanceof Mn?e.nonTerminalName:""}function uht(e,t,r,n){let i=[];if(t.reduce((o,l)=>l.name===e.name?o+1:o,0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:o,type:Ki.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function C_e(e,t,r){let n=[],i;return t.includes(e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ki.INVALID_RULE_OVERRIDE,ruleName:e})),n}function U9(e,t,r,n=[]){let i=[],s=ZA(t.definition);if(s.length===0)return[];{let o=e.name;s.includes(e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ki.LEFT_RECURSION,ruleName:o});let u=n.concat([e]),d=s.filter(f=>!u.includes(f)).flatMap(f=>{let p=[...n];return p.push(f),U9(e,f,r,p)});return i.concat(d)}}function ZA(e){let t=[];if(e.length===0)return t;let r=e[0];if(r instanceof Mn)t.push(r.referencedRule);else if(r instanceof On||r instanceof Vn||r instanceof Si||r instanceof Ei||r instanceof yi||r instanceof yn)t=t.concat(ZA(r.definition));else if(r instanceof xi)t=r.definition.map(s=>ZA(s.definition)).flat();else if(!(r instanceof Yr))throw Error("non exhaustive match");let n=kp(r),i=e.length>1;if(n&&i){let s=e.slice(1);return t.concat(ZA(s))}else return t}function k_e(e,t){let r=new HT;return e.accept(r),r.alternations.flatMap(s=>s.definition.slice(0,-1).flatMap((l,u)=>c_e([l],[],Tu,1).length===0?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:u}),type:Ki.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:u+1}]:[]))}function S_e(e,t,r){let n=new HT;e.accept(n);let i=n.alternations;return i=i.filter(o=>o.ignoreAmbiguities!==!0),i.flatMap(o=>{let l=o.idx,u=o.maxLookahead||t,h=jT(l,e,u,o),d=dht(h,o,e,r),f=fht(h,o,e,r);return d.concat(f)})}function hht(e,t){let r=new HT;return e.accept(r),r.alternations.flatMap(s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:Ki.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}function E_e(e,t,r){let n=[];return e.forEach(i=>{let s=new z9;i.accept(s),s.allProductions.forEach(l=>{let u=XA(l),h=l.maxLookahead||t,d=l.idx;if(qT(d,i,u,h)[0].flat().length===0){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:Ki.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function dht(e,t,r,n){let i=[];return e.reduce((l,u,h)=>(t.definition[h].ignoreAmbiguities===!0||u.forEach(d=>{let f=[h];e.forEach((p,m)=>{h!==m&&QA(p,d)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!QA(i,d)&&(i.push(d),l.push({alts:f,path:d}))}),l),[]).map(l=>{let u=l.alts.map(d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:Ki.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}function fht(e,t,r,n){let i=e.reduce((o,l,u)=>{let h=l.map(d=>({idx:u,path:d}));return o.concat(h)},[]);return i.flatMap(o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path;return i.filter(p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{let m=[p.idx+1,u+1],g=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:Ki.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})})}function pht(e,t,r){let n=[],i=t.map(s=>s.name);return e.forEach(s=>{let o=s.name;if(i.includes(o)){let l=r.buildNamespaceConflictError(s);n.push({message:l,type:Ki.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}var V9,HT,z9,YT=w(()=>{"use strict";Ia();ta();qy();WT();_p();a(x_e,"validateLookahead");a(b_e,"validateGrammar");a(lht,"validateDuplicateProductions");a(cht,"identifyProductionForDuplicates");a(T_e,"getExtraProductionArgument");V9=class extends ea{static{a(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};a(uht,"validateRuleDoesNotAlreadyExist");a(C_e,"validateRuleIsOverridden");a(U9,"validateNoLeftRecursion");a(ZA,"getFirstNoneTerminal");HT=class extends ea{static{a(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};a(k_e,"validateEmptyOrAlternative");a(S_e,"validateAmbiguousAlternationAlternatives");z9=class extends ea{static{a(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};a(hht,"validateTooManyAlts");a(E_e,"validateSomeNonEmptyLookaheadPath");a(dht,"checkAlternativesAmbiguities");a(fht,"checkPrefixAlternativesAmbiguities");a(pht,"checkTerminalAndNoneTerminalsNameSpace")});function v_e(e){let t=Object.assign({errMsgProvider:a_e},e),r={};return e.rules.forEach(n=>{r[n.name]=n}),o_e(r,t.errMsgProvider)}function w_e(e){var t;let r=(t=e.errMsgProvider)!==null&&t!==void 0?t:ml;return b_e(e.rules,e.tokenTypes,r,e.grammarName)}var __e=w(()=>{"use strict";l_e();YT();Wy();a(v_e,"resolveGrammar");a(w_e,"validateGrammar")});function od(e){return D_e.includes(e.name)}var A_e,R_e,L_e,I_e,D_e,Hy,Ip,KT,XT,QT,Yy=w(()=>{"use strict";A_e="MismatchedTokenException",R_e="NoViableAltException",L_e="EarlyExitException",I_e="NotAllInputParsedException",D_e=[A_e,R_e,L_e,I_e];Object.freeze(D_e);a(od,"isRecognitionException");Hy=class extends Error{static{a(this,"RecognitionException")}constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Ip=class extends Hy{static{a(this,"MismatchedTokenException")}constructor(t,r,n){super(t,r),this.previousToken=n,this.name=A_e}},KT=class extends Hy{static{a(this,"NoViableAltException")}constructor(t,r,n){super(t,r),this.previousToken=n,this.name=R_e}},XT=class extends Hy{static{a(this,"NotAllInputParsedException")}constructor(t,r){super(t,r),this.name=I_e}},QT=class extends Hy{static{a(this,"EarlyExitException")}constructor(t,r,n){super(t,r),this.previousToken=n,this.name=L_e}}});function mht(e,t,r,n,i,s,o){var l,u,h;let d=n|i,f=(l=(u=this.firstAfterRepMap)[h=this.currRuleShortName])!==null&&l!==void 0?l:u[h]=[],p=f[d];if(p===void 0){let x=this.getCurrRuleFullName(),b=this.getGAstProductions()[x];p=new s(b,i).startWalking(),f[d]=p}let m=p.token,g=p.occurrence,y=p.isEndOfRule;this.RULE_STACK_IDX===0&&y&&m===void 0&&(m=La,g=1),!(m===void 0||g===void 0)&&this.shouldInRepetitionRecoveryBeTried(m,g,o)&&this.tryInRepetitionRecovery(e,t,r,m)}var W9,q9,j9,JA,H9=w(()=>{"use strict";Lp();WT();Yy();S9();Ia();W9={},q9="InRuleRecoveryException",j9=class extends Error{static{a(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=q9}},JA=class{static{a(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap=[],this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(t,"recoveryEnabled")?t.recoveryEnabled:ra.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=mht)}getTokenToInsert(t){let r=Rp(t,"",-1,-1,-1,-1,-1,-1);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,i){let s=this.findReSyncTokenType(),o=this.exportLexerState(),l=[],u=!1,h=this.LA_FAST(1),d=this.LA_FAST(1),f=a(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new Ip(m,h,this.LA(0));g.resyncedTokens=l.slice(0,-1),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(d,i)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(d,s)?u=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,l));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA_FAST(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getNextPossibleTokenTypes(t){let r=t.ruleStack[0],i=this.getGAstProductions()[r];return new jA(i,t).startWalking()}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new j9("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||r.length===0)return!1;let n=this.LA_FAST(1);return r.find(s=>this.tokenMatcher(n,s))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(r).includes(t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA_FAST(1),n=2;for(;;){let i=t.find(s=>VT(r,s));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return W9;let t=this.currRuleShortName,r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK,n=this.RULE_STACK_IDX+1,i=new Array(n);for(let s=0;sthis.getFollowSetFromFollowKey(r)).flat()}getFollowSetFromFollowKey(t){if(t===W9)return[La];let r=t.ruleName+t.idxInCallingRule+IA+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,La)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA_FAST(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return r.slice(0,-1)}attemptInRepetitionRecovery(t,r,n,i,s,o,l){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),i=this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1);return{ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){let t=this.RULE_STACK_IDX+1,r=new Array(t);for(let n=0;n{"use strict"});var ZT,K9=w(()=>{"use strict";Wy();Ia();YT();qy();ZT=class{static{a(this,"LLkLookaheadStrategy")}constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:ra.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(r.length===0){let n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),s=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...i,...s]}return r}validateNoLeftRecursion(t){return t.flatMap(r=>U9(r,r,ml))}validateEmptyOrAlternatives(t){return t.flatMap(r=>k_e(r,ml))}validateAmbiguousAlternationAlternatives(t,r){return t.flatMap(n=>S_e(n,r,ml))}validateSomeNonEmptyLookaheadPath(t,r){return E_e(t,r,ml)}buildLookaheadForAlternation(t){return h_e(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,f_e)}buildLookaheadForOptional(t){return d_e(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,XA(t.prodType),p_e)}}});function ght(e){eR.reset(),e.accept(eR);let t=eR.dslMethods;return eR.reset(),t}var tR,X9,eR,N_e=w(()=>{"use strict";Ia();Y9();ta();K9();tR=class{static{a(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=Object.hasOwn(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:ra.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(t,"maxLookahead")?t.maxLookahead:ra.maxLookahead,this.lookaheadStrategy=Object.hasOwn(t,"lookaheadStrategy")?t.lookaheadStrategy:new ZT({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=[],this.currRuleLookaheadFuncs=[]}preComputeLookaheadFunctions(t){t.forEach(r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:s,repetitionMandatory:o,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=ght(r);n.forEach(h=>{let d=h.idx===0?"":h.idx;this.TRACE_INIT(`${Ra(h)}${d}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled});this.setLaFuncCache(this.fullRuleNameToShort[r.name],256|h.idx,f)})}),i.forEach(h=>{this.computeLookaheadFunc(r,h.idx,768,"Repetition",h.maxLookahead,Ra(h))}),s.forEach(h=>{this.computeLookaheadFunc(r,h.idx,512,"Option",h.maxLookahead,Ra(h))}),o.forEach(h=>{this.computeLookaheadFunc(r,h.idx,1024,"RepetitionMandatory",h.maxLookahead,Ra(h))}),l.forEach(h=>{this.computeLookaheadFunc(r,h.idx,1536,"RepetitionMandatoryWithSeparator",h.maxLookahead,Ra(h))}),u.forEach(h=>{this.computeLookaheadFunc(r,h.idx,1280,"RepetitionWithSeparator",h.maxLookahead,Ra(h))})})})}computeLookaheadFunc(t,r,n,i,s,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i});this.setLaFuncCache(this.fullRuleNameToShort[t.name],n|r,l)})}setLaFuncCache(t,r,n){let i=this.lookAheadFuncsCache[t];i===void 0&&(i=[],this.lookAheadFuncsCache[t]=i),i[r]=n}},X9=class extends ea{static{a(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},eR=new X9;a(ght,"collectMethods")});function J9(e,t){e.startOffset===-1?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset{"use strict";a(J9,"setNodeLocationOnlyOffset");a(eG,"setNodeLocationFull");a(M_e,"addTerminalToCst");a(O_e,"addNoneTerminalToCst")});function tG(e,t){Object.defineProperty(e,yht,{enumerable:!1,configurable:!0,writable:!1,value:t})}var yht,B_e=w(()=>{"use strict";yht="name";a(tG,"defineNameProp")});function xht(e,t){let r=Object.keys(e),n=r.length;for(let i=0;io.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${s.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function F_e(e,t,r){let n=a(function(){},"derivedConstructor");tG(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return t.forEach(s=>{i[s]=xht}),n.prototype=i,n.prototype.constructor=n,n}function bht(e,t){return Tht(e,t)}function Tht(e,t){return t.filter(i=>typeof e[i]!="function").map(i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:rG.MISSING_METHOD,methodName:i})).filter(Boolean)}var rG,G_e=w(()=>{"use strict";B_e();a(xht,"defaultVisit");a($_e,"createBaseSemanticVisitorConstructor");a(F_e,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(rG||(rG={}));a(bht,"validateVisitor");a(Tht,"validateMissingCstMethods")});var sR,V_e=w(()=>{"use strict";P_e();G_e();Ia();sR=class{static{a(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=Object.hasOwn(t,"nodeLocationTracking")?t.nodeLocationTracking:ra.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{};else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=eG,this.setNodeLocationFromNode=eG,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=J9,this.setNodeLocationFromNode=J9,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{};else throw Error(`Invalid config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:-1,endOffset:-1}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA_FAST(1).startOffset,endOffset:-1}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:-1,startLine:-1,startColumn:-1,endOffset:-1,endLine:-1,endColumn:-1}}setInitialNodeLocationFullRegular(t){let r=this.LA_FAST(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:-1,endLine:-1,endColumn:-1}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.location;n.startOffset!==-1&&n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=-1,n.startLine=-1,n.startColumn=-1)}cstPostRuleOnlyOffset(t){let r=this.LA(0),n=t.location;n.startOffset!==-1&&n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=-1}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];M_e(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];O_e(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}get currCSTNode(){let t=this;return t.CST_STACK[t.CST_STACK.length-1]}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let t=$_e(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let t=F_e(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}}});var aR,z_e=w(()=>{"use strict";Ia();aR=class{static{a(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):ku}LA_FAST(t){let r=this.currIdx+t;return this.tokVector[r]}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?ku:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}}});var oR,U_e=w(()=>{"use strict";Yy();Ia();Wy();YT();ta();oR=class{static{a(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Ky){if(this.definedRulesNames.includes(t)){let o={message:ml.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Ki.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(o)}this.definedRulesNames.push(t);let i=this.defineRule(t,r,n);return this[t]=i,i}OVERRIDE_RULE(t,r,n=Ky){let i=C_e(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let s=this.defineRule(t,r,n);return this[t]=s,s}BACKTRACK(t,r){var n;let i=(n=t.coreRule)!==null&&n!==void 0?n:t;return function(){this.isBackTrackingStack.push(1);let s=this.saveRecogState();try{return i.apply(this,r),!0}catch(o){if(od(o))return!1;throw o}finally{this.reloadRecogState(s),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return AA(Object.values(this.gastProductionsCache))}}});var lR,W_e=w(()=>{"use strict";Y9();Yy();qy();WT();Ia();H9();Lp();_p();lR=class{static{a(this,"RecognizerEngine")}initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull=[],this.fullRuleNameToShort={},this.ruleShortNameIdx=0,this.tokenMatcher=Uy,this.subruleIdx=0,this.currRuleShortName=-1,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(Array.isArray(t)){if(t.length===0)throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof t[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(Array.isArray(t))this.tokensMap=t.reduce((s,o)=>(s[o.name]=o,s),{});else if(Object.hasOwn(t,"modes")&&Object.values(t.modes).flat().every(Qwe)){let s=Object.values(t.modes).flat(),o=[...new Set(s)];this.tokensMap=o.reduce((l,u)=>(l[u.name]=u,l),{})}else if(typeof t=="object"&&t!==null)this.tokensMap=Object.assign({},t);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=La;let i=(Object.hasOwn(t,"modes")?Object.values(t.modes).flat():Object.values(t)).every(s=>{var o;return((o=s.categoryMatches)===null||o===void 0?void 0:o.length)==0});this.tokenMatcher=i?Uy:Tu,Cu(Object.values(this.tokensMap))}defineRule(t,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Object.hasOwn(n,"resyncEnabled")?n.resyncEnabled:Ky.resyncEnabled,s=Object.hasOwn(n,"recoveryValueFunc")?n.recoveryValueFunc:Ky.recoveryValueFunc,o=this.ruleShortNameIdx++;this.shortRuleNameToFull[o]=t,this.fullRuleNameToShort[t]=o;let l;return this.outputCst===!0?l=a(function(...f){try{this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,f);let p=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(p),p}catch(p){return this.invokeRuleCatch(p,i,s)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):l=a(function(...f){try{return this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,f)}catch(p){return this.invokeRuleCatch(p,i,s)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(a(function(...f){this.onBeforeParse(t);try{return l.apply(this,f)}finally{this.onAfterParse(t)}},"rootRule"),{ruleName:t,originalGrammarAction:r,coreRule:l})}invokeRuleCatch(t,r,n){let i=this.RULE_STACK_IDX===0,s=r&&!this.isBackTracking()&&this.recoveryEnabled;if(od(t)){let o=t;if(s){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l))if(o.resyncedTokens=this.reSyncTo(l),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(t);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,o.partialCstResult=u}throw o}}else{if(i)return this.moveToTerminatedState(),n(t);throw o}}else throw t}optionInternal(t,r){let n=512|r;return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let i=this.currRuleLookaheadFuncs[n],s;if(typeof t!="function"){s=t.DEF;let o=t.GATE;if(o!==void 0){let l=i;i=a(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else s=t;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(t,r){let n=1024|t;return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let i=this.currRuleLookaheadFuncs[n],s;if(typeof r!="function"){s=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=a(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else s=r;if(i.call(this)===!0){let o=this.doSingleRepetition(s);for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(t,ni.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,HA)}atLeastOneSepFirstInternal(t,r){let n=1536|t;this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let i=r.DEF,s=r.SEP;if(this.currRuleLookaheadFuncs[n].call(this)===!0){i.call(this);let l=a(()=>this.tokenMatcher(this.LA_FAST(1),s),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA_FAST(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,s,l,i,UT],l,1536,t,UT)}else throw this.raiseEarlyExitException(t,ni.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=768|t;return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let i=this.currRuleLookaheadFuncs[n],s;if(typeof r!="function"){s=r.DEF;let l=r.GATE;if(l!==void 0){let u=i;i=a(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else s=r;let o=!0;for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,qA,o)}manySepFirstInternal(t,r){let n=1280|t;this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let i=r.DEF,s=r.SEP;if(this.currRuleLookaheadFuncs[n].call(this)===!0){i.call(this);let l=a(()=>this.tokenMatcher(this.LA_FAST(1),s),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA_FAST(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,s,l,i,zT],l,1280,t,zT)}}repetitionSepSecondInternal(t,r,n,i,s){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,i,s],n,1536,t,s)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=256|r,i=Array.isArray(t)?t:t.DEF,o=this.currRuleLookaheadFuncs[n].call(this,i);if(o!==void 0)return i[o].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX],this.currRuleLookaheadFuncs=this.lookAheadFuncsCache[this.currRuleShortName]),this.cstFinallyStateUpdate()}subruleInternal(t,r,n){let i;try{let s=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=t.coreRule.apply(this,s),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),i}catch(s){throw this.subruleInternalError(s,n,t.ruleName)}}subruleInternalError(t,r,n){throw od(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let i;try{let s=this.LA_FAST(1);this.tokenMatcher(s,t)===!0?(this.consumeToken(),i=s):this.consumeInternalError(t,s,n)}catch(s){i=this.consumeInternalRecovery(t,r,s)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,i),i}consumeInternalError(t,r,n){let i,s=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Ip(i,r,s))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(s){throw s.name===q9?n:s}}else throw n}saveRecogState(){let t=this.errors,r=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState);let r=t.RULE_STACK;for(let n=0;n=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX],this.currRuleLookaheadFuncs=this.lookAheadFuncsCache[this.currRuleShortName])}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=n,this.RULE_STACK[++this.RULE_STACK_IDX]=t,this.currRuleShortName=t,this.currRuleLookaheadFuncs=this.lookAheadFuncsCache[t],this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.currRuleShortName;return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),La)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=-1,this.currRuleLookaheadFuncs=[],this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(t){for(let r=0;r{"use strict";Yy();qy();Ia();cR=class{static{a(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=Object.hasOwn(t,"errorMessageProvider")?t.errorMessageProvider:ra.errorMessageProvider}SAVE_ERROR(t){if(od(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return[...this._errors]}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],l=qT(t,s,r,this.maxLookahead)[0],u=[];for(let d=1;d<=this.maxLookahead;d++)u.push(this.LA(d));let h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new QT(h,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],s=jT(t,i,this.maxLookahead),o=[];for(let h=1;h<=this.maxLookahead;h++)o.push(this.LA(h));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new KT(u,this.LA(1),l))}}});function eC(e,t,r,n=!1){hR(r);let i=this.recordingProdStack.at(-1),s=typeof t=="function"?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),Object.hasOwn(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),i.definition.push(o),this.recordingProdStack.pop(),dR}function kht(e,t){hR(t);let r=this.recordingProdStack.at(-1),n=Array.isArray(e)===!1,i=n===!1?e:e.DEF,s=new xi({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});Object.hasOwn(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);let o=i.some(l=>typeof l.GATE=="function");return s.hasPredicates=o,r.definition.push(s),i.forEach(l=>{let u=new On({definition:[]});s.definition.push(u),Object.hasOwn(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Object.hasOwn(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),dR}function Y_e(e){return e===0?"":`${e}`}function hR(e){if(e<0||e>H_e){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${H_e+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var dR,q_e,H_e,K_e,X_e,Cht,uR,Q_e=w(()=>{"use strict";ta();FT();_p();Lp();Ia();dR={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(dR);q_e=!0,H_e=255,K_e=lr({name:"RECORDING_PHASE_TOKEN",pattern:Kn.NA});Cu([K_e]);X_e=Rp(K_e,`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(X_e);Cht={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},uR=class{static{a(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,t,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,t,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,t)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,t)},this[`MANY${r}`]=function(n){this.manyInternalRecord(t,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(t,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(t,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(t,n)}}this.consume=function(t,r,n){return this.consumeInternalRecord(r,t,n)},this.subrule=function(t,r,n){return this.subruleInternalRecord(r,t,n)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let t=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return ku}topLevelRuleRecord(t,r){try{let n=new Js({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return eC.call(this,Vn,t,r)}atLeastOneInternalRecord(t,r){eC.call(this,Si,r,t)}atLeastOneSepFirstInternalRecord(t,r){eC.call(this,Ei,r,t,q_e)}manyInternalRecord(t,r){eC.call(this,yn,r,t)}manySepFirstInternalRecord(t,r){eC.call(this,yi,r,t,q_e)}orInternalRecord(t,r){return kht.call(this,t,r)}subruleInternalRecord(t,r,n){if(hR(r),!t||!Object.hasOwn(t,"ruleName")){let l=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let i=this.recordingProdStack.at(-1),s=t.ruleName,o=new Mn({idx:r,nonTerminalName:s,label:n?.LABEL,referencedRule:void 0});return i.definition.push(o),this.outputCst?Cht:dR}consumeInternalRecord(t,r,n){if(hR(r),!N9(t)){let o=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=this.recordingProdStack.at(-1),s=new Yr({idx:r,terminalType:t,label:n?.LABEL});return i.definition.push(s),X_e}};a(eC,"recordProd");a(kht,"recordOrProd");a(Y_e,"getIdxSuffix");a(hR,"assertMethodIdxIsValid")});var fR,Z_e=w(()=>{"use strict";$y();Ia();fR=class{static{a(this,"PerformanceTracer")}initPerformanceTracer(t){if(Object.hasOwn(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=ra.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${t}>`);let{time:i,value:s}=IT(r),o=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return r()}}});function J_e(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,i);s&&(s.get||s.set)?Object.defineProperty(e.prototype,i,s):e.prototype[i]=r.prototype[i]})})}var eAe=w(()=>{"use strict";a(J_e,"applyMixins")});var ku,ra,Ky,Ki,tC,rC,Ia=w(()=>{"use strict";$y();Rwe();Lp();Wy();__e();H9();N_e();V_e();z_e();U_e();W_e();j_e();Q_e();Z_e();eAe();YT();ku=Rp(La,"",-1,-1,-1,-1,-1,-1);Object.freeze(ku);ra=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:WA,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ky=Object.freeze({recoveryValueFunc:a(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ki||(Ki={}));tC=class e{static{a(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{DT(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),this.definedRulesNames.forEach(i=>{let o=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=v_e({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(n.length===0&&this.skipValidations===!1){let i=w_e({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:ml,grammarName:r}),s=x_e({lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,s)}}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Awe(Object.values(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw t=this.definitionErrors.map(i=>i.message),new Error(`Parser Definition Errors detected: + ${t.join(` +------------------------------- +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initGastRecorder(r),n.initPerformanceTracer(r),Object.hasOwn(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=Object.hasOwn(r,"skipValidations")?r.skipValidations:ra.skipValidations}};tC.DEFER_DEFINITION_ERRORS_HANDLING=!1;J_e(tC,[JA,tR,sR,aR,lR,oR,cR,uR,fR]);rC=class extends tC{static{a(this,"CstParser")}constructor(t,r=ra){let n=Object.assign({},r);n.outputCst=!0,super(t,n)}}});var tAe=w(()=>{"use strict";ta()});var rAe=w(()=>{"use strict"});var nAe=w(()=>{"use strict";tAe();rAe()});var iAe=w(()=>{"use strict";b9()});var pR=w(()=>{"use strict";b9();Ia();FT();Lp();qy();K9();Wy();Yy();O9();ta();ta();nAe();iAe()});function Xy(e,t,r){let n=[r];return n.index=t,n.input=e,n}var Eht,vht,sAe,aAe,wht,_ht,Aht,Xi,Dp,mR,ii,Rht,mc,Lht,gR,gc,nG,Iht,Dht,iG,sG,aG,yR,oAe,Pi,oG,xR,lG,cG,uG,hG,dG,fG,pG,mG,gG,yG,Nht,xG,bG,TG,CG,kG,SG,EG,vG,wG,_G,bR,TR,lAe,AG,nC,RG,iC,LG,sC,IG,Ja,CR,aC,DG,kR,oC,lC,Qy,Zy,_o,Jy,NG,eo,SR,MG,OG,PG,BG,$G,Mht,Oht,cAe,uAe,hAe,FG=w(()=>{"use strict";pR();a(Xy,"customMatch");Eht=a((e,t)=>{if(e[t]!=='"'||e[t+1]!=="`")return null;for(let r=t+2;r{if(e[t]!=="%"||e[t+1]!=="%")return null;for(let n=t-1;n>=0;n--){let i=e[n];if(i===` +`||i==="\r")break;if(i!==" "&&i!==" ")return null}let r=t+2;for(;r{for(let r=t-1;r>=0;r--){let n=e[r];if(n===` +`||n==="\r")return!0;if(n!==" "&&n!==" ")return!1}return!0},"isIndentedLineStart"),aAe=a((e,t,r)=>{if(!sAe(e,t))return null;let n=r.exec(e.slice(t));return n?Xy(e,t,n[0]):null},"matchAccessibilityLine"),wht=a((e,t)=>{if(!sAe(e,t))return null;let r=/^accDescr[\t ]*{/.exec(e.slice(t));if(!r)return null;let n=e.indexOf("}",t+r[0].length);return n===-1?null:Xy(e,t,e.slice(t,n+1))},"matchAccDescrBlock"),_ht=a((e,t)=>{if(e[t]!=="{")return null;let r=0,n=!1,i=!1;for(let s=t;s{let r=e.indexOf(">>",t);if(r===-1||/[\n\r]/.test(e.slice(t,r)))return null;let n=e.slice(t,r);return n.trim()?Xy(e,t,n):null},"matchStereotypeText"),Xi=lr({name:"LABEL_TEXT",pattern:Kn.NA}),Dp=lr({name:"WORD",pattern:Kn.NA,categories:Xi}),mR=lr({name:"NUMBER",pattern:/(?:\d+\.\d+|\d+|\.\d+)(?:[A-Za-z]+)?/,categories:Xi}),ii=lr({name:"IDENTIFIER",pattern:/\w+/,longer_alt:mR,categories:Dp}),Rht=lr({name:"HWS",pattern:/[\t ]+/,group:Kn.SKIPPED}),mc=lr({name:"MARKDOWN_STRING",pattern:Eht,start_chars_hint:['"'],line_breaks:!0}),Lht=lr({name:"UNCLOSED_MARKDOWN_STRING",pattern:/"`[^]*/,line_breaks:!0}),gR=lr({name:"COMMENT",pattern:vht,start_chars_hint:["%"],line_breaks:!1}),gc=lr({name:"NEWLINE",pattern:/\r\n|\n|\r/,line_breaks:!0}),nG=lr({name:"ACC_DESCR_BLOCK",pattern:wht,start_chars_hint:["a"],line_breaks:!0}),Iht=/^accTitle[\t ]*:[^\n\r]*/,Dht=/^accDescr[\t ]*:[^\n\r]*/,iG=lr({name:"ACC_TITLE_LINE",pattern:a((e,t)=>aAe(e,t,Iht),"pattern"),start_chars_hint:["a"],line_breaks:!1}),sG=lr({name:"ACC_DESCR_LINE",pattern:a((e,t)=>aAe(e,t,Dht),"pattern"),start_chars_hint:["a"],line_breaks:!1}),aG=lr({name:"JSON_DECLARATION_START",pattern:/json[\t ]+\w+[\t ]*@[\t ]*(?={)/,push_mode:"jsonBody"}),yR=lr({name:"JSON_OBJECT_LITERAL",pattern:_ht,start_chars_hint:["{"],line_breaks:!0,pop_mode:!0}),oAe=lr({name:"UNCLOSED_JSON_OBJECT_LITERAL",pattern:/{[^]*/,line_breaks:!0,pop_mode:!0}),Pi=a((e,t)=>lr({name:e,pattern:t,longer_alt:ii,categories:Dp}),"keyword"),oG=Pi("USECASE",/usecase-beta/),xR=Pi("ACTOR",/actor/),lG=Pi("SYSTEM_BOUNDARY",/systemBoundary/),cG=Pi("END",/end/),uG=Pi("DIRECTION",/direction/),hG=Pi("TD",/TD/),dG=Pi("TB",/TB/),fG=Pi("BT",/BT/),pG=Pi("LR",/LR/),mG=Pi("RL",/RL/),gG=Pi("NOTE",/note/),yG=Pi("FOR",/for/),Nht=Pi("JSON",/json/),xG=Pi("CLASS_DEF",/classDef/),bG=Pi("CLASS",/class/),TG=Pi("STYLE",/style/),CG=Pi("INCLUDE",/include/i),kG=Pi("EXTEND",/extend/i),SG=Pi("TRUE",/true/),EG=Pi("FALSE",/false/),vG=lr({name:"GENERALIZATION",pattern:/--\|>/}),wG=lr({name:"DEPENDENCY_ARROW",pattern:/\.\.>/}),_G=lr({name:"STEREOTYPE_START",pattern:/<>/,pop_mode:!0}),TR=lr({name:"STEREOTYPE_TEXT",pattern:Aht,line_breaks:!1}),lAe=lr({name:"UNCLOSED_STEREOTYPE_TEXT",pattern:/[^\n\r]+/,line_breaks:!1,pop_mode:!0}),AG=lr({name:"CLASS_SEPARATOR",pattern:/:::/}),nC=lr({name:"FORWARD_SOLID",pattern:/--+>/}),RG=lr({name:"BACKWARD_SOLID",pattern:/<--+/}),iC=lr({name:"FORWARD_CIRCLE",pattern:/--o/}),LG=lr({name:"BACKWARD_CIRCLE",pattern:/o--/}),sC=lr({name:"FORWARD_CROSS",pattern:/--x/}),IG=lr({name:"BACKWARD_CROSS",pattern:/x--/}),Ja=lr({name:"MARKERLESS_SOLID",pattern:/--+/}),CR=lr({name:"METADATA_START",pattern:/@{/}),aC=lr({name:"AT",pattern:/@/,categories:Xi}),DG=lr({name:"LBRACE",pattern:/{/}),kR=lr({name:"RBRACE",pattern:/}/}),oC=lr({name:"LBRACKET",pattern:/\[/}),lC=lr({name:"RBRACKET",pattern:/]/}),Qy=lr({name:"LPAREN",pattern:/\(/}),Zy=lr({name:"RPAREN",pattern:/\)/}),_o=lr({name:"COMMA",pattern:/,/,categories:Xi}),Jy=lr({name:"COLON",pattern:/:/,categories:Xi}),NG=lr({name:"HASH_COLOR",pattern:/#[\dA-Fa-f]+/,categories:Xi}),eo=lr({name:"PLAIN_STRING",pattern:/"[^\n\r"]*"|'[^\n\r']*'/}),SR=lr({name:"CSS_IDENTIFIER",pattern:/--[A-Z_a-z][\w-]*|[A-Z_a-z]\w*(?:-\w+)+/,categories:Xi}),MG=lr({name:"CSS_ESCAPED_COMMA",pattern:/\\,/,categories:Xi}),OG=lr({name:"DASH",pattern:/-/,categories:Xi}),PG=lr({name:"DOT",pattern:/\./,categories:Xi}),BG=lr({name:"PERCENT",pattern:/%/,categories:Xi}),$G=lr({name:"CSS_PUNCTUATION",pattern:/[!#$&*+/=?^_|~]/,categories:Xi}),Mht=lr({name:"LABEL_PUNCTUATION",pattern:/[;<>\\`]/,categories:Xi}),Oht=lr({name:"LABEL_SYMBOL",pattern:/[^\t\n\r !-~]+/,categories:Xi}),cAe=[Xi,Dp,Rht,mc,Lht,gR,gc,nG,iG,sG,aG,oG,xR,lG,cG,uG,hG,dG,fG,pG,mG,gG,yG,Nht,xG,bG,TG,CG,kG,SG,EG,vG,wG,_G,AG,nC,RG,iC,LG,sC,IG,Ja,CR,aC,DG,kR,oC,lC,Qy,Zy,_o,Jy,NG,eo,SR,ii,mR,MG,OG,PG,BG,$G,Mht,Oht],uAe={defaultMode:"defaultMode",modes:{defaultMode:[...cAe],jsonBody:[yR,oAe],stereotype:[bR,TR,lAe]}},hAe=[...cAe,yR,oAe,bR,TR,lAe]});var dAe,fAe=w(()=>{"use strict";pR();FG();dAe=new Kn(uAe)});var pAe,Pht,GG,Np,VG=w(()=>{"use strict";pR();FG();pAe=a(e=>VT(e,Xi)||e.tokenType===eo||e.tokenType===mc,"isLabelToken"),Pht={allowmixing:!0,newpage:!0,package:!0,rectangle:!0,skinparam:!0},GG=class extends rC{static{a(this,"UsecaseParser")}constructor(){super(hAe,{nodeLocationTracking:"full"}),this.RULE("start",()=>{this.CONSUME(oG),this.SUBRULE(this.lineEnd),this.MANY(()=>this.SUBRULE(this.line))}),this.RULE("line",()=>{this.OR([{ALT:a(()=>this.SUBRULE(this.blankLine),"ALT")},{ALT:a(()=>this.SUBRULE(this.commentLine),"ALT")},{GATE:a(()=>this.isStatementStart(),"GATE"),ALT:a(()=>this.SUBRULE(this.statement),"ALT")}])}),this.RULE("statement",()=>{this.OR([{ALT:a(()=>this.SUBRULE(this.accTitleStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.accDescrStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.directionStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.actorStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.systemBoundaryStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.noteStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.jsonStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.classDefStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.classStatement),"ALT")},{ALT:a(()=>this.SUBRULE(this.styleStatement),"ALT")},{GATE:a(()=>this.isMetadataAssignment(),"GATE"),ALT:a(()=>this.SUBRULE(this.metadataAssignmentStatement),"ALT")},{GATE:a(()=>!this.isForbiddenPlantUmlStatement(),"GATE"),ALT:a(()=>this.SUBRULE(this.entityStatement),"ALT")}])}),this.RULE("lineEnd",()=>{this.OR([{ALT:a(()=>this.CONSUME(gc),"ALT")},{ALT:a(()=>this.CONSUME(La),"ALT")}])}),this.RULE("blankLine",()=>{this.CONSUME(gc)}),this.RULE("commentLine",()=>{this.CONSUME(gR),this.SUBRULE(this.lineEnd)}),this.RULE("accTitleStatement",()=>{this.CONSUME(iG),this.SUBRULE(this.lineEnd)}),this.RULE("accDescrStatement",()=>{this.OR([{ALT:a(()=>this.CONSUME(sG),"ALT")},{ALT:a(()=>this.CONSUME(nG),"ALT")}]),this.SUBRULE(this.lineEnd)}),this.RULE("actorStatement",()=>{this.CONSUME(xR),this.SUBRULE(this.actorItem),this.OPTION(()=>{this.OR([{ALT:a(()=>this.AT_LEAST_ONE(()=>{this.CONSUME(_o),this.SUBRULE2(this.actorItem)}),"ALT")},{ALT:a(()=>this.SUBRULE(this.relationTail),"ALT")}])}),this.SUBRULE(this.lineEnd)}),this.RULE("actorItem",()=>{this.SUBRULE(this.actorName),this.OPTION(()=>this.SUBRULE(this.metadata)),this.OPTION2(()=>this.SUBRULE(this.stereotype)),this.OPTION3(()=>this.SUBRULE(this.classSuffix))}),this.RULE("actorName",()=>{this.OR([{ALT:a(()=>{this.CONSUME(ii),this.OPTION(()=>{this.CONSUME(Qy),this.SUBRULE(this.nodeLabel),this.CONSUME(Zy)})},"ALT")},{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mc),"ALT")}])}),this.RULE("actorDeclarationOnly",()=>{this.CONSUME(xR),this.SUBRULE(this.actorItem),this.MANY(()=>{this.CONSUME(_o),this.SUBRULE2(this.actorItem)}),this.SUBRULE(this.lineEnd)}),this.RULE("entityStatement",()=>{this.SUBRULE(this.entityName),this.OPTION(()=>this.SUBRULE(this.relationTail)),this.SUBRULE(this.lineEnd)}),this.RULE("entityName",()=>{this.OR([{ALT:a(()=>{this.CONSUME(ii),this.OPTION(()=>{this.OR2([{ALT:a(()=>{this.CONSUME(Qy),this.SUBRULE(this.nodeLabel),this.CONSUME(Zy)},"ALT")},{ALT:a(()=>{this.CONSUME(oC),this.SUBRULE2(this.nodeLabel),this.CONSUME(lC)},"ALT")}])})},"ALT")},{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mc),"ALT")}]),this.OPTION2(()=>this.SUBRULE(this.useCaseMetadata)),this.OPTION3(()=>this.SUBRULE(this.stereotype)),this.OPTION4(()=>this.SUBRULE(this.classSuffix))}),this.RULE("nodeLabel",()=>{this.OR([{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mc),"ALT")},{ALT:a(()=>this.AT_LEAST_ONE(()=>this.CONSUME(Xi)),"ALT")}])}),this.RULE("useCaseMetadata",()=>{this.SUBRULE(this.metadata)}),this.RULE("relationTail",()=>{this.OPTION({GATE:a(()=>this.LA(1).tokenType===ii&&this.LA(2).tokenType===aC,"GATE"),DEF:a(()=>{this.CONSUME(ii),this.CONSUME(aC)},"DEF")}),this.SUBRULE(this.arrow),this.SUBRULE(this.entityName)}),this.RULE("arrow",()=>{this.OR([{ALT:a(()=>this.SUBRULE(this.semanticRelation),"ALT")},{ALT:a(()=>this.SUBRULE(this.forwardSolidOperator),"ALT")},{ALT:a(()=>this.SUBRULE(this.backwardSolidOperator),"ALT")},{ALT:a(()=>this.SUBRULE(this.markerlessSolidOperator),"ALT")},{ALT:a(()=>this.SUBRULE(this.forwardCircleOperator),"ALT")},{ALT:a(()=>this.SUBRULE(this.backwardCircleOperator),"ALT")},{ALT:a(()=>this.SUBRULE(this.forwardCrossOperator),"ALT")},{ALT:a(()=>this.SUBRULE(this.backwardCrossOperator),"ALT")}])}),this.RULE("forwardSolidOperator",()=>{this.CONSUME(nC)}),this.RULE("backwardSolidOperator",()=>{this.CONSUME(RG),this.OPTION({GATE:a(()=>this.LA(0).image==="<--"&&this.hasLabeledRight([Ja]),"GATE"),DEF:a(()=>{this.SUBRULE(this.edgeLabel),this.CONSUME(Ja)},"DEF")})}),this.RULE("markerlessSolidOperator",()=>{this.CONSUME(Ja),this.OPTION({GATE:a(()=>this.LA(0).image==="--"&&this.hasLabeledRight([nC,Ja,iC,sC]),"GATE"),DEF:a(()=>{this.SUBRULE(this.edgeLabel),this.OR([{ALT:a(()=>this.CONSUME(nC),"ALT")},{ALT:a(()=>this.CONSUME2(Ja),"ALT")},{ALT:a(()=>this.CONSUME(iC),"ALT")},{ALT:a(()=>this.CONSUME(sC),"ALT")}])},"DEF")})}),this.RULE("forwardCircleOperator",()=>{this.CONSUME(iC)}),this.RULE("backwardCircleOperator",()=>{this.CONSUME(LG),this.OPTION({GATE:a(()=>this.hasLabeledRight([Ja]),"GATE"),DEF:a(()=>{this.SUBRULE(this.edgeLabel),this.CONSUME(Ja)},"DEF")})}),this.RULE("forwardCrossOperator",()=>{this.CONSUME(sC)}),this.RULE("backwardCrossOperator",()=>{this.CONSUME(IG),this.OPTION({GATE:a(()=>this.hasLabeledRight([Ja]),"GATE"),DEF:a(()=>{this.SUBRULE(this.edgeLabel),this.CONSUME(Ja)},"DEF")})}),this.RULE("edgeLabel",()=>{this.OR([{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mc),"ALT")},{ALT:a(()=>this.AT_LEAST_ONE(()=>this.CONSUME(Xi)),"ALT")}])}),this.RULE("semanticRelation",()=>{this.OR([{ALT:a(()=>{this.CONSUME(wG),this.CONSUME(Jy),this.OR2([{ALT:a(()=>this.CONSUME(CG),"ALT")},{ALT:a(()=>this.CONSUME(kG),"ALT")}])},"ALT")},{ALT:a(()=>this.CONSUME(vG),"ALT")}])}),this.RULE("metadata",()=>{this.CONSUME(CR),this.MANY(()=>this.CONSUME(gc)),this.OPTION(()=>{this.SUBRULE(this.metadataProperty),this.MANY2(()=>{this.SUBRULE(this.metadataSeparator),this.SUBRULE2(this.metadataProperty)}),this.OPTION2(()=>this.CONSUME(_o)),this.MANY3(()=>this.CONSUME2(gc))}),this.CONSUME(kR)}),this.RULE("metadataProperty",()=>{this.OR([{ALT:a(()=>this.CONSUME(ii),"ALT")},{ALT:a(()=>this.CONSUME(eo),"ALT")}]),this.CONSUME(Jy),this.OR2([{ALT:a(()=>this.CONSUME2(ii),"ALT")},{ALT:a(()=>this.CONSUME2(eo),"ALT")},{ALT:a(()=>this.CONSUME(SG),"ALT")},{ALT:a(()=>this.CONSUME(EG),"ALT")}])}),this.RULE("metadataSeparator",()=>{this.OR([{ALT:a(()=>{this.CONSUME(_o),this.MANY(()=>this.CONSUME(gc))},"ALT")},{ALT:a(()=>{this.AT_LEAST_ONE(()=>this.CONSUME2(gc)),this.OPTION(()=>this.CONSUME2(_o)),this.MANY2(()=>this.CONSUME3(gc))},"ALT")}])}),this.RULE("systemBoundaryStatement",()=>{this.CONSUME(lG),this.SUBRULE(this.systemBoundaryName),this.OPTION(()=>this.SUBRULE(this.metadata)),this.OPTION2(()=>this.SUBRULE(this.classSuffix)),this.SUBRULE(this.lineEnd),this.SUBRULE(this.systemBoundaryContent),this.CONSUME(cG),this.SUBRULE2(this.lineEnd)}),this.RULE("systemBoundaryName",()=>{this.OR([{ALT:a(()=>{this.CONSUME(ii),this.OPTION(()=>{this.OR2([{ALT:a(()=>{this.CONSUME(Qy),this.SUBRULE(this.nodeLabel),this.CONSUME(Zy)},"ALT")},{ALT:a(()=>{this.CONSUME(oC),this.SUBRULE2(this.nodeLabel),this.CONSUME(lC)},"ALT")}])})},"ALT")},{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mc),"ALT")}])}),this.RULE("systemBoundaryContent",()=>{this.MANY(()=>{this.OR([{ALT:a(()=>this.SUBRULE(this.blankLine),"ALT")},{ALT:a(()=>this.SUBRULE(this.commentLine),"ALT")},{ALT:a(()=>this.SUBRULE(this.boundaryElement),"ALT")}])})}),this.RULE("boundaryElement",()=>{this.OR([{ALT:a(()=>this.SUBRULE(this.actorDeclarationOnly),"ALT")},{ALT:a(()=>{this.SUBRULE(this.entityName),this.SUBRULE(this.lineEnd)},"ALT")}])}),this.RULE("metadataAssignmentStatement",()=>{this.SUBRULE(this.metadataAssignmentTarget),this.SUBRULE(this.metadata),this.SUBRULE(this.lineEnd)}),this.RULE("metadataAssignmentTarget",()=>{this.OR([{ALT:a(()=>this.CONSUME(ii),"ALT")},{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mc),"ALT")}])}),this.RULE("noteStatement",()=>{this.CONSUME(gG),this.CONSUME(yG),this.CONSUME(ii),this.SUBRULE(this.nodeLabel),this.SUBRULE(this.lineEnd)}),this.RULE("stereotype",()=>{this.CONSUME(_G),this.CONSUME(TR),this.CONSUME(bR)}),this.RULE("classSuffix",()=>{this.CONSUME(AG),this.CONSUME(ii),this.MANY(()=>{this.CONSUME(_o),this.CONSUME2(ii)})}),this.RULE("jsonStatement",()=>{this.CONSUME(aG),this.CONSUME(yR),this.OPTION(()=>this.SUBRULE(this.classSuffix)),this.SUBRULE(this.lineEnd)}),this.RULE("directionStatement",()=>{this.CONSUME(uG),this.OR([{ALT:a(()=>this.CONSUME(hG),"ALT")},{ALT:a(()=>this.CONSUME(dG),"ALT")},{ALT:a(()=>this.CONSUME(fG),"ALT")},{ALT:a(()=>this.CONSUME(pG),"ALT")},{ALT:a(()=>this.CONSUME(mG),"ALT")}]),this.SUBRULE(this.lineEnd)}),this.RULE("classDefStatement",()=>{this.CONSUME(xG),this.CONSUME(ii),this.MANY(()=>{this.CONSUME(_o),this.CONSUME2(ii)}),this.SUBRULE(this.styles),this.SUBRULE(this.lineEnd)}),this.RULE("classStatement",()=>{this.CONSUME(bG),this.CONSUME(ii),this.MANY(()=>{this.CONSUME(_o),this.CONSUME2(ii)}),this.CONSUME3(ii),this.MANY2(()=>{this.CONSUME2(_o),this.CONSUME4(ii)}),this.SUBRULE(this.lineEnd)}),this.RULE("styleStatement",()=>{this.CONSUME(TG),this.CONSUME(ii),this.SUBRULE(this.styles),this.SUBRULE(this.lineEnd)}),this.RULE("styles",()=>{this.SUBRULE(this.styleValue),this.MANY(()=>{this.CONSUME(_o),this.SUBRULE2(this.styleValue)})}),this.RULE("styleValue",()=>{this.OR([{ALT:a(()=>this.CONSUME(Dp),"ALT")},{ALT:a(()=>this.CONSUME(SR),"ALT")},{ALT:a(()=>{this.CONSUME(Ja),this.CONSUME2(Dp)},"ALT")}]),this.CONSUME(Jy),this.AT_LEAST_ONE(()=>this.SUBRULE(this.styleComponent))}),this.RULE("styleComponent",()=>{this.OR([{ALT:a(()=>this.CONSUME(Dp),"ALT")},{ALT:a(()=>this.CONSUME(eo),"ALT")},{ALT:a(()=>this.CONSUME(mR),"ALT")},{ALT:a(()=>this.CONSUME(NG),"ALT")},{ALT:a(()=>this.CONSUME(SR),"ALT")},{ALT:a(()=>this.CONSUME(MG),"ALT")},{ALT:a(()=>this.CONSUME(OG),"ALT")},{ALT:a(()=>this.CONSUME(PG),"ALT")},{ALT:a(()=>this.CONSUME(BG),"ALT")},{ALT:a(()=>this.CONSUME($G),"ALT")},{ALT:a(()=>this.CONSUME(Jy),"ALT")},{ALT:a(()=>this.CONSUME(Qy),"ALT")},{ALT:a(()=>this.CONSUME(Zy),"ALT")},{ALT:a(()=>this.CONSUME(oC),"ALT")},{ALT:a(()=>this.CONSUME(lC),"ALT")},{ALT:a(()=>this.CONSUME(DG),"ALT")},{ALT:a(()=>this.CONSUME(kR),"ALT")},{ALT:a(()=>this.CONSUME(aC),"ALT")},{ALT:a(()=>this.CONSUME(Ja),"ALT")}])}),this.performSelfAnalysis()}isMetadataAssignment(){let t=this.LA(1).tokenType;return(t===ii||t===eo||t===mc)&&this.LA(2).tokenType===CR}isStatementStart(){let t=this.LA(1).tokenType;return t!==La&&t!==gc&&t!==gR}isForbiddenPlantUmlStatement(){return this.LA(1).tokenType===ii&&Pht[this.LA(1).image.toLowerCase()]===!0}hasLabeledRight(t){if(!pAe(this.LA(1)))return!1;for(let r=2;;r++){let n=this.LA(r);if(t.includes(n.tokenType))return!0;if(!pAe(n))return!1}}},Np=new GG});function mAe(e,t,r){let n;try{n=JSON.parse(e)}catch(i){let s=i instanceof Error?i.message:String(i),o=Bht(s,e,t,r);if(!o){let l=0;try{new vR(e).collect()}catch(u){u instanceof Qi&&(l=u.offset)}o=zG(e,l,t,r)}throw new ER(`Invalid JSON: ${s}`,o.line,o.column)}if(typeof n!="object"||n===null||Array.isArray(n))throw new ER("JSON value must have an object root",t,r);return{value:n,propertyOrder:new vR(e).collect()}}var ER,zG,Bht,Qi,vR,gAe=w(()=>{"use strict";ER=class extends Error{constructor(r,n,i){super(`${r} (line ${n}, column ${i})`);this.line=n;this.column=i;this.name="UsecaseJsonError"}static{a(this,"UsecaseJsonError")}},zG=a((e,t,r,n)=>{let i=r,s=n,o=Math.min(Math.max(t,0),e.length);for(let l=0;l{let i=/\bposition (\d+)\b/u.exec(e);if(i)return zG(t,Number.parseInt(i[1],10),r,n);let s=/\bline (\d+) column (\d+)\b/u.exec(e);if(s){let o=Number.parseInt(s[1],10),l=Number.parseInt(s[2],10);return{line:r+o-1,column:o===1?n+l-1:l}}if(/unexpected end|end of json input/iu.test(e))return zG(t,t.length,r,n)},"locationFromErrorMessage"),Qi=class extends Error{constructor(r){super("Invalid JSON token");this.offset=r}static{a(this,"JsonWalkError")}},vR=class{constructor(t){this.text=t;this.offset=0;this.propertyOrder={}}static{a(this,"PropertyOrderCollector")}collect(){if(this.skipWhitespace(),this.collectValue(""),this.skipWhitespace(),this.offset!==this.text.length)throw new Qi(this.offset);return this.propertyOrder}collectValue(t){this.skipWhitespace();let r=this.text[this.offset];if(r==="{")this.collectObject(t);else if(r==="[")this.collectArray(t);else if(r==='"')this.readString(!1);else if(r==="t")this.consumeLiteral("true");else if(r==="f")this.consumeLiteral("false");else if(r==="n")this.consumeLiteral("null");else if(r==="-"||r>="0"&&r<="9")this.consumeNumber();else throw new Qi(this.offset)}collectObject(t){this.offset++;let r=[],n=new Set;if(this.propertyOrder[t]=r,this.skipWhitespace(),this.text[this.offset]==="}"){this.offset++;return}for(;this.offset="1"&&this.text[this.offset]<="9")for(;this.text[this.offset]>="0"&&this.text[this.offset]<="9";)this.offset++;else throw new Qi(this.offset);if(this.text[this.offset]==="."){if(this.offset++,this.text[this.offset]<"0"||this.text[this.offset]>"9")throw new Qi(this.offset);for(;this.text[this.offset]>="0"&&this.text[this.offset]<="9";)this.offset++}if(this.text[this.offset]==="e"||this.text[this.offset]==="E"){if(this.offset++,(this.text[this.offset]==="+"||this.text[this.offset]==="-")&&this.offset++,this.text[this.offset]<"0"||this.text[this.offset]>"9")throw new Qi(this.offset);for(;this.text[this.offset]>="0"&&this.text[this.offset]<="9";)this.offset++}}skipWhitespace(){for(;this.offset{"use strict";wA();$ht=a(e=>({shape:e.type==="normal"?"actor":e.type==="hollow"?"actor-hollow":e.type==="awesome"?"actor-awesome":"actor-icon",...e.label===e.id?{}:{label:e.label},...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{kind:"actor",actorType:e.type,business:e.business,labelType:e.labelType,...e.icon?{icon:e.icon}:{},...e.stereotype?{stereotype:e.stereotype}:{},...e.parentId?{parentId:e.parentId}:{}}}),"actorNode"),Fht=a(e=>({shape:e.shape,...e.label===e.id?{}:{label:e.label},...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{kind:"usecase",useCaseShape:e.shape,business:e.business,labelType:e.labelType,...e.stereotype?{stereotype:e.stereotype}:{},...e.parentId?{parentId:e.parentId}:{}}}),"useCaseNode"),Ght=a(e=>({label:e.label,shape:"note",attrs:{kind:"note",target:e.target,labelType:e.labelType}}),"noteNode"),Vht=a(e=>({label:e.id,shape:"json-table",...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{kind:"json",value:e.value,propertyOrder:e.propertyOrder,labelType:"text"}}),"jsonNode"),zht=a(e=>({id:e.id,source:e.source,target:e.target,...e.label?{label:e.label}:{},...e.classes.length?{classes:[...e.classes]}:{},...e.styles.length?{styles:[...e.styles]}:{},attrs:{relationshipType:e.type,arrowType:e.arrowType,minlen:e.minlen,explicitId:e.explicitId,animate:e.animate,...e.animation?{animation:e.animation}:{},...e.labelType?{labelType:e.labelType}:{}}}),"relationshipEdge"),Uht=a(e=>({id:`${e.id}-edge`,source:e.id,target:e.target,attrs:{relationshipType:"note",arrowType:Nn.LINE_SOLID,pattern:"dotted",minlen:1,explicitId:!1,animate:!1,internal:!0}}),"noteEdge"),yAe=a((e,t,r,n)=>{let i={};for(let u of e.getActors().values())i[u.id]=$ht(u);for(let u of e.getUseCases().values())i[u.id]=Fht(u);for(let u of e.getNotes().values())i[u.id]=Ght(u);for(let u of e.getJsonNodes().values())i[u.id]=Vht(u);let s={};for(let u of e.getSystemBoundaries().values())s[u.id]={...u.label===u.id?{}:{title:u.label},nodes:[...u.members],...u.classes.length?{classes:[...u.classes]}:{},...u.styles.length?{styles:[...u.styles]}:{},attrs:{kind:"systemBoundary",boundaryType:u.type,labelType:u.labelType}};let o={};for(let u of e.getClassDefs().values())o[u.id]={styles:[...u.styles]};let l=e.getDirection();return{version:1,diagramType:"usecase",source:t,header:{keyword:"usecase",direction:l==="TD"?"TB":l,span:r},...e.getAccTitle()?{accTitle:e.getAccTitle()}:{},...e.getAccDescription()?{accDescr:e.getAccDescription()}:{},nodes:i,edges:[...e.getRelationships().map(zht),...[...e.getNotes().values()].map(Uht)],groups:s,classDefs:o,statements:n}},"buildUsecaseGraphAST")});var Bs,bAe,Mp,UG,wR,TAe=w(()=>{"use strict";xAe();Bs=a(e=>`line ${e.line}, column ${e.column} [${e.span[0]},${e.span[1]})`,"locationText"),bAe=a(e=>e===void 0?"":` (label "${e}")`,"labelSuffix"),Mp=a(e=>e.generated?e.label:void 0,"generatedFrom"),UG=a((e,t)=>{for(let r of t)e.includes(r)||e.push(r)},"pushUnique"),wR=class{constructor(t){this.db=t;this.source="";this.statements=[];this.elements=[];this.boundaries=[];this.jsonDrafts=[];this.relationshipDrafts=[];this.noteDrafts=[];this.metadataAssignments=[];this.classAssignments=[];this.styleAssignments=[];this.classDefinitions=[];this.directions=[];this.model=t.createModel()}static{a(this,"UsecaseModelBuilder")}reset(t){this.model=this.db.createModel(),this.source=t,this.statements=[],this.elements.length=0,this.boundaries.length=0,this.jsonDrafts.length=0,this.relationshipDrafts.length=0,this.noteDrafts.length=0,this.metadataAssignments.length=0,this.classAssignments.length=0,this.styleAssignments.length=0,this.classDefinitions.length=0,this.directions.length=0}addElement(t){this.elements.push(t)}addBoundary(t){this.boundaries.push(t)}addJson(t){this.jsonDrafts.push(t)}addRelationship(t){this.relationshipDrafts.push(t)}addNote(t){this.noteDrafts.push(t)}addMetadataAssignment(t,r,n,i){this.metadataAssignments.push({target:t,targetLocation:r,metadata:n,statement:i})}addClassDef(t,r){this.classDefinitions.push({ids:t,styles:r})}addClassAssignment(t,r){this.classAssignments.push({targets:t,classes:r})}addStyleAssignment(t,r,n){this.styleAssignments.push({target:t,location:r,styles:n})}setDirection(t){this.directions.push(t==="TD"?"TB":t)}setAccTitle(t){this.model.accTitle=t}setAccDescription(t){this.model.accDescription=t}setStatements(t){this.statements=t}getActors(){return this.model.actors}getUseCases(){return this.model.useCases}getSystemBoundaries(){return this.model.systemBoundaries}getRelationships(){return this.model.relationships}getNotes(){return this.model.notes}getJsonNodes(){return this.model.jsonNodes}getClassDefs(){return this.model.classDefs}getDirection(){return this.model.direction}getAccTitle(){return this.model.accTitle}getAccDescription(){return this.model.accDescription}finalize(t){let r=new Map,n=new Map,i=new Map,s=new Map;for(let h of this.relationshipDrafts)this.recordFirst(s,h.source.id,h.source.location.span[0]),this.recordFirst(s,h.target.id,h.target.location.span[0]);for(let h of this.elements)this.recordFirst(s,h.id,h.location.span[0]);for(let h of this.boundaries)this.recordFirst(s,h.id,h.location.span[0]);for(let h of this.jsonDrafts)this.recordFirst(s,h.id,h.location.span[0]);let o=[...this.elements.map(h=>({offset:h.location.span[0],type:"element",value:h})),...this.boundaries.map(h=>({offset:h.location.span[0],type:"boundary",value:h})),...this.jsonDrafts.map(h=>({offset:h.location.span[0],type:"json",value:h})),...this.relationshipDrafts.filter(h=>h.explicitId).map(h=>({offset:h.explicitIdLocation.span[0],type:"edge",value:h}))].sort((h,d)=>h.offset-d.offset);for(let h of o)h.type==="element"?this.collectElement(h.value,r,n):h.type==="boundary"?this.collectBoundary(h.value,r,i):h.type==="json"?this.registerUnique(r,h.value.id,"json",h.value.location,!1):this.registerUnique(r,h.value.explicitId,"edge",h.value.explicitIdLocation,!1);this.materializeElements(n,s),this.materializeBoundaries(i,s),this.materializeJson(s);let l=this.materializeRelationships(r,n,s);this.reorderElements(n,s),this.applyMetadataAssignments(r,n,i,l),this.validateAndRefreshElements(n),this.refreshBoundaries(i,n),this.materializeNotes(r),this.applyClassDefinitions(),this.applyClassesAndStyles(r,l),this.model.direction=this.directions.at(-1)??this.model.direction,this.model.symbols=new Map([...r].map(([h,d])=>[h,d.kind]));let u=yAe(this,this.source,t,this.statements);return this.model.ast=u,this.db.commit(this.model),u}collectElement(t,r,n){let i=r.get(t.id),s=Mp({generated:t.generated,label:t.label.text});i&&i.kind!==t.kind&&this.conflict(`ID '${t.id}' is declared as both ${i.kind} and ${t.kind}`,t.location,i.location,s,Mp(i)),i&&(i.generated||t.generated)&&this.conflict(`Generated ID '${t.id}' collides with another declaration`,t.location,i.location,s,Mp(i));let o=n.get(t.id);if(!o){let l={kind:t.kind,id:t.id,label:t.label,location:t.location,generated:t.generated,classes:[...t.classes],...t.parentId?{parentId:t.parentId,parentLocation:t.parentLocation}:{},...t.shape?{shape:t.shape}:{},...t.stereotype?{stereotype:t.stereotype,stereotypeLocation:t.location}:{}};this.applyDeclarationMetadata(l,t.metadata),n.set(t.id,l),r.set(t.id,{kind:t.kind,location:t.location,generated:t.generated,label:t.label.text});return}(o.label.text!==t.label.text||o.label.type!==t.label.type)&&this.conflict(`ID '${t.id}' has conflicting labels`,t.location,o.location),t.shape&&o.shape&&t.shape!==o.shape&&this.conflict(`Use case '${t.id}' has conflicting shapes`,t.location,o.location),t.parentId&&o.parentId&&t.parentId!==o.parentId&&this.conflict(`Element '${t.id}' belongs to more than one system boundary`,t.parentLocation??t.location,o.parentLocation??o.location),t.stereotype&&o.stereotype&&t.stereotype!==o.stereotype&&this.conflict(`Element '${t.id}' has conflicting stereotypes`,t.location,o.stereotypeLocation??o.location),o.shape??=t.shape,o.parentId??=t.parentId,o.parentLocation??=t.parentLocation,o.stereotype??=t.stereotype,o.stereotypeLocation??=t.stereotype?t.location:void 0,UG(o.classes,t.classes),this.applyDeclarationMetadata(o,t.metadata)}collectBoundary(t,r,n){let i=r.get(t.id),s=Mp({generated:t.generated,label:t.label.text});i&&i.kind!=="boundary"&&this.conflict(`ID '${t.id}' is declared as both ${i.kind} and boundary`,t.location,i.location,s,Mp(i)),i&&(i.generated||t.generated)&&this.conflict(`Generated ID '${t.id}' collides with another declaration`,t.location,i.location,s,Mp(i));let o=n.get(t.id);if(o){(o.label.text!==t.label.text||o.label.type!==t.label.type)&&this.conflict(`Boundary '${t.id}' has conflicting titles`,t.location,o.location),UG(o.classes,t.classes);return}n.set(t.id,{id:t.id,label:t.label,location:t.location,generated:t.generated,classes:[...t.classes],styles:[],members:[]}),r.set(t.id,{kind:"boundary",location:t.location,generated:t.generated,label:t.label.text})}materializeElements(t,r){for(let n of[...t.values()].sort((i,s)=>(r.get(i.id)??0)-(r.get(s.id)??0)))this.setElementModel(n)}materializeBoundaries(t,r){for(let n of[...t.values()].sort((i,s)=>(r.get(i.id)??0)-(r.get(s.id)??0)))this.model.systemBoundaries.set(n.id,{id:n.id,label:n.label.text,labelType:n.label.type,type:n.type??"rect",members:[],classes:[...n.classes],styles:[...n.styles]})}materializeJson(t){for(let r of[...this.jsonDrafts].sort((n,i)=>(t.get(n.id)??0)-(t.get(i.id)??0)))this.model.jsonNodes.set(r.id,{id:r.id,value:r.value,propertyOrder:r.propertyOrder,classes:[...r.classes],styles:[]})}materializeRelationships(t,r,n){let i=new Map,s=0;for(let o of this.relationshipDrafts){let l=this.resolveEndpoint(o.source,t,r,n),u=this.resolveEndpoint(o.target,t,r,n);this.validateRelationship(o,l,u,t);let h=o.explicitId??`edge-${s++}`,d={id:h,explicitId:!!o.explicitId,source:o.source.id,target:o.target.id,type:o.type,arrowType:o.arrowType,...o.label?{label:o.label.text,labelType:o.label.type}:{},minlen:o.minlen,classes:[],styles:[],animate:!1};this.model.relationships.push(d),i.set(h,{draft:o,relationship:d})}return this.model.relationshipCounter=s,i}resolveEndpoint(t,r,n,i){if(t.classesOnReference&&!t.declaration)throw new Error(`Relationship endpoint '${t.id}' uses ::: without declaring the node at ${Bs(t.location)}`);let s=r.get(t.id);return s?s.kind:(n.set(t.id,{kind:"usecase",id:t.id,label:t.label,location:t.location,generated:t.generated,shape:"ellipse",classes:[]}),r.set(t.id,{kind:"usecase",location:t.location,generated:t.generated,label:t.label.text}),this.recordFirst(i,t.id,t.location.span[0]),"usecase")}reorderElements(t,r){let n=new Map(this.model.actors),i=new Map(this.model.useCases);this.model.actors.clear(),this.model.useCases.clear();for(let s of[...t.values()].sort((o,l)=>(r.get(o.id)??0)-(r.get(l.id)??0))){!n.has(s.id)&&!i.has(s.id)&&this.setElementModel(s);let o=n.get(s.id)??this.model.actors.get(s.id),l=i.get(s.id)??this.model.useCases.get(s.id);o?this.model.actors.set(s.id,o):l&&this.model.useCases.set(s.id,l)}}applyMetadataAssignments(t,r,n,i){for(let s of this.metadataAssignments){let o=t.get(s.target);if(!o){let l=this.inferMetadataKind(s.metadata);throw new Error(`Metadata target '${s.target}' is unresolved${l?` (metadata implies ${l})`:""} at ${Bs(s.targetLocation)}`)}if(o.kind==="actor"||o.kind==="usecase")this.applyStandaloneElementMetadata(r.get(s.target),s.metadata);else if(o.kind==="boundary"){let l=n.get(s.target);for(let u of s.metadata.properties)(u.key!=="type"||u.value!=="rect"&&u.value!=="package")&&this.invalidMetadata(s.target,o.kind,u),l.type=u.value}else if(o.kind==="edge"){let l=i.get(s.target);if(!l)throw new Error(`Metadata target '${s.target}' is not an explicit edge at ${Bs(s.targetLocation)}`);s.statement.kind="edgeMetadata",s.statement.edges=[{id:s.target,span:s.statement.span,idSpan:s.targetLocation.span,...s.statement.metadata?{metadata:s.statement.metadata}:{}}],delete s.statement.nodes;for(let u of s.metadata.properties)u.key==="animate"&&typeof u.value=="boolean"?l.relationship.animate=u.value:u.key==="animation"&&(u.value==="fast"||u.value==="slow")?(l.relationship.animation=u.value,l.relationship.animate=!0):this.invalidMetadata(s.target,o.kind,u)}else for(let l of s.metadata.properties)this.invalidMetadata(s.target,o.kind,l)}for(let{relationship:s}of i.values())s.animation&&(s.animate=!0)}applyStandaloneElementMetadata(t,r){for(let n of r.properties)t.kind==="actor"?this.applyActorProperty(t,n,!0):n.key==="business"&&typeof n.value=="boolean"?t.business=n.value:this.invalidMetadata(t.id,t.kind,n)}applyDeclarationMetadata(t,r){if(r)for(let n of r.properties)t.kind==="actor"?this.applyActorProperty(t,n,!1):n.key==="business"&&typeof n.value=="boolean"?(t.business!==void 0&&t.business!==n.value&&this.conflict(`Use case '${t.id}' has conflicting business metadata`,n.location,t.location),t.business=n.value):this.invalidMetadata(t.id,t.kind,n)}applyActorProperty(t,r,n){r.key==="type"&&(r.value==="normal"||r.value==="hollow"||r.value==="awesome")?(!n&&t.actorType!==void 0&&t.actorType!==r.value&&this.conflict(`Actor '${t.id}' has conflicting type metadata`,r.location,t.location),t.actorType=r.value):r.key==="icon"&&typeof r.value=="string"?(!n&&t.icon!==void 0&&t.icon!==r.value&&this.conflict(`Actor '${t.id}' has conflicting icon metadata`,r.location,t.location),t.icon=r.value):r.key==="business"&&typeof r.value=="boolean"?(!n&&t.business!==void 0&&t.business!==r.value&&this.conflict(`Actor '${t.id}' has conflicting business metadata`,r.location,t.location),t.business=r.value):this.invalidMetadata(t.id,t.kind,r)}validateAndRefreshElements(t){for(let r of t.values()){let n=r.icon?"icon":r.actorType??"normal";if(r.kind==="actor"){if(r.icon&&r.actorType&&r.actorType!=="normal")throw new Error(`Actor '${r.id}' cannot combine icon with type '${r.actorType}' at ${Bs(r.location)}`);if(r.business&&(n==="icon"||n==="awesome"))throw new Error(`Business actor '${r.id}' must use normal or hollow geometry at ${Bs(r.location)}`)}else if((r.shape??"ellipse")==="rect"&&r.business)throw new Error(`Rectangular use case '${r.id}' cannot be a business use case at ${Bs(r.location)}`);this.setElementModel(r)}}refreshBoundaries(t,r){for(let n of t.values())n.members.length=0;for(let n of[...this.elements].sort((i,s)=>i.location.span[0]-s.location.span[0])){if(!n.parentId)continue;let i=t.get(n.parentId);if(!i)throw new Error(`Parent boundary '${n.parentId}' for '${n.id}' is unresolved at ${Bs(n.parentLocation??n.location)}`);i.members.includes(n.id)||i.members.push(n.id)}for(let n of r.values())if(n.parentId&&!t.has(n.parentId))throw new Error(`Parent boundary '${n.parentId}' for '${n.id}' is unresolved at ${Bs(n.parentLocation??n.location)}`);for(let n of t.values()){let i=this.model.systemBoundaries.get(n.id);i.type=n.type??"rect",i.members=[...n.members],i.classes=[...n.classes],i.styles=[...n.styles]}}materializeNotes(t){let r=0;for(let n of this.noteDrafts){let i=t.get(n.target);if(!i)throw new Error(`Note target '${n.target}' is unresolved at ${Bs(n.targetLocation)}`);i.kind!=="actor"&&i.kind!=="usecase"&&this.conflict(`Note target '${n.target}' must be an actor or use case, not ${i.kind}`,n.targetLocation,i.location);let s=`note-${r++}`;this.model.notes.set(s,{id:s,target:n.target,label:n.label.text,labelType:n.label.type})}this.model.noteCounter=r}applyClassDefinitions(){for(let t of this.classDefinitions)for(let r of t.ids)this.model.classDefs.set(r,{id:r,styles:[...t.styles]})}applyClassesAndStyles(t,r){for(let n of this.classAssignments)for(let i of n.targets)UG(this.getStylable(i.id,t,r,i.location).classes,n.classes);for(let n of this.styleAssignments)this.getStylable(n.target,t,r,n.location).styles.push(...n.styles)}getStylable(t,r,n,i){let s=r.get(t)?.kind,o=s==="actor"?this.model.actors.get(t):s==="usecase"?this.model.useCases.get(t):s==="boundary"?this.model.systemBoundaries.get(t):s==="json"?this.model.jsonNodes.get(t):s==="edge"?n.get(t)?.relationship:void 0;if(!o)throw new Error(`Class/style target '${t}' is unresolved or anonymous at ${Bs(i)}`);return o}validateRelationship(t,r,n,i){let s=a(o=>o==="actor"||o==="usecase"||o==="json","allowed");if(s(r)||this.conflict(`Relationship source '${t.source.id}' cannot be ${r}`,t.source.location,i.get(t.source.id).location),s(n)||this.conflict(`Relationship target '${t.target.id}' cannot be ${n}`,t.target.location,i.get(t.target.id).location),(t.type==="include"||t.type==="extend")&&(r!=="usecase"||n!=="usecase"))throw new Error(`${t.type} relationship requires use-case endpoints at ${Bs(t.location)}`);if(t.type==="generalization"&&(r!=="actor"&&r!=="usecase"||r!==n))throw new Error(`Generalization requires actor-to-actor or use-case-to-use-case endpoints at ${Bs(t.location)}`);if(t.type==="association"&&(r==="json"||n==="json")&&![0,1,2].includes(t.arrowType))throw new Error(`JSON relationship '${t.source.id}' to '${t.target.id}' permits only point, reversed-point, or markerless solid association at ${Bs(t.location)}`)}setElementModel(t){if(t.kind==="actor"){let r=t.icon?"icon":t.actorType??"normal";this.model.useCases.delete(t.id),this.model.actors.set(t.id,{id:t.id,label:t.label.text,labelType:t.label.type,type:r,...t.icon?{icon:t.icon}:{},business:t.business??!1,...t.stereotype?{stereotype:t.stereotype}:{},...t.parentId?{parentId:t.parentId}:{},classes:[...t.classes],styles:this.model.actors.get(t.id)?.styles??[]})}else this.model.actors.delete(t.id),this.model.useCases.set(t.id,{id:t.id,label:t.label.text,labelType:t.label.type,shape:t.shape??"ellipse",business:t.business??!1,...t.stereotype?{stereotype:t.stereotype}:{},...t.parentId?{parentId:t.parentId}:{},classes:[...t.classes],styles:this.model.useCases.get(t.id)?.styles??[]})}inferMetadataKind(t){let r=new Set(["actor","usecase","boundary","edge"]);for(let n of t.properties)if(n.key==="icon")r.clear(),r.add("actor");else if(n.key==="animate"||n.key==="animation")r.clear(),r.add("edge");else if(n.key==="type")r.clear(),n.value==="rect"||n.value==="package"?r.add("boundary"):(n.value==="normal"||n.value==="hollow"||n.value==="awesome")&&r.add("actor");else if(n.key==="business")r.delete("boundary"),r.delete("edge");else return;return r.size===1?[...r][0]:void 0}invalidMetadata(t,r,n){throw new Error(`Metadata property '${n.key}' is invalid for ${r} '${t}' at ${Bs(n.location)}`)}registerUnique(t,r,n,i,s){let o=t.get(r);o&&this.conflict(`ID '${r}' is declared more than once (${o.kind} and ${n})`,i,o.location,void 0,Mp(o)),t.set(r,{kind:n,location:i,generated:s})}recordFirst(t,r,n){let i=t.get(r);(i===void 0||n{"use strict";_A();wA();gAe();TAe();VG();Wht=Np.getBaseCstVisitorConstructor(),WG=class extends Wht{constructor(){super();this.builder=new wR(Cp);this.source="";this.anonymousEdge=0;this.anonymousNote=0;this.validateVisitor()}static{a(this,"UsecaseVisitor")}build(r,n){this.source=n,this.parentBoundary=void 0,this.anonymousEdge=0,this.anonymousNote=0,this.builder.reset(n),this.visit(r)}start(r){let n=this.tokens(r,"USECASE")[0],i=[];for(let s of this.nodes(r,"line"))i.push(this.visit(s));this.builder.setStatements(i),this.builder.finalize(this.tokenSpan(n))}line(r){let n=this.firstNode(r,"blankLine","commentLine","statement");return this.wrap(n,this.visit(n))}statement(r){return this.visit(this.firstNode(r,"accTitleStatement","accDescrStatement","directionStatement","actorStatement","systemBoundaryStatement","noteStatement","jsonStatement","classDefStatement","classStatement","styleStatement","metadataAssignmentStatement","entityStatement"))}lineEnd(r){}blankLine(r){return{kind:"blank",span:this.tokenSpan(this.tokens(r,"NEWLINE")[0])}}commentLine(r){return{kind:"comment",span:this.tokenSpan(this.tokens(r,"COMMENT")[0])}}accTitleStatement(r){let n=this.tokens(r,"ACC_TITLE_LINE")[0].image;return this.builder.setAccTitle(n.slice(n.indexOf(":")+1).trim()),{kind:"accTitle",span:[0,0]}}accDescrStatement(r){let n=this.tokens(r,"ACC_DESCR_LINE")[0],i=this.tokens(r,"ACC_DESCR_BLOCK")[0],s=n?n.image.slice(n.image.indexOf(":")+1).trim():i.image.slice(i.image.indexOf("{")+1,i.image.lastIndexOf("}")).trim();return this.builder.setAccDescription(s),{kind:"accDescr",span:[0,0]}}actorStatement(r){let n=this.nodes(r,"actorItem"),i=n.map(d=>this.visit(d)),s=this.nodes(r,"relationTail")[0],o=i.map((d,f)=>this.actorOccurrence(n[f],d,!0));for(let d of i)this.builder.addElement(this.actorDraft(d));if(!s)return{kind:"node",span:[0,0],nodes:o};let l=this.visit(s);l.target.explicitDeclaration&&this.builder.addElement(this.entityDraft(l.target));let u=this.relationshipDraft(i[0],l,this.nodeLocation(s));this.builder.addRelationship(u);let h=u.explicitId??`edge-${this.anonymousEdge++}`;return o.push(this.entityOccurrence(this.nodes(s.children,"entityName")[0],l.target,l.target.explicitDeclaration)),{kind:"edge",span:[0,0],nodes:o,edges:[{id:h,span:[0,0],...u.explicitIdLocation?{idSpan:u.explicitIdLocation.span}:{},...u.label?{labelSpan:u.label.span}:{}}]}}actorItem(r){let n=this.visit(this.nodes(r,"actorName")[0]),i=this.nodes(r,"metadata")[0],s=this.nodes(r,"stereotype")[0],o=this.nodes(r,"classSuffix")[0],l=o?this.visit(o):{classes:[],spans:[]};return{...n,...i?{metadata:this.visit(i)}:{},...s?{stereotype:this.visit(s)}:{},classes:l.classes,classSpans:l.spans}}actorName(r){let n=this.tokens(r,"IDENTIFIER")[0],i=this.tokens(r,"PLAIN_STRING")[0]??this.tokens(r,"MARKDOWN_STRING")[0];if(n){let o=this.nodes(r,"nodeLabel")[0],l=o?this.visit(o):this.tokenLabel(n);return{id:n.image,label:l,location:this.tokenLocation(n),generated:!1,classes:[],classSpans:[]}}let s=this.tokenLabel(i);return{id:this.generateId(s.text),label:s,location:this.tokenLocation(i),generated:!0,classes:[],classSpans:[]}}actorDeclarationOnly(r){let n=this.nodes(r,"actorItem"),i=n.map(s=>this.visit(s));for(let s of i)this.builder.addElement(this.actorDraft(s));return{kind:"node",span:[0,0],nodes:i.map((s,o)=>this.actorOccurrence(n[o],s,!0))}}entityStatement(r){let n=this.nodes(r,"entityName"),i=this.visit(n[0]),s=this.nodes(r,"relationTail")[0];if(!s)return i.explicitDeclaration=!0,i.shape??="ellipse",this.builder.addElement(this.entityDraft(i)),{kind:"node",span:[0,0],nodes:[this.entityOccurrence(n[0],i,!0)]};i.explicitDeclaration&&this.builder.addElement(this.entityDraft(i));let o=this.visit(s);o.target.explicitDeclaration&&this.builder.addElement(this.entityDraft(o.target));let l={source:this.endpoint(i),target:this.endpoint(o.target),location:this.nodeLocation(s),...o.explicitId?{explicitId:o.explicitId,explicitIdLocation:o.explicitIdLocation}:{},...o.arrow};this.builder.addRelationship(l);let u=l.explicitId??`edge-${this.anonymousEdge++}`;return{kind:"edge",span:[0,0],nodes:[this.entityOccurrence(n[0],i,i.explicitDeclaration),this.entityOccurrence(this.nodes(s.children,"entityName")[0],o.target,o.target.explicitDeclaration)],edges:[{id:u,span:[0,0],...l.explicitIdLocation?{idSpan:l.explicitIdLocation.span}:{},...l.label?{labelSpan:l.label.span}:{}}]}}entityName(r){let n=this.tokens(r,"IDENTIFIER")[0],i=this.tokens(r,"PLAIN_STRING")[0]??this.tokens(r,"MARKDOWN_STRING")[0],s=this.nodes(r,"nodeLabel")[0],o=this.nodes(r,"useCaseMetadata")[0],l=this.nodes(r,"stereotype")[0],u=this.nodes(r,"classSuffix")[0],h=u?this.visit(u):{classes:[],spans:[]};if(n){let f=s?this.visit(s):this.tokenLabel(n),p=s?this.tokens(r,"LBRACKET").length?"rect":"ellipse":void 0;return{id:n.image,label:f,location:this.tokenLocation(n),generated:!1,...p?{shape:p}:{},...o?{metadata:this.visit(o)}:{},...l?{stereotype:this.visit(l)}:{},classes:h.classes,classSpans:h.spans,explicitDeclaration:!!(p||o||l)}}let d=this.tokenLabel(i);return{id:this.generateId(d.text),label:d,location:this.tokenLocation(i),generated:!0,...o?{metadata:this.visit(o)}:{},...l?{stereotype:this.visit(l)}:{},classes:h.classes,classSpans:h.spans,explicitDeclaration:!!(o||l)}}nodeLabel(r){let n=this.allTokens(r);if(n.length===1&&(n[0].tokenType.name==="PLAIN_STRING"||n[0].tokenType.name==="MARKDOWN_STRING"))return this.tokenLabel(n[0]);let i=[n[0].startOffset,(n.at(-1).endOffset??n.at(-1).startOffset)+1];return{text:this.source.slice(i[0],i[1]),type:"text",span:i}}useCaseMetadata(r){return this.visit(this.nodes(r,"metadata")[0])}relationTail(r){let n=this.tokens(r,"IDENTIFIER")[0];return{...n?{explicitId:n.image,explicitIdLocation:this.tokenLocation(n)}:{},arrow:this.visit(this.nodes(r,"arrow")[0]),target:this.visit(this.nodes(r,"entityName")[0])}}arrow(r){return this.visit(this.firstNode(r,"semanticRelation","forwardSolidOperator","backwardSolidOperator","markerlessSolidOperator","forwardCircleOperator","backwardCircleOperator","forwardCrossOperator","backwardCrossOperator"))}edgeLabel(r){return this.nodeLabel(r)}semanticRelation(r){if(this.tokens(r,"GENERALIZATION").length)return{type:"generalization",arrowType:Nn.SOLID_ARROW,minlen:1};let n=this.tokens(r,"INCLUDE").length?"include":"extend",i=this.tokens(r,n==="include"?"INCLUDE":"EXTEND")[0];return{type:n,arrowType:Nn.SOLID_ARROW,label:{text:n,type:"text",span:this.tokenSpan(i)},minlen:1}}metadata(r){return{properties:this.nodes(r,"metadataProperty").map(n=>this.visit(n)),location:this.ctxLocation(r)}}metadataProperty(r){let n=this.allTokens(r).filter(u=>u.tokenType.name!=="COLON"),i=n[0],s=n[1],o=s.tokenType.name==="TRUE"?!0:s.tokenType.name==="FALSE"?!1:this.decodePlain(s),l=[i.startOffset,(s.endOffset??s.startOffset)+1];return{key:this.decodePlain(i),value:o,span:l,keySpan:this.contentSpan(i),valueSpan:this.contentSpan(s),location:this.tokenLocation(i)}}metadataSeparator(r){}systemBoundaryStatement(r){let n=this.visit(this.nodes(r,"systemBoundaryName")[0]),i=this.nodes(r,"classSuffix")[0],s=i?this.visit(i):{classes:[],spans:[]};n.classes=s.classes,this.builder.addBoundary(n);let o=this.parentBoundary;this.parentBoundary={id:n.id,location:n.location};let l=this.nodes(r,"systemBoundaryContent")[0],u=l?this.visit(l):[];this.parentBoundary=o;let h=this.tokens(r,"END")[0],d=this.nodes(r,"metadata")[0],f=d?this.visit(d):void 0,p={kind:"group",span:[0,0],group:n.id,idSpan:n.location.span,titleSpan:n.label.span,endSpan:this.tokenSpan(h),classSpans:s.spans,...f?{metadata:f.properties.map(({key:m,span:g,keySpan:y,valueSpan:x})=>({key:m,span:g,keySpan:y,valueSpan:x}))}:{},...u.length?{children:u}:{}};return f&&this.builder.addMetadataAssignment(n.id,n.location,f,p),p}systemBoundaryName(r){let n=this.tokens(r,"IDENTIFIER")[0];if(n){let o=this.nodes(r,"nodeLabel")[0];return{id:n.image,label:o?this.visit(o):this.tokenLabel(n),location:this.tokenLocation(n),generated:!1,classes:[]}}let i=this.tokens(r,"PLAIN_STRING")[0]??this.tokens(r,"MARKDOWN_STRING")[0],s=this.tokenLabel(i);return{id:this.generateId(s.text),label:s,location:this.tokenLocation(i),generated:!0,classes:[]}}systemBoundaryContent(r){return[...this.nodes(r,"blankLine"),...this.nodes(r,"commentLine"),...this.nodes(r,"boundaryElement")].sort((i,s)=>(i.location?.startOffset??0)-(s.location?.startOffset??0)).map(i=>this.wrap(i,this.visit(i)))}boundaryElement(r){let n=this.nodes(r,"actorDeclarationOnly")[0];if(n)return this.visit(n);let i=this.nodes(r,"entityName")[0],s=this.visit(i);return s.explicitDeclaration=!0,s.shape??="ellipse",this.builder.addElement(this.entityDraft(s)),{kind:"node",span:[0,0],nodes:[this.entityOccurrence(i,s,!0)]}}metadataAssignmentStatement(r){let n=this.visit(this.nodes(r,"metadataAssignmentTarget")[0]),i=this.visit(this.nodes(r,"metadata")[0]),s={kind:"metadata",span:[0,0],nodes:[{id:n.id,span:n.location.span,idSpan:n.location.span}],metadata:i.properties.map(({key:o,span:l,keySpan:u,valueSpan:h})=>({key:o,span:l,keySpan:u,valueSpan:h}))};return this.builder.addMetadataAssignment(n.id,n.location,i,s),s}metadataAssignmentTarget(r){let n=this.allTokens(r)[0],i=this.tokenLabel(n);return{id:n.tokenType.name==="IDENTIFIER"?n.image:this.generateId(i.text),location:this.tokenLocation(n)}}noteStatement(r){let n=this.tokens(r,"IDENTIFIER")[0],i=this.visit(this.nodes(r,"nodeLabel")[0]);return this.builder.addNote({target:n.image,targetLocation:this.tokenLocation(n),label:i,location:this.ctxLocation(r)}),{kind:"note",span:[0,0],ref:`note-${this.anonymousNote++}`,refSpan:i.span,nodes:[{id:n.image,span:this.tokenSpan(n),idSpan:this.tokenSpan(n)}]}}stereotype(r){let n=this.tokens(r,"STEREOTYPE_TEXT")[0];return{value:n.image.trim(),span:this.tokenSpan(n)}}classSuffix(r){let n=this.tokens(r,"IDENTIFIER");return{classes:n.map(i=>i.image),spans:n.map(i=>this.tokenSpan(i))}}jsonStatement(r){let n=this.tokens(r,"JSON_DECLARATION_START")[0],i=this.tokens(r,"JSON_OBJECT_LITERAL")[0],s=/^json[\t ]+(\w+)/.exec(n.image),o=s[1],l=s[0].length-o.length,u={span:[n.startOffset+l,n.startOffset+l+o.length],line:n.startLine??1,column:(n.startColumn??1)+l},h=mAe(i.image,i.startLine??1,i.startColumn??1),d=this.nodes(r,"classSuffix")[0],f=d?this.visit(d):{classes:[],spans:[]},p={id:o,value:h.value,propertyOrder:h.propertyOrder,location:u,classes:f.classes};return this.builder.addJson(p),{kind:"json",span:[0,0],nodes:[{id:o,span:u.span,idSpan:u.span,defines:!0,classSpans:f.spans}],classSpans:f.spans}}directionStatement(r){let n=this.allTokens(r).find(i=>["TD","TB","BT","RL","LR"].includes(i.tokenType.name));return this.builder.setDirection(n.image),{kind:"direction",span:[0,0]}}classDefStatement(r){let n=this.tokens(r,"IDENTIFIER"),i=this.visit(this.nodes(r,"styles")[0]);return this.builder.addClassDef(n.map(s=>s.image),i),{kind:"classDef",span:[0,0],ref:n[0].image,refSpan:this.tokenSpan(n[0])}}classStatement(r){let n=this.tokens(r,"IDENTIFIER"),i=1;for(;i({id:l.image,location:this.tokenLocation(l)})),o=n.slice(i).map(l=>l.image);return this.builder.addClassAssignment(s,o),{kind:"classAssign",span:[0,0],ref:o[0],refSpan:this.tokenSpan(n[i]),nodes:s.map(({id:l,location:u})=>({id:l,span:u.span,idSpan:u.span}))}}styleStatement(r){let n=this.tokens(r,"IDENTIFIER")[0],i=this.visit(this.nodes(r,"styles")[0]);return this.builder.addStyleAssignment(n.image,this.tokenLocation(n),i),{kind:"style",span:[0,0],nodes:[{id:n.image,span:this.tokenSpan(n),idSpan:this.tokenSpan(n)}]}}styles(r){return this.nodes(r,"styleValue").map(n=>this.visit(n))}styleValue(r){let n=this.allTokens(r),i=[n[0].startOffset,(n.at(-1).endOffset??n.at(-1).startOffset)+1];return this.source.slice(i[0],i[1]).replaceAll("\\,",",")}styleComponent(r){return this.allTokens(r).map(n=>n.image).join("")}forwardSolidOperator(r){let n=this.tokens(r,"FORWARD_SOLID")[0];return{type:"association",arrowType:Nn.SOLID_ARROW,minlen:this.solidMinlen(n)}}backwardSolidOperator(r){let n=this.tokens(r,"BACKWARD_SOLID")[0],i=this.nodes(r,"edgeLabel")[0],s=i?this.tokens(r,"MARKERLESS_SOLID").at(-1):n;return{type:"association",arrowType:Nn.BACK_ARROW,minlen:this.solidMinlen(s),...i?{label:this.visit(i)}:{}}}markerlessSolidOperator(r){let n=this.nodes(r,"edgeLabel")[0],i=this.allTokens(r);if(!n)return{type:"association",arrowType:Nn.LINE_SOLID,minlen:this.solidMinlen(this.tokens(r,"MARKERLESS_SOLID")[0])};let s=i.at(-1),o=s.tokenType.name==="FORWARD_SOLID"?Nn.SOLID_ARROW:s.tokenType.name==="FORWARD_CIRCLE"?Nn.CIRCLE_ARROW:s.tokenType.name==="FORWARD_CROSS"?Nn.CROSS_ARROW:Nn.LINE_SOLID;return{type:"association",arrowType:o,label:this.visit(n),minlen:o===Nn.SOLID_ARROW||o===Nn.LINE_SOLID?this.solidMinlen(s):1}}forwardCircleOperator(r){return{type:"association",arrowType:Nn.CIRCLE_ARROW,minlen:1}}backwardCircleOperator(r){let n=this.nodes(r,"edgeLabel")[0];return{type:"association",arrowType:Nn.CIRCLE_ARROW_REVERSED,minlen:1,...n?{label:this.visit(n)}:{}}}forwardCrossOperator(r){return{type:"association",arrowType:Nn.CROSS_ARROW,minlen:1}}backwardCrossOperator(r){let n=this.nodes(r,"edgeLabel")[0];return{type:"association",arrowType:Nn.CROSS_ARROW_REVERSED,minlen:1,...n?{label:this.visit(n)}:{}}}actorDraft(r){return{id:r.id,kind:"actor",label:r.label,location:r.location,generated:r.generated,...this.parentBoundary?{parentId:this.parentBoundary.id,parentLocation:this.parentBoundary.location}:{},...r.metadata?{metadata:r.metadata}:{},...r.stereotype?{stereotype:r.stereotype.value,stereotypeSpan:r.stereotype.span}:{},classes:r.classes}}entityDraft(r){return{id:r.id,kind:"usecase",label:r.label,location:r.location,generated:r.generated,...this.parentBoundary?{parentId:this.parentBoundary.id,parentLocation:this.parentBoundary.location}:{},...r.shape?{shape:r.shape}:{},...r.metadata?{metadata:r.metadata}:{},...r.stereotype?{stereotype:r.stereotype.value,stereotypeSpan:r.stereotype.span}:{},classes:r.classes}}endpoint(r,n=r.explicitDeclaration??!0){return{id:r.id,label:r.label,location:r.location,generated:r.generated,declaration:n,classesOnReference:r.classes.length>0}}relationshipDraft(r,n,i){return{source:this.endpoint(r,!0),target:this.endpoint(n.target),location:i,...n.explicitId?{explicitId:n.explicitId,explicitIdLocation:n.explicitIdLocation}:{},...n.arrow}}actorOccurrence(r,n,i){return{id:n.id,span:this.nodeSpan(r),idSpan:n.location.span,labelSpan:n.label.span,...i?{defines:!0}:{},...n.stereotype?{stereotypeSpan:n.stereotype.span}:{},...n.metadata?{metadata:n.metadata.properties.map(({key:s,span:o,keySpan:l,valueSpan:u})=>({key:s,span:o,keySpan:l,valueSpan:u}))}:{},...n.classSpans.length?{classSpans:n.classSpans}:{}}}entityOccurrence(r,n,i){return this.actorOccurrence(r,n,i)}wrap(r,n){if(n.kind==="blank"||n.kind==="comment")return n;n.span=this.nodeSpan(r);for(let i of n.edges??[])i.span=n.span;return n}tokenLabel(r){let n=r.tokenType.name==="MARKDOWN_STRING"?"markdown":"text",i=n==="markdown"?2:r.tokenType.name==="PLAIN_STRING"?1:0,s=this.tokenSpan(r,i);return{text:this.source.slice(s[0],s[1]),type:n,span:s}}decodePlain(r){return r.tokenType.name==="PLAIN_STRING"?r.image.slice(1,-1):r.image}contentSpan(r){return this.tokenSpan(r,r.tokenType.name==="PLAIN_STRING"?1:r.tokenType.name==="MARKDOWN_STRING"?2:0)}generateId(r){return r.replace(/\W/g,"_")}solidMinlen(r){return Math.max(1,(r.image.match(/-/g)?.length??2)-1)}nodeLocation(r){let n=this.allTokens(r.children)[0];return{span:this.nodeSpan(r),line:n.startLine??1,column:n.startColumn??1}}ctxLocation(r){let n=this.allTokens(r).filter(o=>o.tokenType.name!=="NEWLINE"&&o.tokenType.name!=="EOF"),i=n[0],s=n.at(-1);return{span:[i.startOffset,Math.min(this.source.length,(s.endOffset??s.startOffset+s.image.length-1)+1)],line:i.startLine??1,column:i.startColumn??1}}tokenLocation(r){let n=r.tokenType.name==="PLAIN_STRING"?1:r.tokenType.name==="MARKDOWN_STRING"?2:0;return{span:this.tokenSpan(r,n),line:r.startLine??1,column:(r.startColumn??1)+n}}nodeSpan(r){let n=this.allTokens(r.children).filter(o=>o.tokenType.name!=="NEWLINE"&&o.tokenType.name!=="EOF"),i=n[0],s=n.at(-1);if(!i||!s)throw new Error("Usecase CST node has no source token");return[i.startOffset,Math.min(this.source.length,(s.endOffset??s.startOffset+s.image.length-1)+1)]}tokenSpan(r,n=0){return[r.startOffset+n,Math.min(this.source.length,(r.endOffset??r.startOffset+r.image.length-1)+1-n)]}nodes(r,n){return(r[n]??[]).filter(i=>"children"in i)}tokens(r,n){return(r[n]??[]).filter(i=>"tokenTypeIdx"in i)}firstNode(r,...n){for(let i of n){let s=this.nodes(r,i)[0];if(s)return s}throw new Error(`Usecase CST is missing one of: ${n.join(", ")}`)}allTokens(r){let n=[];for(let i of Object.values(r))for(let s of i)"tokenTypeIdx"in s?n.push(s):n.push(...this.allTokens(s.children));return n.sort((i,s)=>i.startOffset-s.startOffset)}},CAe=new WG});var SAe,EAe=w(()=>{"use strict";xwe();_A();fAe();VG();kAe();SAe={parse:a(async e=>{Cp.clear(),Np.input=[];try{ywe({diagramType:"usecase",lexer:dAe,parser:Np,entry:a(()=>Np.start(),"entry"),visit:a(t=>CAe.build(t,e),"visit")},e)}catch(t){Cp.clear();let r=Np.errors[0];if(r){let{token:n}=r,i=bp(n.startOffset)?n.startOffset:e.length,s=bp(n.endOffset)?n.endOffset+1:i,o=bp(n.startLine)?n.startLine:e.slice(0,i).split(/\r\n|\r|\n/).length,l=Math.max(e.lastIndexOf(` +`,i-1),e.lastIndexOf("\r",i-1)),u=bp(n.startColumn)?n.startColumn:i-l,h=t instanceof Error?t.message:String(t);throw new Error(`${h} at line ${o}, column ${u} [${i},${s})`)}throw t}},"parse")}});var jht,AAe,vAe,qht,_R,Hht,Yht,Kht,e1,wAe,Xht,Qht,_Ae,Zht,RAe,LAe=w(()=>{"use strict";Lr();Gt();bt();rh();Yc();QN();Kc();jt();jht=["point","circle","cross","extension"],AAe={usecaseActor:!0,usecaseActorHollow:!0,usecaseActorAwesome:!0,usecaseActorIcon:!0},vAe=a((e,t)=>{let[r,n]=[e,t].map(i=>i.replace(/[^\w-]+/g,"_").replace(/^_+|_+$/g,"")||"element");return`usecase-${r}-${n}`},"usecaseDomId"),qht=a(e=>`usecase-${e.replace(/[^\w-]+/g,"_").replace(/^_+|_+$/g,"")||"element"}`,"usecaseNodeDomId"),_R=a((e,t)=>t!=="markdown"?e:B2(e).map(r=>r.map(n=>n.content).join(" ")).join(` +`),"getAccessibleLabel"),Hht=a(e=>{let t=_R(e.label??e.id,e.labelType);if(AAe[e.shape]){let n=e.actorType&&e.actorType!=="normal"?`${e.actorType} `:"",i=e.business?"business ":"",s=e.stereotype?`, stereotype ${e.stereotype}`:"";return`${i}${n}actor ${t}${s}`}if(e.shape==="note")return`Note for ${e.noteTargetLabel??e.noteTarget??""}: ${t}`;if(e.shape==="usecaseJsonTable"){let n=(e.jsonRows??[]).map(i=>`${i.accessibleKey}: ${i.value}`).join("; ");return n?`${t}: ${n}`:t}let r=e.stereotype?`, stereotype ${e.stereotype}`:"";return`${e.business?"business ":""}use case ${t}${r}`},"getUsecaseNodeAccessibleName"),Yht=a(e=>`${e.boundaryType} system boundary ${_R(e.label??e.id,e.labelType)}`,"getUsecaseBoundaryAccessibleName"),Kht=a(e=>e.relationshipType==="note"?"":`${e.relationshipType==="association"&&e.label?`association ${_R(e.label,e.labelType)}`:e.relationshipType} from ${e.sourceLabel} to ${e.targetLabel}`,"getUsecaseEdgeAccessibleName"),e1=a(e=>e.replace(/&/g,"&").replace(//g,">"),"escapePlainLabel"),wAe=a(e=>e.replace(/([*[\\\]_`])/g,"\\$1"),"escapeMarkdownMarkers"),Xht=a((e,t)=>{e.diagramId=t,e.markers=[...jht];for(let r of e.nodes){let n=r;if(n.domId=qht(r.id),r.label!==void 0&&r.labelType==="text"&&(r.label=e1(r.label)),r.stereotype&&(r.stereotype=e1(r.stereotype)),!r.isGroup&&r.shape==="usecaseJsonTable"&&(r.jsonRows=r.jsonRows?.map(i=>({...i,key:e1(i.key),value:e1(i.value)}))),!r.isGroup&&(r.shape==="usecaseEllipse"||r.shape==="rect")&&r.stereotype){let i=r.label??e1(r.id);r.label=`\xAB${wAe(r.stereotype)}\xBB
    ${r.labelType==="text"?wAe(i):i}`,r.labelType="markdown",n.hasFoldedStereotype=!0,delete r.stereotype}}for(let r of e.edges)r.label!==void 0&&r.labelType==="text"&&(r.label=e1(r.label));return e},"prepareUsecaseLayoutData"),Qht=a((e,t,r)=>{for(let i of t.nodes){let s=typeof i.domId=="string"?i.domId:vAe(t.diagramId,i.id),o=e.select(`#${s}`),l=i.isGroup?"boundary":AAe[i.shape]?"actor":i.shape==="note"?"note":i.shape==="usecaseJsonTable"?"json":"usecase",u=r.nodes.get(i.id)??i.id;if(o.attr("data-usecase-id",i.id).attr("data-usecase-kind",l).attr("role","img").attr("aria-label",u),!i.isGroup&&(i.shape==="usecaseEllipse"||i.shape==="rect")&&"hasFoldedStereotype"in i&&i.hasFoldedStereotype===!0){let h=o.node(),d=h?.querySelector(".nodeLabel"),f=d?.querySelector("p")??d,p=f?.firstChild;if(f&&p?.nodeType===3){let m=f.ownerDocument.createElement("span");m.className="usecase-stereotype",f.insertBefore(m,p),m.appendChild(p)}else h?.querySelector(".label tspan tspan, .label tspan")?.classList.add("usecase-stereotype")}}let n=new Map(t.edges.map(i=>[i.id,i]));e.selectAll('path[data-et="edge"]').each(function(){let i=n.get(this.getAttribute("data-id")??"");if(!i)return;let s=st(this);s.attr("id",vAe(t.diagramId,i.id)).attr("data-usecase-id",i.id).attr("data-usecase-kind",i.internal?"note-connector":"relationship"),i.internal?s.attr("aria-hidden","true"):s.attr("role","img").attr("aria-label",r.edges.get(i.id)??i.id)})},"annotateUsecaseElements"),_Ae=a((e,t)=>{e.style("--mermaid-usecase-actor-font-size",`${t.actorFontSize}px`).style("--mermaid-usecase-actor-font-family",t.actorFontFamily).style("--mermaid-usecase-actor-font-weight",t.actorFontWeight).style("--mermaid-usecase-font-size",`${t.usecaseFontSize}px`).style("--mermaid-usecase-font-family",t.usecaseFontFamily).style("--mermaid-usecase-font-weight",t.usecaseFontWeight)},"applyUsecaseFonts"),Zht=a(async(e,t,r,n)=>{H.info("Drawing usecase diagram (unified)",t);let{layout:i}=_e(),s=n.db,o=s.getData(),l=new Map(o.nodes.map(f=>[f.id,_R(f.label??f.id,f.labelType)])),u={nodes:new Map(o.nodes.map(f=>[f.id,f.isGroup?Yht(f):Hht(f.shape==="note"?{...f,noteTargetLabel:l.get(f.noteTarget??"")}:f)])),edges:new Map(o.edges.map(f=>[f.id,Kht({...f,sourceLabel:l.get(f.source)??f.sourceLabel,targetLabel:l.get(f.target)??f.targetLabel})]))},h=ca(t,o.config.securityLevel);o.layoutAlgorithm=Ta(i),Xht(o,t),_Ae(h,o),await ba(o,h),Qht(h,o,u);let d=o.diagramPadding;Xt.insertTitle(h,"usecaseDiagramTitleText",0,s.getDiagramTitle?.()??""),Is(h,d,"usecaseDiagram",o.useMaxWidth),_Ae(h,o)},"draw"),RAe={draw:Zht}});var Jht,edt,tdt,IAe,DAe=w(()=>{"use strict";Tr();Wi();Jht=a(e=>({actorBkg:e.usecaseActorBkg??e.actorBkg??e.mainBkg,actorBorder:e.usecaseActorBorder??e.actorBorder??e.primaryColor,bkg:e.usecaseBkg??e.mainBkg,border:e.usecaseBorder??e.nodeBorder??e.primaryColor,boundaryBkg:e.usecaseBoundaryBkg??e.clusterBkg,boundaryBorder:e.usecaseBoundaryBorder??e.clusterBorder,includeLine:e.usecaseIncludeLine??e.lineColor,extendLine:e.usecaseExtendLine??e.lineColor}),"roleColors"),edt=a(e=>{let{theme:t,bkgColorArray:r,borderColorArray:n}=e;if(!Ui(t,n))return"";let i=Ct().usecase?.colorScheme==="rotate",s=Di(e.look),o=s==="handDrawn",l=zi(r),u="";for(let h=0;h{let t=Jht(e),r=Di(e.look)==="handDrawn";return` + ${edt(e)} + & .usecase-actor { + color: ${e.actorTextColor??e.primaryTextColor}; + } + + & .usecase-actor-shape, + & .usecase-actor-hollow, + & .usecase-actor-awesome, + & .usecase-actor-icon { + fill: ${t.actorBkg}; + stroke: ${t.actorBorder}; + stroke-width: 2px; + } +${r?"":` + /* The rule above colours the glyph group and lets its children inherit, which the neo + look breaks: it ships a \`[data-look="neo"].node path { stroke }\` rule that lands on + the glyph's own paths, and a value set directly on a child always beats one inherited + from its parent, whatever the parent rule's specificity. Since neo is the default look, + without this every actor renders in the node border colour rather than the actor + colour the rule above asks for. + + \`.node\` is in the selector to outrank that neo rule rather than tie with it: both + would otherwise be one attribute plus one class plus one element, leaving the winner to + depend on which stylesheet is concatenated last. + + Stroke only: the hollow variant's own \`fill="none"\` has to keep winning. */ + & .node.usecase-actor .usecase-actor-glyph path, + & .node.usecase-actor .usecase-actor-glyph circle { + stroke: ${t.actorBorder}; + } +`} + & .usecase-actor .nodeLabel, + & .actor-label { + color: ${e.actorTextColor??e.primaryTextColor}; + fill: ${e.actorTextColor??e.primaryTextColor}; + font-family: var(--mermaid-usecase-actor-font-family, ${e.fontFamily}); + font-size: var(--mermaid-usecase-actor-font-size, 14px); + font-weight: var(--mermaid-usecase-actor-font-weight, normal); + } + + & .usecase-element ellipse, + & .usecase-element rect, + & .usecase-business ellipse, + & .usecase-business rect { + fill: ${t.bkg}; + stroke: ${t.border}; + stroke-width: 2px; + } +${r?"":` + /* The same interception the actor glyph hits, one element down: neo ships + \`[data-look="neo"].node rect { stroke: nodeBorder }\`, which outranks the plain + \`.usecase-element rect\` above, so a use case written in the \`[Rect]\` form kept the node + border colour while its ellipse siblings took the role colour. An \`\` has no + equivalent neo rule and is already correct; restating it here costs nothing and means + the two forms cannot drift apart again. + + Qualified with \`[data-look]\` *and* \`.node\` to land strictly above that rule rather than + tie with it -- on a tie the later stylesheet would win, which is how neo took this in + the first place. Skipped under handDrawn, where roughjs draws paths and neither element + exists. */ + & [data-look="${Di(e.look)}"].node.usecase-element ellipse, + & [data-look="${Di(e.look)}"].node.usecase-element rect { + fill: ${t.bkg}; + stroke: ${t.border}; + } + + /* The business marker is a \`\`, so it loses to \`[data-look="neo"].node path\` the same + way. No \`fill\`: the marker is drawn with \`fill="none"\` and has to stay that way. */ + & [data-look="${Di(e.look)}"].node.usecase-element .usecase-business-marker { + stroke: ${t.border}; + } +`} + & .usecase-element .nodeLabel, + & .usecase-label { + color: ${e.primaryTextColor}; + fill: ${e.primaryTextColor}; + font-family: var(--mermaid-usecase-font-family, ${e.fontFamily}); + font-size: var(--mermaid-usecase-font-size, 12px); + font-weight: var(--mermaid-usecase-font-weight, normal); + } + + & .usecase-stereotype, + & .usecase-business-marker { + color: ${e.primaryTextColor}; + fill: ${e.primaryTextColor}; + stroke: ${t.border}; + } + + & .system-boundary rect.boundary-body, + & .system-boundary rect.boundary-tab, + & .system-boundary-package-tab { + fill: ${t.boundaryBkg}; + stroke: ${t.boundaryBorder}; + stroke-width: 1px; + } + + & .system-boundary-title text { + fill: ${e.titleColor??e.primaryTextColor}; + } + + /* Only the span, never the

    inside it: the renderer puts a user-supplied + 'color' on the span, and that has to stay inheritable by its children. */ + & .system-boundary-title span { + color: ${e.titleColor??e.primaryTextColor}; + } + + & .usecase-note { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + color: ${e.noteTextColor}; + } + + & .usecase-note .nodeLabel { + color: ${e.noteTextColor}; + fill: ${e.noteTextColor}; + } + + & .usecase-json-table, + & .usecase-json-table rect, + & .usecase-json-cell { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder??e.primaryColor}; + } + + & .usecase-json-title, + & .usecase-json-key, + & .usecase-json-value { + color: ${e.primaryTextColor}; + fill: ${e.primaryTextColor}; + } + + & .relationship { + fill: none; + stroke: ${e.lineColor}; + } + + & .relationship-include, + & .relationship-extend, + & .relationship-note { + stroke-dasharray: 3; + } + + /* Include and extend are both dashed, which is a weak distinction at small sizes. The + tokens default to \`lineColor\`, so a theme that does not set them is unchanged. */ + & .relationship-include { + stroke: ${t.includeLine}; + } + + & .relationship-extend { + stroke: ${t.extendLine}; + } + + & .relationship.edge-animation-fast, + & .relationship.edge-animation-slow { + stroke-linecap: round; + } + + & .edgeLabel, + & .edgeLabel p { + background-color: ${e.edgeLabelBackground}; + } + + & .labelBkg { + background-color: ${e.edgeLabelBackground}; + padding: 0 2px; + } + + & .edgeLabel .label rect { + fill: ${e.edgeLabelBackground}; + } + + & .relationship-label, + & .edgeLabel { + color: ${e.primaryTextColor}; + fill: ${e.primaryTextColor}; + font-family: ${e.fontFamily}; + font-size: 10px; + font-weight: normal; + } + + & .marker, + & .marker.point, + & .marker.circle, + & .marker.cross { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + } + + & .marker.extension { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + } +`},"getStyles"),IAe=tdt});var NAe={};ir(NAe,{diagram:()=>rdt});var rdt,MAe=w(()=>{"use strict";EAe();_A();LAe();DAe();rdt={parser:SAe,db:Cp,renderer:RAe,styles:IAe}});var AR,Op,BAe,sdt,adt,jG,$Ae=w(()=>{"use strict";Ms();bt();va();AR=a((e,t)=>{let r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),Op=a((e,t,r)=>({x:AR(t,`${r} evolution`),y:AR(e,`${r} visibility`)}),"toCoordinates"),BAe=a(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),sdt=a(e=>{if(!e?.startsWith("+"))return{};let r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),adt=a((e,t)=>{if(Dn(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(i=>i.secondName?`${i.name.trim()} / ${i.secondName.trim()}`:i.name.trim()),n=e.evolution.stages.filter(i=>i.boundary!==void 0).map(i=>i.boundary);t.updateAxes({stages:r,stageBoundaries:n})}if(e.anchors.forEach(r=>{let n=Op(r.visibility,r.evolution,`Anchor "${r.name}"`);t.addNode(r.name,r.name,n.x,n.y,"anchor")}),e.components.forEach(r=>{let n=Op(r.visibility,r.evolution,`Component "${r.name}"`),i=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,s=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,o=r.decorator?.strategy;t.addNode(r.name,r.name,n.x,n.y,"component",i,s,r.inertia,o)}),e.notes.forEach(r=>{let n=Op(r.visibility,r.evolution,`Note "${r.text}"`);t.addNote(r.text,n.x,n.y)}),e.pipelines.forEach(r=>{let n=t.getNode(r.parent);if(!n||typeof n.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let i=n.y;t.startPipeline(r.parent),r.components.forEach(s=>{let o=`${r.parent}_${s.name}`,l=s.label?(s.label.negX?-1:1)*s.label.offsetX:void 0,u=s.label?(s.label.negY?-1:1)*s.label.offsetY:void 0,h=AR(s.evolution,`Pipeline component "${s.name}" evolution`);t.addNode(o,s.name,h,i,"pipeline-component",l,u),t.addPipelineComponent(r.parent,o)})}),e.links.forEach(r=>{let n=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),i=BAe(r.fromPort)??BAe(r.toPort),{flow:s,label:o}=sdt(r.arrow);!i&&s&&(i=s);let l=r.linkLabel,u=o??l;t.addLink(t.resolveNodeId(r.from),t.resolveNodeId(r.to),n,u,i)}),e.evolves.forEach(r=>{let n=t.getNode(r.component);if(n?.y!==void 0){let i=AR(r.target,`Evolve target for "${r.component}"`);t.addTrend(r.component,i,n.y)}}),e.annotations.length>0){let r=e.annotations[0],n=Op(r.x,r.y,"Annotations box");t.setAnnotationsBox(n.x,n.y)}e.annotation.forEach(r=>{let n=Op(r.x,r.y,`Annotation ${r.number}`);t.addAnnotation(r.number,[{x:n.x,y:n.y}],r.text)}),e.accelerators.forEach(r=>{let n=Op(r.x,r.y,`Accelerator "${r.name}"`);t.addAccelerator(r.name,n.x,n.y)}),e.deaccelerators.forEach(r=>{let n=Op(r.x,r.y,`Deaccelerator "${r.name}"`);t.addDeaccelerator(r.name,n.x,n.y)})},"populateDb"),jG={parser:{yy:void 0},parse:a(async e=>{let t=await ki("wardley",e);H.debug(t);let r=jG.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");adt(t,r)},"parse")}});var RR,FAe=w(()=>{"use strict";RR=class{constructor(){this.nodes=new Map;this.links=[];this.trends=new Map;this.pipelines=new Map;this.annotations=[];this.notes=[];this.accelerators=[];this.deaccelerators=[];this.axes={}}static{a(this,"WardleyBuilder")}addNode(t){let r=this.nodes.get(t.id)??{id:t.id,label:t.label},n={...r,...t,className:t.className??r.className,labelOffsetX:t.labelOffsetX??r.labelOffsetX,labelOffsetY:t.labelOffsetY??r.labelOffsetY};this.nodes.set(t.id,n)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});let r=this.nodes.get(t);r&&(r.isPipelineParent=!0)}addPipelineComponent(t,r){let n=this.pipelines.get(t);n&&n.componentIds.push(r);let i=this.nodes.get(r);i&&(i.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,r){this.annotationsBox={x:t,y:r}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,r){this.size={width:t,height:r}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(let[r,n]of this.nodes)if(n.label===t)return r;return t}build(){let t=[];for(let r of this.nodes.values()){if(typeof r.x!="number"||typeof r.y!="number")throw new Error(`Node "${r.label}" is missing coordinates`);t.push(r)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}}});function odt(){return _e()["wardley-beta"]}function ldt(e,t,r,n,i,s,o,l,u){$s.addNode({id:e,label:t,x:r,y:n,className:i,labelOffsetX:s,labelOffsetY:o,inertia:l,sourceStrategy:u})}function cdt(e,t,r=!1,n,i){$s.addLink({source:e,target:t,dashed:r,label:n,flow:i})}function udt(e,t,r){$s.addTrend({nodeId:e,targetX:t,targetY:r})}function hdt(e,t,r){$s.addAnnotation({number:e,coordinates:t,text:r})}function ddt(e,t,r){$s.addNote({text:e,x:t,y:r})}function fdt(e,t,r){$s.addAccelerator({name:e,x:t,y:r})}function pdt(e,t,r){$s.addDeaccelerator({name:e,x:t,y:r})}function mdt(e,t){$s.setAnnotationsBox(e,t)}function gdt(e,t){$s.setSize(e,t)}function ydt(e){$s.startPipeline(e)}function xdt(e,t){$s.addPipelineComponent(e,t)}function bdt(e){$s.setAxes(e)}function Tdt(e){return $s.getNode(e)}function Cdt(e){return $s.resolveNodeId(e)}function kdt(){return $s.build()}function Sdt(){$s.clear(),or()}var $s,GAe,VAe=w(()=>{"use strict";Gt();fn();FAe();$s=new RR;a(odt,"getConfig");a(ldt,"addNode");a(cdt,"addLink");a(udt,"addTrend");a(hdt,"addAnnotation");a(ddt,"addNote");a(fdt,"addAccelerator");a(pdt,"addDeaccelerator");a(mdt,"setAnnotationsBox");a(gdt,"setSize");a(ydt,"startPipeline");a(xdt,"addPipelineComponent");a(bdt,"updateAxes");a(Tdt,"getNode");a(Cdt,"resolveNodeId");a(kdt,"getWardleyData");a(Sdt,"clear");GAe={getConfig:odt,addNode:ldt,addLink:cdt,addTrend:udt,addAnnotation:hdt,addNote:ddt,addAccelerator:fdt,addDeaccelerator:pdt,setAnnotationsBox:mdt,setSize:gdt,startPipeline:ydt,addPipelineComponent:xdt,updateAxes:bdt,getNode:Tdt,resolveNodeId:Cdt,getWardleyData:kdt,clear:Sdt,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,getAccDescription:yr,setAccDescription:fr}});var Edt,vdt,wdt,_dt,zAe,UAe=w(()=>{"use strict";Gt();bt();Os();Rn();Edt=["Genesis","Custom Built","Product","Commodity"],vdt=a(()=>{let{themeVariables:e}=_e();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),wdt=a(()=>{let e=_e()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),_dt=a((e,t,r,n)=>{H.debug(`Rendering Wardley map +`+e);let i=wdt(),s=vdt(),o=i.nodeRadius*1.6,l=n.db,u=l.getWardleyData(),h=l.getDiagramTitle(),d=u.size?.width??i.width,f=u.size?.height??i.height,p=gn(t);p.selectAll("*").remove(),Dr(p,f,d,i.useMaxWidth),p.attr("viewBox",`0 0 ${d} ${f}`);let m=p.append("g").attr("class","wardley-map"),g=p.append("defs");g.append("marker").attr("id",`arrow-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",s.evolutionStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-end-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",s.linkStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-start-${t}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",s.linkStroke).attr("stroke","none"),m.append("rect").attr("class","wardley-background").attr("width",d).attr("height",f).attr("fill",s.backgroundColor);let y=d-i.padding*2,x=f-i.padding*2;h&&m.append("text").attr("class","wardley-title").attr("x",d/2).attr("y",i.padding/2).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let b=a(R=>i.padding+R/100*y,"projectX"),T=a(R=>f-i.padding-R/100*x,"projectY"),C=m.append("g").attr("class","wardley-axes");C.append("line").attr("x1",i.padding).attr("x2",d-i.padding).attr("y1",f-i.padding).attr("y2",f-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1),C.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke",s.axisColor).attr("stroke-width",1);let v=u.axes.xLabel??"Evolution",E=u.axes.yLabel??"Visibility";C.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+y/2).attr("y",f-i.padding/4).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(v),C.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+x/2).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+x/2})`).text(E);let S=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:Edt;if(S.length>0){let R=m.append("g").attr("class","wardley-stages"),P=u.axes.stageBoundaries,V=[];if(P&&P.length===S.length){let U=0;P.forEach(z=>{V.push({start:U,end:z}),U=z})}else{let U=1/S.length;S.forEach((z,j)=>{V.push({start:j*U,end:(j+1)*U})})}S.forEach((U,z)=>{let j=V[z],K=i.padding+j.start*y,Z=i.padding+j.end*y,ce=(K+Z)/2;z>0&&R.append("line").attr("x1",K).attr("x2",K).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),R.append("text").attr("class","wardley-stage-label").attr("x",ce).attr("y",f-i.padding/1.5).attr("fill",s.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(U)})}if(i.showGrid){let R=m.append("g").attr("class","wardley-grid");for(let P=1;P<4;P++){let V=P/4,U=i.padding+y*V;R.append("line").attr("x1",U).attr("x2",U).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6"),R.append("line").attr("x1",i.padding).attr("x2",d-i.padding).attr("y1",f-i.padding-x*V).attr("y2",f-i.padding-x*V).attr("stroke",s.gridColor).attr("stroke-dasharray","2 6")}}let _=new Map;if(u.nodes.forEach(R=>{_.set(R.id,{x:b(R.x),y:T(R.y),node:R})}),u.pipelines.length>0){let R=m.append("g").attr("class","wardley-pipelines"),P=m.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach(V=>{if(V.componentIds.length===0)return;let U=V.componentIds.map(Z=>({id:Z,pos:_.get(Z),node:u.nodes.find(ce=>ce.id===Z)})).filter(Z=>Z.pos&&Z.node).sort((Z,ce)=>Z.node.x-ce.node.x);for(let Z=0;Z{let ce=_.get(Z);ce&&(z=Math.min(z,ce.x),j=Math.max(j,ce.x),K=ce.y)}),z!==1/0&&j!==-1/0){let ce=i.nodeRadius*4,te=K-ce/2,me=_.get(V.nodeId);if(me){let he=(z+j)/2;me.x=he,me.y=te-o/6}R.append("rect").attr("class","wardley-pipeline-box").attr("x",z-15).attr("y",te).attr("width",j-z+30).attr("height",ce).attr("fill","none").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let A=m.append("g").attr("class","wardley-links"),B=new Map;u.pipelines.forEach(R=>{B.set(R.nodeId,new Set(R.componentIds))});let $=u.links.filter(R=>!(!_.has(R.source)||!_.has(R.target)||B.get(R.target)?.has(R.source)));A.selectAll("line").data($).enter().append("line").attr("class",R=>`wardley-link${R.dashed?" wardley-link--dashed":""}`).attr("x1",R=>{let P=_.get(R.source),V=_.get(R.target),z=u.nodes.find(ce=>ce.id===R.source).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,j=V.x-P.x,K=V.y-P.y,Z=Math.sqrt(j*j+K*K);return P.x+j/Z*z}).attr("y1",R=>{let P=_.get(R.source),V=_.get(R.target),z=u.nodes.find(ce=>ce.id===R.source).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,j=V.x-P.x,K=V.y-P.y,Z=Math.sqrt(j*j+K*K);return P.y+K/Z*z}).attr("x2",R=>{let P=_.get(R.source),V=_.get(R.target),z=u.nodes.find(ce=>ce.id===R.target).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,j=P.x-V.x,K=P.y-V.y,Z=Math.sqrt(j*j+K*K);return V.x+j/Z*z}).attr("y2",R=>{let P=_.get(R.source),V=_.get(R.target),z=u.nodes.find(ce=>ce.id===R.target).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,j=P.x-V.x,K=P.y-V.y,Z=Math.sqrt(j*j+K*K);return V.y+K/Z*z}).attr("stroke",s.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",R=>R.dashed?"6 6":null).attr("marker-end",R=>R.flow==="forward"||R.flow==="bidirectional"?`url(#link-arrow-end-${t})`:null).attr("marker-start",R=>R.flow==="backward"||R.flow==="bidirectional"?`url(#link-arrow-start-${t})`:null),A.selectAll("text").data($.filter(R=>R.label)).enter().append("text").attr("class","wardley-link-label").attr("x",R=>{let P=_.get(R.source),V=_.get(R.target),U=(P.x+V.x)/2,z=V.y-P.y,j=V.x-P.x,K=Math.sqrt(j*j+z*z),Z=8,ce=z/K;return U+ce*Z}).attr("y",R=>{let P=_.get(R.source),V=_.get(R.target),U=(P.y+V.y)/2,z=V.x-P.x,j=V.y-P.y,K=Math.sqrt(z*z+j*j),Z=8,ce=-z/K;return U+ce*Z}).attr("fill",s.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",R=>{let P=_.get(R.source),V=_.get(R.target),U=(P.x+V.x)/2,z=(P.y+V.y)/2,j=V.x-P.x,K=V.y-P.y,Z=Math.sqrt(j*j+K*K),ce=8,te=K/Z,me=-j/Z,he=U+te*ce,we=z+me*ce,ye=Math.atan2(K,j)*180/Math.PI;return(ye>90||ye<-90)&&(ye+=180),`rotate(${ye} ${he} ${we})`}).text(R=>R.label);let O=m.append("g").attr("class","wardley-trends"),G=u.trends.map(R=>{let P=_.get(R.nodeId);if(!P)return null;let V=b(R.targetX),U=T(R.targetY),z=V-P.x,j=U-P.y,K=Math.sqrt(z*z+j*j),Z=i.nodeRadius+2,ce=K>Z?V-z/K*Z:V,te=K>Z?U-j/K*Z:U;return{origin:P,targetX:V,targetY:U,adjustedX2:ce,adjustedY2:te}}).filter(R=>R!==null);O.selectAll("line").data(G).enter().append("line").attr("class","wardley-trend").attr("x1",R=>R.origin.x).attr("y1",R=>R.origin.y).attr("x2",R=>R.adjustedX2).attr("y2",R=>R.adjustedY2).attr("stroke",s.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${t})`);let F=m.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",R=>["wardley-node",R.className?`wardley-node--${R.className}`:""].filter(Boolean).join(" "));F.filter(R=>R.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",R=>_.get(R.id).x).attr("cy",R=>_.get(R.id).y).attr("r",i.nodeRadius*2).attr("fill","#666").attr("stroke",s.componentStroke).attr("stroke-width",1),F.filter(R=>R.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",R=>_.get(R.id).x).attr("cy",R=>_.get(R.id).y).attr("r",i.nodeRadius*2).attr("fill","#ccc").attr("stroke",s.componentStroke).attr("stroke-width",1),F.filter(R=>R.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",R=>_.get(R.id).x).attr("cy",R=>_.get(R.id).y).attr("r",i.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let N=F.filter(R=>R.sourceStrategy==="market");N.append("circle").attr("class","wardley-market-overlay").attr("cx",R=>_.get(R.id).x).attr("cy",R=>_.get(R.id).y).attr("r",i.nodeRadius*2).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),F.filter(R=>!R.isPipelineParent&&R.sourceStrategy!=="market"&&R.className!=="anchor").append("circle").attr("cx",R=>_.get(R.id).x).attr("cy",R=>_.get(R.id).y).attr("r",i.nodeRadius).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1);let D=i.nodeRadius*.7,M=i.nodeRadius*1.2;if(N.append("line").attr("class","wardley-market-line").attr("x1",R=>_.get(R.id).x).attr("y1",R=>_.get(R.id).y-M).attr("x2",R=>_.get(R.id).x-M*Math.cos(Math.PI/6)).attr("y2",R=>_.get(R.id).y+M*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),N.append("line").attr("class","wardley-market-line").attr("x1",R=>_.get(R.id).x-M*Math.cos(Math.PI/6)).attr("y1",R=>_.get(R.id).y+M*Math.sin(Math.PI/6)).attr("x2",R=>_.get(R.id).x+M*Math.cos(Math.PI/6)).attr("y2",R=>_.get(R.id).y+M*Math.sin(Math.PI/6)).attr("stroke",s.componentStroke).attr("stroke-width",1),N.append("line").attr("class","wardley-market-line").attr("x1",R=>_.get(R.id).x+M*Math.cos(Math.PI/6)).attr("y1",R=>_.get(R.id).y+M*Math.sin(Math.PI/6)).attr("x2",R=>_.get(R.id).x).attr("y2",R=>_.get(R.id).y-M).attr("stroke",s.componentStroke).attr("stroke-width",1),N.append("circle").attr("class","wardley-market-dot").attr("cx",R=>_.get(R.id).x).attr("cy",R=>_.get(R.id).y-M).attr("r",D).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),N.append("circle").attr("class","wardley-market-dot").attr("cx",R=>_.get(R.id).x-M*Math.cos(Math.PI/6)).attr("cy",R=>_.get(R.id).y+M*Math.sin(Math.PI/6)).attr("r",D).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),N.append("circle").attr("class","wardley-market-dot").attr("cx",R=>_.get(R.id).x+M*Math.cos(Math.PI/6)).attr("cy",R=>_.get(R.id).y+M*Math.sin(Math.PI/6)).attr("r",D).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",2),F.filter(R=>R.isPipelineParent===!0).append("rect").attr("x",R=>_.get(R.id).x-o/2).attr("y",R=>_.get(R.id).y-o/2).attr("width",o).attr("height",o).attr("fill",s.componentFill).attr("stroke",s.componentStroke).attr("stroke-width",1),F.filter(R=>R.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",R=>{let P=_.get(R.id),V=R.isPipelineParent?o/2+15:i.nodeRadius+15;return R.sourceStrategy&&(V+=i.nodeRadius+10),P.x+V}).attr("y1",R=>{let P=_.get(R.id),V=R.isPipelineParent?o:i.nodeRadius*2;return P.y-V/2}).attr("x2",R=>{let P=_.get(R.id),V=R.isPipelineParent?o/2+15:i.nodeRadius+15;return R.sourceStrategy&&(V+=i.nodeRadius+10),P.x+V}).attr("y2",R=>{let P=_.get(R.id),V=R.isPipelineParent?o:i.nodeRadius*2;return P.y+V/2}).attr("stroke",s.componentStroke).attr("stroke-width",6),F.append("text").attr("x",R=>{let P=_.get(R.id);if(R.className==="anchor")return R.labelOffsetX!==void 0?P.x+R.labelOffsetX:P.x;let V=i.nodeLabelOffset;R.sourceStrategy&&R.labelOffsetX===void 0&&(V+=10);let U=R.labelOffsetX??V;return P.x+U}).attr("y",R=>{let P=_.get(R.id);if(R.className==="anchor")return R.labelOffsetY!==void 0?P.y+R.labelOffsetY:P.y-3;let V=-i.nodeLabelOffset;R.sourceStrategy&&R.labelOffsetY===void 0&&(V-=10);let U=R.labelOffsetY??V;return P.y+U}).attr("class","wardley-node-label").attr("fill",R=>R.className==="evolved"?s.evolutionStroke:R.className==="anchor"?"#000":s.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",R=>R.className==="anchor"?"bold":"normal").attr("text-anchor",R=>R.className==="anchor"?"middle":"start").attr("dominant-baseline",R=>R.className==="anchor"?"middle":"auto").text(R=>R.label),u.annotations.length>0){let R=m.append("g").attr("class","wardley-annotations");if(u.annotations.forEach(P=>{let V=P.coordinates.map(U=>({x:b(U.x),y:T(U.y)}));if(V.length>1)for(let U=0;U{let z=R.append("g").attr("class","wardley-annotation");z.append("circle").attr("cx",U.x).attr("cy",U.y).attr("r",10).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5),z.append("text").attr("x",U.x).attr("y",U.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(P.number)})}),u.annotationsBox){let P=b(u.annotationsBox.x),V=T(u.annotationsBox.y),U=10,z=16,j=11,K=R.append("g").attr("class","wardley-annotations-box"),Z=[...u.annotations].filter(te=>te.text).sort((te,me)=>te.number-me.number),ce=[];if(Z.forEach((te,me)=>{let he=K.append("text").attr("x",P+U).attr("y",V+U+(me+1)*z).attr("font-size",j).attr("fill",s.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${te.number}. ${te.text}`);ce.push(he)}),ce.length>0){let te=0,me=0;ce.forEach(Me=>{let at=Me.node(),ht=at.getComputedTextLength();te=Math.max(te,ht);let ge=at.getBBox();me=Math.max(me,ge.height)});let he=te+U*2+105,we=Z.length*z+U*2+me/2,ye=i.padding,ke=d-i.padding-he,Fe=i.padding,Ge=f-i.padding-we;P=Math.max(ye,Math.min(P,ke)),V=Math.max(Fe,Math.min(V,Ge)),ce.forEach((Me,at)=>{Me.attr("x",P+U).attr("y",V+U+(at+1)*z)}),K.insert("rect","text").attr("x",P).attr("y",V).attr("width",he).attr("height",we).attr("fill","white").attr("stroke",s.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){let R=m.append("g").attr("class","wardley-notes");u.notes.forEach(P=>{let V=b(P.x),U=T(P.y);R.append("text").attr("x",V).attr("y",U).attr("text-anchor","start").attr("font-size",11).attr("fill",s.axisTextColor).attr("font-weight","bold").text(P.text)})}if(u.accelerators.length>0){let R=m.append("g").attr("class","wardley-accelerators");u.accelerators.forEach(P=>{let V=b(P.x),U=T(P.y),z=60,j=30,K=20,Z=` + M ${V} ${U-j/2} + L ${V+z-K} ${U-j/2} + L ${V+z-K} ${U-j/2-8} + L ${V+z} ${U} + L ${V+z-K} ${U+j/2+8} + L ${V+z-K} ${U+j/2} + L ${V} ${U+j/2} + Z + `;R.append("path").attr("d",Z).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),R.append("text").attr("x",V+z/2).attr("y",U+j/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(P.name)})}if(u.deaccelerators.length>0){let R=m.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach(P=>{let V=b(P.x),U=T(P.y),z=60,j=30,K=20,Z=` + M ${V+z} ${U-j/2} + L ${V+K} ${U-j/2} + L ${V+K} ${U-j/2-8} + L ${V} ${U} + L ${V+K} ${U+j/2+8} + L ${V+K} ${U+j/2} + L ${V+z} ${U+j/2} + Z + `;R.append("path").attr("d",Z).attr("fill","white").attr("stroke",s.componentStroke).attr("stroke-width",1),R.append("text").attr("x",V+z/2).attr("y",U+j/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",s.axisTextColor).attr("font-weight","bold").text(P.name)})}},"draw"),zAe={draw:_dt}});var WAe,jAe=w(()=>{"use strict";jt();yl();Tr();WAe=a(({wardley:e}={})=>{let t=Zi(),r=Ct(),n=Nr(t,r.themeVariables),i=Nr(n.wardley,e);return` + .wardley-background { + fill: ${i.backgroundColor}; + } + .wardley-axes line, .wardley-axes path { + stroke: ${i.axisColor}; + } + .wardley-axis-label { + fill: ${i.axisTextColor}; + } + .wardley-stage-label { + fill: ${i.axisTextColor}; + } + .wardley-grid line { + stroke: ${i.gridColor}; + } + .wardley-node circle { + fill: ${i.componentFill}; + stroke: ${i.componentStroke}; + } + .wardley-node-label { + fill: ${i.componentLabelColor}; + } + .wardley-link { + stroke: ${i.linkStroke}; + } + .wardley-link--dashed { + stroke-dasharray: 4 4; + } + .wardley-link-label { + fill: ${i.axisTextColor}; + } + .wardley-trend line { + stroke: ${i.evolutionStroke}; + } + .wardley-annotation-line { + stroke: ${i.annotationStroke}; + } + .wardley-annotation circle { + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; + } + .wardley-annotation text { + fill: ${i.annotationTextColor}; + } + .wardley-annotations-box rect { + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; + } + .wardley-annotations-box text { + fill: ${i.annotationTextColor}; + } + .wardley-pipeline-box { + stroke: ${i.componentStroke}; + } + .wardley-notes text { + fill: ${i.axisTextColor}; + } + `},"styles")});var qAe={};ir(qAe,{diagram:()=>Adt});var Adt,HAe=w(()=>{"use strict";$Ae();VAe();UAe();jAe();Adt={parser:jG,db:GAe,renderer:zAe,styles:WAe}});var XAe,cC,Ddt,Ndt,Mdt,Odt,Pdt,Bdt,t1,qG=w(()=>{"use strict";Tr();Gi();bt();jt();fn();XAe=a(()=>({domains:new Map,transitions:[]}),"createDefaultData"),cC=XAe(),Ddt=a(()=>cC.domains,"getDomains"),Ndt=a(()=>cC.transitions,"getTransitions"),Mdt=a(e=>{if(e)for(let t of e){let r=t.domain,n=(t.items??[]).map(i=>({label:i.label}));cC.domains.set(r,{name:r,items:n})}},"setDomains"),Odt=a(e=>{e&&(cC.transitions=e.filter(t=>t.from===t.to?(H.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1):!0).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),Pdt=a(()=>Nr({...dr.cynefin,...Ct().cynefin}),"getConfig"),Bdt=a(()=>{or(),cC=XAe()},"clear"),t1={getDomains:Ddt,getTransitions:Ndt,setDomains:Mdt,setTransitions:Odt,getConfig:Pdt,clear:Bdt,setAccTitle:hr,getAccTitle:gr,setDiagramTitle:Cr,getDiagramTitle:xr,getAccDescription:yr,setAccDescription:fr}});var $dt,QAe,ZAe=w(()=>{"use strict";Ms();bt();va();qG();$dt=a(e=>{Dn(e,t1),t1.setDomains(e.domains),t1.setTransitions(e.transitions)},"populate"),QAe={parse:a(async e=>{let t=await ki("cynefin",e);H.debug(t),$dt(t)},"parse")}});function LR(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Fdt(e){let t=0;for(let r=0;r{"use strict";a(LR,"seededRandom");a(Fdt,"hashString");a(JAe,"resolveSeed");a(eRe,"generateFoldPath");a(tRe,"generateHorizontalBoundary");a(rRe,"generateCliffPath");a(nRe,"generateConfusionPath")});var sRe,Gdt,Vdt,HG,zdt,aRe,oRe=w(()=>{"use strict";Os();Rn();bt();Tr();yl();jt();iRe();sRe={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Gdt=a((e,t)=>{let r=e/2,n=t/2;return{complex:{cx:r/2,cy:n/2,x:0,y:0,w:r,h:n},complicated:{cx:r+r/2,cy:n/2,x:r,y:0,w:r,h:n},chaotic:{cx:r/2,cy:n+n/2,x:0,y:n,w:r,h:n},clear:{cx:r+r/2,cy:n+n/2,x:r,y:n,w:r,h:n},confusion:{cx:r,cy:n,x:r*.7,y:n*.7,w:r*.6,h:n*.6}}},"getDomainLayouts"),Vdt=a(()=>{let e=Zi(),t=Ct();return Nr(e,t.themeVariables).cynefin},"getCynefinDomainColors"),HG=3,zdt=a((e,t,r,n)=>{let i=n.db,s=i.getDomains(),o=i.getTransitions(),l=i.getDiagramTitle(),u=i.getAccTitle(),h=i.getAccDescription(),d=i.getConfig(),f=Vdt();H.debug("Rendering Cynefin diagram");let p=d.width,m=d.height,g=d.padding,y=d.showDomainDescriptions,x=d.boundaryAmplitude,b=p+g*2,T=m+g*2,C={complex:f.complexBg,complicated:f.complicatedBg,clear:f.clearBg,chaotic:f.chaoticBg,confusion:f.confusionBg},v=gn(t);Dr(v,T,b,d.useMaxWidth??!0),v.attr("viewBox",`0 0 ${b} ${T}`),u&&v.append("title").text(u),h&&v.append("desc").text(h);let E=v.append("g").attr("transform",`translate(${g}, ${g})`),S=Gdt(p,m),_=JAe(d.seed,t),A=E.append("g").attr("class","cynefin-backgrounds"),B=["complex","complicated","chaotic","clear"];for(let R of B){let P=S[R];A.append("rect").attr("class","cynefinDomain").attr("x",P.x).attr("y",P.y).attr("width",P.w).attr("height",P.h).attr("fill",C[R]).attr("fill-opacity",.4).attr("stroke","none")}let $=E.append("g").attr("class","cynefin-boundaries");$.append("path").attr("class","cynefinBoundary").attr("d",eRe(p,m,_,x)).attr("fill","none"),$.append("path").attr("class","cynefinBoundary").attr("d",tRe(p,m,_+100,x)).attr("fill","none"),$.append("path").attr("class","cynefinCliff").attr("d",rRe(p,m)).attr("fill","none");let O=p*.15,G=m*.15;E.append("path").attr("class","cynefinConfusion").attr("d",nRe(p/2,m/2,O,G)).attr("fill",C.confusion).attr("fill-opacity",.5);let I=E.append("g").attr("class","cynefin-labels");for(let R of B){let P=S[R];I.append("text").attr("class","cynefinDomainLabel").attr("x",P.cx).attr("y",y?P.cy-30:P.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(R.charAt(0).toUpperCase()+R.slice(1))}if(I.append("text").attr("class","cynefinDomainLabel").attr("x",p/2).attr("y",y?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),y){let R=E.append("g").attr("class","cynefin-subtitles");for(let P of B){let V=S[P],U=sRe[P];R.append("text").attr("class","cynefinSubtitle").attr("x",V.cx).attr("y",V.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(U.model),R.append("text").attr("class","cynefinSubtitle").attr("x",V.cx).attr("y",V.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(U.practice)}R.append("text").attr("class","cynefinSubtitle").attr("x",p/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(sRe.confusion.practice)}let F=E.append("g").attr("class","cynefin-items"),N=26,D=10,M=["complex","complicated","chaotic","clear","confusion"];for(let R of M){let P=s.get(R);if(!P||P.items.length===0)continue;let V=S[R],U=R==="confusion",z=P.items,j=0;U&&P.items.length>HG&&(j=P.items.length-HG,z=P.items.slice(0,HG));let K;if(U){let Z=y?22:14;K=V.cy+Z}else K=V.cy+(y?25:15);if([...z].forEach((Z,ce)=>{let te=K+ce*(N+4),me=F.append("g"),he=me.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",N/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(Z.label),we=Z.label.length*7,ye=he.node();if(ye&&typeof ye.getBBox=="function"){let Ge=ye.getBBox();Ge.width>0&&(we=Ge.width)}let ke=we+D*2,Fe=V.cx-ke/2;me.attr("transform",`translate(${Fe}, ${te})`),me.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",ke).attr("height",N).attr("rx",4).attr("ry",4).attr("fill",C[R]).attr("fill-opacity",.95),he.attr("x",ke/2).attr("y",N/2)}),j>0){let Z=K+z.length*(N+4),ce=`+${j} more`,te=F.append("g"),me=te.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",N/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(ce),he=ce.length*7,we=me.node();if(we&&typeof we.getBBox=="function"){let Fe=we.getBBox();Fe.width>0&&(he=Fe.width)}let ye=he+D*2,ke=V.cx-ye/2;te.attr("transform",`translate(${ke}, ${Z})`),te.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",ye).attr("height",N).attr("rx",4).attr("ry",4).attr("fill",C[R]).attr("fill-opacity",.6),me.attr("x",ye/2).attr("y",N/2)}}if(o.length>0){let R=v.select("defs").empty()?v.append("defs"):v.select("defs"),P=`cynefin-arrow-${t}`;R.append("marker").attr("id",P).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let V=E.append("g").attr("class","cynefin-arrows");o.forEach(U=>{let z=S[U.from],j=S[U.to];if(!z||!j)return;if(U.from===U.to){H.warn(`Cynefin renderer: skipping self-loop on domain "${U.from}"`);return}let K=z.cx,Z=z.cy,ce=j.cx,te=j.cy,me=(K+ce)/2,he=(Z+te)/2,we=ce-K,ye=te-Z,ke=Math.sqrt(we*we+ye*ye),Fe=ke*.15,Ge=-ye/ke,Me=we/ke,at=me+Ge*Fe,ht=he+Me*Fe;V.append("path").attr("class","cynefinArrowLine").attr("d",`M${K},${Z} Q${at},${ht} ${ce},${te}`).attr("fill","none").attr("marker-end",`url(#${P})`),U.label&&V.append("text").attr("class","cynefinArrowLabel").attr("x",at).attr("y",ht-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(U.label)})}l&&E.append("text").attr("class","cynefinTitle").attr("x",p/2).attr("y",-g/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l)},"draw"),aRe={draw:zdt}});var Udt,Wdt,lRe,cRe=w(()=>{"use strict";jt();yl();Tr();Udt=a(()=>{let e=Zi(),t=Ct();return Nr(e,t.themeVariables).cynefin},"getCynefinTheme"),Wdt=a(()=>{let e=Udt();return` + .cynefinDomain { + stroke: none; + } + .cynefinDomainLabel { + font-size: ${e.domainFontSize}px; + font-weight: bold; + fill: ${e.labelColor}; + } + .cynefinSubtitle { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + font-style: italic; + } + .cynefinItem { + fill-opacity: 0.95; + stroke: ${e.boundaryColor}; + stroke-width: 1; + } + .cynefinItemText { + font-size: ${e.itemFontSize}px; + fill: ${e.textColor}; + } + .cynefinItemOverflow { + fill-opacity: 0.6; + stroke: ${e.boundaryColor}; + stroke-width: 1; + stroke-dasharray: 3 2; + } + .cynefinBoundary { + stroke: ${e.boundaryColor}; + stroke-width: ${e.boundaryWidth}; + stroke-dasharray: 6 3; + } + .cynefinCliff { + stroke: ${e.cliffColor}; + stroke-width: ${e.cliffWidth}; + } + .cynefinConfusion { + stroke: ${e.boundaryColor}; + stroke-width: 1.5; + stroke-dasharray: 4 2; + } + .cynefinArrowLine { + stroke: ${e.arrowColor}; + stroke-width: ${e.arrowWidth}; + fill: none; + } + .cynefinArrowHead { + fill: ${e.arrowColor}; + stroke: none; + } + .cynefinArrowLabel { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + } + .cynefinTitle { + font-size: ${e.domainFontSize+2}px; + font-weight: bold; + fill: ${e.labelColor}; + } + `},"styles"),lRe=Wdt});var uRe={};ir(uRe,{diagram:()=>jdt});var jdt,hRe=w(()=>{"use strict";ZAe();qG();oRe();cRe();jdt={parser:QAe,db:t1,renderer:aRe,styles:lRe}});var YG,KG,XG,QG,IR,ld,r1,Ydt,pRe,mRe,Kdt,Xdt,Qdt,Zdt,Jdt,eft,tft,rft,nft,Zr,yc=w(()=>{"use strict";Gt();bt();fn();Ir();YG="",KG="",XG="",QG=[],IR=new Map,ld=a(e=>vr(e,_e()),"sanitizeText"),r1=a(e=>{switch(e.type){case"terminal":return{...e,value:ld(e.value)};case"nonterminal":return{...e,name:ld(e.name)};case"sequence":return{...e,elements:e.elements.map(r1)};case"choice":return{...e,alternatives:e.alternatives.map(r1)};case"optional":return{...e,element:r1(e.element)};case"repetition":return{...e,element:r1(e.element),separator:e.separator?r1(e.separator):void 0};case"special":return{...e,text:ld(e.text)}}},"sanitizeAstNode"),Ydt=a(()=>{YG="",KG="",XG="",QG.length=0,IR.clear(),or(),H.debug("[Railroad] Database cleared")},"clear"),pRe=a(e=>{YG=ld(e),H.debug("[Railroad] Title set:",e)},"setTitle"),mRe=a(()=>YG,"getTitle"),Kdt=a(e=>{let t={...e,name:ld(e.name),definition:r1(e.definition),comment:e.comment?ld(e.comment):void 0};H.debug("[Railroad] Adding rule:",t.name),IR.has(t.name)&&H.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),QG.push(t),IR.set(t.name,t)},"addRule"),Xdt=a(()=>QG,"getRules"),Qdt=a(e=>IR.get(e),"getRule"),Zdt=a(e=>{KG=ld(e).replace(/^\s+/g,""),H.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Jdt=a(()=>KG,"getAccTitle"),eft=a(e=>{XG=ld(e).replace(/\n\s+/g,` +`),H.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),tft=a(()=>XG,"getAccDescription"),rft=pRe,nft=mRe,Zr={clear:Ydt,setTitle:pRe,getTitle:mRe,addRule:Kdt,getRules:Xdt,getRule:Qdt,setAccTitle:Zdt,getAccTitle:Jdt,setAccDescription:eft,getAccDescription:tft,setDiagramTitle:rft,getDiagramTitle:nft}});var ift,n1,sft,aft,gRe,yRe=w(()=>{"use strict";Ms();bt();va();yc();ift=sy().Railroad.parser.LangiumParser,n1=a(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let t=e.elements.map(n1);return t.length===1?t[0]:{type:"sequence",elements:t}}case"RailroadChoiceExpr":{let t=e.alternatives.map(n1);return t.length===1?t[0]:{type:"choice",alternatives:t}}case"RailroadOptionalExpr":return{type:"optional",element:n1(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:n1(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:n1(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),sft=a(e=>({name:e.name,definition:n1(e.definition)}),"transformRule"),aft=a(e=>{Dn(e,Zr),e.title&&Zr.setTitle(e.title),e.rules.map(t=>Zr.addRule(sft(t)))},"populateDb"),gRe={parse:a(e=>{Zr.clear(),H.debug("[Railroad Parser] Starting Langium parse");let t=ift.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new cu(t);let r=t.value;H.debug("[Railroad Parser] Parsed rules:",r.rules.length),aft(r),H.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:Zr}}});var ps,xRe=w(()=>{"use strict";ps={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5}});var oft,lft,cft,bRe,uft,hft,Sn,TRe,Pp,dft,fft,DR,cd,i1=w(()=>{"use strict";Tr();yl();xRe();oft=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,lft=/^[\w "',.-]+$/,cft=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),bRe=a(e=>e?Object.keys(e).every(t=>t==="railroad"||cft.has(t)):!1,"isRailroadStyleOptions"),uft=a(e=>e?"railroad"in e&&e.railroad?e.railroad:bRe(e)?e:{}:{},"extractRailroadOverrides"),hft=a(e=>{if(!e||bRe(e))return{};let{railroad:t,svgId:r,theme:n,look:i,...s}=e;return s},"extractThemeOverrides"),Sn=a((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return oft.test(r)?r:t},"sanitizeColorValue"),TRe=a((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return lft.test(r)?r:t},"sanitizeFontFamilyValue"),Pp=a((e,t)=>{let r=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(r)&&r>=0?r:t},"sanitizeNumberValue"),dft=a(e=>{let t=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),fft=a(e=>{let t=TRe(e.fontFamily,ps.fontFamily),r=dft(e.fontSize)??ps.fontSize;return{...ps,fontFamily:t,fontSize:r,terminalFill:Sn(e.secondBkg??e.secondaryColor,ps.terminalFill),terminalStroke:Sn(e.secondaryBorderColor??e.lineColor,ps.terminalStroke),terminalTextColor:Sn(e.secondaryTextColor??e.textColor,ps.terminalTextColor),nonTerminalFill:Sn(e.mainBkg??e.background,ps.nonTerminalFill),nonTerminalStroke:Sn(e.primaryBorderColor??e.lineColor,ps.nonTerminalStroke),nonTerminalTextColor:Sn(e.primaryTextColor??e.textColor,ps.nonTerminalTextColor),lineColor:Sn(e.lineColor,ps.lineColor),markerFill:Sn(e.lineColor,ps.markerFill),commentFill:Sn(e.labelBackground??e.tertiaryColor,ps.commentFill),commentStroke:Sn(e.tertiaryBorderColor??e.lineColor,ps.commentStroke),commentTextColor:Sn(e.tertiaryTextColor??e.textColor,ps.commentTextColor),specialFill:Sn(e.tertiaryColor??e.secondaryColor,ps.specialFill),specialStroke:Sn(e.tertiaryBorderColor??e.secondaryBorderColor,ps.specialStroke),ruleNameColor:Sn(e.titleColor??e.textColor,ps.ruleNameColor)}},"buildThemeDefaults"),DR=a(e=>{let t=Ct(),r={...Zi(),...t.themeVariables??{},...hft(e)},n=fft(r),i={...t.railroad??{},...uft(e)};return{compactMode:i.compactMode??n.compactMode,padding:Pp(i.padding,n.padding),verticalSeparation:Pp(i.verticalSeparation,n.verticalSeparation),horizontalSeparation:Pp(i.horizontalSeparation,n.horizontalSeparation),arcRadius:Pp(i.arcRadius,n.arcRadius),fontSize:Pp(i.fontSize,n.fontSize),fontFamily:TRe(i.fontFamily,n.fontFamily),terminalFill:Sn(i.terminalFill,n.terminalFill),terminalStroke:Sn(i.terminalStroke,n.terminalStroke),terminalTextColor:Sn(i.terminalTextColor,n.terminalTextColor),nonTerminalFill:Sn(i.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:Sn(i.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:Sn(i.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:Sn(i.lineColor,n.lineColor),strokeWidth:Pp(i.strokeWidth,n.strokeWidth),markerFill:Sn(i.markerFill,n.markerFill),commentFill:Sn(i.commentFill,n.commentFill),commentStroke:Sn(i.commentStroke,n.commentStroke),commentTextColor:Sn(i.commentTextColor,n.commentTextColor),specialFill:Sn(i.specialFill,n.specialFill),specialStroke:Sn(i.specialStroke,n.specialStroke),ruleNameColor:Sn(i.ruleNameColor,n.ruleNameColor),showMarkers:i.showMarkers??n.showMarkers,markerRadius:Pp(i.markerRadius,n.markerRadius)}},"buildRailroadStyleOptions"),cd=a(e=>{let{fontFamily:t,fontSize:r,terminalFill:n,terminalStroke:i,terminalTextColor:s,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:u,lineColor:h,strokeWidth:d,markerFill:f,commentFill:p,commentStroke:m,commentTextColor:g,specialFill:y,specialStroke:x,ruleNameColor:b}=DR(e);return` + .railroad-diagram { + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-terminal rect { + fill: ${n}; + stroke: ${i}; + stroke-width: ${d}px; + } + + .railroad-terminal text { + fill: ${s}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-nonterminal rect { + fill: ${o}; + stroke: ${l}; + stroke-width: ${d}px; + } + + .railroad-nonterminal text { + fill: ${u}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-line { + stroke: ${h}; + stroke-width: ${d}px; + fill: none; + } + + .railroad-start circle, + .railroad-end circle { + fill: ${f}; + } + + .railroad-comment ellipse { + fill: ${p}; + stroke: ${m}; + stroke-width: ${d}px; + } + + .railroad-comment text { + fill: ${g}; + font-style: italic; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-special rect { + fill: ${y}; + stroke: ${x}; + stroke-width: ${d}px; + stroke-dasharray: 5,3; + } + + .railroad-special text { + fill: ${u}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-rule-name { + font-weight: bold; + fill: ${b}; + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-group { + /* Grouping container, no specific styles */ + } +`},"getStyles")});var Da,ZG,CRe,pft,ud,uC=w(()=>{"use strict";bt();Tr();Os();Rn();yc();i1();Da=class{constructor(){this.d=""}static{a(this,"PathBuilder")}moveTo(t,r){return this.d+=`M ${t} ${r} `,this}lineTo(t,r){return this.d+=`L ${t} ${r} `,this}horizontalTo(t){return this.d+=`H ${t} `,this}verticalTo(t){return this.d+=`V ${t} `,this}arcTo(t,r,n,i,s,o,l){return this.d+=`A ${t} ${r} ${n} ${i?1:0} ${s?1:0} ${o} ${l} `,this}build(){return this.d.trim()}},ZG=class{constructor(t,r=DR()){this.textCache=new Map;this.svg=t,this.config=r}static{a(this,"RailroadRenderer")}measureText(t){if(this.textCache.has(t))return this.textCache.get(t);let r=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(t),n=r.node().getBBox(),i={width:n.width,height:n.height};return r.remove(),this.textCache.set(t,i),i}renderTerminal(t,r){let n=this.measureText(r),i=n.width+this.config.padding*2,s=n.height+this.config.padding*2,o=t.append("g").attr("class","railroad-terminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",s).attr("rx",10).attr("ry",10),o.append("text").attr("x",i/2).attr("y",s/2).text(r),{element:o.node(),dimensions:{width:i,height:s,up:s/2,down:s/2}}}renderNonTerminal(t,r){let n=this.measureText(r),i=n.width+this.config.padding*2,s=n.height+this.config.padding*2,o=t.append("g").attr("class","railroad-nonterminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",s),o.append("text").attr("x",i/2).attr("y",s/2).text(r),{element:o.node(),dimensions:{width:i,height:s,up:s/2,down:s/2}}}renderSequence(t,r){let n=r.map(h=>this.renderExpression(t,h)),i=0,s=0,o=0;for(let h of n)i+=h.dimensions.width,s=Math.max(s,h.dimensions.up),o=Math.max(o,h.dimensions.down);i+=(n.length-1)*this.config.horizontalSeparation;let l=t.append("g").attr("class","railroad-sequence"),u=0;for(let h=0;hthis.renderExpression(t,p)),i=0,s=0;for(let p of n)i=Math.max(i,p.dimensions.width),s+=p.dimensions.height;s+=(n.length-1)*this.config.verticalSeparation;let o=this.config.arcRadius,l=o*4,u=i+l,h=t.append("g").attr("class","railroad-choice"),d=0,f=s/2;for(let p of n){let m=d,g=m+p.dimensions.up,y=o*2+(i-p.dimensions.width)/2;h.node().appendChild(p.element).setAttribute("transform",`translate(${y}, ${m})`);let b=new Da,T=g>f;g===f?b.moveTo(0,f).lineTo(y,g):b.moveTo(0,f).arcTo(o,o,0,!1,T,o,f+(T?o:-o)).lineTo(o,g-(T?o:-o)).arcTo(o,o,0,!1,!T,o*2,g).lineTo(y,g),h.append("path").attr("class","railroad-line").attr("d",b.build());let C=new Da,v=y+p.dimensions.width,E=u-o*2;g===f?C.moveTo(v,g).lineTo(u,f):C.moveTo(v,g).lineTo(E,g).arcTo(o,o,0,!1,!T,u-o,g+(T?-o:o)).lineTo(u-o,f+(T?o:-o)).arcTo(o,o,0,!1,T,u,f),h.append("path").attr("class","railroad-line").attr("d",C.build()),d+=p.dimensions.height+this.config.verticalSeparation}return{element:h.node(),dimensions:{width:u,height:s,up:f,down:s-f}}}renderOptional(t,r){let n=this.renderExpression(t,r),i=this.config.arcRadius,s=i*2,o=n.dimensions.width+i*4,l=n.dimensions.height+s,u=t.append("g").attr("class","railroad-optional"),h=i*2,d=s;u.node().appendChild(n.element).setAttribute("transform",`translate(${h}, ${d})`);let p=d+n.dimensions.up,m=new Da().moveTo(0,p).lineTo(i*2,p);u.append("path").attr("class","railroad-line").attr("d",m.build());let g=new Da().moveTo(h+n.dimensions.width,p).lineTo(o,p);u.append("path").attr("class","railroad-line").attr("d",g.build());let y=new Da().moveTo(0,p).arcTo(i,i,0,!1,!1,i,p-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,p-i).arcTo(i,i,0,!1,!1,o,p);return u.append("path").attr("class","railroad-line").attr("d",y.build()),{element:u.node(),dimensions:{width:o,height:l,up:p,down:l-p}}}renderRepetition(t,r,n){let i=this.renderExpression(t,r),s=this.config.arcRadius,o=s*2,l=i.dimensions.width+s*4,u=n===0,h=i.dimensions.height+o+(u?o:0),d=t.append("g").attr("class","railroad-repetition"),f=s*2,p=u?o:0;d.node().appendChild(i.element).setAttribute("transform",`translate(${f}, ${p})`);let g=p+i.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",new Da().moveTo(0,g).lineTo(s*2,g).build()),d.append("path").attr("class","railroad-line").attr("d",new Da().moveTo(f+i.dimensions.width,g).lineTo(l,g).build());let y=p+i.dimensions.height+s,x=new Da().moveTo(f+i.dimensions.width,g).arcTo(s,s,0,!1,!0,f+i.dimensions.width+s,g+s).lineTo(f+i.dimensions.width+s,y).arcTo(s,s,0,!1,!0,f+i.dimensions.width,y+s).lineTo(s*2,y+s).arcTo(s,s,0,!1,!0,s,y).lineTo(s,g+s).arcTo(s,s,0,!1,!0,s*2,g);if(d.append("path").attr("class","railroad-line").attr("d",x.build()),u){let b=new Da().moveTo(0,g).arcTo(s,s,0,!1,!1,s,g-s).lineTo(s,s).arcTo(s,s,0,!1,!0,s*2,0).lineTo(l-s*2,0).arcTo(s,s,0,!1,!0,l-s,s).lineTo(l-s,g-s).arcTo(s,s,0,!1,!1,l,g);d.append("path").attr("class","railroad-line").attr("d",b.build())}return{element:d.node(),dimensions:{width:l,height:h,up:g,down:h-g}}}renderSpecial(t,r){let n=this.measureText("? "+r+" ?"),i=n.width+this.config.padding*2,s=n.height+this.config.padding*2,o=t.append("g").attr("class","railroad-special");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",s),o.append("text").attr("x",i/2).attr("y",s/2).text("? "+r+" ?"),{element:o.node(),dimensions:{width:i,height:s,up:s/2,down:s/2}}}renderExpression(t,r){switch(r.type){case"terminal":return this.renderTerminal(t,r.value);case"nonterminal":return this.renderNonTerminal(t,r.name);case"sequence":return this.renderSequence(t,r.elements);case"choice":return this.renderChoice(t,r.alternatives);case"optional":return this.renderOptional(t,r.element);case"repetition":return this.renderRepetition(t,r.element,r.min);case"special":return this.renderSpecial(t,r.text);default:throw new Error(`Unknown node type: ${r.type}`)}}renderRule(t,r){let n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${r})`),i=t.name+" =",s=this.measureText(i).width+20,o=s+20,l=n.append("g"),u=this.renderExpression(l,t.definition),h=Math.max(20,u.dimensions.up),d=h-u.dimensions.up;return l.attr("transform",`translate(${o}, ${d})`),n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",h).text(i),n.append("g").attr("class","railroad-start").append("circle").attr("cx",s).attr("cy",h).attr("r",this.config.markerRadius),n.append("g").attr("class","railroad-end").append("circle").attr("cx",o+u.dimensions.width+10).attr("cy",h).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",new Da().moveTo(s+this.config.markerRadius,h).lineTo(o,h).build()),n.append("path").attr("class","railroad-line").attr("d",new Da().moveTo(o+u.dimensions.width,h).lineTo(o+u.dimensions.width+10-this.config.markerRadius,h).build()),{height:Math.max(40,d+u.dimensions.height+this.config.padding*2),width:o+u.dimensions.width+10+this.config.markerRadius}}renderDiagram(t){let r=this.config.padding,n=0;for(let i of t){let s=this.renderRule(i,r);r+=s.height+this.config.verticalSeparation,n=Math.max(n,s.width)}return{width:n+this.config.padding*2,height:r+this.config.padding}}},CRe=a((e,t,r)=>{Dr(e,t.height,t.width,r),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),pft=a((e,t,r)=>{H.debug(`[Railroad] Rendering diagram +`+e);try{let n=gn(t);n.attr("class","railroad-diagram");let s=Ct().railroad?.useMaxWidth??!0,o=Zr.getRules();if(H.debug(`[Railroad] Rendering ${o.length} rules`),o.length===0){H.warn("[Railroad] No rules to render"),CRe(n,{height:100,width:200},s);return}let u=new ZG(n,DR()).renderDiagram(o);CRe(n,u,s),H.debug("[Railroad] Render complete")}catch(n){throw H.error("[Railroad] Render error:",n),n}},"draw"),ud={draw:pft}});var SRe={};ir(SRe,{default:()=>mft,diagram:()=>kRe});var kRe,mft,ERe=w(()=>{"use strict";yRe();yc();uC();i1();kRe={parser:gRe,db:Zr,renderer:ud,styles:cd},mft=kRe});var xft,NR,bft,_Re,Tft,Cft,kft,Sft,ARe,RRe=w(()=>{"use strict";Ms();bt();va();yc();xft=ay().RailroadEbnf.parser.LangiumParser,NR=a(e=>{let t=e.alternatives.map(bft);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformChoice"),bft=a(e=>{let t=e.elements.map(Cft);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),_Re=a(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return NR(e.element);case"EbnfOptional":return{type:"optional",element:NR(e.element)};case"EbnfRepetition":return{type:"repetition",element:NR(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),Tft=a((e,t)=>{switch(t.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},_Re(t.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${t.$type}`)}},"transformPostfix"),Cft=a(e=>e.postfixes.reduce((t,r)=>Tft(t,r),_Re(e.base)),"transformTerm"),kft=a(e=>({name:e.name,definition:NR(e.definition)}),"transformRule"),Sft=a(e=>{Dn(e,Zr),e.title&&Zr.setTitle(e.title),e.rules.map(t=>Zr.addRule(kft(t)))},"populateDb"),ARe={parse:a(e=>{Zr.clear(),H.debug("[EBNF Parser] Starting Langium parse");let t=xft.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new cu(t);let r=t.value;H.debug("[EBNF Parser] Parsed rules:",r.rules.length),Sft(r),H.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:Zr}}});var LRe={};ir(LRe,{diagram:()=>Eft});var Eft,IRe=w(()=>{"use strict";RRe();yc();uC();i1();Eft={parser:ARe,db:Zr,renderer:ud,styles:cd}});var _ft,JG,Aft,Rft,Lft,Ift,Dft,Nft,MRe,ORe=w(()=>{"use strict";Ms();bt();va();yc();_ft=oy().RailroadAbnf.parser.LangiumParser,JG=a(e=>{let t=e.alternatives.map(Aft);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformAlternation"),Aft=a(e=>{let t=e.elements.map(Lft);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformConcatenation"),Rft=a(e=>{if(e.includes("*")){let[r,n]=e.split("*"),i=r?parseInt(r,10):0,s=n?parseInt(n,10):1/0;return{min:i,max:s}}let t=parseInt(e,10);return{min:t,max:t}},"parseRepeat"),Lft=a(e=>{let t=Ift(e.primary);if(!e.repeat)return t;let{min:r,max:n}=Rft(e.repeat);return r===0&&n===1?{type:"optional",element:t}:{type:"repetition",element:t,min:r,max:n}},"transformElement"),Ift=a(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return JG(e.element);case"AbnfOptionalGroup":return{type:"optional",element:JG(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),Dft=a(e=>({name:e.name,definition:JG(e.definition)}),"transformRule"),Nft=a(e=>{Dn(e,Zr),e.title&&Zr.setTitle(e.title),e.rules.map(t=>Zr.addRule(Dft(t)))},"populateDb"),MRe={parse:a(e=>{Zr.clear(),H.debug("[ABNF Parser] Starting Langium parse");let t=_ft.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new cu(t);let r=t.value;H.debug("[ABNF Parser] Parsed rules:",r.rules.length),Nft(r),H.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:Zr}}});var PRe={};ir(PRe,{diagram:()=>Mft});var Mft,BRe=w(()=>{"use strict";ORe();yc();uC();i1();Mft={parser:MRe,db:Zr,renderer:ud,styles:cd}});var Bft,VRe,$ft,Fft,GRe,Gft,Vft,zft,Uft,zRe,URe=w(()=>{"use strict";Ms();bt();va();yc();Bft=ly().RailroadPeg.parser.LangiumParser,VRe=a(e=>{let t=e.alternatives.map($ft);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformOrderedChoice"),$ft=a(e=>{let t=e.elements.map(Fft);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),Fft=a(e=>{let t=Gft(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${GRe(t)}`:`!${GRe(t)}`}:t},"transformPrefix"),GRe=a(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),Gft=a(e=>{let t=Vft(e.primary);if(!e.operator)return t;switch(e.operator){case"?":return{type:"optional",element:t};case"*":return{type:"repetition",element:t,min:0,max:1/0};case"+":return{type:"repetition",element:t,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),Vft=a(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return VRe(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),zft=a(e=>({name:e.name,definition:VRe(e.definition)}),"transformRule"),Uft=a(e=>{Dn(e,Zr),e.title&&Zr.setTitle(e.title),e.rules.map(t=>Zr.addRule(zft(t)))},"populateDb"),zRe={parse:a(e=>{Zr.clear(),H.debug("[PEG Parser] Starting Langium parse");let t=Bft.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new cu(t);let r=t.value;H.debug("[PEG Parser] Parsed rules:",r.rules.length),Uft(r),H.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:Zr}}});var WRe={};ir(WRe,{diagram:()=>Wft});var Wft,jRe=w(()=>{"use strict";URe();yc();uC();i1();Wft={parser:zRe,db:Zr,renderer:ud,styles:cd}});var Mpt={};ir(Mpt,{default:()=>Npt});Sc();PL();Nu();var i6e=a(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),s6e=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(jJ(),WJ));return{id:"c4",diagram:e}},"loader"),a6e={id:"c4",detector:i6e,loader:s6e},qJ=a6e;var jue="flowchart-v2",_je=a(e=>/^\s*(graph|flowchart)/.test(e),"detector"),Aje=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(S5(),Wue));return{id:jue,diagram:e}},"loader"),Rje={id:jue,detector:_je,loader:Aje},que=Rje;var hhe="agentflow",Uje=a(e=>/^\s*agentflow-beta\b/.test(e),"detector"),Wje=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uhe(),che));return{id:hhe,diagram:e}},"loader"),jje={id:hhe,detector:Uje,loader:Wje},dhe=jje;var yhe="swimlane",Yje=a(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Kje=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ghe(),mhe));return{id:yhe,diagram:e}},"loader"),Xje={id:yhe,detector:Yje,loader:Kje},xhe=Xje;var tqe=a(e=>/^\s*erDiagram/.test(e),"detector"),rqe=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_he(),whe));return{id:"er",diagram:e}},"loader"),nqe={id:"er",detector:tqe,loader:rqe},Ahe=nqe;var Tbe="gitGraph",Uet=a(e=>/^\s*gitGraph/.test(e),"detector"),Wet=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bbe(),xbe));return{id:Tbe,diagram:e}},"loader"),jet={id:Tbe,detector:Uet,loader:Wet},Cbe=jet;var tTe="gantt",Ntt=a(e=>/^\s*gantt/.test(e),"detector"),Mtt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(eTe(),Jbe));return{id:tTe,diagram:e}},"loader"),Ott={id:tTe,detector:Ntt,loader:Mtt},rTe=Ott;var hTe="info",Gtt=a(e=>/^\s*info/.test(e),"detector"),Vtt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uTe(),cTe));return{id:hTe,diagram:e}},"loader"),dTe={id:hTe,detector:Gtt,loader:Vtt};var ert=a(e=>/^\s*pie/.test(e),"detector"),trt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CTe(),TTe));return{id:"pie",diagram:e}},"loader"),kTe={id:"pie",detector:ert,loader:trt};var OTe="quadrantChart",xrt=a(e=>/^\s*quadrantChart/.test(e),"detector"),brt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(MTe(),NTe));return{id:OTe,diagram:e}},"loader"),Trt={id:OTe,detector:xrt,loader:brt},PTe=Trt;var dCe="xychart",Grt=a(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Vrt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(hCe(),uCe));return{id:dCe,diagram:e}},"loader"),zrt={id:dCe,detector:Grt,loader:Vrt},fCe=zrt;var kCe="requirement",Hrt=a(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Yrt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CCe(),TCe));return{id:kCe,diagram:e}},"loader"),Krt={id:kCe,detector:Hrt,loader:Yrt},SCe=Krt;var qCe="sequence",qnt=a(e=>/^\s*sequenceDiagram/.test(e),"detector"),Hnt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(jCe(),WCe));return{id:qCe,diagram:e}},"loader"),Ynt={id:qCe,detector:qnt,loader:Hnt},HCe=Ynt;var ake="classDiagram",tit=a(e=>/^\s*classDiagram/.test(e),"detector"),rit=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ske(),ike));return{id:ake,diagram:e}},"loader"),nit={id:ake,detector:tit,loader:rit},oke=nit;var $ke="stateDiagram",bit=a(e=>/^\s*stateDiagram/.test(e),"detector"),Tit=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Bke(),Pke));return{id:$ke,diagram:e}},"loader"),Cit={id:$ke,detector:bit,loader:Tit},Fke=Cit;var e2e="journey",zit=a(e=>/^\s*journey/.test(e),"detector"),Uit=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Jke(),Zke));return{id:e2e,diagram:e}},"loader"),Wit={id:e2e,detector:zit,loader:Uit},t2e=Wit;bt();Os();Rn();var oA=4,bT=75,jit=a(e=>{let t=[];for(let i of e.split(/\s+/)){let s=[...i];for(;s.length>bT;)t.push(s.slice(0,bT).join("")),s=s.slice(bT);s.length>0&&t.push(s.join(""))}let r=[],n="";for(let i of t){let s=n?`${n} ${i}`:i;[...s].length>bT?(r.push(n),n=i):n=s}if(n&&r.push(n),r.length>oA){r.length=oA;let i=r[oA-1]??"";r[oA-1]=`${[...i].slice(0,bT-3).join("")}...`}return r},"wrapErrorMessage"),qit=a((e,t,r,n)=>{H.debug(`rendering svg for syntax error +`);let i=gn(t),s=i.append("g"),o=jit(n?.db.getErrorMessage?.()??""),l=o.length>0?500+o.length*56:512;i.attr("viewBox",`0 0 2412 ${l}`),Dr(i,100,l,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),o.forEach((u,h)=>{s.append("text").attr("class","error-text").attr("x",1440).attr("y",510+h*56).attr("font-size","42px").style("text-anchor","middle").text(u)})},"draw"),iF={draw:qit},r2e=iF;var sF,Hit={clear(){sF=void 0},setErrorMessage(e){sF=e},getErrorMessage(){return sF}},Yit={db:Hit,renderer:iF,parser:{parse:a(()=>{},"parse")}},n2e=Yit;var $2e="timeline",bst=a(e=>/^\s*timeline/.test(e),"detector"),Tst=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(B2e(),P2e));return{id:$2e,diagram:e}},"loader"),Cst={id:$2e,detector:bst,loader:Tst},F2e=Cst;var Q2e="kanban",Bst=a(e=>/^\s*kanban/.test(e),"detector"),$st=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(X2e(),K2e));return{id:Q2e,diagram:e}},"loader"),Fst={id:Q2e,detector:Bst,loader:$st},Z2e=Fst;var NSe="sankey",cat=a(e=>/^\s*sankey(-beta)?/.test(e),"detector"),uat=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(DSe(),ISe));return{id:NSe,diagram:e}},"loader"),hat={id:NSe,detector:cat,loader:uat},MSe=hat;var zSe="packet",Tat=a(e=>/^\s*packet(-beta)?/.test(e),"detector"),Cat=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(VSe(),GSe));return{id:zSe,diagram:e}},"loader"),USe={id:zSe,detector:Tat,loader:Cat};var eEe="radar",Uat=a(e=>/^\s*radar-beta/.test(e),"detector"),Wat=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(JSe(),ZSe));return{id:eEe,diagram:e}},"loader"),tEe={id:eEe,detector:Uat,loader:Wat};var AEe="block",Eot=a(e=>/^\s*block(-beta)?/.test(e),"detector"),vot=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Ee(),wEe));return{id:AEe,diagram:e}},"loader"),wot={id:AEe,detector:Eot,loader:vot},REe=wot;var KEe="treeView",Xot=a(e=>/^\s*treeView-beta/.test(e),"detector"),Qot=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(YEe(),HEe));return{id:KEe,diagram:e}},"loader"),Zot={id:KEe,detector:Xot,loader:Qot},XEe=Zot;var cve="eventmodeling",Plt=a(e=>/^\s*eventmodeling/.test(e),"detector"),Blt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(lve(),ove));return{id:cve,diagram:e}},"loader"),$lt={id:cve,detector:Plt,loader:Blt},uve=$lt;var _ve="ishikawa",Qlt=a(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Zlt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(wve(),vve));return{id:_ve,diagram:e}},"loader"),Ave={id:_ve,detector:Qlt,loader:Zlt};var iwe="venn",Pct=a(e=>/^\s*venn-beta/.test(e),"detector"),Bct=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(nwe(),rwe));return{id:iwe,diagram:e}},"loader"),$ct={id:iwe,detector:Pct,loader:Bct},swe=$ct;Nu();Gt();var mwe="treemap",Hct=a(e=>/^\s*treemap/.test(e),"detector"),Yct=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(pwe(),fwe));return{id:mwe,diagram:e}},"loader"),gwe={id:mwe,detector:Hct,loader:Yct};var OAe="usecase",ndt=a(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),idt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(MAe(),NAe));return{id:OAe,diagram:e}},"loader"),PAe={id:OAe,detector:ndt,loader:idt};var YAe="wardley",Rdt=a(e=>/^\s*wardley-beta/i.test(e),"detector"),Ldt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(HAe(),qAe));return{id:YAe,diagram:e}},"loader"),Idt={id:YAe,detector:Rdt,loader:Ldt},KAe=Idt;var dRe="cynefin",qdt=a(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Hdt=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(hRe(),uRe));return{id:dRe,diagram:e}},"loader"),fRe={id:dRe,detector:qdt,loader:Hdt};var vRe="railroad",gft=a(e=>/^\s*railroad-beta/i.test(e),"detector"),yft=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ERe(),SRe));return{id:vRe,diagram:e}},"loader"),wRe={id:vRe,detector:gft,loader:yft};var DRe="railroadEbnf",vft=a(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),wft=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(IRe(),LRe));return{id:DRe,diagram:e}},"loader"),NRe={id:DRe,detector:vft,loader:wft};var $Re="railroadAbnf",Oft=a(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Pft=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(BRe(),PRe));return{id:$Re,diagram:e}},"loader"),FRe={id:$Re,detector:Oft,loader:Pft};var qRe="railroadPeg",jft=a(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),qft=a(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(jRe(),WRe));return{id:qRe,diagram:e}},"loader"),HRe={id:qRe,detector:jft,loader:qft};var YRe=!1,s1=a(()=>{YRe||(YRe=!0,bd("error",n2e,e=>e.toLowerCase().trim()==="error"),bd("---",{db:{clear:a(()=>{},"clear")},styles:{},renderer:{draw:a(()=>{},"draw")},parser:{parse:a(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:a(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),FC(dhe,qJ,Z2e,oke,Ahe,rTe,dTe,kTe,SCe,HCe,xhe,que,F2e,Cbe,Fke,t2e,PTe,MSe,USe,fCe,REe,uve,XEe,tEe,Ave,gwe,wRe,NRe,FRe,HRe,swe,KAe,fRe,PAe))},"addDiagrams");bt();Nu();Gt();var KRe=a(async()=>{H.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(Ec).map(async([r,{detector:n,loader:i}])=>{if(i)try{A1(r)}catch{try{let{diagram:s,id:o}=await i();bd(o,s,n)}catch(s){throw H.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ec[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){H.error(`Failed to load ${t.length} external diagrams`);for(let r of t)H.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");bt();Lr();var a1="comm",MR="rule",OR="decl";var XRe="@media",QRe="@import";var ZRe="@supports";var JRe="@namespace",hC="@keyframes";var PR="@layer",eLe="@scope";var eV=Math.abs,dC=String.fromCharCode;function BR(e){return e.trim()}a(BR,"trim");function o1(e,t,r){return e.replace(t,r)}a(o1,"replace");function tLe(e,t,r){return e.indexOf(t,r)}a(tLe,"indexof");function Su(e,t){return e.charCodeAt(t)|0}a(Su,"charat");function Eu(e,t,r){return e.slice(t,r)}a(Eu,"substr");function Na(e){return e.length}a(Na,"strlen");function $R(e){return e.length}a($R,"sizeof");function l1(e,t){return t.push(e),e}a(l1,"append");var FR=1,c1=1,rLe=0,Ao=0,Bi=0,h1="";function GR(e,t,r,n,i,s,o,l){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:FR,column:c1,length:o,return:"",siblings:l}}a(GR,"node");function nLe(){return Bi}a(nLe,"char");function iLe(){return Bi=Ao>0?Su(h1,--Ao):0,c1--,Bi===10&&(c1=1,FR--),Bi}a(iLe,"prev");function Ro(){return Bi=Ao2||u1(Bi)>3?"":" "}a(oLe,"whitespace");function lLe(e,t){for(;--t&&Ro()&&!(Bi<48||Bi>102||Bi>57&&Bi<65||Bi>70&&Bi<97););return VR(e,fC()+(t<6&&vu()==32&&Ro()==32))}a(lLe,"escaping");function tV(e){for(;Ro();)switch(Bi){case e:return Ao;case 34:case 39:e!==34&&e!==39&&tV(Bi);break;case 40:e===41&&tV(e);break;case 92:Ro();break}return Ao}a(tV,"delimiter");function cLe(e,t){for(;Ro()&&e+Bi!==57;)if(e+Bi===84&&vu()===47)break;return"/*"+VR(t,Ao-1)+"*"+dC(e===47?e:Ro())}a(cLe,"commenter");function uLe(e){for(;!u1(vu());)Ro();return VR(e,Ao)}a(uLe,"identifier");function fLe(e){return aLe(UR("",null,null,null,[""],e=sLe(e),0,[0],e))}a(fLe,"compile");function UR(e,t,r,n,i,s,o,l,u){for(var h=0,d=0,f=o,p=0,m=0,g=0,y=1,x=1,b=1,T=0,C="",v=i,E=s,S=n,_=C;x;)switch(g=T,T=Ro()){case 40:if(g!=108&&Su(_,f-1)==58){tLe(_+=o1(zR(T),"&","&\f"),"&\f",eV(h?l[h-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:_+=zR(T);break;case 9:case 10:case 13:case 32:_+=oLe(g);break;case 92:_+=lLe(fC()-1,7);continue;case 47:switch(vu()){case 42:case 47:l1(Yft(cLe(Ro(),fC()),t,r,u),u),(u1(g||1)==5||u1(vu()||1)==5)&&Na(_)&&Eu(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/"}break;case 123*y:l[h++]=Na(_)*b;case 125*y:case 59:case 0:switch(T){case 0:case 125:x=0;case 59+d:b==-1&&(_=o1(_,/\f/g,"")),m>0&&(Na(_)-f||y===0&&g===47)&&l1(m>32?dLe(_+";",n,r,f-1,u):dLe(o1(_," ","")+";",n,r,f-2,u),u);break;case 59:_+=";";default:if(l1(S=hLe(_,t,r,h,d,i,l,C,v=[],E=[],f,s),s),T===123)if(d===0)UR(_,t,S,S,v,s,f,l,E);else{switch(p){case 99:if(Su(_,3)===110)break;case 108:if(Su(_,2)===97)break;default:d=0;case 100:case 109:case 115:}d?UR(e,S,S,n&&l1(hLe(e,S,S,0,0,i,l,C,i,v=[],f,E),E),i,E,f,l,n?v:E):UR(_,S,S,S,[""],E,0,l,E)}}h=d=m=0,y=b=1,C=_="",f=o;break;case 58:f=1+Na(_),m=g;default:if(y<1){if(T==123)--y;else if(T==125&&y++==0&&iLe()==125)continue}switch(_+=dC(T),T*y){case 38:b=d>0?1:(_+="\f",-1);break;case 44:l[h++]=(Na(_)-1)*b,b=1;break;case 64:vu()===45&&(_+=zR(Ro())),p=vu(),d=f=Na(C=_+=uLe(fC())),T++;break;case 45:g===45&&Na(_)==2&&(y=0)}}return s}a(UR,"parse");function hLe(e,t,r,n,i,s,o,l,u,h,d,f){for(var p=i-1,m=i===0?s:[""],g=$R(m),y=0,x=0,b=0;y0?m[T]+" "+C:o1(C,/&\f/g,m[T])))&&(u[b++]=v);return GR(e,t,r,i===0?MR:l,u,h,d,f)}a(hLe,"ruleset");function Yft(e,t,r,n){return GR(e,t,r,a1,dC(nLe()),Eu(e,2,-2),0,n)}a(Yft,"comment");function dLe(e,t,r,n,i){return GR(e,t,r,OR,Eu(e,0,n),Eu(e,n+1,-1),n,i)}a(dLe,"declaration");function WR(e,t){for(var r="",n=0;np?H.warn(`Comment-preserving source exceeds maxTextSize (${n.withComments.length} > ${p}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):d=n.withComments}let f=sK(d)+` +`;return n.frontmatterLineOffset&&o.setFrontmatterLineOffset?.(n.frontmatterLineOffset),await l.parse(f),new e(s,f,o,l,u)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}};Ir();var xLe=[];var bLe=a(()=>{xLe.forEach(e=>{e()}),xLe=[]},"attachFunctions");bt();wm();var TLe=a(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");$C();Im();function CLe(e){let t=BC(e);if(!t)return{text:e,metadata:{}};let r=t.indent,n=r?t.body.split(` +`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(` +`):t.body,i=Qo(n,{schema:Xo})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};let s={};return i.displayMode&&(s.displayMode=i.displayMode.toString()),i.title&&(s.title=i.title.toString()),i.config&&(s.config=i.config),{text:e.slice(t.length),metadata:s}}a(CLe,"extractFrontMatter");jt();var Xft=a(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Qft=a(e=>{let{text:t,metadata:r}=CLe(e),{displayMode:n,title:i,config:s={}}=r;return n&&(s.gantt||(s.gantt={}),s.gantt.displayMode=n),{title:i,config:s,text:t}},"processFrontmatter"),Zft=a(e=>{let t=Xt.detectInit(e)??{},r=Xt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:rK(e),directive:t}},"processDirectives");function rV(e){let t=e,r=Xft(e),n=Qft(r),i=Zft(n.text),s=Nr(n.config,i.directive),o=i.text,l=TLe(o),u=r.length>n.text.length?(r.substring(0,r.length-n.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:l,withComments:o,frontmatterLineOffset:u},title:n.title,config:s}}a(rV,"preprocessDiagram");VL();wC();jt();function kLe(e){let t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}a(kLe,"toBase64");_C();var Jft=5e4,ept="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",tpt="sandbox",rpt="loose",npt="http://www.w3.org/2000/svg",ipt="http://www.w3.org/1999/xlink",spt="http://www.w3.org/1999/xhtml",apt="100%",opt="100%",lpt="border:0;margin:0;",cpt="margin:0",upt="allow-top-navigation-by-user-activation allow-popups",hpt='The "iframe" tag is not supported by your browser.',dpt=["foreignobject"],fpt=["dominant-baseline"];function wLe(e){let t=rV(e);T1();let r;try{r=Du(t.code.cleaned,Ct())}catch{r=void 0}return RC(r),Dz(t.config??{}),t}a(wLe,"processAndSetConfigs");async function ppt(e,t){s1();try{let{code:r,config:n}=wLe(e);return{diagramType:(await Bp.fromText(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}finally{RC(void 0)}}a(ppt,"parse");var SLe=a((e,t,r=[])=>{let n=kL(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${n}`},"cssImportantStyles"),mpt=a((e,t=new Map)=>{let r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){let l=vn(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(u=>{_2(u.styles)||l.forEach(h=>{r.insertRule(SLe(u.id,h,u.styles),r.cssRules.length)}),_2(u.textStyles)||r.insertRule(SLe(u.id,"tspan",(u?.textStyles||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let n="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){let i=new CSSStyleSheet;i.replaceSync(e.themeCSS),n=GL(i)+` +`}else n+=`${e.themeCSS} +`;return n+GL(r)},"createCssStyles"),gpt=a((e,t)=>WR(fLe(`${e}{${t}}`),mLe([a(function(n,i,s,o){if(n.type==="rule"&&Array.isArray(n.props)){if(n.parent&&n.parent.type===hC)return;n.props=n.props.map(l=>l===e&&Array.isArray(n.children)&&n.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(l.startsWith(`${e} `)||l.startsWith(`${e}>`))&&!l.startsWith(`${e} ||`)?l:`${e} ${l}`)}else n.type.startsWith("@")&&([...[XRe,ZRe,PR,eLe,"@container","@starting-style"],hC].includes(n.type)||(H.warn(`Removing unsupported at-rule ${n.type} from CSS`),n.type=a1))},"addNamespace"),pLe])),"compileCSS"),ypt=a((e,t,r,n)=>{let i=mpt(e,r),s=oU(t,i,{...e.themeVariables,theme:e.theme,look:e.look},n);return gpt(n,s)},"createUserStyles"),xpt=a((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=aa(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),bpt=a((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":opt,n=kLe(`${e}`);return``},"putIntoIFrame"),ELe=a((e,t,r,n,i)=>{let s=e.append("div");s.attr("id",r),n&&s.attr("style",n);let o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",npt);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function vLe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}a(vLe,"sandboxedIframe");var Tpt=a((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),Cpt=a(async function(e,t,r){s1();let n=wLe(t),i=n.code;t=i.cleaned;let s=Ct();H.debug(s),t.length>(s?.maxTextSize??Jft)&&(t=ept,i={raw:t,cleaned:t});let o=`#${e}`,l="i"+e,u="#"+l,h="d"+e,d="#"+h,f=a(()=>{let N=st(m?u:d).node();N&&"remove"in N&&N.remove()},"removeTempElements"),p=st(document.body),m=s.securityLevel===tpt,g=s.securityLevel===rpt,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),m){let F=vLe(st(r),l);p=st(F.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=st(r);ELe(p,e,h,`font-family: ${y}`,ipt)}else{if(Tpt(document,e,h,l),m){let F=vLe(st(document.body),l);p=st(F.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=st("body");ELe(p,e,h)}let x,b;try{x=await Bp.fromText(i,{title:n.title})}catch(F){if(s.suppressErrorRendering)throw f(),F;x=await Bp.fromText("error"),b=F,x.db.setErrorMessage?.(iK(F))}let T=p.select(d).node(),C=x.type,v=T.firstChild,E=v.firstChild,S=x.renderer.getClasses?.(t,x),_=ypt(s,C,S,o),A=document.createElement("style");A.innerHTML=_,v.insertBefore(A,E);try{await x.renderer.draw(t,e,"12.2.0",x)}catch(F){throw s.suppressErrorRendering?f():r2e.draw(t,e,"12.2.0"),F}let B=p.select(`${d} svg`),$=x.db.getAccTitle?.(),O=x.db.getAccDescription?.();vpt(C,B,$,O);let I=a(()=>{p.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",spt);let F=p.select(d).node().innerHTML;if(H.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),F=xpt(F,m,Ji(s.arrowMarkerAbsolute)),m){let N=p.select(d+" svg").node();F=bpt(F,N)}else g||(F=Es.sanitize(F,{ADD_TAGS:dpt,ADD_ATTR:fpt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return bLe(),F},"serializeSvg")();if(b)throw b;return f(),{diagramType:C,svg:I,bindFunctions:x.db.bindFunctions}},"renderDiagram"),kpt=a(async function(e,t,r){try{return await Cpt(e,t,r)}finally{RC(void 0)}},"render");function Spt(e={}){let t=Pn({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Rz(t);let r=xl.theme;t?.theme&&Object.hasOwn(no,t.theme)?t.themeVariables=no[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=no[r].getThemeVariables(t.themeVariables));let n=typeof t=="object"?SL(t):EL();f1(n.logLevel),s1()}a(Spt,"initialize");var Ept=a((e,t={})=>{let{code:r}=rV(e);return Bp.fromText(r,t)},"getDiagramFromText");function vpt(e,t,r,n){gLe(t,e),yLe(t,r,n,t.attr("id"))}a(vpt,"addA11yInfo");var hd=Object.freeze({render:kpt,parse:ppt,getDiagramFromText:Ept,initialize:Spt,getConfig:Ct,setConfig:LC,getSiteConfig:EL,updateSiteConfig:Lz,reset:a(()=>{T1()},"reset"),globalReset:a(()=>{T1(xl)},"globalReset"),defaultConfig:xl});f1(Ct().logLevel);T1(Ct());Yc();jt();var wpt=a((e,t,r)=>{H.warn(e),$N(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),_Le=a(async function(e={querySelector:".mermaid"}){try{await _pt(e)}catch(t){if($N(t)&&H.error(t.str),wu.parseError&&wu.parseError(t),!e.suppressErrors)throw H.error("Use the suppressErrors option to suppress these errors"),t}},"run"),_pt=a(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=hd.getConfig();H.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");H.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(H.debug("Start On Load: "+n?.startOnLoad),hd.updateSiteConfig({startOnLoad:n?.startOnLoad}));let s=new Xt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){H.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${s.next()}`;o=u.innerHTML,o=MC(Xt.entityDecode(o)).trim().replace(//gi,"
    ");let d=Xt.detectInit(o);d&&H.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await ILe(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){wpt(f,l,wu.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),ALe=a(function(e){hd.initialize(e)},"initialize"),Apt=a(async function(e,t,r){H.warn("mermaid.init is deprecated. Please use run instead."),e&&ALe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await _Le(n)},"init"),Rpt=a(async(e,{lazyLoad:t=!0}={})=>{s1(),FC(...e),t===!1&&await KRe()},"registerExternalDiagrams"),RLe=a(function(){if(wu.startOnLoad){let{startOnLoad:e}=hd.getConfig();e&&wu.run().catch(t=>H.error("Mermaid failed to initialize",t))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",RLe,!1)}var Lpt=a(function(e){wu.parseError=e},"setParseErrorHandler"),jR=[],nV=!1,LLe=a(async()=>{if(!nV){for(nV=!0;jR.length>0;){let e=jR.shift();if(e)try{await e()}catch(t){H.error("Error executing queue",t)}}nV=!1}},"executeQueue"),Ipt=a(async(e,t)=>new Promise((r,n)=>{let i=a(()=>new Promise((s,o)=>{hd.parse(e,t).then(l=>{s(l),r(l)},l=>{H.error("Error parsing",l),wu.parseError?.(l),o(l),n(l)})}),"performCall");jR.push(i),LLe().catch(n)}),"parse"),ILe=a((e,t,r)=>new Promise((n,i)=>{let s=a(()=>new Promise((o,l)=>{hd.render(e,t,r).then(u=>{o(u),n(u)},u=>{H.error("Error parsing",u),wu.parseError?.(u),l(u),i(u)})}),"performCall");jR.push(s),LLe().catch(i)}),"render"),Dpt=a(()=>Object.keys(Ec).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),wu={startOnLoad:!0,mermaidAPI:hd,parse:Ipt,render:ILe,init:Apt,run:_Le,registerExternalDiagrams:Rpt,registerLayoutLoaders:b5,initialize:ALe,parseError:void 0,contentLoaded:RLe,setParseErrorHandler:Lpt,detectType:Du,registerIconPacks:DC,getRegisteredDiagramsMetadata:Dpt},Npt=wu;return BLe(Mpt);})(); +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ +/*! Bundled license information: + +dompurify/dist/purify.es.mjs: + (*! @license DOMPurify 3.4.12 | (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.12/LICENSE *) + +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 + *) +*/ +globalThis["mermaid"] = globalThis.__esbuild_esm_mermaid_nm["mermaid"].default; diff --git a/ios/SourceBraid/Resources/Mermaid/sourcebraid-mermaid.js b/ios/SourceBraid/Resources/Mermaid/sourcebraid-mermaid.js new file mode 100644 index 0000000..656211d --- /dev/null +++ b/ios/SourceBraid/Resources/Mermaid/sourcebraid-mermaid.js @@ -0,0 +1,113 @@ +/* SourceBraid's offline Mermaid adapter. This file is app-owned, not archive content. */ +(() => { + "use strict"; + const german = document.documentElement.lang === "de"; + const message = { + error: german + ? "Dieses Mermaid-Diagramm kann nicht dargestellt werden. Der originale Quelltext bleibt verfügbar." + : "This Mermaid diagram could not be rendered. Its original source remains available.", + limit: german + ? "Dieses Diagramm überschreitet die Vorschaugrenze. Der originale Quelltext bleibt verfügbar." + : "This diagram exceeds the preview limit. Its original source remains available.", + ready: german ? "Auf diesem Gerät dargestellt." : "Rendered on this device." + }; + const media = matchMedia("(prefers-color-scheme: dark)"); + let running; + let sequence = 0; + + function initialize() { + mermaid.initialize({ + startOnLoad: false, + securityLevel: "strict", + suppressErrorRendering: true, + maxTextSize: 20000, + maxEdges: 200, + logLevel: "fatal", + theme: media.matches ? "dark" : "default", + fontFamily: "-apple-system, BlinkMacSystemFont, sans-serif", + htmlLabels: false, + flowchart: { htmlLabels: false, useMaxWidth: true }, + // Archive config/directives must never lower the app's security boundaries. + secure: ["secure", "securityLevel", "startOnLoad", "maxTextSize", "maxEdges", + "suppressErrorRendering", "htmlLabels", "flowchart", "fontFamily", + "themeCSS", "dompurifyConfig"] + }); + mermaid.parseError = () => {}; + } + + function safeSVG(markup) { + const parsed = new DOMParser().parseFromString(markup, "image/svg+xml"); + const svg = parsed.documentElement; + if (svg.localName !== "svg" || parsed.querySelector("parsererror")) throw new Error("Invalid SVG"); + // Mermaid strict mode sanitizes its output. Enforce our own smaller image-only + // boundary as well: no HTML labels, navigation, embedded/external media or scripts. + svg.querySelectorAll("script, foreignObject, iframe, object, embed, image, video, audio").forEach(node => node.remove()); + svg.querySelectorAll("a").forEach(node => node.replaceWith(...node.childNodes)); + for (const node of [svg, ...svg.querySelectorAll("*")]) { + for (const attribute of [...node.attributes]) { + const name = attribute.name.toLowerCase(); + const value = attribute.value.trim(); + if (name.startsWith("on") || + ((name === "href" || name === "xlink:href") && !value.startsWith("#"))) { + node.removeAttribute(attribute.name); + } + } + } + return document.importNode(svg, true); + } + + async function render(force) { + initialize(); + let total = 0; + let rendered = 0; + const figures = [...document.querySelectorAll("figure[data-mermaid]")]; + for (let index = 0; index < figures.length; index++) { + const figure = figures[index]; + if (!force && figure.dataset.mermaidRendered === "true") continue; + const preview = figure.querySelector(".mermaid-preview"); + const status = figure.querySelector(".mermaid-status"); + const details = figure.querySelector("details"); + const source = figure.querySelector("code").textContent; + total += source.length; + preview.replaceChildren(); + preview.hidden = true; + details.open = true; + figure.dataset.mermaidRendered = "false"; + if (index >= 12 || source.length > 20000 || total > 100000 || source.split("\n").length > 300) { + status.textContent = message.limit; + continue; + } + // A unique, disposable container prevents failed renders from leaving SVG + // error elements in the article or contaminating the following diagram. + const scratch = document.createElement("div"); + scratch.style.cssText = "position:absolute;left:-100000px;top:0;width:1000px;visibility:hidden"; + document.body.append(scratch); + try { + const result = await mermaid.render(`sourcebraid-mermaid-${++sequence}`, source, scratch); + preview.append(safeSVG(result.svg)); + preview.hidden = false; + details.open = false; + status.textContent = message.ready; + figure.dataset.mermaidRendered = "true"; + rendered++; + } catch (_) { + status.textContent = message.error; + } finally { + scratch.remove(); + } + } + return rendered; + } + + globalThis.SourceBraidMermaid = { + renderAll(force = false) { + if (running) return running; + running = render(force).finally(() => { running = undefined; }); + return running; + } + }; + initialize(); + media.addEventListener("change", () => { + globalThis.SourceBraidMermaid.renderAll(true).catch(() => {}); + }); +})(); diff --git a/ios/SourceBraid/Resources/Mermaid/vendor-manifest.json b/ios/SourceBraid/Resources/Mermaid/vendor-manifest.json new file mode 100644 index 0000000..d9b9d9a --- /dev/null +++ b/ios/SourceBraid/Resources/Mermaid/vendor-manifest.json @@ -0,0 +1,349 @@ +{ + "package": "@mermaid-js/tiny", + "version": "12.2.0", + "tarball": "https://registry.npmjs.org/@mermaid-js/tiny/-/tiny-12.2.0.tgz", + "integrity": "sha512-9bEE+R974NTh1YJlfc6ztgwhy6+9sE+wAFiFrqvSdtlJHdxGfLytQmHYHNpFKmj94+Z+uMicYrQeGXnTTjILAQ==", + "bundle_sha256": "ea0cdf04eb31907eb20d956a34fe300095365c876887b54ffa29f1f847f56d00", + "dependencies_for_notices": [ + { + "name": "@antfu/install-pkg", + "version": "2.1.0", + "license": "MIT" + }, + { + "name": "@braintree/sanitize-url", + "version": "7.1.2", + "license": "MIT" + }, + { + "name": "@chevrotain/cst-dts-gen", + "version": "13.2.0", + "license": "Apache-2.0" + }, + { + "name": "@chevrotain/gast", + "version": "13.2.0", + "license": "Apache-2.0" + }, + { + "name": "@chevrotain/regexp-to-ast", + "version": "13.2.0", + "license": "Apache-2.0" + }, + { + "name": "@chevrotain/types", + "version": "13.2.0", + "license": "Apache-2.0" + }, + { + "name": "@chevrotain/utils", + "version": "13.2.0", + "license": "Apache-2.0" + }, + { + "name": "@iconify/types", + "version": "2.0.0", + "license": "MIT" + }, + { + "name": "@iconify/utils", + "version": "3.1.7", + "license": "MIT" + }, + { + "name": "@mermaid-js/parser", + "version": "2.0.1", + "license": "MIT" + }, + { + "name": "@upsetjs/venn.js", + "version": "2.0.0", + "license": "MIT" + }, + { + "name": "chevrotain", + "version": "13.2.0", + "license": "Apache-2.0" + }, + { + "name": "d3", + "version": "7.9.0", + "license": "ISC" + }, + { + "name": "d3-array", + "version": "3.2.4", + "license": "ISC" + }, + { + "name": "d3-axis", + "version": "3.0.0", + "license": "ISC" + }, + { + "name": "d3-brush", + "version": "3.0.0", + "license": "ISC" + }, + { + "name": "d3-chord", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-color", + "version": "3.1.0", + "license": "ISC" + }, + { + "name": "d3-contour", + "version": "4.0.2", + "license": "ISC" + }, + { + "name": "d3-delaunay", + "version": "6.0.4", + "license": "ISC" + }, + { + "name": "d3-dispatch", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-drag", + "version": "3.0.0", + "license": "ISC" + }, + { + "name": "d3-dsv", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-ease", + "version": "3.0.1", + "license": "BSD-3-Clause" + }, + { + "name": "d3-fetch", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-force", + "version": "3.0.0", + "license": "ISC" + }, + { + "name": "d3-format", + "version": "3.1.2", + "license": "ISC" + }, + { + "name": "d3-geo", + "version": "3.1.1", + "license": "ISC" + }, + { + "name": "d3-hierarchy", + "version": "3.1.2", + "license": "ISC" + }, + { + "name": "d3-interpolate", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-path", + "version": "3.1.0", + "license": "ISC" + }, + { + "name": "d3-polygon", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-quadtree", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-random", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-sankey", + "version": "0.12.3", + "license": "BSD-3-Clause" + }, + { + "name": "d3-scale", + "version": "4.0.2", + "license": "ISC" + }, + { + "name": "d3-scale-chromatic", + "version": "3.1.0", + "license": "ISC" + }, + { + "name": "d3-selection", + "version": "3.0.0", + "license": "ISC" + }, + { + "name": "d3-shape", + "version": "3.2.0", + "license": "ISC" + }, + { + "name": "d3-time", + "version": "3.1.0", + "license": "ISC" + }, + { + "name": "d3-time-format", + "version": "4.1.0", + "license": "ISC" + }, + { + "name": "d3-timer", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-transition", + "version": "3.0.1", + "license": "ISC" + }, + { + "name": "d3-zoom", + "version": "3.0.0", + "license": "ISC" + }, + { + "name": "dagre-d3-es", + "version": "7.0.14", + "license": "MIT" + }, + { + "name": "dayjs", + "version": "1.11.23", + "license": "MIT" + }, + { + "name": "delaunator", + "version": "5.1.0", + "license": "ISC" + }, + { + "name": "dompurify", + "version": "3.4.17", + "license": "(MPL-2.0 OR Apache-2.0)" + }, + { + "name": "es-toolkit", + "version": "1.52.0", + "license": "MIT" + }, + { + "name": "hachure-fill", + "version": "0.5.2", + "license": "MIT" + }, + { + "name": "iconv-lite", + "version": "0.6.3", + "license": "MIT" + }, + { + "name": "import-meta-resolve", + "version": "4.2.0", + "license": "MIT" + }, + { + "name": "internmap", + "version": "2.0.3", + "license": "ISC" + }, + { + "name": "khroma", + "version": "2.1.0", + "license": "MIT (see retained LICENSE file)" + }, + { + "name": "lodash-es", + "version": "4.18.1", + "license": "MIT" + }, + { + "name": "marked", + "version": "16.4.2", + "license": "MIT" + }, + { + "name": "package-manager-detector", + "version": "1.9.0", + "license": "MIT" + }, + { + "name": "path-data-parser", + "version": "0.1.0", + "license": "MIT" + }, + { + "name": "points-on-curve", + "version": "0.2.0", + "license": "MIT" + }, + { + "name": "points-on-path", + "version": "0.2.1", + "license": "MIT" + }, + { + "name": "robust-predicates", + "version": "3.0.3", + "license": "Unlicense" + }, + { + "name": "roughjs", + "version": "4.6.6", + "license": "MIT" + }, + { + "name": "rw", + "version": "1.3.3", + "license": "BSD-3-Clause" + }, + { + "name": "safer-buffer", + "version": "2.1.2", + "license": "MIT" + }, + { + "name": "stylis", + "version": "4.4.0", + "license": "MIT" + }, + { + "name": "tinyexec", + "version": "1.3.1", + "license": "MIT" + }, + { + "name": "ts-dedent", + "version": "2.3.0", + "license": "MIT" + }, + { + "name": "uuid", + "version": "14.0.3", + "license": "MIT" + } + ] +} diff --git a/ios/SourceBraid/Resources/ThirdPartyNotices.txt b/ios/SourceBraid/Resources/ThirdPartyNotices.txt index fe61ee3..89443e1 100644 --- a/ios/SourceBraid/Resources/ThirdPartyNotices.txt +++ b/ios/SourceBraid/Resources/ThirdPartyNotices.txt @@ -437,3 +437,3452 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +SourceBraid offline Mermaid renderer — third-party notices + +Mermaid Tiny 12.2.0 +https://github.com/mermaid-js/mermaid + +The MIT License (MIT) + +Copyright (c) 2014 - 2022 Knut Sveidqvist + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +The official tiny distribution excludes ELK, Cytoscape mindmaps, architecture, +and KaTeX. Additional permissive runtime dependency notices are retained below. +DOMPurify is used under its Apache-2.0 licensing option. These notices do not +relicense SourceBraid or the captured user content. + +------------------------------------------------------------------------------- +@antfu/install-pkg 2.1.0 + +LICENSE +MIT License + +Copyright (c) 2021 Anthony Fu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +@braintree/sanitize-url 7.1.2 + +LICENSE +MIT License + +Copyright (c) 2017 Braintree + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +@chevrotain/cst-dts-gen 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/gast 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/regexp-to-ast 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/types 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@chevrotain/utils 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +@iconify/types 2.0.0 + +license.txt +MIT License + +Copyright (c) 2021 - 2022 Vjacheslav Trushkin / Iconify OÜ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------- +@iconify/utils 3.1.7 + +license.txt +MIT License + +Copyright (c) 2021-PRESENT Vjacheslav Trushkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------- +@mermaid-js/parser 2.0.1 + +LICENSE +The MIT License (MIT) + +Copyright (c) 2023 Yokozuna59 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +@upsetjs/venn.js 2.0.0 + +LICENSE +MIT License + +Copyright (c) 2013 Ben Frederickson +Copyright (c) 2021 Samuel Gratzl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +chevrotain 13.2.0 + +LICENSE.txt + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------------------------------------------------------------------- +d3 7.9.0 + +LICENSE +Copyright 2010-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-array 3.2.4 + +LICENSE +Copyright 2010-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-axis 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-brush 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-chord 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-color 3.1.0 + +LICENSE +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-contour 4.0.2 + +LICENSE +Copyright 2012-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-delaunay 6.0.4 + +LICENSE +Copyright 2018-2021 Observable, Inc. +Copyright 2021 Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-dispatch 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-drag 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-dsv 3.0.1 + +LICENSE +Copyright 2013-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-ease 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock +Copyright 2001 Robert Penner +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- +d3-fetch 3.0.1 + +LICENSE +Copyright 2016-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-force 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-format 3.1.2 + +LICENSE +Copyright 2010-2026 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-geo 3.1.1 + +LICENSE +Copyright 2010-2024 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +This license applies to GeographicLib, versions 1.12 and later. + +Copyright 2008-2012 Charles Karney + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +d3-hierarchy 3.1.2 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-interpolate 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-path 3.1.0 + +LICENSE +Copyright 2015-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-polygon 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-quadtree 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-random 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-sankey 0.12.3 + +LICENSE +Copyright 2015, Mike Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- +d3-scale 4.0.2 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-scale-chromatic 3.1.0 + +LICENSE +Copyright 2010-2024 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +Apache-Style Software License for ColorBrewer software and ColorBrewer Color Schemes + +Copyright 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State University + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + + +------------------------------------------------------------------------------- +d3-selection 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-shape 3.2.0 + +LICENSE +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-time 3.1.0 + +LICENSE +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-time-format 4.1.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-timer 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-transition 3.0.1 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +d3-zoom 3.0.0 + +LICENSE +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +dagre-d3-es 7.0.14 + +LICENSE.md +Original dagre-d3 copyright: Copyright (c) 2013 Chris Pettitt +Original dagre copyright: Copyright (c) 2012-2014 Chris Pettitt +Original graphlib copyright: Copyright (c) 2012-2014 Chris Pettitt + +Copyright (c) 2022-2024 Thibaut Lassalle, David Newell, Alois Klink, Sidharth Vinod and dagre-es contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +------------------------------------------------------------------------------- +dayjs 1.11.23 + +LICENSE +MIT License + +Copyright (c) 2018-present, iamkun + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +delaunator 5.1.0 + +LICENSE +ISC License + +Copyright (c) 2026, Mapbox + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +dompurify 3.4.17 + +LICENSE + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +LICENSE-MPL +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + + +------------------------------------------------------------------------------- +es-toolkit 1.52.0 + +LICENSE +MIT License + +Copyright (c) 2024 Viva Republica, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +NOTICE +es-toolkit + +Parts of the test suite and compatibility layer in es-toolkit/compat are +derived from Lodash (https://github.com/lodash/lodash). + +Lodash copyright notice and MIT permission notice: + +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +hachure-fill 0.5.2 + +LICENSE +MIT License + +Copyright (c) 2023 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +iconv-lite 0.6.3 + +LICENSE +Copyright (c) 2011 Alexander Shtuchkin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +------------------------------------------------------------------------------- +import-meta-resolve 4.2.0 + +license +(The MIT License) + +Copyright (c) Titus Wormer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +This is a derivative work based on: +. +Which is licensed: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + + +------------------------------------------------------------------------------- +internmap 2.0.3 + +LICENSE +Copyright 2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + + +------------------------------------------------------------------------------- +khroma 2.1.0 + +license +The MIT License (MIT) + +Copyright (c) 2019-present Fabio Spampinato, Andrew Maney + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +lodash-es 4.18.1 + +LICENSE +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + + +------------------------------------------------------------------------------- +marked 16.4.2 + +LICENSE.md +# License information + +## Contribution License Agreement + +If you contribute code to this project, you are implicitly allowing your code +to be distributed under the MIT license. You are also implicitly verifying that +all code is your original work. `` + +## Marked + +Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/) +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## Markdown + +Copyright © 2004, John Gruber +http://daringfireball.net/ +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. + + +------------------------------------------------------------------------------- +package-manager-detector 1.9.0 + +LICENSE +MIT License + +Copyright (c) 2020-PRESENT Anthony Fu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +path-data-parser 0.1.0 + +LICENSE +MIT License + +Copyright (c) 2020 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +points-on-curve 0.2.0 + +LICENSE +MIT License + +Copyright (c) 2020 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +points-on-path 0.2.1 + +LICENSE +MIT License + +Copyright (c) 2020 Preet + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +robust-predicates 3.0.3 + +LICENSE +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + + +------------------------------------------------------------------------------- +roughjs 4.6.6 + +LICENSE +MIT License + +Copyright (c) 2019 Preet Shihn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +rw 1.3.3 + +LICENSE +Copyright (c) 2014-2016, Michael Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* The name Michael Bostock may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- +safer-buffer 2.1.2 + +LICENSE +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +stylis 4.4.0 + +LICENSE +MIT License + +Copyright (c) 2016-present Sultan Tarimo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +tinyexec 1.3.1 + +LICENSE +MIT License + +Copyright (c) 2024 Tinylibs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +ts-dedent 2.3.0 + +LICENSE +MIT License + +Copyright (c) 2018 Tamino Martinius + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------------------- +uuid 14.0.3 + +LICENSE.md +The MIT License (MIT) + +Copyright (c) 2010-2020 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ios/SourceBraidTests/ArchiveChatTests.swift b/ios/SourceBraidTests/ArchiveChatTests.swift index c122681..ee1f943 100644 --- a/ios/SourceBraidTests/ArchiveChatTests.swift +++ b/ios/SourceBraidTests/ArchiveChatTests.swift @@ -86,7 +86,7 @@ final class ArchiveChatTests: XCTestCase { chat.draft = "Summary"; chat.send(library: library) XCTAssertTrue(chat.messages.isEmpty) XCTAssertFalse(chat.isWorking) - XCTAssertFalse(state.message.isEmpty) + XCTAssertEqual(chat.draft, "Summary", "An unavailable model must not consume a question") } let chat = ArchiveChat(service: model, availability: { .ready }) chat.draft = String(repeating: "x", count: 1201); chat.send(library: library) @@ -94,6 +94,75 @@ final class ArchiveChatTests: XCTestCase { XCTAssertTrue(model.received.isEmpty) } + func testAvailabilityRefreshKeepsConversationAndDraftThroughRecovery() async throws { + let library = try await library(), model = FakeArchiveAnswering() + var availability = IntelligenceState.ready + let chat = ArchiveChat(service: model, availability: { availability }) + chat.draft = "Summary"; chat.send(library: library); await chat.waitForAnswer() + let messageIDs = chat.messages.map(\.id) + XCTAssertEqual(messageIDs.count, 2) + // The preserved archive-scope question must match the synthetic corpus, + // otherwise retrieval correctly stops before the answering service. + let followUp = "Markdown scrolling" + chat.draft = followUp + chat.wholeArchive = true + + for state in [IntelligenceState.disabled, .modelNotReady, .unsupportedLanguage, .ready] { + availability = state + chat.checkAvailability() + XCTAssertEqual(chat.state, state) + XCTAssertEqual(chat.messages.map(\.id), messageIDs) + XCTAssertEqual(chat.draft, followUp) + XCTAssertTrue(chat.wholeArchive) + XCTAssertFalse(chat.isWorking) + } + XCTAssertEqual(model.received.count, 1, "A readiness check must not make a model request") + chat.send(library: library); await chat.waitForAnswer() + XCTAssertEqual(model.received.count, 2) + XCTAssertFalse(chat.messages.last?.incomplete ?? true) + } + + func testSendRefreshesReadinessBeforeConsumingDraft() async throws { + let library = try await library(), model = FakeArchiveAnswering() + var availability = IntelligenceState.ready + let chat = ArchiveChat(service: model, availability: { availability }) + availability = .modelNotReady // The app still displays the earlier ready state. + chat.draft = "Keep this question" + chat.send(library: library) + XCTAssertEqual(chat.state, .modelNotReady) + XCTAssertEqual(chat.draft, "Keep this question") + XCTAssertTrue(chat.messages.isEmpty) + XCTAssertTrue(model.received.isEmpty) + XCTAssertFalse(chat.isWorking) + } + + func testReadinessLostDuringRetrievalPreventsGeneration() async throws { + let library = try await library(), model = FakeArchiveAnswering() + var checks = 0 + let chat = ArchiveChat(service: model, availability: { + checks += 1 + return checks < 3 ? .ready : .modelNotReady + }) + chat.draft = "Preserve my submitted question" + chat.send(library: library); await chat.waitForAnswer() + XCTAssertEqual(chat.state, .modelNotReady) + XCTAssertTrue(model.received.isEmpty) + XCTAssertFalse(chat.isWorking) + XCTAssertEqual(chat.messages.first?.text, "Preserve my submitted question") + XCTAssertTrue(chat.messages.last?.incomplete == true) + XCTAssertTrue(chat.messages.last?.sources.isEmpty == true) + } + + func testDiagnosticActionsDistinguishPreparationFromEligibilityAndLanguage() { + XCTAssertTrue(IntelligenceState.modelNotReady.recoverySteps.contains(.prepareModel)) + XCTAssertTrue(IntelligenceState.modelNotReady.recoverySteps.contains(.matchLanguages)) + XCTAssertFalse(IntelligenceState.disabled.recoverySteps.contains(.prepareModel), "Disabled Intelligence first needs enabling, not a claimed model download") + XCTAssertEqual(IntelligenceState.deviceNotEligible.recoverySteps, [.checkRequirements]) + XCTAssertEqual(IntelligenceState.unsupportedLanguage.recoverySteps, [.matchLanguages]) + XCTAssertEqual(IntelligenceState.unsupportedOS.recoverySteps, [.updateOS]) + XCTAssertTrue(IntelligenceState.ready.recoverySteps.isEmpty) + } + func testStopDiscardsPartialAnswer() async throws { let library = try await library(), model = FakeArchiveAnswering(delay: true) let chat = ArchiveChat(service: model, availability: { .ready }) diff --git a/ios/SourceBraidTests/ArchiveRefreshTests.swift b/ios/SourceBraidTests/ArchiveRefreshTests.swift index 78acd44..c3647fc 100644 --- a/ios/SourceBraidTests/ArchiveRefreshTests.swift +++ b/ios/SourceBraidTests/ArchiveRefreshTests.swift @@ -10,6 +10,10 @@ private actor RefreshFixtureReader: ArchiveReading { private(set) var inventoryWalks = 0 private(set) var inventoryLimits: [Int?] = [] var suspended = false + private var suspendAfterReads: Int? + private var holdCancelledRead = false + private var cancelledReadContinuation: CheckedContinuation? + private(set) var cancelledReadIsHeld = false init(identity: ArchiveIdentity, count: Int) { self.identity = identity @@ -32,13 +36,28 @@ private actor RefreshFixtureReader: ArchiveReading { func read(_ file: ArchiveFile, limit: Int) async throws -> Data { reads.append(file.path) - while suspended { try await Task.sleep(nanoseconds: 10_000_000) } + while suspended || suspendAfterReads.map({ reads.count > $0 }) == true { + do { try await Task.sleep(nanoseconds: 10_000_000) } + catch { + if holdCancelledRead { + cancelledReadIsHeld = true + await withCheckedContinuation { cancelledReadContinuation = $0 } + } + throw error + } + } try Task.checkCancellation() guard let bytes = documents[file.path], bytes.count <= limit else { throw ArchiveError.tooLarge } return bytes } func setSuspended(_ value: Bool) { suspended = value } + func setSuspendAfterReads(_ value: Int?) { suspendAfterReads = value } + func setHoldCancelledRead(_ value: Bool) { holdCancelledRead = value } + func releaseCancelledRead() { + holdCancelledRead = false + cancelledReadContinuation?.resume(); cancelledReadContinuation = nil + } func resetReads() { reads = [] } func currentSnapshot() -> ArchiveSnapshot { inventory } func changeAndDelete() { @@ -81,6 +100,16 @@ private actor FailingBudgetReader: ArchiveReading { } } +private struct DocumentBytesReader: ArchiveReading { + let inventory: ArchiveSnapshot + let bytes: Data + func snapshot() async throws -> ArchiveSnapshot { inventory } + func read(_ file: ArchiveFile, limit: Int) async throws -> Data { + guard bytes.count <= limit else { throw ArchiveError.tooLarge } + return bytes + } +} + @MainActor final class ArchiveRefreshTests: XCTestCase { private var temporary: URL! @@ -96,14 +125,59 @@ final class ArchiveRefreshTests: XCTestCase { return (reader, cache, ArchiveLibrary(reader: reader, cache: cache, identity: identity)) } - private func waitForRead(_ reader: RefreshFixtureReader) async throws { + private func waitForRead(_ reader: RefreshFixtureReader, count: Int = 1) async throws { for _ in 0..<100 { - if await !reader.reads.isEmpty { return } + if await reader.reads.count >= count { return } try await Task.sleep(nanoseconds: 10_000_000) } XCTFail("The synthetic body request did not start") } + private func documentFixture(bytes: Data, cached: Bool) async throws -> (ArchiveLibrary, ArchiveClip, ArchiveSnapshot) { + let identity = try ArchiveIdentity(configuration: .init(owner: "synthetic", repository: "encoding-\(UUID().uuidString)", branch: "main", rootFolder: "clips")) + let sha = Insecure.SHA1.hash(data: Data("blob \(bytes.count)\0".utf8) + bytes).map { String(format: "%02x", $0) }.joined() + let file = ArchiveFile(path: "clips/synthetic-encoding.md", sha: sha, size: bytes.count) + let inventory = ArchiveSnapshot(identity: identity, commit: String(repeating: "a", count: 40), files: [file], checkedAt: Date()) + let clip = ClipMetadataReader.read("", file: file) + let cache = ArchiveCache(identity: identity, base: temporary) + try await cache.begin(inventory); try await cache.addMetadata(clip) + if cached { try await cache.store(bytes, sha: sha) } + let library = ArchiveLibrary(reader: DocumentBytesReader(inventory: inventory, bytes: bytes), cache: cache, identity: identity) + await library.configure(bootstrapIfEmpty: false) + library.select(clip.path) + return (library, clip, inventory) + } + + func testInvalidUTF8DocumentAndCitationProduceVisibleErrorRatherThanCancellation() async throws { + for cached in [false, true] { + let (library, clip, inventory) = try await documentFixture(bytes: Data([0x23, 0x20, 0xC3, 0x28]), cached: cached) + do { _ = try await library.document(clip); XCTFail("Invalid UTF-8 must not leave a reader silently loading") } + catch { XCTAssertEqual(error as? ArchiveError, .invalidEncoding, "Cached and network bytes need the same visible encoding error") } + XCTAssertEqual(library.selectedPath, clip.path) + XCTAssertNotNil(inventory.githubURL(for: clip.path), "The invalid file remains available through GitHub fallback") + let source = SourceExcerpt(id: "S1", path: clip.path, sha: clip.sha, title: clip.title, line: 1, text: "Synthetic encoding fixture") + do { try await library.openCitation(source, snapshot: inventory); XCTFail("Invalid citation bytes must report their encoding") } + catch { XCTAssertEqual(error as? ArchiveError, .invalidEncoding) } + XCTAssertNil(library.pinnedClip, "An invalid citation must not become the current pinned document") + } + } + + func testActualCancellationOfCachedDocumentAndCitationRemainsCancellation() async throws { + let (library, clip, inventory) = try await documentFixture(bytes: Data("# Valid synthetic UTF-8\n".utf8), cached: true) + let document = Task { try await library.document(clip) } + document.cancel() + do { _ = try await document.value; XCTFail("A cancelled read must not finish") } + catch { XCTAssertTrue(error is CancellationError) } + let source = SourceExcerpt(id: "S1", path: clip.path, sha: clip.sha, title: clip.title, line: 1, text: "Synthetic cancellation fixture") + let citation = Task { try await library.openCitation(source, snapshot: inventory) } + citation.cancel() + do { try await citation.value; XCTFail("A cancelled citation must not become pinned") } + catch { XCTAssertTrue(error is CancellationError) } + XCTAssertNil(library.pinnedClip) + let (_, raw) = try await library.document(clip) + XCTAssertEqual(raw, "# Valid synthetic UTF-8\n", "A cancelled request must not poison a later valid read") + } + func testColdLaunchSeedsAtMostSevenAndForegroundDoesNotRepeatDownload() async throws { let (reader, _, library) = try fixture(count: 31) await library.configure(); await library.waitForSync() @@ -137,6 +211,56 @@ final class ArchiveRefreshTests: XCTestCase { XCTAssertEqual(restored.recent.map(\.path), original.recent.map(\.path)) } + func testInterruptedFirstLaunchKeepsCommittedClipAndResumesOnlyMissingSeedSlots() async throws { + let (reader, _, original) = try fixture(count: 31) + await reader.setSuspendAfterReads(1) + await original.configure() + try await waitForRead(reader, count: 2) + original.stopSync(); await original.waitForSync() + XCTAssertEqual(original.lastRefreshReport?.state, .cancelled) + XCTAssertEqual(original.clips.count, 1, "A stopped refresh must expose its atomically committed progress") + XCTAssertEqual(original.indexedCount, 1) + XCTAssertEqual(original.inventoryClipCount, 31) + + await reader.setSuspendAfterReads(nil); await reader.resetReads() + let restoredCache = ArchiveCache(identity: reader.identity, base: temporary) + let restored = ArchiveLibrary(reader: reader, cache: restoredCache, identity: reader.identity) + await restored.configure(); await restored.waitForSync() + let resumedReads = await reader.reads + XCTAssertEqual(resumedReads.count, 6, "An interrupted one-clip seed must fill six slots, without an automatic full download") + XCTAssertEqual(restored.clips.count, 7) + XCTAssertEqual(restored.indexedCount, 7) + XCTAssertEqual(restored.lastRefreshReport?.remaining, 24) + XCTAssertFalse(restored.metadataComplete) + XCTAssertEqual(Set(resumedReads).count, 6) + XCTAssertFalse(resumedReads.contains(original.clips[0].path), "The committed first body must be reused") + + await reader.resetReads() + await restored.configure(); await restored.waitForSync() + let foregroundReads = await reader.reads + XCTAssertTrue(foregroundReads.isEmpty, "A completed seed restores without further foreground downloads") + + restored.synchronize(); await restored.waitForSync() + let explicitReads = await reader.reads + XCTAssertEqual(explicitReads.count, 24) + XCTAssertEqual(restored.clips.count, 31) + XCTAssertEqual(restored.indexedCount, 31) + XCTAssertTrue(restored.metadataComplete) + XCTAssertEqual(restored.lastRefreshReport?.remaining, 0) + } + + func testInventorySavedBeforeAnyBodyStillResumesBootstrap() async throws { + let (reader, cache, library) = try fixture(count: 10) + let inventory = await reader.currentSnapshot() + try await cache.begin(inventory) + await library.configure(); await library.waitForSync() + let reads = await reader.reads + XCTAssertEqual(reads.count, 7) + XCTAssertEqual(library.clips.count, 7) + XCTAssertEqual(library.lastRefreshReport?.remaining, 3) + XCTAssertFalse(library.metadataComplete) + } + func testUnchangedCommitSkipsTreesBodiesAndPreservesIndex() async throws { let (reader, _, library) = try fixture(count: 8) library.synchronize(); await library.waitForSync() @@ -228,6 +352,7 @@ final class ArchiveRefreshTests: XCTestCase { try await waitForRead(reader) await foreground.removeLocalData(broadcast: false) let report = await task.value + XCTAssertFalse(FileManager.default.fileExists(atPath: cache.directory.path), "Cancellation recovery must not recreate the deleted cache directory") let manifest = try await cache.load(), count = try await foreground.searchIndex?.count() XCTAssertEqual(report.state, .cancelled) XCTAssertNil(manifest.snapshot) @@ -235,6 +360,34 @@ final class ArchiveRefreshTests: XCTestCase { XCTAssertEqual(count, 0) } + func testLocalRemovalWaitsForCancelledReadCleanupAndDoesNotRecreateCache() async throws { + let (reader, cache, foreground) = try fixture(count: 8) + let background = ArchiveLibrary(reader: reader, cache: cache, identity: reader.identity) + await foreground.configure(bootstrapIfEmpty: false) + await background.configure(bootstrapIfEmpty: false) + await reader.setSuspended(true); await reader.setHoldCancelledRead(true) + let refresh = Task { await background.refreshInBackground() } + try await waitForRead(reader) + let removal = Task { await foreground.removeLocalData(broadcast: false) } + for _ in 0..<100 { + if await reader.cancelledReadIsHeld { break } + try await Task.sleep(nanoseconds: 10_000_000) + } + let cancellationHeld = await reader.cancelledReadIsHeld + XCTAssertTrue(cancellationHeld, "The synthetic reader must hold cancellation cleanup until explicitly released") + XCTAssertTrue(FileManager.default.fileExists(atPath: cache.directory.appendingPathComponent("catalog.json").path), + "Removal must wait for the tracked reader cleanup before deleting the catalog") + await reader.releaseCancelledRead() + await removal.value + let report = await refresh.value + XCTAssertEqual(report.state, .cancelled) + XCTAssertFalse(FileManager.default.fileExists(atPath: cache.directory.path), "No late recovery read may recreate a removed cache") + let manifest = try await cache.load() + XCTAssertNil(manifest.snapshot) + XCTAssertTrue(manifest.clips.isEmpty) + XCTAssertTrue(foreground.clips.isEmpty) + } + func testConfigurationInvalidationCancelsWriterAndNoOldResultIsApplied() async throws { let (reader, _, library) = try fixture(count: 8) await library.configure(bootstrapIfEmpty: false) diff --git a/ios/SourceBraidTests/ArchiveTests.swift b/ios/SourceBraidTests/ArchiveTests.swift index b13b0fb..cafb1c6 100644 --- a/ios/SourceBraidTests/ArchiveTests.swift +++ b/ios/SourceBraidTests/ArchiveTests.swift @@ -92,6 +92,37 @@ final class ArchiveTests: XCTestCase { XCTAssertTrue(html.contains("script-src 'none'")) } + func testMermaidFencesKeepSourceAndNeverInsertExecutableContent() { + let body = """ + ~~~MeRmAiD extra info + flowchart LR + A[\"\"] --> B + ~~~ + + ```swift + mermaid is just code here + ``` + """ + let html = MarkdownRenderer.document(clip("title: Diagram", body: body), root: "clips") + XCTAssertEqual(html.components(separatedBy: "data-mermaid").count - 1, 1) + XCTAssertTrue(html.contains("id='source-L1'")) + XCTAssertTrue(html.contains("</code><script>")) + XCTAssertTrue(html.contains("

    "), "Original source remains available if rendering fails") + XCTAssertFalse(html.contains("